2012-02-29 00:45:58

by Richard Weinberger

[permalink] [raw]
Subject: [PATCH 1/2] OpenRISC: Fix audit_syscall_exit() usage

Commit d7e7528 (Audit: push audit success and retcode into arch ptrace.h)
changed audit_syscall_exit().

Fixes:
CC arch/openrisc/kernel/ptrace.o
arch/openrisc/kernel/ptrace.c: In function ‘do_syscall_trace_leave’:
arch/openrisc/kernel/ptrace.c:206:21: error: macro "audit_syscall_exit" passed 2 arguments, but takes just 1
arch/openrisc/kernel/ptrace.c:205:3: error: ‘audit_syscall_exit’ undeclared (first use in this function)
arch/openrisc/kernel/ptrace.c:205:3: note: each undeclared identifier is reported only once for each function it appears in

Signed-off-by: Richard Weinberger <[email protected]>
---
arch/openrisc/kernel/ptrace.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/arch/openrisc/kernel/ptrace.c b/arch/openrisc/kernel/ptrace.c
index 656b94b..fa381b2 100644
--- a/arch/openrisc/kernel/ptrace.c
+++ b/arch/openrisc/kernel/ptrace.c
@@ -202,8 +202,7 @@ asmlinkage void do_syscall_trace_leave(struct pt_regs *regs)
int step;

if (unlikely(current->audit_context))
- audit_syscall_exit(AUDITSC_RESULT(regs->gpr[11]),
- regs->gpr[11]);
+ audit_syscall_exit(regs);

step = test_thread_flag(TIF_SINGLESTEP);
if (step || test_thread_flag(TIF_SYSCALL_TRACE))
--
1.7.6


2012-02-29 00:45:59

by Richard Weinberger

[permalink] [raw]
Subject: [PATCH 2/2] OpenRISC: IRQ: Include module.h

Fixes:
CC arch/openrisc/kernel/irq.o
arch/openrisc/kernel/irq.c:35:1: warning: data definition has no type or storage class
arch/openrisc/kernel/irq.c:35:1: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL’
arch/openrisc/kernel/irq.c:35:1: warning: parameter names (without types) in function declaration
arch/openrisc/kernel/irq.c:42:1: warning: data definition has no type or storage class
arch/openrisc/kernel/irq.c:42:1: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL’
arch/openrisc/kernel/irq.c:42:1: warning: parameter names (without types) in function declaration
arch/openrisc/kernel/irq.c:173:1: warning: data definition has no type or storage class
arch/openrisc/kernel/irq.c:173:1: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL_GPL’
arch/openrisc/kernel/irq.c:173:1: warning: parameter names (without types) in function declaration

Signed-off-by: Richard Weinberger <[email protected]>
---
arch/openrisc/kernel/irq.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/openrisc/kernel/irq.c b/arch/openrisc/kernel/irq.c
index 59b3023..f917925 100644
--- a/arch/openrisc/kernel/irq.c
+++ b/arch/openrisc/kernel/irq.c
@@ -14,6 +14,7 @@
* 2 of the License, or (at your option) any later version.
*/

+#include <linux/module.h>
#include <linux/ptrace.h>
#include <linux/errno.h>
#include <linux/interrupt.h>
--
1.7.6

2012-02-29 07:46:35

by Jonas Bonn

[permalink] [raw]
Subject: Re: [PATCH 1/2] OpenRISC: Fix audit_syscall_exit() usage


Thanks, Richard. There is, however, already a patch in linux-next that
provides this fix.

/Jonas

On Wed, 2012-02-29 at 01:46 +0100, Richard Weinberger wrote:
> Commit d7e7528 (Audit: push audit success and retcode into arch ptrace.h)
> changed audit_syscall_exit().
>
> Fixes:
> CC arch/openrisc/kernel/ptrace.o
> arch/openrisc/kernel/ptrace.c: In function ‘do_syscall_trace_leave’:
> arch/openrisc/kernel/ptrace.c:206:21: error: macro "audit_syscall_exit" passed 2 arguments, but takes just 1
> arch/openrisc/kernel/ptrace.c:205:3: error: ‘audit_syscall_exit’ undeclared (first use in this function)
> arch/openrisc/kernel/ptrace.c:205:3: note: each undeclared identifier is reported only once for each function it appears in
>
> Signed-off-by: Richard Weinberger <[email protected]>
> ---
> arch/openrisc/kernel/ptrace.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/arch/openrisc/kernel/ptrace.c b/arch/openrisc/kernel/ptrace.c
> index 656b94b..fa381b2 100644
> --- a/arch/openrisc/kernel/ptrace.c
> +++ b/arch/openrisc/kernel/ptrace.c
> @@ -202,8 +202,7 @@ asmlinkage void do_syscall_trace_leave(struct pt_regs *regs)
> int step;
>
> if (unlikely(current->audit_context))
> - audit_syscall_exit(AUDITSC_RESULT(regs->gpr[11]),
> - regs->gpr[11]);
> + audit_syscall_exit(regs);
>
> step = test_thread_flag(TIF_SINGLESTEP);
> if (step || test_thread_flag(TIF_SYSCALL_TRACE))

2012-02-29 07:49:12

by Jonas Bonn

[permalink] [raw]
Subject: Re: [PATCH 2/2] OpenRISC: IRQ: Include module.h


Thanks. There is already a patch in linux-next for this.

However, the patch in linux-next pulls in export.h instead of module.h.
I think export.h is the correct header file to be using here, but let me
know if you see it differently.

Thanks for helping out with build-testing the OpenRISC arch... much
appreciated.

/Jonas

On Wed, 2012-02-29 at 01:46 +0100, Richard Weinberger wrote:
> Fixes:
> CC arch/openrisc/kernel/irq.o
> arch/openrisc/kernel/irq.c:35:1: warning: data definition has no type or storage class
> arch/openrisc/kernel/irq.c:35:1: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL’
> arch/openrisc/kernel/irq.c:35:1: warning: parameter names (without types) in function declaration
> arch/openrisc/kernel/irq.c:42:1: warning: data definition has no type or storage class
> arch/openrisc/kernel/irq.c:42:1: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL’
> arch/openrisc/kernel/irq.c:42:1: warning: parameter names (without types) in function declaration
> arch/openrisc/kernel/irq.c:173:1: warning: data definition has no type or storage class
> arch/openrisc/kernel/irq.c:173:1: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL_GPL’
> arch/openrisc/kernel/irq.c:173:1: warning: parameter names (without types) in function declaration
>
> Signed-off-by: Richard Weinberger <[email protected]>
> ---
> arch/openrisc/kernel/irq.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/arch/openrisc/kernel/irq.c b/arch/openrisc/kernel/irq.c
> index 59b3023..f917925 100644
> --- a/arch/openrisc/kernel/irq.c
> +++ b/arch/openrisc/kernel/irq.c
> @@ -14,6 +14,7 @@
> * 2 of the License, or (at your option) any later version.
> */
>
> +#include <linux/module.h>
> #include <linux/ptrace.h>
> #include <linux/errno.h>
> #include <linux/interrupt.h>

2012-02-29 08:34:32

by Richard Weinberger

[permalink] [raw]
Subject: Re: [PATCH 1/2] OpenRISC: Fix audit_syscall_exit() usage

Am 29.02.2012 08:46, schrieb Jonas Bonn:
>
> Thanks, Richard. There is, however, already a patch in linux-next that
> provides this fix.

No problem.
Why is the fix not in Linus' tree?
We are already at 3.3-rc5...

Thanks,
//richard


Attachments:
signature.asc (490.00 B)
OpenPGP digital signature

2012-02-29 08:39:24

by Richard Weinberger

[permalink] [raw]
Subject: Re: [PATCH 2/2] OpenRISC: IRQ: Include module.h

Am 29.02.2012 08:49, schrieb Jonas Bonn:
You are right. export.h is better.
I forgot commit f501693 (module.h: split out the EXPORT_SYMBOL into export.h).

> Thanks for helping out with build-testing the OpenRISC arch... much
> appreciated.

I'm doing more than build-testing.
Yesterday my FPGA board booted the very first time Linux on OpenRISC. :-)

Thanks,
//richard


Attachments:
signature.asc (490.00 B)
OpenPGP digital signature

2012-02-29 08:48:31

by Jonas Bonn

[permalink] [raw]
Subject: Re: [PATCH 1/2] OpenRISC: Fix audit_syscall_exit() usage


On Wed, 2012-02-29 at 09:34 +0100, Richard Weinberger wrote:
> Am 29.02.2012 08:46, schrieb Jonas Bonn:
> >
> > Thanks, Richard. There is, however, already a patch in linux-next that
> > provides this fix.
>
> No problem.
> Why is the fix not in Linus' tree?

I have no good excuse... will send a pull request in short order.

/Jonas

2012-02-29 08:56:16

by Jonas Bonn

[permalink] [raw]
Subject: Re: [PATCH 2/2] OpenRISC: IRQ: Include module.h


On Wed, 2012-02-29 at 09:39 +0100, Richard Weinberger wrote:
> Am 29.02.2012 08:49, schrieb Jonas Bonn:
> You are right. export.h is better.
> I forgot commit f501693 (module.h: split out the EXPORT_SYMBOL into export.h).
>
> > Thanks for helping out with build-testing the OpenRISC arch... much
> > appreciated.
>
> I'm doing more than build-testing.
> Yesterday my FPGA board booted the very first time Linux on OpenRISC. :-)
>
> Thanks,
> //richard
>

Ah, awesome! Glad to hear that.

I'll just let you in on the little catch with the upstream OpenRISC
kernel, then: it drops support for deprecated syscalls; unfortunately,
there is no libc that supports that yet.

For that reason, the kernel at git://openrisc.net/jonas/linux is still
the one that is most usable... it's carrying a patch to reenable those
syscalls so that uClibc works.

I've got a patch series that attempts to fix that, but upstream uClibc
didn't seem particularly enamored by the idea of adding more code to
libc so that Linux can get smaller... and that's kind of where we got
stuck.

Probably best to drop linux-kernel from this conversation at this point,
but feel free to continue it at [email protected]

/Jonas