Skip to content

Commit 8fcb346

Browse files
committed
x86/headers: Convert sigcontext_ia32 uses to sigcontext_32
Use the new name in kernel code, and move the old name to the user-space-only legacy section of the UAPI header. Acked-by: Mikko Rapeli <mikko.rapeli@iki.fi> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/1441438363-9999-14-git-send-email-mingo@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent db1e031 commit 8fcb346

5 files changed

Lines changed: 22 additions & 16 deletions

File tree

arch/x86/ia32/ia32_signal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
}
6969

7070
static int ia32_restore_sigcontext(struct pt_regs *regs,
71-
struct sigcontext_ia32 __user *sc)
71+
struct sigcontext_32 __user *sc)
7272
{
7373
unsigned int tmpflags, err = 0;
7474
void __user *buf;
@@ -170,7 +170,7 @@ asmlinkage long sys32_rt_sigreturn(void)
170170
* Set up a signal frame.
171171
*/
172172

173-
static int ia32_setup_sigcontext(struct sigcontext_ia32 __user *sc,
173+
static int ia32_setup_sigcontext(struct sigcontext_32 __user *sc,
174174
void __user *fpstate,
175175
struct pt_regs *regs, unsigned int mask)
176176
{

arch/x86/include/asm/ia32.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ struct ucontext_ia32 {
1818
unsigned int uc_flags;
1919
unsigned int uc_link;
2020
compat_stack_t uc_stack;
21-
struct sigcontext_ia32 uc_mcontext;
21+
struct sigcontext_32 uc_mcontext;
2222
compat_sigset_t uc_sigmask; /* mask last for extensibility */
2323
};
2424

arch/x86/include/asm/sigframe.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
struct sigframe_ia32 {
2323
u32 pretcode;
2424
int sig;
25-
struct sigcontext_ia32 sc;
25+
struct sigcontext_32 sc;
2626
/*
2727
* fpstate is unused. fpstate is moved/allocated after
2828
* retcode[] below. This movement allows to have the FP state and the

arch/x86/include/uapi/asm/sigcontext.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ struct _xstate {
190190
/* New processor state extensions go here: */
191191
};
192192

193+
/*
194+
* The 32-bit signal frame:
195+
*/
193196
struct sigcontext_32 {
194197
__u16 gs, __gsh;
195198
__u16 fs, __fsh;
@@ -223,8 +226,9 @@ struct sigcontext_32 {
223226
__u32 cr2;
224227
};
225228

226-
#define sigcontext_ia32 sigcontext_32
227-
229+
/*
230+
* The 64-bit signal frame:
231+
*/
228232
struct sigcontext_64 {
229233
__u64 r8;
230234
__u64 r9;
@@ -282,7 +286,9 @@ struct sigcontext_64 {
282286
*/
283287
#ifndef __KERNEL__
284288

285-
#define _fpstate_ia32 _fpstate_32
289+
#define _fpstate_ia32 _fpstate_32
290+
#define sigcontext_ia32 sigcontext_32
291+
286292

287293
# ifdef __i386__
288294
struct sigcontext {

arch/x86/kernel/asm-offsets.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ void common(void) {
4343

4444
#if defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION)
4545
BLANK();
46-
OFFSET(IA32_SIGCONTEXT_ax, sigcontext_ia32, ax);
47-
OFFSET(IA32_SIGCONTEXT_bx, sigcontext_ia32, bx);
48-
OFFSET(IA32_SIGCONTEXT_cx, sigcontext_ia32, cx);
49-
OFFSET(IA32_SIGCONTEXT_dx, sigcontext_ia32, dx);
50-
OFFSET(IA32_SIGCONTEXT_si, sigcontext_ia32, si);
51-
OFFSET(IA32_SIGCONTEXT_di, sigcontext_ia32, di);
52-
OFFSET(IA32_SIGCONTEXT_bp, sigcontext_ia32, bp);
53-
OFFSET(IA32_SIGCONTEXT_sp, sigcontext_ia32, sp);
54-
OFFSET(IA32_SIGCONTEXT_ip, sigcontext_ia32, ip);
46+
OFFSET(IA32_SIGCONTEXT_ax, sigcontext_32, ax);
47+
OFFSET(IA32_SIGCONTEXT_bx, sigcontext_32, bx);
48+
OFFSET(IA32_SIGCONTEXT_cx, sigcontext_32, cx);
49+
OFFSET(IA32_SIGCONTEXT_dx, sigcontext_32, dx);
50+
OFFSET(IA32_SIGCONTEXT_si, sigcontext_32, si);
51+
OFFSET(IA32_SIGCONTEXT_di, sigcontext_32, di);
52+
OFFSET(IA32_SIGCONTEXT_bp, sigcontext_32, bp);
53+
OFFSET(IA32_SIGCONTEXT_sp, sigcontext_32, sp);
54+
OFFSET(IA32_SIGCONTEXT_ip, sigcontext_32, ip);
5555

5656
BLANK();
5757
OFFSET(TI_sysenter_return, thread_info, sysenter_return);

0 commit comments

Comments
 (0)