There will be compilation error in building utrace-patched kernel.
It's environment is x86/2.6.26/gcc 3.4.6.
[linux-2.6.26]# make
CHK include/linux/version.h
CHK include/linux/utsrelease.h
CALL scripts/checksyscalls.sh
CHK include/linux/compile.h
CC lib/syscall.o
lib/syscall.c: In function `collect_syscall':
include/asm/syscall.h:72: sorry, unimplemented: inlining failed in call
to 'syscall_get_arguments': function not inlinable
lib/syscall.c:19: sorry, unimplemented: called from here
make[1]: *** [lib/syscall.o] Error 1
make: *** [lib] Error 2
Seems the syscall_get_arguments is not well defined. After I made a
little change, it passed. I browse the code and it seems this maybe
happen in other architectures.
Proposed patch is:
---
include/asm-powerpc/syscall.h | 4 ++--
include/asm-sparc/syscall.h | 4 ++--
include/asm-x86/syscall.h | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/include/asm-powerpc/syscall.h b/include/asm-powerpc/syscall.h
index 57e7882..3ced23a 100644
--- a/include/asm-powerpc/syscall.h
+++ b/include/asm-powerpc/syscall.h
@@ -55,7 +55,7 @@ static inline void syscall_set_return_value(struct
task_struct *task,
static inline void syscall_get_arguments(struct task_struct *task,
struct pt_regs *regs,
unsigned int i, unsigned int n,
- unsigned long args[n])
+ unsigned long *args)
{
BUG_ON(i + n > 6);
#ifdef CONFIG_PPC64
@@ -75,7 +75,7 @@ static inline void syscall_get_arguments(struct
task_struct *task,
static inline void syscall_set_arguments(struct task_struct *task,
struct pt_regs *regs,
unsigned int i, unsigned int n,
- const unsigned long args[n])
+ const unsigned long *args)
{
BUG_ON(i + n > 6);
memcpy(®s->gpr[3 + i], args, n * sizeof(args[0]));
diff --git a/include/asm-sparc/syscall.h b/include/asm-sparc/syscall.h
index dfd390f..53bf5b3 100644
--- a/include/asm-sparc/syscall.h
+++ b/include/asm-sparc/syscall.h
@@ -53,7 +53,7 @@ static inline void syscall_set_return_value(struct
task_struct *task,
static inline void syscall_get_arguments(struct task_struct *task,
struct pt_regs *regs,
unsigned int i, unsigned int n,
- unsigned long args[n])
+ unsigned long *args)
{
BUG_ON(i + n > 6);
#ifdef TIF_32BIT
@@ -70,7 +70,7 @@ static inline void syscall_get_arguments(struct
task_struct *task,
static inline void syscall_set_arguments(struct task_struct *task,
struct pt_regs *regs,
unsigned int i, unsigned int n,
- const unsigned long args[n])
+ const unsigned long *args)
{
BUG_ON(i + n > 6);
memcpy(®s->u_regs[UREG_I0 + i], args, n * sizeof(args[0]));
diff --git a/include/asm-x86/syscall.h b/include/asm-x86/syscall.h
index 7de35f0..6f29389 100644
--- a/include/asm-x86/syscall.h
+++ b/include/asm-x86/syscall.h
@@ -68,7 +68,7 @@ static inline void syscall_set_return_value(struct
task_struct *task,
static inline void syscall_get_arguments(struct task_struct *task,
struct pt_regs *regs,
unsigned int i, unsigned int n,
- unsigned long args[n])
+ unsigned long *args)
{
BUG_ON(i + n > 6);
memcpy(args, ®s->bx + i, n * sizeof(args[0]));
@@ -77,7 +77,7 @@ static inline void syscall_get_arguments(struct
task_struct *task,
static inline void syscall_set_arguments(struct task_struct *task,
struct pt_regs *regs,
unsigned int i, unsigned int n,
- const unsigned long args[n])
+ const unsigned long *args)
{
BUG_ON(i + n > 6);
memcpy(®s->bx + i, args, n * sizeof(args[0]));
--
1.5.3