mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Define _addr_lsb in siginfo_t for mips and ia64
@ 2010-10-08 17:55 Andi Kleen
  2010-10-08 18:13 ` Luck, Tony
  2010-10-08 18:27 ` Thomas Gleixner
  0 siblings, 2 replies; 5+ messages in thread
From: Andi Kleen @ 2010-10-08 17:55 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, Andi Kleen, ralf, tony.luck

From: Andi Kleen <ak@linux.intel.com>

Define an _addr_lsb field in the mips and ia64 siginfo_ts, following
the asm-generic version. This just puts the field over padding.

This fixes a compilation problem introduced with a337fda.

Cc: ralf@linux-mips.org
Cc: tony.luck@intel.com
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 arch/ia64/include/asm/siginfo.h |    1 +
 arch/mips/include/asm/siginfo.h |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/ia64/include/asm/siginfo.h b/arch/ia64/include/asm/siginfo.h
index 118d429..d20bf96 100644
--- a/arch/ia64/include/asm/siginfo.h
+++ b/arch/ia64/include/asm/siginfo.h
@@ -62,6 +62,7 @@ typedef struct siginfo {
 			int _imm;		/* immediate value for "break" */
 			unsigned int _flags;	/* see below */
 			unsigned long _isr;	/* isr */
+			short _addr_lsb;
 		} _sigfault;
 
 		/* SIGPOLL */
diff --git a/arch/mips/include/asm/siginfo.h b/arch/mips/include/asm/siginfo.h
index 96e28f1..709f7d4 100644
--- a/arch/mips/include/asm/siginfo.h
+++ b/arch/mips/include/asm/siginfo.h
@@ -88,6 +88,7 @@ typedef struct siginfo {
 #ifdef __ARCH_SI_TRAPNO
 			int _trapno;	/* TRAP # which caused the signal */
 #endif
+			short _addr_lsb;	
 		} _sigfault;
 
 		/* SIGPOLL, SIGXFSZ (To do ...)  */
-- 
1.7.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] Define _addr_lsb in siginfo_t for mips and ia64
  2010-10-08 17:55 [PATCH] Define _addr_lsb in siginfo_t for mips and ia64 Andi Kleen
@ 2010-10-08 18:13 ` Luck, Tony
  2010-10-11 16:53   ` Tony Luck
  2010-10-08 18:27 ` Thomas Gleixner
  1 sibling, 1 reply; 5+ messages in thread
From: Luck, Tony @ 2010-10-08 18:13 UTC (permalink / raw)
  To: Andi Kleen, torvalds; +Cc: linux-kernel, Andi Kleen, ralf

ia64 has HAVE_ARCH_COPY_SIGINFO_TO_USER - so it doesn't see
this build problem because the version of copy_siginfo_to_user()
in kernel/signal.c isn't the one we use. So I don't think that
we need this (unless someone has some plan to unify the
ARCH specific version).

-Tony


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Define _addr_lsb in siginfo_t for mips and ia64
  2010-10-08 17:55 [PATCH] Define _addr_lsb in siginfo_t for mips and ia64 Andi Kleen
  2010-10-08 18:13 ` Luck, Tony
@ 2010-10-08 18:27 ` Thomas Gleixner
  1 sibling, 0 replies; 5+ messages in thread
From: Thomas Gleixner @ 2010-10-08 18:27 UTC (permalink / raw)
  To: Andi Kleen; +Cc: torvalds, linux-kernel, Andi Kleen, ralf, tony.luck

On Fri, 8 Oct 2010, Andi Kleen wrote:

> From: Andi Kleen <ak@linux.intel.com>
> 
> Define an _addr_lsb field in the mips and ia64 siginfo_ts, following
> the asm-generic version. This just puts the field over padding.
> 
> This fixes a compilation problem introduced with a337fda.

But it does not fix the mess you created in kernel/signal.c (aside of
the completely braindaed #ifdef, it's whitespace damaged) with a two
days old patch which has neither seen next, nor been reviewed by
people who care about core code nor been cross-compiled which is
mandatory for core kernel code changes.

The correct fix is to revert the patch in kernel/signal.c and fix this
proper in .37. This put_user is missing since .32 when you introduced
that grossly misnamed si extension, so there is no rush to get this in
during the late -rc cycle.

Thanks

	tglx

> Cc: ralf@linux-mips.org
> Cc: tony.luck@intel.com
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> ---
>  arch/ia64/include/asm/siginfo.h |    1 +
>  arch/mips/include/asm/siginfo.h |    1 +
>  2 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/ia64/include/asm/siginfo.h b/arch/ia64/include/asm/siginfo.h
> index 118d429..d20bf96 100644
> --- a/arch/ia64/include/asm/siginfo.h
> +++ b/arch/ia64/include/asm/siginfo.h
> @@ -62,6 +62,7 @@ typedef struct siginfo {
>  			int _imm;		/* immediate value for "break" */
>  			unsigned int _flags;	/* see below */
>  			unsigned long _isr;	/* isr */
> +			short _addr_lsb;
>  		} _sigfault;
>  
>  		/* SIGPOLL */
> diff --git a/arch/mips/include/asm/siginfo.h b/arch/mips/include/asm/siginfo.h
> index 96e28f1..709f7d4 100644
> --- a/arch/mips/include/asm/siginfo.h
> +++ b/arch/mips/include/asm/siginfo.h
> @@ -88,6 +88,7 @@ typedef struct siginfo {
>  #ifdef __ARCH_SI_TRAPNO
>  			int _trapno;	/* TRAP # which caused the signal */
>  #endif
> +			short _addr_lsb;	
>  		} _sigfault;
>  
>  		/* SIGPOLL, SIGXFSZ (To do ...)  */
> -- 
> 1.7.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Define _addr_lsb in siginfo_t for mips and ia64
  2010-10-08 18:13 ` Luck, Tony
@ 2010-10-11 16:53   ` Tony Luck
  2010-10-11 17:11     ` Andi Kleen
  0 siblings, 1 reply; 5+ messages in thread
From: Tony Luck @ 2010-10-11 16:53 UTC (permalink / raw)
  To: Andi Kleen, torvalds; +Cc: linux-kernel, Andi Kleen, ralf

On Fri, Oct 8, 2010 at 11:13 AM, Luck, Tony <tony.luck@intel.com> wrote:
> ia64 has HAVE_ARCH_COPY_SIGINFO_TO_USER - so it doesn't see
> this build problem because the version of copy_siginfo_to_user()
> in kernel/signal.c isn't the one we use. So I don't think that
> we need this (unless someone has some plan to unify the
> ARCH specific version).

I take this back ... in next-20101011 the disease has spread:

fs/signalfd.c: In function ‘signalfd_copyinfo’:
fs/signalfd.c:109: error: ‘const struct <anonymous>’ has no member
named ‘_addr_lsb’
fs/signalfd.c:109: warning: type defaults to ‘int’ in declaration of ‘__pu_x’
fs/signalfd.c:109: error: ‘const struct <anonymous>’ has no member
named ‘_addr_lsb’

So today I have build problems :-(

A question about the naming/type of this new field. "lsb" sounds like
it might mean
"least significant byte (or perhaps bit)" ... why is the type "short"?

-Tony

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Define _addr_lsb in siginfo_t for mips and ia64
  2010-10-11 16:53   ` Tony Luck
@ 2010-10-11 17:11     ` Andi Kleen
  0 siblings, 0 replies; 5+ messages in thread
From: Andi Kleen @ 2010-10-11 17:11 UTC (permalink / raw)
  To: Tony Luck; +Cc: Andi Kleen, torvalds, linux-kernel, ralf

On Mon, Oct 11, 2010 at 09:53:22AM -0700, Tony Luck wrote:
> On Fri, Oct 8, 2010 at 11:13 AM, Luck, Tony <tony.luck@intel.com> wrote:
> > ia64 has HAVE_ARCH_COPY_SIGINFO_TO_USER - so it doesn't see
> > this build problem because the version of copy_siginfo_to_user()
> > in kernel/signal.c isn't the one we use. So I don't think that
> > we need this (unless someone has some plan to unify the
> > ARCH specific version).
> 
> I take this back ... in next-20101011 the disease has spread:

Ok I will include the patch for ia64 in my tree -- unless you
want to carry it.

-Andi

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-10-11 17:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-08 17:55 [PATCH] Define _addr_lsb in siginfo_t for mips and ia64 Andi Kleen
2010-10-08 18:13 ` Luck, Tony
2010-10-11 16:53   ` Tony Luck
2010-10-11 17:11     ` Andi Kleen
2010-10-08 18:27 ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome