* CONFIG_GENERIC_SIGALTSTACK with asm-generic/syscalls.h (was Re: [git pull] signal.git pile 2)
@ 2012-12-21 6:24 ` Vineet Gupta
0 siblings, 0 replies; 9+ messages in thread
From: Vineet Gupta @ 2012-12-21 6:24 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Al Viro, Linus Torvalds, linux-kernel, linux-arch
On Friday 21 December 2012 05:51 AM, Al Viro wrote:
> sigaltstack infrastructure + conversion for x86, alpha and um,
> COMPAT_SYSCALL_DEFINE infrastructure. Note that there are several
> conflicts between "unify SS_ONSTACK/SS_DISABLE definitions" and
> UAPI patches in mainline; resolution is trivial - just remove definitions
> of SS_ONSTACK and SS_DISABLED from arch/*/uapi/asm/signal.h; they are
> all identical and include/uapi/linux/signal.h contains the unified
> variant. Please, pull from
> git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal for-linus
>
Hi Arnd,
In Linus' tree with above merged, selecting CONFIG_GENERIC_SIGALTSTACK
is causing build issues for ARC port (and possibly others as well) which
use asm-generic/syscalls.h due to a different prototype for
sys_sigaltstack coming in from linux/syscalls.h
While I can band-aid ARC port by #define sys_sigaltstack before
including asm-generic, it might be better if we conditional-ize one of
the prototypes. Following works for me.
diff --git a/include/asm-generic/syscalls.h b/include/asm-generic/syscalls.h
index 58f466f..1db51b8 100644
--- a/include/asm-generic/syscalls.h
+++ b/include/asm-generic/syscalls.h
@@ -21,10 +21,12 @@ asmlinkage long sys_mmap(unsigned long addr, unsigned long len,
unsigned long fd, off_t pgoff);
#endif
+#ifndef CONFIG_GENERIC_SIGALTSTACK
#ifndef sys_sigaltstack
asmlinkage long sys_sigaltstack(const stack_t __user *, stack_t __user *,
struct pt_regs *);
#endif
+#endif
#ifndef sys_rt_sigreturn
asmlinkage long sys_rt_sigreturn(struct pt_regs *regs);
Thx,
-Vineet
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: CONFIG_GENERIC_SIGALTSTACK with asm-generic/syscalls.h (was Re: [git pull] signal.git pile 2)
2012-12-21 6:24 ` Vineet Gupta
(?)
@ 2012-12-21 7:15 ` Al Viro
-1 siblings, 0 replies; 9+ messages in thread
From: Al Viro @ 2012-12-21 7:15 UTC (permalink / raw)
To: Vineet Gupta; +Cc: Arnd Bergmann, Linus Torvalds, linux-kernel, linux-arch
On Fri, Dec 21, 2012 at 11:54:08AM +0530, Vineet Gupta wrote:
> On Friday 21 December 2012 05:51 AM, Al Viro wrote:
> > sigaltstack infrastructure + conversion for x86, alpha and um,
> > COMPAT_SYSCALL_DEFINE infrastructure. Note that there are several
> > conflicts between "unify SS_ONSTACK/SS_DISABLE definitions" and
> > UAPI patches in mainline; resolution is trivial - just remove definitions
> > of SS_ONSTACK and SS_DISABLED from arch/*/uapi/asm/signal.h; they are
> > all identical and include/uapi/linux/signal.h contains the unified
> > variant. Please, pull from
> > git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal for-linus
> >
>
> Hi Arnd,
>
> In Linus' tree with above merged, selecting CONFIG_GENERIC_SIGALTSTACK
> is causing build issues for ARC port (and possibly others as well) which
> use asm-generic/syscalls.h due to a different prototype for
> sys_sigaltstack coming in from linux/syscalls.h
>
> While I can band-aid ARC port by #define sys_sigaltstack before
> including asm-generic, it might be better if we conditional-ize one of
> the prototypes. Following works for me.
TBH, the plan was to use such band-aids until all ports using
asm-generic/syscalls.h switch to generic and we drop the damn prototype
from there. But yes, what you are suggesting would also do.
As for asm-generic/syscalls.h, it should simply die out. Look:
sys_sigaltstack() eventually goes to linux/syscalls.h, where it ought
to be anyway. sys_rt_sigreturn() should be there as well - and it should
be long (void); current_pt_regs() is there for purpose...
sys_rt_sigsuspend() and and should go into linux/syscalls.h too - the
only obstacle is mips and it can simply drop its private implementation
and use the generic one. Et cetera...
I hope to kill it completely in the next cycle, along with quite
a few things in arch/*/include/asm/syscalls.h. FWIW, the plan for this
cycle signal.git is to put a bunch of generic variants of syscalls into
kernel/signal.c (we have a lot of pointless code duplication, mostly
in compat ones) and start a bunch of no-rebase arch-$ARCH branches at
that point, as it had been done for kernel_thread series - i.e. safely
mergable into architecture git trees and going to Linus either that way
or through signal.git, preferably the former. sigaltstack(2) definitely
should get unified by the end of that, and I hope to get several kilolines
of code killed in compat stuff.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: CONFIG_GENERIC_SIGALTSTACK with asm-generic/syscalls.h (was Re: [git pull] signal.git pile 2)
2012-12-21 6:24 ` Vineet Gupta
@ 2012-12-21 11:52 ` James Hogan
-1 siblings, 0 replies; 9+ messages in thread
From: James Hogan @ 2012-12-21 11:52 UTC (permalink / raw)
To: Vineet Gupta, Al Viro
Cc: Arnd Bergmann, Linus Torvalds, linux-kernel, linux-arch
On 21/12/12 06:24, Vineet Gupta wrote:
> On Friday 21 December 2012 05:51 AM, Al Viro wrote:
>> sigaltstack infrastructure + conversion for x86, alpha and um,
>> COMPAT_SYSCALL_DEFINE infrastructure. Note that there are several
>> conflicts between "unify SS_ONSTACK/SS_DISABLE definitions" and
>> UAPI patches in mainline; resolution is trivial - just remove definitions
>> of SS_ONSTACK and SS_DISABLED from arch/*/uapi/asm/signal.h; they are
>> all identical and include/uapi/linux/signal.h contains the unified
>> variant. Please, pull from
>> git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal for-linus
>>
>
> Hi Arnd,
>
> In Linus' tree with above merged, selecting CONFIG_GENERIC_SIGALTSTACK
> is causing build issues for ARC port (and possibly others as well) which
> use asm-generic/syscalls.h due to a different prototype for
> sys_sigaltstack coming in from linux/syscalls.h
>
> While I can band-aid ARC port by #define sys_sigaltstack before
> including asm-generic, it might be better if we conditional-ize one of
> the prototypes. Following works for me.
>
> diff --git a/include/asm-generic/syscalls.h b/include/asm-generic/syscalls.h
> index 58f466f..1db51b8 100644
> --- a/include/asm-generic/syscalls.h
> +++ b/include/asm-generic/syscalls.h
> @@ -21,10 +21,12 @@ asmlinkage long sys_mmap(unsigned long addr, unsigned long len,
> unsigned long fd, off_t pgoff);
> #endif
>
> +#ifndef CONFIG_GENERIC_SIGALTSTACK
> #ifndef sys_sigaltstack
> asmlinkage long sys_sigaltstack(const stack_t __user *, stack_t __user *,
> struct pt_regs *);
> #endif
> +#endif
Reviewed-by: James Hogan <james.hogan@imgtec.com>
I also see this issue with metag when I try and select
CONFIG_GENERIC_SIGALTSTACK. Until asm-generic/syscalls.h goes away it
seems a shame to have to keep a misleading #define sys_sigaltstack
sys_sigaltstack bodge in architecture's asm/syscalls.h.
Cheers
James
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: CONFIG_GENERIC_SIGALTSTACK with asm-generic/syscalls.h (was Re: [git pull] signal.git pile 2)
@ 2012-12-21 11:52 ` James Hogan
0 siblings, 0 replies; 9+ messages in thread
From: James Hogan @ 2012-12-21 11:52 UTC (permalink / raw)
To: Vineet Gupta, Al Viro
Cc: Arnd Bergmann, Linus Torvalds, linux-kernel, linux-arch
On 21/12/12 06:24, Vineet Gupta wrote:
> On Friday 21 December 2012 05:51 AM, Al Viro wrote:
>> sigaltstack infrastructure + conversion for x86, alpha and um,
>> COMPAT_SYSCALL_DEFINE infrastructure. Note that there are several
>> conflicts between "unify SS_ONSTACK/SS_DISABLE definitions" and
>> UAPI patches in mainline; resolution is trivial - just remove definitions
>> of SS_ONSTACK and SS_DISABLED from arch/*/uapi/asm/signal.h; they are
>> all identical and include/uapi/linux/signal.h contains the unified
>> variant. Please, pull from
>> git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal for-linus
>>
>
> Hi Arnd,
>
> In Linus' tree with above merged, selecting CONFIG_GENERIC_SIGALTSTACK
> is causing build issues for ARC port (and possibly others as well) which
> use asm-generic/syscalls.h due to a different prototype for
> sys_sigaltstack coming in from linux/syscalls.h
>
> While I can band-aid ARC port by #define sys_sigaltstack before
> including asm-generic, it might be better if we conditional-ize one of
> the prototypes. Following works for me.
>
> diff --git a/include/asm-generic/syscalls.h b/include/asm-generic/syscalls.h
> index 58f466f..1db51b8 100644
> --- a/include/asm-generic/syscalls.h
> +++ b/include/asm-generic/syscalls.h
> @@ -21,10 +21,12 @@ asmlinkage long sys_mmap(unsigned long addr, unsigned long len,
> unsigned long fd, off_t pgoff);
> #endif
>
> +#ifndef CONFIG_GENERIC_SIGALTSTACK
> #ifndef sys_sigaltstack
> asmlinkage long sys_sigaltstack(const stack_t __user *, stack_t __user *,
> struct pt_regs *);
> #endif
> +#endif
Reviewed-by: James Hogan <james.hogan@imgtec.com>
I also see this issue with metag when I try and select
CONFIG_GENERIC_SIGALTSTACK. Until asm-generic/syscalls.h goes away it
seems a shame to have to keep a misleading #define sys_sigaltstack
sys_sigaltstack bodge in architecture's asm/syscalls.h.
Cheers
James
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: CONFIG_GENERIC_SIGALTSTACK with asm-generic/syscalls.h (was Re: [git pull] signal.git pile 2)
2012-12-21 11:52 ` James Hogan
(?)
@ 2012-12-21 16:07 ` Al Viro
2012-12-24 5:21 ` Vineet Gupta
-1 siblings, 1 reply; 9+ messages in thread
From: Al Viro @ 2012-12-21 16:07 UTC (permalink / raw)
To: James Hogan
Cc: Vineet Gupta, Arnd Bergmann, Linus Torvalds, linux-kernel,
linux-arch
On Fri, Dec 21, 2012 at 11:52:01AM +0000, James Hogan wrote:
> Reviewed-by: James Hogan <james.hogan@imgtec.com>
>
> I also see this issue with metag when I try and select
> CONFIG_GENERIC_SIGALTSTACK. Until asm-generic/syscalls.h goes away it
> seems a shame to have to keep a misleading #define sys_sigaltstack
> sys_sigaltstack bodge in architecture's asm/syscalls.h.
OK, I'm convinced; Vineet, could you reply with Signed-off-by: to use?
It's trivial, of course, but...
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] CONFIG_GENERIC_SIGALTSTACK build breakage with asm-generic/syscalls.h
2012-12-21 16:07 ` Al Viro
@ 2012-12-24 5:21 ` Vineet Gupta
0 siblings, 0 replies; 9+ messages in thread
From: Vineet Gupta @ 2012-12-24 5:21 UTC (permalink / raw)
To: viro; +Cc: Vineet Gupta, james.hogan, arnd, torvalds, linux-kernel,
linux-arch
For arches which include asm-generic/syscalls.h as well as newly
introduced CONFIG_GENERIC_SIGALTSTACK, there's a build breakage due to
conflicting prototypes of sys_sigaltstack(), due to removal of struct
pt_regs from latter based code.
----------------------->8-------------------------
In file included from
/home/vineetg/arc/upstream-kernel/arch/arc/include/asm/syscalls.h:25,
from arch/arc/kernel/sys.c:6:
include/asm-generic/syscalls.h:26: error: conflicting types for
'sys_sigaltstack'
include/linux/syscalls.h:304: note: previous declaration of
'sys_sigaltstack' was here
make[2]: *** [arch/arc/kernel/sys.o] Error 1
----------------------->8-------------------------
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: james.hogan@imgtec.com
Cc: arnd@arndb.de
Cc: torvalds@linux-foundation.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org
---
include/asm-generic/syscalls.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/include/asm-generic/syscalls.h b/include/asm-generic/syscalls.h
index 58f466f..1db51b8 100644
--- a/include/asm-generic/syscalls.h
+++ b/include/asm-generic/syscalls.h
@@ -21,10 +21,12 @@ asmlinkage long sys_mmap(unsigned long addr, unsigned long len,
unsigned long fd, off_t pgoff);
#endif
+#ifndef CONFIG_GENERIC_SIGALTSTACK
#ifndef sys_sigaltstack
asmlinkage long sys_sigaltstack(const stack_t __user *, stack_t __user *,
struct pt_regs *);
#endif
+#endif
#ifndef sys_rt_sigreturn
asmlinkage long sys_rt_sigreturn(struct pt_regs *regs);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH] CONFIG_GENERIC_SIGALTSTACK build breakage with asm-generic/syscalls.h
@ 2012-12-24 5:21 ` Vineet Gupta
0 siblings, 0 replies; 9+ messages in thread
From: Vineet Gupta @ 2012-12-24 5:21 UTC (permalink / raw)
To: viro; +Cc: Vineet Gupta, james.hogan, arnd, torvalds, linux-kernel,
linux-arch
For arches which include asm-generic/syscalls.h as well as newly
introduced CONFIG_GENERIC_SIGALTSTACK, there's a build breakage due to
conflicting prototypes of sys_sigaltstack(), due to removal of struct
pt_regs from latter based code.
----------------------->8-------------------------
In file included from
/home/vineetg/arc/upstream-kernel/arch/arc/include/asm/syscalls.h:25,
from arch/arc/kernel/sys.c:6:
include/asm-generic/syscalls.h:26: error: conflicting types for
'sys_sigaltstack'
include/linux/syscalls.h:304: note: previous declaration of
'sys_sigaltstack' was here
make[2]: *** [arch/arc/kernel/sys.o] Error 1
----------------------->8-------------------------
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: james.hogan@imgtec.com
Cc: arnd@arndb.de
Cc: torvalds@linux-foundation.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org
---
include/asm-generic/syscalls.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/include/asm-generic/syscalls.h b/include/asm-generic/syscalls.h
index 58f466f..1db51b8 100644
--- a/include/asm-generic/syscalls.h
+++ b/include/asm-generic/syscalls.h
@@ -21,10 +21,12 @@ asmlinkage long sys_mmap(unsigned long addr, unsigned long len,
unsigned long fd, off_t pgoff);
#endif
+#ifndef CONFIG_GENERIC_SIGALTSTACK
#ifndef sys_sigaltstack
asmlinkage long sys_sigaltstack(const stack_t __user *, stack_t __user *,
struct pt_regs *);
#endif
+#endif
#ifndef sys_rt_sigreturn
asmlinkage long sys_rt_sigreturn(struct pt_regs *regs);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 9+ messages in thread