mirror of
https://github.com/torvalds/linux.git
synced 2026-05-05 23:05:25 -04:00
Merge tag 'execve-v6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull execve updates from Kees Cook: - Introduce regular REGSET note macros arch-wide (Dave Martin) - Remove arbitrary 4K limitation of program header size (Yin Fengwei) - Reorder function qualifiers for copy_clone_args_from_user() (Dishank Jogi) * tag 'execve-v6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: (25 commits) fork: reorder function qualifiers for copy_clone_args_from_user binfmt_elf: remove the 4k limitation of program header size binfmt_elf: Warn on missing or suspicious regset note names xtensa: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names um: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names x86/ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names sparc: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names sh: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names s390/ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names riscv: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names powerpc/ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names parisc: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names openrisc: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names nios2: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names MIPS: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names m68k: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names LoongArch: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names hexagon: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names csky: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names arm64: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names ...
This commit is contained in:
@@ -568,114 +568,114 @@ static int pkey_set(struct task_struct *target, const struct user_regset *regset
|
||||
|
||||
static const struct user_regset native_regsets[] = {
|
||||
[REGSET_GPR] = {
|
||||
.core_note_type = NT_PRSTATUS, .n = ELF_NGREG,
|
||||
USER_REGSET_NOTE_TYPE(PRSTATUS), .n = ELF_NGREG,
|
||||
.size = sizeof(long), .align = sizeof(long),
|
||||
.regset_get = gpr_get, .set = gpr_set
|
||||
},
|
||||
[REGSET_FPR] = {
|
||||
.core_note_type = NT_PRFPREG, .n = ELF_NFPREG,
|
||||
USER_REGSET_NOTE_TYPE(PRFPREG), .n = ELF_NFPREG,
|
||||
.size = sizeof(double), .align = sizeof(double),
|
||||
.regset_get = fpr_get, .set = fpr_set
|
||||
},
|
||||
#ifdef CONFIG_ALTIVEC
|
||||
[REGSET_VMX] = {
|
||||
.core_note_type = NT_PPC_VMX, .n = 34,
|
||||
USER_REGSET_NOTE_TYPE(PPC_VMX), .n = 34,
|
||||
.size = sizeof(vector128), .align = sizeof(vector128),
|
||||
.active = vr_active, .regset_get = vr_get, .set = vr_set
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_VSX
|
||||
[REGSET_VSX] = {
|
||||
.core_note_type = NT_PPC_VSX, .n = 32,
|
||||
USER_REGSET_NOTE_TYPE(PPC_VSX), .n = 32,
|
||||
.size = sizeof(double), .align = sizeof(double),
|
||||
.active = vsr_active, .regset_get = vsr_get, .set = vsr_set
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_SPE
|
||||
[REGSET_SPE] = {
|
||||
.core_note_type = NT_PPC_SPE, .n = 35,
|
||||
USER_REGSET_NOTE_TYPE(PPC_SPE), .n = 35,
|
||||
.size = sizeof(u32), .align = sizeof(u32),
|
||||
.active = evr_active, .regset_get = evr_get, .set = evr_set
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
|
||||
[REGSET_TM_CGPR] = {
|
||||
.core_note_type = NT_PPC_TM_CGPR, .n = ELF_NGREG,
|
||||
USER_REGSET_NOTE_TYPE(PPC_TM_CGPR), .n = ELF_NGREG,
|
||||
.size = sizeof(long), .align = sizeof(long),
|
||||
.active = tm_cgpr_active, .regset_get = tm_cgpr_get, .set = tm_cgpr_set
|
||||
},
|
||||
[REGSET_TM_CFPR] = {
|
||||
.core_note_type = NT_PPC_TM_CFPR, .n = ELF_NFPREG,
|
||||
USER_REGSET_NOTE_TYPE(PPC_TM_CFPR), .n = ELF_NFPREG,
|
||||
.size = sizeof(double), .align = sizeof(double),
|
||||
.active = tm_cfpr_active, .regset_get = tm_cfpr_get, .set = tm_cfpr_set
|
||||
},
|
||||
[REGSET_TM_CVMX] = {
|
||||
.core_note_type = NT_PPC_TM_CVMX, .n = ELF_NVMX,
|
||||
USER_REGSET_NOTE_TYPE(PPC_TM_CVMX), .n = ELF_NVMX,
|
||||
.size = sizeof(vector128), .align = sizeof(vector128),
|
||||
.active = tm_cvmx_active, .regset_get = tm_cvmx_get, .set = tm_cvmx_set
|
||||
},
|
||||
[REGSET_TM_CVSX] = {
|
||||
.core_note_type = NT_PPC_TM_CVSX, .n = ELF_NVSX,
|
||||
USER_REGSET_NOTE_TYPE(PPC_TM_CVSX), .n = ELF_NVSX,
|
||||
.size = sizeof(double), .align = sizeof(double),
|
||||
.active = tm_cvsx_active, .regset_get = tm_cvsx_get, .set = tm_cvsx_set
|
||||
},
|
||||
[REGSET_TM_SPR] = {
|
||||
.core_note_type = NT_PPC_TM_SPR, .n = ELF_NTMSPRREG,
|
||||
USER_REGSET_NOTE_TYPE(PPC_TM_SPR), .n = ELF_NTMSPRREG,
|
||||
.size = sizeof(u64), .align = sizeof(u64),
|
||||
.active = tm_spr_active, .regset_get = tm_spr_get, .set = tm_spr_set
|
||||
},
|
||||
[REGSET_TM_CTAR] = {
|
||||
.core_note_type = NT_PPC_TM_CTAR, .n = 1,
|
||||
USER_REGSET_NOTE_TYPE(PPC_TM_CTAR), .n = 1,
|
||||
.size = sizeof(u64), .align = sizeof(u64),
|
||||
.active = tm_tar_active, .regset_get = tm_tar_get, .set = tm_tar_set
|
||||
},
|
||||
[REGSET_TM_CPPR] = {
|
||||
.core_note_type = NT_PPC_TM_CPPR, .n = 1,
|
||||
USER_REGSET_NOTE_TYPE(PPC_TM_CPPR), .n = 1,
|
||||
.size = sizeof(u64), .align = sizeof(u64),
|
||||
.active = tm_ppr_active, .regset_get = tm_ppr_get, .set = tm_ppr_set
|
||||
},
|
||||
[REGSET_TM_CDSCR] = {
|
||||
.core_note_type = NT_PPC_TM_CDSCR, .n = 1,
|
||||
USER_REGSET_NOTE_TYPE(PPC_TM_CDSCR), .n = 1,
|
||||
.size = sizeof(u64), .align = sizeof(u64),
|
||||
.active = tm_dscr_active, .regset_get = tm_dscr_get, .set = tm_dscr_set
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_PPC64
|
||||
[REGSET_PPR] = {
|
||||
.core_note_type = NT_PPC_PPR, .n = 1,
|
||||
USER_REGSET_NOTE_TYPE(PPC_PPR), .n = 1,
|
||||
.size = sizeof(u64), .align = sizeof(u64),
|
||||
.regset_get = ppr_get, .set = ppr_set
|
||||
},
|
||||
[REGSET_DSCR] = {
|
||||
.core_note_type = NT_PPC_DSCR, .n = 1,
|
||||
USER_REGSET_NOTE_TYPE(PPC_DSCR), .n = 1,
|
||||
.size = sizeof(u64), .align = sizeof(u64),
|
||||
.regset_get = dscr_get, .set = dscr_set
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_PPC_BOOK3S_64
|
||||
[REGSET_TAR] = {
|
||||
.core_note_type = NT_PPC_TAR, .n = 1,
|
||||
USER_REGSET_NOTE_TYPE(PPC_TAR), .n = 1,
|
||||
.size = sizeof(u64), .align = sizeof(u64),
|
||||
.regset_get = tar_get, .set = tar_set
|
||||
},
|
||||
[REGSET_EBB] = {
|
||||
.core_note_type = NT_PPC_EBB, .n = ELF_NEBB,
|
||||
USER_REGSET_NOTE_TYPE(PPC_EBB), .n = ELF_NEBB,
|
||||
.size = sizeof(u64), .align = sizeof(u64),
|
||||
.active = ebb_active, .regset_get = ebb_get, .set = ebb_set
|
||||
},
|
||||
[REGSET_PMR] = {
|
||||
.core_note_type = NT_PPC_PMU, .n = ELF_NPMU,
|
||||
USER_REGSET_NOTE_TYPE(PPC_PMU), .n = ELF_NPMU,
|
||||
.size = sizeof(u64), .align = sizeof(u64),
|
||||
.active = pmu_active, .regset_get = pmu_get, .set = pmu_set
|
||||
},
|
||||
[REGSET_DEXCR] = {
|
||||
.core_note_type = NT_PPC_DEXCR, .n = ELF_NDEXCR,
|
||||
USER_REGSET_NOTE_TYPE(PPC_DEXCR), .n = ELF_NDEXCR,
|
||||
.size = sizeof(u64), .align = sizeof(u64),
|
||||
.active = dexcr_active, .regset_get = dexcr_get
|
||||
},
|
||||
#ifdef CONFIG_CHECKPOINT_RESTORE
|
||||
[REGSET_HASHKEYR] = {
|
||||
.core_note_type = NT_PPC_HASHKEYR, .n = ELF_NHASHKEYR,
|
||||
USER_REGSET_NOTE_TYPE(PPC_HASHKEYR), .n = ELF_NHASHKEYR,
|
||||
.size = sizeof(u64), .align = sizeof(u64),
|
||||
.active = hashkeyr_active, .regset_get = hashkeyr_get, .set = hashkeyr_set
|
||||
},
|
||||
@@ -683,7 +683,7 @@ static const struct user_regset native_regsets[] = {
|
||||
#endif
|
||||
#ifdef CONFIG_PPC_MEM_KEYS
|
||||
[REGSET_PKEY] = {
|
||||
.core_note_type = NT_PPC_PKEY, .n = ELF_NPKEY,
|
||||
USER_REGSET_NOTE_TYPE(PPC_PKEY), .n = ELF_NPKEY,
|
||||
.size = sizeof(u64), .align = sizeof(u64),
|
||||
.active = pkey_active, .regset_get = pkey_get, .set = pkey_set
|
||||
},
|
||||
@@ -843,92 +843,92 @@ static int gpr32_set(struct task_struct *target,
|
||||
*/
|
||||
static const struct user_regset compat_regsets[] = {
|
||||
[REGSET_GPR] = {
|
||||
.core_note_type = NT_PRSTATUS, .n = ELF_NGREG,
|
||||
USER_REGSET_NOTE_TYPE(PRSTATUS), .n = ELF_NGREG,
|
||||
.size = sizeof(compat_long_t), .align = sizeof(compat_long_t),
|
||||
.regset_get = gpr32_get, .set = gpr32_set
|
||||
},
|
||||
[REGSET_FPR] = {
|
||||
.core_note_type = NT_PRFPREG, .n = ELF_NFPREG,
|
||||
USER_REGSET_NOTE_TYPE(PRFPREG), .n = ELF_NFPREG,
|
||||
.size = sizeof(double), .align = sizeof(double),
|
||||
.regset_get = fpr_get, .set = fpr_set
|
||||
},
|
||||
#ifdef CONFIG_ALTIVEC
|
||||
[REGSET_VMX] = {
|
||||
.core_note_type = NT_PPC_VMX, .n = 34,
|
||||
USER_REGSET_NOTE_TYPE(PPC_VMX), .n = 34,
|
||||
.size = sizeof(vector128), .align = sizeof(vector128),
|
||||
.active = vr_active, .regset_get = vr_get, .set = vr_set
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_SPE
|
||||
[REGSET_SPE] = {
|
||||
.core_note_type = NT_PPC_SPE, .n = 35,
|
||||
USER_REGSET_NOTE_TYPE(PPC_SPE), .n = 35,
|
||||
.size = sizeof(u32), .align = sizeof(u32),
|
||||
.active = evr_active, .regset_get = evr_get, .set = evr_set
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
|
||||
[REGSET_TM_CGPR] = {
|
||||
.core_note_type = NT_PPC_TM_CGPR, .n = ELF_NGREG,
|
||||
USER_REGSET_NOTE_TYPE(PPC_TM_CGPR), .n = ELF_NGREG,
|
||||
.size = sizeof(long), .align = sizeof(long),
|
||||
.active = tm_cgpr_active,
|
||||
.regset_get = tm_cgpr32_get, .set = tm_cgpr32_set
|
||||
},
|
||||
[REGSET_TM_CFPR] = {
|
||||
.core_note_type = NT_PPC_TM_CFPR, .n = ELF_NFPREG,
|
||||
USER_REGSET_NOTE_TYPE(PPC_TM_CFPR), .n = ELF_NFPREG,
|
||||
.size = sizeof(double), .align = sizeof(double),
|
||||
.active = tm_cfpr_active, .regset_get = tm_cfpr_get, .set = tm_cfpr_set
|
||||
},
|
||||
[REGSET_TM_CVMX] = {
|
||||
.core_note_type = NT_PPC_TM_CVMX, .n = ELF_NVMX,
|
||||
USER_REGSET_NOTE_TYPE(PPC_TM_CVMX), .n = ELF_NVMX,
|
||||
.size = sizeof(vector128), .align = sizeof(vector128),
|
||||
.active = tm_cvmx_active, .regset_get = tm_cvmx_get, .set = tm_cvmx_set
|
||||
},
|
||||
[REGSET_TM_CVSX] = {
|
||||
.core_note_type = NT_PPC_TM_CVSX, .n = ELF_NVSX,
|
||||
USER_REGSET_NOTE_TYPE(PPC_TM_CVSX), .n = ELF_NVSX,
|
||||
.size = sizeof(double), .align = sizeof(double),
|
||||
.active = tm_cvsx_active, .regset_get = tm_cvsx_get, .set = tm_cvsx_set
|
||||
},
|
||||
[REGSET_TM_SPR] = {
|
||||
.core_note_type = NT_PPC_TM_SPR, .n = ELF_NTMSPRREG,
|
||||
USER_REGSET_NOTE_TYPE(PPC_TM_SPR), .n = ELF_NTMSPRREG,
|
||||
.size = sizeof(u64), .align = sizeof(u64),
|
||||
.active = tm_spr_active, .regset_get = tm_spr_get, .set = tm_spr_set
|
||||
},
|
||||
[REGSET_TM_CTAR] = {
|
||||
.core_note_type = NT_PPC_TM_CTAR, .n = 1,
|
||||
USER_REGSET_NOTE_TYPE(PPC_TM_CTAR), .n = 1,
|
||||
.size = sizeof(u64), .align = sizeof(u64),
|
||||
.active = tm_tar_active, .regset_get = tm_tar_get, .set = tm_tar_set
|
||||
},
|
||||
[REGSET_TM_CPPR] = {
|
||||
.core_note_type = NT_PPC_TM_CPPR, .n = 1,
|
||||
USER_REGSET_NOTE_TYPE(PPC_TM_CPPR), .n = 1,
|
||||
.size = sizeof(u64), .align = sizeof(u64),
|
||||
.active = tm_ppr_active, .regset_get = tm_ppr_get, .set = tm_ppr_set
|
||||
},
|
||||
[REGSET_TM_CDSCR] = {
|
||||
.core_note_type = NT_PPC_TM_CDSCR, .n = 1,
|
||||
USER_REGSET_NOTE_TYPE(PPC_TM_CDSCR), .n = 1,
|
||||
.size = sizeof(u64), .align = sizeof(u64),
|
||||
.active = tm_dscr_active, .regset_get = tm_dscr_get, .set = tm_dscr_set
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_PPC64
|
||||
[REGSET_PPR] = {
|
||||
.core_note_type = NT_PPC_PPR, .n = 1,
|
||||
USER_REGSET_NOTE_TYPE(PPC_PPR), .n = 1,
|
||||
.size = sizeof(u64), .align = sizeof(u64),
|
||||
.regset_get = ppr_get, .set = ppr_set
|
||||
},
|
||||
[REGSET_DSCR] = {
|
||||
.core_note_type = NT_PPC_DSCR, .n = 1,
|
||||
USER_REGSET_NOTE_TYPE(PPC_DSCR), .n = 1,
|
||||
.size = sizeof(u64), .align = sizeof(u64),
|
||||
.regset_get = dscr_get, .set = dscr_set
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_PPC_BOOK3S_64
|
||||
[REGSET_TAR] = {
|
||||
.core_note_type = NT_PPC_TAR, .n = 1,
|
||||
USER_REGSET_NOTE_TYPE(PPC_TAR), .n = 1,
|
||||
.size = sizeof(u64), .align = sizeof(u64),
|
||||
.regset_get = tar_get, .set = tar_set
|
||||
},
|
||||
[REGSET_EBB] = {
|
||||
.core_note_type = NT_PPC_EBB, .n = ELF_NEBB,
|
||||
USER_REGSET_NOTE_TYPE(PPC_EBB), .n = ELF_NEBB,
|
||||
.size = sizeof(u64), .align = sizeof(u64),
|
||||
.active = ebb_active, .regset_get = ebb_get, .set = ebb_set
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user