cregit-Linux how code gets into the kernel

Release 4.14 arch/ia64/include/asm/syscall.h

/*
 * Access to user system call parameters and results
 *
 * Copyright (C) 2008 Intel Corp.  Shaohua Li <shaohua.li@intel.com>
 *
 * This copyrighted material is made available to anyone wishing to use,
 * modify, copy, or redistribute it subject to the terms and conditions
 * of the GNU General Public License v.2.
 *
 * See asm-generic/syscall.h for descriptions of what we must do here.
 */

#ifndef _ASM_SYSCALL_H

#define _ASM_SYSCALL_H	1

#include <uapi/linux/audit.h>
#include <linux/sched.h>
#include <linux/err.h>


static inline long syscall_get_nr(struct task_struct *task, struct pt_regs *regs) { if ((long)regs->cr_ifs < 0) /* Not a syscall */ return -1; return regs->r15; }

Contributors

PersonTokensPropCommitsCommitProp
David Shaohua Li38100.00%1100.00%
Total38100.00%1100.00%


static inline void syscall_rollback(struct task_struct *task, struct pt_regs *regs) { /* do nothing */ }

Contributors

PersonTokensPropCommitsCommitProp
David Shaohua Li18100.00%1100.00%
Total18100.00%1100.00%


static inline long syscall_get_error(struct task_struct *task, struct pt_regs *regs) { return regs->r10 == -1 ? regs->r8:0; }

Contributors

PersonTokensPropCommitsCommitProp
David Shaohua Li31100.00%1100.00%
Total31100.00%1100.00%


static inline long syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) { return regs->r8; }

Contributors

PersonTokensPropCommitsCommitProp
David Shaohua Li22100.00%1100.00%
Total22100.00%1100.00%


static inline void syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, int error, long val) { if (error) { /* error < 0, but ia64 uses > 0 return value */ regs->r8 = -error; regs->r10 = -1; } else { regs->r8 = val; regs->r10 = 0; } }

Contributors

PersonTokensPropCommitsCommitProp
David Shaohua Li59100.00%1100.00%
Total59100.00%1100.00%

extern void ia64_syscall_get_set_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, unsigned long *args, int rw);
static inline void syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, unsigned long *args) { BUG_ON(i + n > 6); ia64_syscall_get_set_arguments(task, regs, i, n, args, 0); }

Contributors

PersonTokensPropCommitsCommitProp
David Shaohua Li54100.00%2100.00%
Total54100.00%2100.00%


static inline void syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, unsigned long *args) { BUG_ON(i + n > 6); ia64_syscall_get_set_arguments(task, regs, i, n, args, 1); }

Contributors

PersonTokensPropCommitsCommitProp
David Shaohua Li54100.00%2100.00%
Total54100.00%2100.00%


static inline int syscall_get_arch(void) { return AUDIT_ARCH_IA64; }

Contributors

PersonTokensPropCommitsCommitProp
Eric Paris12100.00%1100.00%
Total12100.00%1100.00%

#endif /* _ASM_SYSCALL_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
David Shaohua Li32495.58%266.67%
Eric Paris154.42%133.33%
Total339100.00%3100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.