Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

hexagon: Remove CONFIG_HEXAGON_ARCH_VERSION from uapi header

uapi headers should not expose CONFIG switches since they are not
available in userspace. Fix it in arch/hexagon/include/uapi/asm/user.h
by always defining the cs0 and cs1 entries instead of pad values.

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

authored by

Thomas Huth and committed by
Arnd Bergmann
280ac178 b85ea95d

+6 -9
+1 -6
arch/hexagon/include/uapi/asm/user.h
··· 56 56 unsigned long pc; 57 57 unsigned long cause; 58 58 unsigned long badva; 59 - #if CONFIG_HEXAGON_ARCH_VERSION < 4 60 - unsigned long pad1; /* pad out to 48 words total */ 61 - unsigned long pad2; /* pad out to 48 words total */ 62 - unsigned long pad3; /* pad out to 48 words total */ 63 - #else 59 + /* cs0 and cs1 are only available with HEXAGON_ARCH_VERSION >= 4 */ 64 60 unsigned long cs0; 65 61 unsigned long cs1; 66 62 unsigned long pad1; /* pad out to 48 words total */ 67 - #endif 68 63 }; 69 64 70 65 #endif
+5 -2
arch/hexagon/kernel/ptrace.c
··· 74 74 unsigned int pos, unsigned int count, 75 75 const void *kbuf, const void __user *ubuf) 76 76 { 77 - int ret; 77 + int ret, ignore_offset; 78 78 unsigned long bucket; 79 79 struct pt_regs *regs = task_pt_regs(target); 80 80 ··· 111 111 #if CONFIG_HEXAGON_ARCH_VERSION >=4 112 112 INEXT(&regs->cs0, cs0); 113 113 INEXT(&regs->cs1, cs1); 114 + ignore_offset = offsetof(struct user_regs_struct, pad1); 115 + #else 116 + ignore_offset = offsetof(struct user_regs_struct, cs0); 114 117 #endif 115 118 116 119 /* Ignore the rest, if needed */ 117 120 if (!ret) 118 121 user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, 119 - offsetof(struct user_regs_struct, pad1), -1); 122 + ignore_offset, -1); 120 123 else 121 124 return ret; 122 125
-1
scripts/headers_install.sh
··· 74 74 arch/arc/include/uapi/asm/page.h:CONFIG_ARC_PAGE_SIZE_4K 75 75 arch/arc/include/uapi/asm/swab.h:CONFIG_ARC_HAS_SWAPE 76 76 arch/arm/include/uapi/asm/ptrace.h:CONFIG_CPU_ENDIAN_BE8 77 - arch/hexagon/include/uapi/asm/user.h:CONFIG_HEXAGON_ARCH_VERSION 78 77 arch/m68k/include/uapi/asm/ptrace.h:CONFIG_COLDFIRE 79 78 arch/nios2/include/uapi/asm/swab.h:CONFIG_NIOS2_CI_SWAB_NO 80 79 arch/nios2/include/uapi/asm/swab.h:CONFIG_NIOS2_CI_SWAB_SUPPORT