Skip to contentSkip to conversation

Define _addr_lsb in siginfo_t for mips and ia64

PATCH In review Andi Kleen 5 participants 5 messages Oct 8, 2010 – Oct 11, 2010 MIPS

lore
Share & tools
lore

Andi Kleen

author
#0 lore raw

PATCH 1/1 Define _addr_lsb in siginfo_t for mips and ia64

From: Andi Kleen <[email protected]>

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.

---
 arch/ia64/include/asm/siginfo.h |    1 +
 arch/mips/include/asm/siginfo.h |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
arch/ia64/include/asm/siginfo.h +1 -0
index 118d429..d20bf96 100644
@@ -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 */
arch/mips/include/asm/siginfo.h +1 -0
index 96e28f1..709f7d4 100644
@@ -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 ...)  */
Signature · 1 line
1.7.1
#1 lore raw

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

#2 lore raw
Quoted 5 lines · Tony

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

#3 lore raw
Quoted 8 lines · Tony Luck
Quoted 5 lines · Tony

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

#4 lore raw
In reply to Andi Kleen
Quoted 6 lines · Andi Kleen

From: Andi Kleen <[email protected]>

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

Quoted 41 lines
---
 arch/ia64/include/asm/siginfo.h |    1 +
 arch/mips/include/asm/siginfo.h |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
arch/ia64/include/asm/siginfo.h +1 -0
index 118d429..d20bf96 100644
@@ -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 */
arch/mips/include/asm/siginfo.h +1 -0
index 96e28f1..709f7d4 100644
@@ -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 ...)  */
Signature · 7 lines
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/