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.

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
...

+196 -175
+2 -2
arch/arc/kernel/ptrace.c
··· 284 284 285 285 static const struct user_regset arc_regsets[] = { 286 286 [REGSET_CMN] = { 287 - .core_note_type = NT_PRSTATUS, 287 + USER_REGSET_NOTE_TYPE(PRSTATUS), 288 288 .n = ELF_NGREG, 289 289 .size = sizeof(unsigned long), 290 290 .align = sizeof(unsigned long), ··· 293 293 }, 294 294 #ifdef CONFIG_ISA_ARCV2 295 295 [REGSET_ARCV2] = { 296 - .core_note_type = NT_ARC_V2, 296 + USER_REGSET_NOTE_TYPE(ARC_V2), 297 297 .n = ELF_ARCV2REG, 298 298 .size = sizeof(unsigned long), 299 299 .align = sizeof(unsigned long),
+3 -3
arch/arm/kernel/ptrace.c
··· 677 677 678 678 static const struct user_regset arm_regsets[] = { 679 679 [REGSET_GPR] = { 680 - .core_note_type = NT_PRSTATUS, 680 + USER_REGSET_NOTE_TYPE(PRSTATUS), 681 681 .n = ELF_NGREG, 682 682 .size = sizeof(u32), 683 683 .align = sizeof(u32), ··· 689 689 * For the FPA regs in fpstate, the real fields are a mixture 690 690 * of sizes, so pretend that the registers are word-sized: 691 691 */ 692 - .core_note_type = NT_PRFPREG, 692 + USER_REGSET_NOTE_TYPE(PRFPREG), 693 693 .n = sizeof(struct user_fp) / sizeof(u32), 694 694 .size = sizeof(u32), 695 695 .align = sizeof(u32), ··· 702 702 * Pretend that the VFP regs are word-sized, since the FPSCR is 703 703 * a single word dangling at the end of struct user_vfp: 704 704 */ 705 - .core_note_type = NT_ARM_VFP, 705 + USER_REGSET_NOTE_TYPE(ARM_VFP), 706 706 .n = ARM_VFPREGS_SIZE / sizeof(u32), 707 707 .size = sizeof(u32), 708 708 .align = sizeof(u32),
+26 -26
arch/arm64/kernel/ptrace.c
··· 1586 1586 1587 1587 static const struct user_regset aarch64_regsets[] = { 1588 1588 [REGSET_GPR] = { 1589 - .core_note_type = NT_PRSTATUS, 1589 + USER_REGSET_NOTE_TYPE(PRSTATUS), 1590 1590 .n = sizeof(struct user_pt_regs) / sizeof(u64), 1591 1591 .size = sizeof(u64), 1592 1592 .align = sizeof(u64), ··· 1594 1594 .set = gpr_set 1595 1595 }, 1596 1596 [REGSET_FPR] = { 1597 - .core_note_type = NT_PRFPREG, 1597 + USER_REGSET_NOTE_TYPE(PRFPREG), 1598 1598 .n = sizeof(struct user_fpsimd_state) / sizeof(u32), 1599 1599 /* 1600 1600 * We pretend we have 32-bit registers because the fpsr and ··· 1607 1607 .set = fpr_set 1608 1608 }, 1609 1609 [REGSET_TLS] = { 1610 - .core_note_type = NT_ARM_TLS, 1610 + USER_REGSET_NOTE_TYPE(ARM_TLS), 1611 1611 .n = 2, 1612 1612 .size = sizeof(void *), 1613 1613 .align = sizeof(void *), ··· 1616 1616 }, 1617 1617 #ifdef CONFIG_HAVE_HW_BREAKPOINT 1618 1618 [REGSET_HW_BREAK] = { 1619 - .core_note_type = NT_ARM_HW_BREAK, 1619 + USER_REGSET_NOTE_TYPE(ARM_HW_BREAK), 1620 1620 .n = sizeof(struct user_hwdebug_state) / sizeof(u32), 1621 1621 .size = sizeof(u32), 1622 1622 .align = sizeof(u32), ··· 1624 1624 .set = hw_break_set, 1625 1625 }, 1626 1626 [REGSET_HW_WATCH] = { 1627 - .core_note_type = NT_ARM_HW_WATCH, 1627 + USER_REGSET_NOTE_TYPE(ARM_HW_WATCH), 1628 1628 .n = sizeof(struct user_hwdebug_state) / sizeof(u32), 1629 1629 .size = sizeof(u32), 1630 1630 .align = sizeof(u32), ··· 1633 1633 }, 1634 1634 #endif 1635 1635 [REGSET_SYSTEM_CALL] = { 1636 - .core_note_type = NT_ARM_SYSTEM_CALL, 1636 + USER_REGSET_NOTE_TYPE(ARM_SYSTEM_CALL), 1637 1637 .n = 1, 1638 1638 .size = sizeof(int), 1639 1639 .align = sizeof(int), ··· 1641 1641 .set = system_call_set, 1642 1642 }, 1643 1643 [REGSET_FPMR] = { 1644 - .core_note_type = NT_ARM_FPMR, 1644 + USER_REGSET_NOTE_TYPE(ARM_FPMR), 1645 1645 .n = 1, 1646 1646 .size = sizeof(u64), 1647 1647 .align = sizeof(u64), ··· 1650 1650 }, 1651 1651 #ifdef CONFIG_ARM64_SVE 1652 1652 [REGSET_SVE] = { /* Scalable Vector Extension */ 1653 - .core_note_type = NT_ARM_SVE, 1653 + USER_REGSET_NOTE_TYPE(ARM_SVE), 1654 1654 .n = DIV_ROUND_UP(SVE_PT_SIZE(ARCH_SVE_VQ_MAX, 1655 1655 SVE_PT_REGS_SVE), 1656 1656 SVE_VQ_BYTES), ··· 1662 1662 #endif 1663 1663 #ifdef CONFIG_ARM64_SME 1664 1664 [REGSET_SSVE] = { /* Streaming mode SVE */ 1665 - .core_note_type = NT_ARM_SSVE, 1665 + USER_REGSET_NOTE_TYPE(ARM_SSVE), 1666 1666 .n = DIV_ROUND_UP(SVE_PT_SIZE(SME_VQ_MAX, SVE_PT_REGS_SVE), 1667 1667 SVE_VQ_BYTES), 1668 1668 .size = SVE_VQ_BYTES, ··· 1671 1671 .set = ssve_set, 1672 1672 }, 1673 1673 [REGSET_ZA] = { /* SME ZA */ 1674 - .core_note_type = NT_ARM_ZA, 1674 + USER_REGSET_NOTE_TYPE(ARM_ZA), 1675 1675 /* 1676 1676 * ZA is a single register but it's variably sized and 1677 1677 * the ptrace core requires that the size of any data ··· 1687 1687 .set = za_set, 1688 1688 }, 1689 1689 [REGSET_ZT] = { /* SME ZT */ 1690 - .core_note_type = NT_ARM_ZT, 1690 + USER_REGSET_NOTE_TYPE(ARM_ZT), 1691 1691 .n = 1, 1692 1692 .size = ZT_SIG_REG_BYTES, 1693 1693 .align = sizeof(u64), ··· 1697 1697 #endif 1698 1698 #ifdef CONFIG_ARM64_PTR_AUTH 1699 1699 [REGSET_PAC_MASK] = { 1700 - .core_note_type = NT_ARM_PAC_MASK, 1700 + USER_REGSET_NOTE_TYPE(ARM_PAC_MASK), 1701 1701 .n = sizeof(struct user_pac_mask) / sizeof(u64), 1702 1702 .size = sizeof(u64), 1703 1703 .align = sizeof(u64), ··· 1705 1705 /* this cannot be set dynamically */ 1706 1706 }, 1707 1707 [REGSET_PAC_ENABLED_KEYS] = { 1708 - .core_note_type = NT_ARM_PAC_ENABLED_KEYS, 1708 + USER_REGSET_NOTE_TYPE(ARM_PAC_ENABLED_KEYS), 1709 1709 .n = 1, 1710 1710 .size = sizeof(long), 1711 1711 .align = sizeof(long), ··· 1714 1714 }, 1715 1715 #ifdef CONFIG_CHECKPOINT_RESTORE 1716 1716 [REGSET_PACA_KEYS] = { 1717 - .core_note_type = NT_ARM_PACA_KEYS, 1717 + USER_REGSET_NOTE_TYPE(ARM_PACA_KEYS), 1718 1718 .n = sizeof(struct user_pac_address_keys) / sizeof(__uint128_t), 1719 1719 .size = sizeof(__uint128_t), 1720 1720 .align = sizeof(__uint128_t), ··· 1722 1722 .set = pac_address_keys_set, 1723 1723 }, 1724 1724 [REGSET_PACG_KEYS] = { 1725 - .core_note_type = NT_ARM_PACG_KEYS, 1725 + USER_REGSET_NOTE_TYPE(ARM_PACG_KEYS), 1726 1726 .n = sizeof(struct user_pac_generic_keys) / sizeof(__uint128_t), 1727 1727 .size = sizeof(__uint128_t), 1728 1728 .align = sizeof(__uint128_t), ··· 1733 1733 #endif 1734 1734 #ifdef CONFIG_ARM64_TAGGED_ADDR_ABI 1735 1735 [REGSET_TAGGED_ADDR_CTRL] = { 1736 - .core_note_type = NT_ARM_TAGGED_ADDR_CTRL, 1736 + USER_REGSET_NOTE_TYPE(ARM_TAGGED_ADDR_CTRL), 1737 1737 .n = 1, 1738 1738 .size = sizeof(long), 1739 1739 .align = sizeof(long), ··· 1743 1743 #endif 1744 1744 #ifdef CONFIG_ARM64_POE 1745 1745 [REGSET_POE] = { 1746 - .core_note_type = NT_ARM_POE, 1746 + USER_REGSET_NOTE_TYPE(ARM_POE), 1747 1747 .n = 1, 1748 1748 .size = sizeof(long), 1749 1749 .align = sizeof(long), ··· 1753 1753 #endif 1754 1754 #ifdef CONFIG_ARM64_GCS 1755 1755 [REGSET_GCS] = { 1756 - .core_note_type = NT_ARM_GCS, 1756 + USER_REGSET_NOTE_TYPE(ARM_GCS), 1757 1757 .n = sizeof(struct user_gcs) / sizeof(u64), 1758 1758 .size = sizeof(u64), 1759 1759 .align = sizeof(u64), ··· 1943 1943 1944 1944 static const struct user_regset aarch32_regsets[] = { 1945 1945 [REGSET_COMPAT_GPR] = { 1946 - .core_note_type = NT_PRSTATUS, 1946 + USER_REGSET_NOTE_TYPE(PRSTATUS), 1947 1947 .n = COMPAT_ELF_NGREG, 1948 1948 .size = sizeof(compat_elf_greg_t), 1949 1949 .align = sizeof(compat_elf_greg_t), ··· 1951 1951 .set = compat_gpr_set 1952 1952 }, 1953 1953 [REGSET_COMPAT_VFP] = { 1954 - .core_note_type = NT_ARM_VFP, 1954 + USER_REGSET_NOTE_TYPE(ARM_VFP), 1955 1955 .n = VFP_STATE_SIZE / sizeof(compat_ulong_t), 1956 1956 .size = sizeof(compat_ulong_t), 1957 1957 .align = sizeof(compat_ulong_t), ··· 1968 1968 1969 1969 static const struct user_regset aarch32_ptrace_regsets[] = { 1970 1970 [REGSET_GPR] = { 1971 - .core_note_type = NT_PRSTATUS, 1971 + USER_REGSET_NOTE_TYPE(PRSTATUS), 1972 1972 .n = COMPAT_ELF_NGREG, 1973 1973 .size = sizeof(compat_elf_greg_t), 1974 1974 .align = sizeof(compat_elf_greg_t), ··· 1976 1976 .set = compat_gpr_set 1977 1977 }, 1978 1978 [REGSET_FPR] = { 1979 - .core_note_type = NT_ARM_VFP, 1979 + USER_REGSET_NOTE_TYPE(ARM_VFP), 1980 1980 .n = VFP_STATE_SIZE / sizeof(compat_ulong_t), 1981 1981 .size = sizeof(compat_ulong_t), 1982 1982 .align = sizeof(compat_ulong_t), ··· 1984 1984 .set = compat_vfp_set 1985 1985 }, 1986 1986 [REGSET_TLS] = { 1987 - .core_note_type = NT_ARM_TLS, 1987 + USER_REGSET_NOTE_TYPE(ARM_TLS), 1988 1988 .n = 1, 1989 1989 .size = sizeof(compat_ulong_t), 1990 1990 .align = sizeof(compat_ulong_t), ··· 1993 1993 }, 1994 1994 #ifdef CONFIG_HAVE_HW_BREAKPOINT 1995 1995 [REGSET_HW_BREAK] = { 1996 - .core_note_type = NT_ARM_HW_BREAK, 1996 + USER_REGSET_NOTE_TYPE(ARM_HW_BREAK), 1997 1997 .n = sizeof(struct user_hwdebug_state) / sizeof(u32), 1998 1998 .size = sizeof(u32), 1999 1999 .align = sizeof(u32), ··· 2001 2001 .set = hw_break_set, 2002 2002 }, 2003 2003 [REGSET_HW_WATCH] = { 2004 - .core_note_type = NT_ARM_HW_WATCH, 2004 + USER_REGSET_NOTE_TYPE(ARM_HW_WATCH), 2005 2005 .n = sizeof(struct user_hwdebug_state) / sizeof(u32), 2006 2006 .size = sizeof(u32), 2007 2007 .align = sizeof(u32), ··· 2010 2010 }, 2011 2011 #endif 2012 2012 [REGSET_SYSTEM_CALL] = { 2013 - .core_note_type = NT_ARM_SYSTEM_CALL, 2013 + USER_REGSET_NOTE_TYPE(ARM_SYSTEM_CALL), 2014 2014 .n = 1, 2015 2015 .size = sizeof(int), 2016 2016 .align = sizeof(int),
+2 -2
arch/csky/kernel/ptrace.c
··· 166 166 167 167 static const struct user_regset csky_regsets[] = { 168 168 [REGSET_GPR] = { 169 - .core_note_type = NT_PRSTATUS, 169 + USER_REGSET_NOTE_TYPE(PRSTATUS), 170 170 .n = sizeof(struct pt_regs) / sizeof(u32), 171 171 .size = sizeof(u32), 172 172 .align = sizeof(u32), ··· 174 174 .set = gpr_set, 175 175 }, 176 176 [REGSET_FPR] = { 177 - .core_note_type = NT_PRFPREG, 177 + USER_REGSET_NOTE_TYPE(PRFPREG), 178 178 .n = sizeof(struct user_fp) / sizeof(u32), 179 179 .size = sizeof(u32), 180 180 .align = sizeof(u32),
+1 -1
arch/hexagon/kernel/ptrace.c
··· 137 137 138 138 static const struct user_regset hexagon_regsets[] = { 139 139 [REGSET_GENERAL] = { 140 - .core_note_type = NT_PRSTATUS, 140 + USER_REGSET_NOTE_TYPE(PRSTATUS), 141 141 .n = ELF_NGREG, 142 142 .size = sizeof(unsigned long), 143 143 .align = sizeof(unsigned long),
+8 -8
arch/loongarch/kernel/ptrace.c
··· 864 864 865 865 static const struct user_regset loongarch64_regsets[] = { 866 866 [REGSET_GPR] = { 867 - .core_note_type = NT_PRSTATUS, 867 + USER_REGSET_NOTE_TYPE(PRSTATUS), 868 868 .n = ELF_NGREG, 869 869 .size = sizeof(elf_greg_t), 870 870 .align = sizeof(elf_greg_t), ··· 872 872 .set = gpr_set, 873 873 }, 874 874 [REGSET_FPR] = { 875 - .core_note_type = NT_PRFPREG, 875 + USER_REGSET_NOTE_TYPE(PRFPREG), 876 876 .n = ELF_NFPREG, 877 877 .size = sizeof(elf_fpreg_t), 878 878 .align = sizeof(elf_fpreg_t), ··· 880 880 .set = fpr_set, 881 881 }, 882 882 [REGSET_CPUCFG] = { 883 - .core_note_type = NT_LOONGARCH_CPUCFG, 883 + USER_REGSET_NOTE_TYPE(LOONGARCH_CPUCFG), 884 884 .n = 64, 885 885 .size = sizeof(u32), 886 886 .align = sizeof(u32), ··· 889 889 }, 890 890 #ifdef CONFIG_CPU_HAS_LSX 891 891 [REGSET_LSX] = { 892 - .core_note_type = NT_LOONGARCH_LSX, 892 + USER_REGSET_NOTE_TYPE(LOONGARCH_LSX), 893 893 .n = NUM_FPU_REGS, 894 894 .size = 16, 895 895 .align = 16, ··· 899 899 #endif 900 900 #ifdef CONFIG_CPU_HAS_LASX 901 901 [REGSET_LASX] = { 902 - .core_note_type = NT_LOONGARCH_LASX, 902 + USER_REGSET_NOTE_TYPE(LOONGARCH_LASX), 903 903 .n = NUM_FPU_REGS, 904 904 .size = 32, 905 905 .align = 32, ··· 909 909 #endif 910 910 #ifdef CONFIG_CPU_HAS_LBT 911 911 [REGSET_LBT] = { 912 - .core_note_type = NT_LOONGARCH_LBT, 912 + USER_REGSET_NOTE_TYPE(LOONGARCH_LBT), 913 913 .n = 5, 914 914 .size = sizeof(u64), 915 915 .align = sizeof(u64), ··· 919 919 #endif 920 920 #ifdef CONFIG_HAVE_HW_BREAKPOINT 921 921 [REGSET_HW_BREAK] = { 922 - .core_note_type = NT_LOONGARCH_HW_BREAK, 922 + USER_REGSET_NOTE_TYPE(LOONGARCH_HW_BREAK), 923 923 .n = sizeof(struct user_watch_state_v2) / sizeof(u32), 924 924 .size = sizeof(u32), 925 925 .align = sizeof(u32), ··· 927 927 .set = hw_break_set, 928 928 }, 929 929 [REGSET_HW_WATCH] = { 930 - .core_note_type = NT_LOONGARCH_HW_WATCH, 930 + USER_REGSET_NOTE_TYPE(LOONGARCH_HW_WATCH), 931 931 .n = sizeof(struct user_watch_state_v2) / sizeof(u32), 932 932 .size = sizeof(u32), 933 933 .align = sizeof(u32),
+2 -2
arch/m68k/kernel/ptrace.c
··· 319 319 320 320 static const struct user_regset m68k_user_regsets[] = { 321 321 [REGSET_GPR] = { 322 - .core_note_type = NT_PRSTATUS, 322 + USER_REGSET_NOTE_TYPE(PRSTATUS), 323 323 .n = ELF_NGREG, 324 324 .size = sizeof(u32), 325 325 .align = sizeof(u16), ··· 327 327 }, 328 328 #ifdef CONFIG_FPU 329 329 [REGSET_FPU] = { 330 - .core_note_type = NT_PRFPREG, 330 + USER_REGSET_NOTE_TYPE(PRFPREG), 331 331 .n = sizeof(struct user_m68kfp_struct) / sizeof(u32), 332 332 .size = sizeof(u32), 333 333 .align = sizeof(u32),
+10 -10
arch/mips/kernel/ptrace.c
··· 935 935 936 936 static const struct user_regset mips_regsets[] = { 937 937 [REGSET_GPR] = { 938 - .core_note_type = NT_PRSTATUS, 938 + USER_REGSET_NOTE_TYPE(PRSTATUS), 939 939 .n = ELF_NGREG, 940 940 .size = sizeof(unsigned int), 941 941 .align = sizeof(unsigned int), ··· 943 943 .set = gpr32_set, 944 944 }, 945 945 [REGSET_DSP] = { 946 - .core_note_type = NT_MIPS_DSP, 946 + USER_REGSET_NOTE_TYPE(MIPS_DSP), 947 947 .n = NUM_DSP_REGS + 1, 948 948 .size = sizeof(u32), 949 949 .align = sizeof(u32), ··· 953 953 }, 954 954 #ifdef CONFIG_MIPS_FP_SUPPORT 955 955 [REGSET_FPR] = { 956 - .core_note_type = NT_PRFPREG, 956 + USER_REGSET_NOTE_TYPE(PRFPREG), 957 957 .n = ELF_NFPREG, 958 958 .size = sizeof(elf_fpreg_t), 959 959 .align = sizeof(elf_fpreg_t), ··· 961 961 .set = fpr_set, 962 962 }, 963 963 [REGSET_FP_MODE] = { 964 - .core_note_type = NT_MIPS_FP_MODE, 964 + USER_REGSET_NOTE_TYPE(MIPS_FP_MODE), 965 965 .n = 1, 966 966 .size = sizeof(int), 967 967 .align = sizeof(int), ··· 971 971 #endif 972 972 #ifdef CONFIG_CPU_HAS_MSA 973 973 [REGSET_MSA] = { 974 - .core_note_type = NT_MIPS_MSA, 974 + USER_REGSET_NOTE_TYPE(MIPS_MSA), 975 975 .n = NUM_FPU_REGS + 1, 976 976 .size = 16, 977 977 .align = 16, ··· 995 995 996 996 static const struct user_regset mips64_regsets[] = { 997 997 [REGSET_GPR] = { 998 - .core_note_type = NT_PRSTATUS, 998 + USER_REGSET_NOTE_TYPE(PRSTATUS), 999 999 .n = ELF_NGREG, 1000 1000 .size = sizeof(unsigned long), 1001 1001 .align = sizeof(unsigned long), ··· 1003 1003 .set = gpr64_set, 1004 1004 }, 1005 1005 [REGSET_DSP] = { 1006 - .core_note_type = NT_MIPS_DSP, 1006 + USER_REGSET_NOTE_TYPE(MIPS_DSP), 1007 1007 .n = NUM_DSP_REGS + 1, 1008 1008 .size = sizeof(u64), 1009 1009 .align = sizeof(u64), ··· 1013 1013 }, 1014 1014 #ifdef CONFIG_MIPS_FP_SUPPORT 1015 1015 [REGSET_FP_MODE] = { 1016 - .core_note_type = NT_MIPS_FP_MODE, 1016 + USER_REGSET_NOTE_TYPE(MIPS_FP_MODE), 1017 1017 .n = 1, 1018 1018 .size = sizeof(int), 1019 1019 .align = sizeof(int), ··· 1021 1021 .set = fp_mode_set, 1022 1022 }, 1023 1023 [REGSET_FPR] = { 1024 - .core_note_type = NT_PRFPREG, 1024 + USER_REGSET_NOTE_TYPE(PRFPREG), 1025 1025 .n = ELF_NFPREG, 1026 1026 .size = sizeof(elf_fpreg_t), 1027 1027 .align = sizeof(elf_fpreg_t), ··· 1031 1031 #endif 1032 1032 #ifdef CONFIG_CPU_HAS_MSA 1033 1033 [REGSET_MSA] = { 1034 - .core_note_type = NT_MIPS_MSA, 1034 + USER_REGSET_NOTE_TYPE(MIPS_MSA), 1035 1035 .n = NUM_FPU_REGS + 1, 1036 1036 .size = 16, 1037 1037 .align = 16,
+1 -1
arch/nios2/kernel/ptrace.c
··· 95 95 96 96 static const struct user_regset nios2_regsets[] = { 97 97 [REGSET_GENERAL] = { 98 - .core_note_type = NT_PRSTATUS, 98 + USER_REGSET_NOTE_TYPE(PRSTATUS), 99 99 .n = NUM_PTRACE_REG, 100 100 .size = sizeof(unsigned long), 101 101 .align = sizeof(unsigned long),
+2 -2
arch/openrisc/kernel/ptrace.c
··· 124 124 125 125 static const struct user_regset or1k_regsets[] = { 126 126 [REGSET_GENERAL] = { 127 - .core_note_type = NT_PRSTATUS, 127 + USER_REGSET_NOTE_TYPE(PRSTATUS), 128 128 .n = ELF_NGREG, 129 129 .size = sizeof(long), 130 130 .align = sizeof(long), ··· 133 133 }, 134 134 #ifdef CONFIG_FPU 135 135 [REGSET_FPU] = { 136 - .core_note_type = NT_PRFPREG, 136 + USER_REGSET_NOTE_TYPE(PRFPREG), 137 137 .n = sizeof(struct __or1k_fpu_state) / sizeof(long), 138 138 .size = sizeof(long), 139 139 .align = sizeof(long),
+4 -4
arch/parisc/kernel/ptrace.c
··· 562 562 563 563 static const struct user_regset native_regsets[] = { 564 564 [REGSET_GENERAL] = { 565 - .core_note_type = NT_PRSTATUS, .n = ELF_NGREG, 565 + USER_REGSET_NOTE_TYPE(PRSTATUS), .n = ELF_NGREG, 566 566 .size = sizeof(long), .align = sizeof(long), 567 567 .regset_get = gpr_get, .set = gpr_set 568 568 }, 569 569 [REGSET_FP] = { 570 - .core_note_type = NT_PRFPREG, .n = ELF_NFPREG, 570 + USER_REGSET_NOTE_TYPE(PRFPREG), .n = ELF_NFPREG, 571 571 .size = sizeof(__u64), .align = sizeof(__u64), 572 572 .regset_get = fpr_get, .set = fpr_set 573 573 } ··· 629 629 */ 630 630 static const struct user_regset compat_regsets[] = { 631 631 [REGSET_GENERAL] = { 632 - .core_note_type = NT_PRSTATUS, .n = ELF_NGREG, 632 + USER_REGSET_NOTE_TYPE(PRSTATUS), .n = ELF_NGREG, 633 633 .size = sizeof(compat_long_t), .align = sizeof(compat_long_t), 634 634 .regset_get = gpr32_get, .set = gpr32_set 635 635 }, 636 636 [REGSET_FP] = { 637 - .core_note_type = NT_PRFPREG, .n = ELF_NFPREG, 637 + USER_REGSET_NOTE_TYPE(PRFPREG), .n = ELF_NFPREG, 638 638 .size = sizeof(__u64), .align = sizeof(__u64), 639 639 .regset_get = fpr_get, .set = fpr_set 640 640 }
+37 -37
arch/powerpc/kernel/ptrace/ptrace-view.c
··· 568 568 569 569 static const struct user_regset native_regsets[] = { 570 570 [REGSET_GPR] = { 571 - .core_note_type = NT_PRSTATUS, .n = ELF_NGREG, 571 + USER_REGSET_NOTE_TYPE(PRSTATUS), .n = ELF_NGREG, 572 572 .size = sizeof(long), .align = sizeof(long), 573 573 .regset_get = gpr_get, .set = gpr_set 574 574 }, 575 575 [REGSET_FPR] = { 576 - .core_note_type = NT_PRFPREG, .n = ELF_NFPREG, 576 + USER_REGSET_NOTE_TYPE(PRFPREG), .n = ELF_NFPREG, 577 577 .size = sizeof(double), .align = sizeof(double), 578 578 .regset_get = fpr_get, .set = fpr_set 579 579 }, 580 580 #ifdef CONFIG_ALTIVEC 581 581 [REGSET_VMX] = { 582 - .core_note_type = NT_PPC_VMX, .n = 34, 582 + USER_REGSET_NOTE_TYPE(PPC_VMX), .n = 34, 583 583 .size = sizeof(vector128), .align = sizeof(vector128), 584 584 .active = vr_active, .regset_get = vr_get, .set = vr_set 585 585 }, 586 586 #endif 587 587 #ifdef CONFIG_VSX 588 588 [REGSET_VSX] = { 589 - .core_note_type = NT_PPC_VSX, .n = 32, 589 + USER_REGSET_NOTE_TYPE(PPC_VSX), .n = 32, 590 590 .size = sizeof(double), .align = sizeof(double), 591 591 .active = vsr_active, .regset_get = vsr_get, .set = vsr_set 592 592 }, 593 593 #endif 594 594 #ifdef CONFIG_SPE 595 595 [REGSET_SPE] = { 596 - .core_note_type = NT_PPC_SPE, .n = 35, 596 + USER_REGSET_NOTE_TYPE(PPC_SPE), .n = 35, 597 597 .size = sizeof(u32), .align = sizeof(u32), 598 598 .active = evr_active, .regset_get = evr_get, .set = evr_set 599 599 }, 600 600 #endif 601 601 #ifdef CONFIG_PPC_TRANSACTIONAL_MEM 602 602 [REGSET_TM_CGPR] = { 603 - .core_note_type = NT_PPC_TM_CGPR, .n = ELF_NGREG, 603 + USER_REGSET_NOTE_TYPE(PPC_TM_CGPR), .n = ELF_NGREG, 604 604 .size = sizeof(long), .align = sizeof(long), 605 605 .active = tm_cgpr_active, .regset_get = tm_cgpr_get, .set = tm_cgpr_set 606 606 }, 607 607 [REGSET_TM_CFPR] = { 608 - .core_note_type = NT_PPC_TM_CFPR, .n = ELF_NFPREG, 608 + USER_REGSET_NOTE_TYPE(PPC_TM_CFPR), .n = ELF_NFPREG, 609 609 .size = sizeof(double), .align = sizeof(double), 610 610 .active = tm_cfpr_active, .regset_get = tm_cfpr_get, .set = tm_cfpr_set 611 611 }, 612 612 [REGSET_TM_CVMX] = { 613 - .core_note_type = NT_PPC_TM_CVMX, .n = ELF_NVMX, 613 + USER_REGSET_NOTE_TYPE(PPC_TM_CVMX), .n = ELF_NVMX, 614 614 .size = sizeof(vector128), .align = sizeof(vector128), 615 615 .active = tm_cvmx_active, .regset_get = tm_cvmx_get, .set = tm_cvmx_set 616 616 }, 617 617 [REGSET_TM_CVSX] = { 618 - .core_note_type = NT_PPC_TM_CVSX, .n = ELF_NVSX, 618 + USER_REGSET_NOTE_TYPE(PPC_TM_CVSX), .n = ELF_NVSX, 619 619 .size = sizeof(double), .align = sizeof(double), 620 620 .active = tm_cvsx_active, .regset_get = tm_cvsx_get, .set = tm_cvsx_set 621 621 }, 622 622 [REGSET_TM_SPR] = { 623 - .core_note_type = NT_PPC_TM_SPR, .n = ELF_NTMSPRREG, 623 + USER_REGSET_NOTE_TYPE(PPC_TM_SPR), .n = ELF_NTMSPRREG, 624 624 .size = sizeof(u64), .align = sizeof(u64), 625 625 .active = tm_spr_active, .regset_get = tm_spr_get, .set = tm_spr_set 626 626 }, 627 627 [REGSET_TM_CTAR] = { 628 - .core_note_type = NT_PPC_TM_CTAR, .n = 1, 628 + USER_REGSET_NOTE_TYPE(PPC_TM_CTAR), .n = 1, 629 629 .size = sizeof(u64), .align = sizeof(u64), 630 630 .active = tm_tar_active, .regset_get = tm_tar_get, .set = tm_tar_set 631 631 }, 632 632 [REGSET_TM_CPPR] = { 633 - .core_note_type = NT_PPC_TM_CPPR, .n = 1, 633 + USER_REGSET_NOTE_TYPE(PPC_TM_CPPR), .n = 1, 634 634 .size = sizeof(u64), .align = sizeof(u64), 635 635 .active = tm_ppr_active, .regset_get = tm_ppr_get, .set = tm_ppr_set 636 636 }, 637 637 [REGSET_TM_CDSCR] = { 638 - .core_note_type = NT_PPC_TM_CDSCR, .n = 1, 638 + USER_REGSET_NOTE_TYPE(PPC_TM_CDSCR), .n = 1, 639 639 .size = sizeof(u64), .align = sizeof(u64), 640 640 .active = tm_dscr_active, .regset_get = tm_dscr_get, .set = tm_dscr_set 641 641 }, 642 642 #endif 643 643 #ifdef CONFIG_PPC64 644 644 [REGSET_PPR] = { 645 - .core_note_type = NT_PPC_PPR, .n = 1, 645 + USER_REGSET_NOTE_TYPE(PPC_PPR), .n = 1, 646 646 .size = sizeof(u64), .align = sizeof(u64), 647 647 .regset_get = ppr_get, .set = ppr_set 648 648 }, 649 649 [REGSET_DSCR] = { 650 - .core_note_type = NT_PPC_DSCR, .n = 1, 650 + USER_REGSET_NOTE_TYPE(PPC_DSCR), .n = 1, 651 651 .size = sizeof(u64), .align = sizeof(u64), 652 652 .regset_get = dscr_get, .set = dscr_set 653 653 }, 654 654 #endif 655 655 #ifdef CONFIG_PPC_BOOK3S_64 656 656 [REGSET_TAR] = { 657 - .core_note_type = NT_PPC_TAR, .n = 1, 657 + USER_REGSET_NOTE_TYPE(PPC_TAR), .n = 1, 658 658 .size = sizeof(u64), .align = sizeof(u64), 659 659 .regset_get = tar_get, .set = tar_set 660 660 }, 661 661 [REGSET_EBB] = { 662 - .core_note_type = NT_PPC_EBB, .n = ELF_NEBB, 662 + USER_REGSET_NOTE_TYPE(PPC_EBB), .n = ELF_NEBB, 663 663 .size = sizeof(u64), .align = sizeof(u64), 664 664 .active = ebb_active, .regset_get = ebb_get, .set = ebb_set 665 665 }, 666 666 [REGSET_PMR] = { 667 - .core_note_type = NT_PPC_PMU, .n = ELF_NPMU, 667 + USER_REGSET_NOTE_TYPE(PPC_PMU), .n = ELF_NPMU, 668 668 .size = sizeof(u64), .align = sizeof(u64), 669 669 .active = pmu_active, .regset_get = pmu_get, .set = pmu_set 670 670 }, 671 671 [REGSET_DEXCR] = { 672 - .core_note_type = NT_PPC_DEXCR, .n = ELF_NDEXCR, 672 + USER_REGSET_NOTE_TYPE(PPC_DEXCR), .n = ELF_NDEXCR, 673 673 .size = sizeof(u64), .align = sizeof(u64), 674 674 .active = dexcr_active, .regset_get = dexcr_get 675 675 }, 676 676 #ifdef CONFIG_CHECKPOINT_RESTORE 677 677 [REGSET_HASHKEYR] = { 678 - .core_note_type = NT_PPC_HASHKEYR, .n = ELF_NHASHKEYR, 678 + USER_REGSET_NOTE_TYPE(PPC_HASHKEYR), .n = ELF_NHASHKEYR, 679 679 .size = sizeof(u64), .align = sizeof(u64), 680 680 .active = hashkeyr_active, .regset_get = hashkeyr_get, .set = hashkeyr_set 681 681 }, ··· 683 683 #endif 684 684 #ifdef CONFIG_PPC_MEM_KEYS 685 685 [REGSET_PKEY] = { 686 - .core_note_type = NT_PPC_PKEY, .n = ELF_NPKEY, 686 + USER_REGSET_NOTE_TYPE(PPC_PKEY), .n = ELF_NPKEY, 687 687 .size = sizeof(u64), .align = sizeof(u64), 688 688 .active = pkey_active, .regset_get = pkey_get, .set = pkey_set 689 689 }, ··· 843 843 */ 844 844 static const struct user_regset compat_regsets[] = { 845 845 [REGSET_GPR] = { 846 - .core_note_type = NT_PRSTATUS, .n = ELF_NGREG, 846 + USER_REGSET_NOTE_TYPE(PRSTATUS), .n = ELF_NGREG, 847 847 .size = sizeof(compat_long_t), .align = sizeof(compat_long_t), 848 848 .regset_get = gpr32_get, .set = gpr32_set 849 849 }, 850 850 [REGSET_FPR] = { 851 - .core_note_type = NT_PRFPREG, .n = ELF_NFPREG, 851 + USER_REGSET_NOTE_TYPE(PRFPREG), .n = ELF_NFPREG, 852 852 .size = sizeof(double), .align = sizeof(double), 853 853 .regset_get = fpr_get, .set = fpr_set 854 854 }, 855 855 #ifdef CONFIG_ALTIVEC 856 856 [REGSET_VMX] = { 857 - .core_note_type = NT_PPC_VMX, .n = 34, 857 + USER_REGSET_NOTE_TYPE(PPC_VMX), .n = 34, 858 858 .size = sizeof(vector128), .align = sizeof(vector128), 859 859 .active = vr_active, .regset_get = vr_get, .set = vr_set 860 860 }, 861 861 #endif 862 862 #ifdef CONFIG_SPE 863 863 [REGSET_SPE] = { 864 - .core_note_type = NT_PPC_SPE, .n = 35, 864 + USER_REGSET_NOTE_TYPE(PPC_SPE), .n = 35, 865 865 .size = sizeof(u32), .align = sizeof(u32), 866 866 .active = evr_active, .regset_get = evr_get, .set = evr_set 867 867 }, 868 868 #endif 869 869 #ifdef CONFIG_PPC_TRANSACTIONAL_MEM 870 870 [REGSET_TM_CGPR] = { 871 - .core_note_type = NT_PPC_TM_CGPR, .n = ELF_NGREG, 871 + USER_REGSET_NOTE_TYPE(PPC_TM_CGPR), .n = ELF_NGREG, 872 872 .size = sizeof(long), .align = sizeof(long), 873 873 .active = tm_cgpr_active, 874 874 .regset_get = tm_cgpr32_get, .set = tm_cgpr32_set 875 875 }, 876 876 [REGSET_TM_CFPR] = { 877 - .core_note_type = NT_PPC_TM_CFPR, .n = ELF_NFPREG, 877 + USER_REGSET_NOTE_TYPE(PPC_TM_CFPR), .n = ELF_NFPREG, 878 878 .size = sizeof(double), .align = sizeof(double), 879 879 .active = tm_cfpr_active, .regset_get = tm_cfpr_get, .set = tm_cfpr_set 880 880 }, 881 881 [REGSET_TM_CVMX] = { 882 - .core_note_type = NT_PPC_TM_CVMX, .n = ELF_NVMX, 882 + USER_REGSET_NOTE_TYPE(PPC_TM_CVMX), .n = ELF_NVMX, 883 883 .size = sizeof(vector128), .align = sizeof(vector128), 884 884 .active = tm_cvmx_active, .regset_get = tm_cvmx_get, .set = tm_cvmx_set 885 885 }, 886 886 [REGSET_TM_CVSX] = { 887 - .core_note_type = NT_PPC_TM_CVSX, .n = ELF_NVSX, 887 + USER_REGSET_NOTE_TYPE(PPC_TM_CVSX), .n = ELF_NVSX, 888 888 .size = sizeof(double), .align = sizeof(double), 889 889 .active = tm_cvsx_active, .regset_get = tm_cvsx_get, .set = tm_cvsx_set 890 890 }, 891 891 [REGSET_TM_SPR] = { 892 - .core_note_type = NT_PPC_TM_SPR, .n = ELF_NTMSPRREG, 892 + USER_REGSET_NOTE_TYPE(PPC_TM_SPR), .n = ELF_NTMSPRREG, 893 893 .size = sizeof(u64), .align = sizeof(u64), 894 894 .active = tm_spr_active, .regset_get = tm_spr_get, .set = tm_spr_set 895 895 }, 896 896 [REGSET_TM_CTAR] = { 897 - .core_note_type = NT_PPC_TM_CTAR, .n = 1, 897 + USER_REGSET_NOTE_TYPE(PPC_TM_CTAR), .n = 1, 898 898 .size = sizeof(u64), .align = sizeof(u64), 899 899 .active = tm_tar_active, .regset_get = tm_tar_get, .set = tm_tar_set 900 900 }, 901 901 [REGSET_TM_CPPR] = { 902 - .core_note_type = NT_PPC_TM_CPPR, .n = 1, 902 + USER_REGSET_NOTE_TYPE(PPC_TM_CPPR), .n = 1, 903 903 .size = sizeof(u64), .align = sizeof(u64), 904 904 .active = tm_ppr_active, .regset_get = tm_ppr_get, .set = tm_ppr_set 905 905 }, 906 906 [REGSET_TM_CDSCR] = { 907 - .core_note_type = NT_PPC_TM_CDSCR, .n = 1, 907 + USER_REGSET_NOTE_TYPE(PPC_TM_CDSCR), .n = 1, 908 908 .size = sizeof(u64), .align = sizeof(u64), 909 909 .active = tm_dscr_active, .regset_get = tm_dscr_get, .set = tm_dscr_set 910 910 }, 911 911 #endif 912 912 #ifdef CONFIG_PPC64 913 913 [REGSET_PPR] = { 914 - .core_note_type = NT_PPC_PPR, .n = 1, 914 + USER_REGSET_NOTE_TYPE(PPC_PPR), .n = 1, 915 915 .size = sizeof(u64), .align = sizeof(u64), 916 916 .regset_get = ppr_get, .set = ppr_set 917 917 }, 918 918 [REGSET_DSCR] = { 919 - .core_note_type = NT_PPC_DSCR, .n = 1, 919 + USER_REGSET_NOTE_TYPE(PPC_DSCR), .n = 1, 920 920 .size = sizeof(u64), .align = sizeof(u64), 921 921 .regset_get = dscr_get, .set = dscr_set 922 922 }, 923 923 #endif 924 924 #ifdef CONFIG_PPC_BOOK3S_64 925 925 [REGSET_TAR] = { 926 - .core_note_type = NT_PPC_TAR, .n = 1, 926 + USER_REGSET_NOTE_TYPE(PPC_TAR), .n = 1, 927 927 .size = sizeof(u64), .align = sizeof(u64), 928 928 .regset_get = tar_get, .set = tar_set 929 929 }, 930 930 [REGSET_EBB] = { 931 - .core_note_type = NT_PPC_EBB, .n = ELF_NEBB, 931 + USER_REGSET_NOTE_TYPE(PPC_EBB), .n = ELF_NEBB, 932 932 .size = sizeof(u64), .align = sizeof(u64), 933 933 .active = ebb_active, .regset_get = ebb_get, .set = ebb_set 934 934 },
+6 -6
arch/riscv/kernel/ptrace.c
··· 186 186 187 187 static const struct user_regset riscv_user_regset[] = { 188 188 [REGSET_X] = { 189 - .core_note_type = NT_PRSTATUS, 189 + USER_REGSET_NOTE_TYPE(PRSTATUS), 190 190 .n = ELF_NGREG, 191 191 .size = sizeof(elf_greg_t), 192 192 .align = sizeof(elf_greg_t), ··· 195 195 }, 196 196 #ifdef CONFIG_FPU 197 197 [REGSET_F] = { 198 - .core_note_type = NT_PRFPREG, 198 + USER_REGSET_NOTE_TYPE(PRFPREG), 199 199 .n = ELF_NFPREG, 200 200 .size = sizeof(elf_fpreg_t), 201 201 .align = sizeof(elf_fpreg_t), ··· 205 205 #endif 206 206 #ifdef CONFIG_RISCV_ISA_V 207 207 [REGSET_V] = { 208 - .core_note_type = NT_RISCV_VECTOR, 208 + USER_REGSET_NOTE_TYPE(RISCV_VECTOR), 209 209 .align = 16, 210 210 .n = ((32 * RISCV_MAX_VLENB) + 211 211 sizeof(struct __riscv_v_regset_state)) / sizeof(__u32), ··· 216 216 #endif 217 217 #ifdef CONFIG_RISCV_ISA_SUPM 218 218 [REGSET_TAGGED_ADDR_CTRL] = { 219 - .core_note_type = NT_RISCV_TAGGED_ADDR_CTRL, 219 + USER_REGSET_NOTE_TYPE(RISCV_TAGGED_ADDR_CTRL), 220 220 .n = 1, 221 221 .size = sizeof(long), 222 222 .align = sizeof(long), ··· 380 380 381 381 static const struct user_regset compat_riscv_user_regset[] = { 382 382 [REGSET_X] = { 383 - .core_note_type = NT_PRSTATUS, 383 + USER_REGSET_NOTE_TYPE(PRSTATUS), 384 384 .n = ELF_NGREG, 385 385 .size = sizeof(compat_elf_greg_t), 386 386 .align = sizeof(compat_elf_greg_t), ··· 389 389 }, 390 390 #ifdef CONFIG_FPU 391 391 [REGSET_F] = { 392 - .core_note_type = NT_PRFPREG, 392 + USER_REGSET_NOTE_TYPE(PRFPREG), 393 393 .n = ELF_NFPREG, 394 394 .size = sizeof(elf_fpreg_t), 395 395 .align = sizeof(elf_fpreg_t),
+21 -21
arch/s390/kernel/ptrace.c
··· 1209 1209 1210 1210 static const struct user_regset s390_regsets[] = { 1211 1211 { 1212 - .core_note_type = NT_PRSTATUS, 1212 + USER_REGSET_NOTE_TYPE(PRSTATUS), 1213 1213 .n = sizeof(s390_regs) / sizeof(long), 1214 1214 .size = sizeof(long), 1215 1215 .align = sizeof(long), ··· 1217 1217 .set = s390_regs_set, 1218 1218 }, 1219 1219 { 1220 - .core_note_type = NT_PRFPREG, 1220 + USER_REGSET_NOTE_TYPE(PRFPREG), 1221 1221 .n = sizeof(s390_fp_regs) / sizeof(long), 1222 1222 .size = sizeof(long), 1223 1223 .align = sizeof(long), ··· 1225 1225 .set = s390_fpregs_set, 1226 1226 }, 1227 1227 { 1228 - .core_note_type = NT_S390_SYSTEM_CALL, 1228 + USER_REGSET_NOTE_TYPE(S390_SYSTEM_CALL), 1229 1229 .n = 1, 1230 1230 .size = sizeof(unsigned int), 1231 1231 .align = sizeof(unsigned int), ··· 1233 1233 .set = s390_system_call_set, 1234 1234 }, 1235 1235 { 1236 - .core_note_type = NT_S390_LAST_BREAK, 1236 + USER_REGSET_NOTE_TYPE(S390_LAST_BREAK), 1237 1237 .n = 1, 1238 1238 .size = sizeof(long), 1239 1239 .align = sizeof(long), ··· 1241 1241 .set = s390_last_break_set, 1242 1242 }, 1243 1243 { 1244 - .core_note_type = NT_S390_TDB, 1244 + USER_REGSET_NOTE_TYPE(S390_TDB), 1245 1245 .n = 1, 1246 1246 .size = 256, 1247 1247 .align = 1, ··· 1249 1249 .set = s390_tdb_set, 1250 1250 }, 1251 1251 { 1252 - .core_note_type = NT_S390_VXRS_LOW, 1252 + USER_REGSET_NOTE_TYPE(S390_VXRS_LOW), 1253 1253 .n = __NUM_VXRS_LOW, 1254 1254 .size = sizeof(__u64), 1255 1255 .align = sizeof(__u64), ··· 1257 1257 .set = s390_vxrs_low_set, 1258 1258 }, 1259 1259 { 1260 - .core_note_type = NT_S390_VXRS_HIGH, 1260 + USER_REGSET_NOTE_TYPE(S390_VXRS_HIGH), 1261 1261 .n = __NUM_VXRS_HIGH, 1262 1262 .size = sizeof(__vector128), 1263 1263 .align = sizeof(__vector128), ··· 1265 1265 .set = s390_vxrs_high_set, 1266 1266 }, 1267 1267 { 1268 - .core_note_type = NT_S390_GS_CB, 1268 + USER_REGSET_NOTE_TYPE(S390_GS_CB), 1269 1269 .n = sizeof(struct gs_cb) / sizeof(__u64), 1270 1270 .size = sizeof(__u64), 1271 1271 .align = sizeof(__u64), ··· 1273 1273 .set = s390_gs_cb_set, 1274 1274 }, 1275 1275 { 1276 - .core_note_type = NT_S390_GS_BC, 1276 + USER_REGSET_NOTE_TYPE(S390_GS_BC), 1277 1277 .n = sizeof(struct gs_cb) / sizeof(__u64), 1278 1278 .size = sizeof(__u64), 1279 1279 .align = sizeof(__u64), ··· 1281 1281 .set = s390_gs_bc_set, 1282 1282 }, 1283 1283 { 1284 - .core_note_type = NT_S390_RI_CB, 1284 + USER_REGSET_NOTE_TYPE(S390_RI_CB), 1285 1285 .n = sizeof(struct runtime_instr_cb) / sizeof(__u64), 1286 1286 .size = sizeof(__u64), 1287 1287 .align = sizeof(__u64), ··· 1413 1413 1414 1414 static const struct user_regset s390_compat_regsets[] = { 1415 1415 { 1416 - .core_note_type = NT_PRSTATUS, 1416 + USER_REGSET_NOTE_TYPE(PRSTATUS), 1417 1417 .n = sizeof(s390_compat_regs) / sizeof(compat_long_t), 1418 1418 .size = sizeof(compat_long_t), 1419 1419 .align = sizeof(compat_long_t), ··· 1421 1421 .set = s390_compat_regs_set, 1422 1422 }, 1423 1423 { 1424 - .core_note_type = NT_PRFPREG, 1424 + USER_REGSET_NOTE_TYPE(PRFPREG), 1425 1425 .n = sizeof(s390_fp_regs) / sizeof(compat_long_t), 1426 1426 .size = sizeof(compat_long_t), 1427 1427 .align = sizeof(compat_long_t), ··· 1429 1429 .set = s390_fpregs_set, 1430 1430 }, 1431 1431 { 1432 - .core_note_type = NT_S390_SYSTEM_CALL, 1432 + USER_REGSET_NOTE_TYPE(S390_SYSTEM_CALL), 1433 1433 .n = 1, 1434 1434 .size = sizeof(compat_uint_t), 1435 1435 .align = sizeof(compat_uint_t), ··· 1437 1437 .set = s390_system_call_set, 1438 1438 }, 1439 1439 { 1440 - .core_note_type = NT_S390_LAST_BREAK, 1440 + USER_REGSET_NOTE_TYPE(S390_LAST_BREAK), 1441 1441 .n = 1, 1442 1442 .size = sizeof(long), 1443 1443 .align = sizeof(long), ··· 1445 1445 .set = s390_compat_last_break_set, 1446 1446 }, 1447 1447 { 1448 - .core_note_type = NT_S390_TDB, 1448 + USER_REGSET_NOTE_TYPE(S390_TDB), 1449 1449 .n = 1, 1450 1450 .size = 256, 1451 1451 .align = 1, ··· 1453 1453 .set = s390_tdb_set, 1454 1454 }, 1455 1455 { 1456 - .core_note_type = NT_S390_VXRS_LOW, 1456 + USER_REGSET_NOTE_TYPE(S390_VXRS_LOW), 1457 1457 .n = __NUM_VXRS_LOW, 1458 1458 .size = sizeof(__u64), 1459 1459 .align = sizeof(__u64), ··· 1461 1461 .set = s390_vxrs_low_set, 1462 1462 }, 1463 1463 { 1464 - .core_note_type = NT_S390_VXRS_HIGH, 1464 + USER_REGSET_NOTE_TYPE(S390_VXRS_HIGH), 1465 1465 .n = __NUM_VXRS_HIGH, 1466 1466 .size = sizeof(__vector128), 1467 1467 .align = sizeof(__vector128), ··· 1469 1469 .set = s390_vxrs_high_set, 1470 1470 }, 1471 1471 { 1472 - .core_note_type = NT_S390_HIGH_GPRS, 1472 + USER_REGSET_NOTE_TYPE(S390_HIGH_GPRS), 1473 1473 .n = sizeof(s390_compat_regs_high) / sizeof(compat_long_t), 1474 1474 .size = sizeof(compat_long_t), 1475 1475 .align = sizeof(compat_long_t), ··· 1477 1477 .set = s390_compat_regs_high_set, 1478 1478 }, 1479 1479 { 1480 - .core_note_type = NT_S390_GS_CB, 1480 + USER_REGSET_NOTE_TYPE(S390_GS_CB), 1481 1481 .n = sizeof(struct gs_cb) / sizeof(__u64), 1482 1482 .size = sizeof(__u64), 1483 1483 .align = sizeof(__u64), ··· 1485 1485 .set = s390_gs_cb_set, 1486 1486 }, 1487 1487 { 1488 - .core_note_type = NT_S390_GS_BC, 1488 + USER_REGSET_NOTE_TYPE(S390_GS_BC), 1489 1489 .n = sizeof(struct gs_cb) / sizeof(__u64), 1490 1490 .size = sizeof(__u64), 1491 1491 .align = sizeof(__u64), ··· 1493 1493 .set = s390_gs_bc_set, 1494 1494 }, 1495 1495 { 1496 - .core_note_type = NT_S390_RI_CB, 1496 + USER_REGSET_NOTE_TYPE(S390_RI_CB), 1497 1497 .n = sizeof(struct runtime_instr_cb) / sizeof(__u64), 1498 1498 .size = sizeof(__u64), 1499 1499 .align = sizeof(__u64),
+2 -2
arch/sh/kernel/ptrace_32.c
··· 291 291 * PC, PR, SR, GBR, MACH, MACL, TRA 292 292 */ 293 293 [REGSET_GENERAL] = { 294 - .core_note_type = NT_PRSTATUS, 294 + USER_REGSET_NOTE_TYPE(PRSTATUS), 295 295 .n = ELF_NGREG, 296 296 .size = sizeof(long), 297 297 .align = sizeof(long), ··· 301 301 302 302 #ifdef CONFIG_SH_FPU 303 303 [REGSET_FPU] = { 304 - .core_note_type = NT_PRFPREG, 304 + USER_REGSET_NOTE_TYPE(PRFPREG), 305 305 .n = sizeof(struct user_fpu_struct) / sizeof(long), 306 306 .size = sizeof(long), 307 307 .align = sizeof(long),
+2 -2
arch/sparc/kernel/ptrace_32.c
··· 218 218 * PSR, PC, nPC, Y, WIM, TBR 219 219 */ 220 220 [REGSET_GENERAL] = { 221 - .core_note_type = NT_PRSTATUS, 221 + USER_REGSET_NOTE_TYPE(PRSTATUS), 222 222 .n = 38, 223 223 .size = sizeof(u32), .align = sizeof(u32), 224 224 .regset_get = genregs32_get, .set = genregs32_set ··· 234 234 * FPU QUEUE (64 32-bit ints) 235 235 */ 236 236 [REGSET_FP] = { 237 - .core_note_type = NT_PRFPREG, 237 + USER_REGSET_NOTE_TYPE(PRFPREG), 238 238 .n = 99, 239 239 .size = sizeof(u32), .align = sizeof(u32), 240 240 .regset_get = fpregs32_get, .set = fpregs32_set
+4 -4
arch/sparc/kernel/ptrace_64.c
··· 420 420 * TSTATE, TPC, TNPC, Y 421 421 */ 422 422 [REGSET_GENERAL] = { 423 - .core_note_type = NT_PRSTATUS, 423 + USER_REGSET_NOTE_TYPE(PRSTATUS), 424 424 .n = 36, 425 425 .size = sizeof(u64), .align = sizeof(u64), 426 426 .regset_get = genregs64_get, .set = genregs64_set ··· 432 432 * FPRS 433 433 */ 434 434 [REGSET_FP] = { 435 - .core_note_type = NT_PRFPREG, 435 + USER_REGSET_NOTE_TYPE(PRFPREG), 436 436 .n = 35, 437 437 .size = sizeof(u64), .align = sizeof(u64), 438 438 .regset_get = fpregs64_get, .set = fpregs64_set ··· 750 750 * PSR, PC, nPC, Y, WIM, TBR 751 751 */ 752 752 [REGSET_GENERAL] = { 753 - .core_note_type = NT_PRSTATUS, 753 + USER_REGSET_NOTE_TYPE(PRSTATUS), 754 754 .n = 38, 755 755 .size = sizeof(u32), .align = sizeof(u32), 756 756 .regset_get = genregs32_get, .set = genregs32_set ··· 766 766 * FPU QUEUE (64 32-bit ints) 767 767 */ 768 768 [REGSET_FP] = { 769 - .core_note_type = NT_PRFPREG, 769 + USER_REGSET_NOTE_TYPE(PRFPREG), 770 770 .n = 99, 771 771 .size = sizeof(u32), .align = sizeof(u32), 772 772 .regset_get = fpregs32_get, .set = fpregs32_set
+11 -11
arch/x86/kernel/ptrace.c
··· 1236 1236 1237 1237 static struct user_regset x86_64_regsets[] __ro_after_init = { 1238 1238 [REGSET64_GENERAL] = { 1239 - .core_note_type = NT_PRSTATUS, 1239 + USER_REGSET_NOTE_TYPE(PRSTATUS), 1240 1240 .n = sizeof(struct user_regs_struct) / sizeof(long), 1241 1241 .size = sizeof(long), 1242 1242 .align = sizeof(long), ··· 1244 1244 .set = genregs_set 1245 1245 }, 1246 1246 [REGSET64_FP] = { 1247 - .core_note_type = NT_PRFPREG, 1247 + USER_REGSET_NOTE_TYPE(PRFPREG), 1248 1248 .n = sizeof(struct fxregs_state) / sizeof(long), 1249 1249 .size = sizeof(long), 1250 1250 .align = sizeof(long), ··· 1253 1253 .set = xfpregs_set 1254 1254 }, 1255 1255 [REGSET64_XSTATE] = { 1256 - .core_note_type = NT_X86_XSTATE, 1256 + USER_REGSET_NOTE_TYPE(X86_XSTATE), 1257 1257 .size = sizeof(u64), 1258 1258 .align = sizeof(u64), 1259 1259 .active = xstateregs_active, ··· 1261 1261 .set = xstateregs_set 1262 1262 }, 1263 1263 [REGSET64_IOPERM] = { 1264 - .core_note_type = NT_386_IOPERM, 1264 + USER_REGSET_NOTE_TYPE(386_IOPERM), 1265 1265 .n = IO_BITMAP_LONGS, 1266 1266 .size = sizeof(long), 1267 1267 .align = sizeof(long), ··· 1270 1270 }, 1271 1271 #ifdef CONFIG_X86_USER_SHADOW_STACK 1272 1272 [REGSET64_SSP] = { 1273 - .core_note_type = NT_X86_SHSTK, 1273 + USER_REGSET_NOTE_TYPE(X86_SHSTK), 1274 1274 .n = 1, 1275 1275 .size = sizeof(u64), 1276 1276 .align = sizeof(u64), ··· 1297 1297 #if defined CONFIG_X86_32 || defined CONFIG_IA32_EMULATION 1298 1298 static struct user_regset x86_32_regsets[] __ro_after_init = { 1299 1299 [REGSET32_GENERAL] = { 1300 - .core_note_type = NT_PRSTATUS, 1300 + USER_REGSET_NOTE_TYPE(PRSTATUS), 1301 1301 .n = sizeof(struct user_regs_struct32) / sizeof(u32), 1302 1302 .size = sizeof(u32), 1303 1303 .align = sizeof(u32), ··· 1305 1305 .set = genregs32_set 1306 1306 }, 1307 1307 [REGSET32_FP] = { 1308 - .core_note_type = NT_PRFPREG, 1308 + USER_REGSET_NOTE_TYPE(PRFPREG), 1309 1309 .n = sizeof(struct user_i387_ia32_struct) / sizeof(u32), 1310 1310 .size = sizeof(u32), 1311 1311 .align = sizeof(u32), ··· 1314 1314 .set = fpregs_set 1315 1315 }, 1316 1316 [REGSET32_XFP] = { 1317 - .core_note_type = NT_PRXFPREG, 1317 + USER_REGSET_NOTE_TYPE(PRXFPREG), 1318 1318 .n = sizeof(struct fxregs_state) / sizeof(u32), 1319 1319 .size = sizeof(u32), 1320 1320 .align = sizeof(u32), ··· 1323 1323 .set = xfpregs_set 1324 1324 }, 1325 1325 [REGSET32_XSTATE] = { 1326 - .core_note_type = NT_X86_XSTATE, 1326 + USER_REGSET_NOTE_TYPE(X86_XSTATE), 1327 1327 .size = sizeof(u64), 1328 1328 .align = sizeof(u64), 1329 1329 .active = xstateregs_active, ··· 1331 1331 .set = xstateregs_set 1332 1332 }, 1333 1333 [REGSET32_TLS] = { 1334 - .core_note_type = NT_386_TLS, 1334 + USER_REGSET_NOTE_TYPE(386_TLS), 1335 1335 .n = GDT_ENTRY_TLS_ENTRIES, 1336 1336 .bias = GDT_ENTRY_TLS_MIN, 1337 1337 .size = sizeof(struct user_desc), ··· 1341 1341 .set = regset_tls_set 1342 1342 }, 1343 1343 [REGSET32_IOPERM] = { 1344 - .core_note_type = NT_386_IOPERM, 1344 + USER_REGSET_NOTE_TYPE(386_IOPERM), 1345 1345 .n = IO_BITMAP_BYTES / sizeof(u32), 1346 1346 .size = sizeof(u32), 1347 1347 .align = sizeof(u32),
+5 -5
arch/x86/um/ptrace.c
··· 236 236 237 237 static struct user_regset uml_regsets[] __ro_after_init = { 238 238 [REGSET_GENERAL] = { 239 - .core_note_type = NT_PRSTATUS, 239 + USER_REGSET_NOTE_TYPE(PRSTATUS), 240 240 .n = sizeof(struct user_regs_struct) / sizeof(long), 241 241 .size = sizeof(long), 242 242 .align = sizeof(long), ··· 246 246 #ifdef CONFIG_X86_32 247 247 /* Old FP registers, they are needed in signal frames */ 248 248 [REGSET_FP_LEGACY] = { 249 - .core_note_type = NT_PRFPREG, 249 + USER_REGSET_NOTE_TYPE(PRFPREG), 250 250 .n = sizeof(struct user_i387_ia32_struct) / sizeof(long), 251 251 .size = sizeof(long), 252 252 .align = sizeof(long), ··· 257 257 #endif 258 258 [REGSET_FP] = { 259 259 #ifdef CONFIG_X86_32 260 - .core_note_type = NT_PRXFPREG, 260 + USER_REGSET_NOTE_TYPE(PRXFPREG), 261 261 .n = sizeof(struct user32_fxsr_struct) / sizeof(long), 262 262 #else 263 - .core_note_type = NT_PRFPREG, 263 + USER_REGSET_NOTE_TYPE(PRFPREG), 264 264 .n = sizeof(struct user_i387_struct) / sizeof(long), 265 265 #endif 266 266 .size = sizeof(long), ··· 270 270 .set = generic_fpregs_set, 271 271 }, 272 272 [REGSET_XSTATE] = { 273 - .core_note_type = NT_X86_XSTATE, 273 + USER_REGSET_NOTE_TYPE(X86_XSTATE), 274 274 .size = sizeof(long), 275 275 .align = sizeof(long), 276 276 .active = generic_fpregs_active,
+2 -2
arch/xtensa/kernel/ptrace.c
··· 193 193 194 194 static const struct user_regset xtensa_regsets[] = { 195 195 [REGSET_GPR] = { 196 - .core_note_type = NT_PRSTATUS, 196 + USER_REGSET_NOTE_TYPE(PRSTATUS), 197 197 .n = sizeof(struct user_pt_regs) / sizeof(u32), 198 198 .size = sizeof(u32), 199 199 .align = sizeof(u32), ··· 201 201 .set = gpr_set, 202 202 }, 203 203 [REGSET_TIE] = { 204 - .core_note_type = NT_PRFPREG, 204 + USER_REGSET_NOTE_TYPE(PRFPREG), 205 205 .n = sizeof(elf_xtregs_t) / sizeof(u32), 206 206 .size = sizeof(u32), 207 207 .align = sizeof(u32),
+24 -14
fs/binfmt_elf.c
··· 519 519 /* Sanity check the number of program headers... */ 520 520 /* ...and their total size. */ 521 521 size = sizeof(struct elf_phdr) * elf_ex->e_phnum; 522 - if (size == 0 || size > 65536 || size > ELF_MIN_ALIGN) 522 + if (size == 0 || size > 65536) 523 523 goto out; 524 524 525 525 elf_phdata = kmalloc(size, GFP_KERNEL); ··· 1450 1450 phdr->p_align = 4; 1451 1451 } 1452 1452 1453 - static void fill_note(struct memelfnote *note, const char *name, int type, 1454 - unsigned int sz, void *data) 1453 + static void __fill_note(struct memelfnote *note, const char *name, int type, 1454 + unsigned int sz, void *data) 1455 1455 { 1456 1456 note->name = name; 1457 1457 note->type = type; 1458 1458 note->datasz = sz; 1459 1459 note->data = data; 1460 1460 } 1461 + 1462 + #define fill_note(note, type, sz, data) \ 1463 + __fill_note(note, NN_ ## type, NT_ ## type, sz, data) 1461 1464 1462 1465 /* 1463 1466 * fill up all the fields in prstatus from the given task struct, except ··· 1552 1549 do 1553 1550 i += 2; 1554 1551 while (auxv[i - 2] != AT_NULL); 1555 - fill_note(note, NN_AUXV, NT_AUXV, i * sizeof(elf_addr_t), auxv); 1552 + fill_note(note, AUXV, i * sizeof(elf_addr_t), auxv); 1556 1553 } 1557 1554 1558 1555 static void fill_siginfo_note(struct memelfnote *note, user_siginfo_t *csigdata, 1559 1556 const kernel_siginfo_t *siginfo) 1560 1557 { 1561 1558 copy_siginfo_to_external(csigdata, siginfo); 1562 - fill_note(note, NN_SIGINFO, NT_SIGINFO, sizeof(*csigdata), csigdata); 1559 + fill_note(note, SIGINFO, sizeof(*csigdata), csigdata); 1563 1560 } 1564 1561 1565 1562 /* ··· 1655 1652 } 1656 1653 1657 1654 size = name_curpos - (char *)data; 1658 - fill_note(note, NN_FILE, NT_FILE, size, data); 1655 + fill_note(note, FILE, size, data); 1659 1656 return 0; 1660 1657 } 1661 1658 ··· 1716 1713 regset_get(t->task, &view->regsets[0], 1717 1714 sizeof(t->prstatus.pr_reg), &t->prstatus.pr_reg); 1718 1715 1719 - fill_note(&t->notes[0], NN_PRSTATUS, NT_PRSTATUS, 1720 - PRSTATUS_SIZE, &t->prstatus); 1716 + fill_note(&t->notes[0], PRSTATUS, PRSTATUS_SIZE, &t->prstatus); 1721 1717 info->size += notesize(&t->notes[0]); 1722 1718 1723 1719 do_thread_regset_writeback(t->task, &view->regsets[0]); ··· 1729 1727 for (view_iter = 1; view_iter < view->n; ++view_iter) { 1730 1728 const struct user_regset *regset = &view->regsets[view_iter]; 1731 1729 int note_type = regset->core_note_type; 1730 + const char *note_name = regset->core_note_name; 1732 1731 bool is_fpreg = note_type == NT_PRFPREG; 1733 1732 void *data; 1734 1733 int ret; ··· 1750 1747 if (is_fpreg) 1751 1748 SET_PR_FPVALID(&t->prstatus); 1752 1749 1753 - fill_note(&t->notes[note_iter], is_fpreg ? NN_PRFPREG : "LINUX", 1754 - note_type, ret, data); 1750 + /* There should be a note name, but if not, guess: */ 1751 + if (WARN_ON_ONCE(!note_name)) 1752 + note_name = "LINUX"; 1753 + else 1754 + /* Warn on non-legacy-compatible names, for now. */ 1755 + WARN_ON_ONCE(strcmp(note_name, 1756 + is_fpreg ? "CORE" : "LINUX")); 1757 + 1758 + __fill_note(&t->notes[note_iter], note_name, note_type, 1759 + ret, data); 1755 1760 1756 1761 info->size += notesize(&t->notes[note_iter]); 1757 1762 note_iter++; ··· 1778 1767 fill_prstatus(&t->prstatus.common, p, signr); 1779 1768 elf_core_copy_task_regs(p, &t->prstatus.pr_reg); 1780 1769 1781 - fill_note(&t->notes[0], NN_PRSTATUS, NT_PRSTATUS, sizeof(t->prstatus), 1782 - &(t->prstatus)); 1770 + fill_note(&t->notes[0], PRSTATUS, sizeof(t->prstatus), &t->prstatus); 1783 1771 info->size += notesize(&t->notes[0]); 1784 1772 1785 1773 fpu = kzalloc(sizeof(elf_fpregset_t), GFP_KERNEL); ··· 1788 1778 } 1789 1779 1790 1780 t->prstatus.pr_fpvalid = 1; 1791 - fill_note(&t->notes[1], NN_PRFPREG, NT_PRFPREG, sizeof(*fpu), fpu); 1781 + fill_note(&t->notes[1], PRFPREG, sizeof(*fpu), fpu); 1792 1782 info->size += notesize(&t->notes[1]); 1793 1783 1794 1784 return 1; ··· 1808 1798 psinfo = kmalloc(sizeof(*psinfo), GFP_KERNEL); 1809 1799 if (!psinfo) 1810 1800 return 0; 1811 - fill_note(&info->psinfo, NN_PRPSINFO, NT_PRPSINFO, sizeof(*psinfo), psinfo); 1801 + fill_note(&info->psinfo, PRPSINFO, sizeof(*psinfo), psinfo); 1812 1802 1813 1803 #ifdef CORE_DUMP_USE_REGSET 1814 1804 view = task_user_regset_view(dump_task);
+9 -8
fs/binfmt_elf_fdpic.c
··· 1275 1275 return; 1276 1276 } 1277 1277 1278 - static inline void fill_note(struct memelfnote *note, const char *name, int type, 1279 - unsigned int sz, void *data) 1278 + static inline void __fill_note(struct memelfnote *note, const char *name, int type, 1279 + unsigned int sz, void *data) 1280 1280 { 1281 1281 note->name = name; 1282 1282 note->type = type; ··· 1284 1284 note->data = data; 1285 1285 return; 1286 1286 } 1287 + 1288 + #define fill_note(note, type, sz, data) \ 1289 + __fill_note(note, NN_ ## type, NT_ ## type, sz, data) 1287 1290 1288 1291 /* 1289 1292 * fill up all the fields in prstatus from the given task struct, except ··· 1401 1398 regset_get(p, &view->regsets[0], 1402 1399 sizeof(t->prstatus.pr_reg), &t->prstatus.pr_reg); 1403 1400 1404 - fill_note(&t->notes[0], NN_PRSTATUS, NT_PRSTATUS, sizeof(t->prstatus), 1405 - &t->prstatus); 1401 + fill_note(&t->notes[0], PRSTATUS, sizeof(t->prstatus), &t->prstatus); 1406 1402 t->num_notes++; 1407 1403 *sz += notesize(&t->notes[0]); 1408 1404 ··· 1418 1416 } 1419 1417 1420 1418 if (t->prstatus.pr_fpvalid) { 1421 - fill_note(&t->notes[1], NN_PRFPREG, NT_PRFPREG, sizeof(t->fpu), 1422 - &t->fpu); 1419 + fill_note(&t->notes[1], PRFPREG, sizeof(t->fpu), &t->fpu); 1423 1420 t->num_notes++; 1424 1421 *sz += notesize(&t->notes[1]); 1425 1422 } ··· 1532 1531 */ 1533 1532 1534 1533 fill_psinfo(psinfo, current->group_leader, current->mm); 1535 - fill_note(&psinfo_note, NN_PRPSINFO, NT_PRPSINFO, sizeof(*psinfo), psinfo); 1534 + fill_note(&psinfo_note, PRPSINFO, sizeof(*psinfo), psinfo); 1536 1535 thread_status_size += notesize(&psinfo_note); 1537 1536 1538 1537 auxv = (elf_addr_t *) current->mm->saved_auxv; ··· 1540 1539 do 1541 1540 i += 2; 1542 1541 while (auxv[i - 2] != AT_NULL); 1543 - fill_note(&auxv_note, NN_AUXV, NT_AUXV, i * sizeof(elf_addr_t), auxv); 1542 + fill_note(&auxv_note, AUXV, i * sizeof(elf_addr_t), auxv); 1544 1543 thread_status_size += notesize(&auxv_note); 1545 1544 1546 1545 offset = sizeof(*elf); /* ELF header */
+11 -1
include/linux/regset.h
··· 151 151 * @align: Required alignment, in bytes. 152 152 * @bias: Bias from natural indexing. 153 153 * @core_note_type: ELF note @n_type value used in core dumps. 154 - * @get: Function to fetch values. 154 + * @core_note_name: ELF note name to qualify the note type. 155 + * @regset_get: Function to fetch values. 155 156 * @set: Function to store values. 156 157 * @active: Function to report if regset is active, or %NULL. 157 158 * @writeback: Function to write data back to user memory, or %NULL. ··· 191 190 * 192 191 * If nonzero, @core_note_type gives the n_type field (NT_* value) 193 192 * of the core file note in which this regset's data appears. 193 + * @core_note_name specifies the note name. The preferred way to 194 + * specify these two fields is to use the @USER_REGSET_NOTE_TYPE() 195 + * macro. 196 + * 194 197 * NT_PRSTATUS is a special case in that the regset data starts at 195 198 * offsetof(struct elf_prstatus, pr_reg) into the note data; that is 196 199 * part of the per-machine ELF formats userland knows about. In ··· 212 207 unsigned int align; 213 208 unsigned int bias; 214 209 unsigned int core_note_type; 210 + const char *core_note_name; 215 211 }; 212 + 213 + #define USER_REGSET_NOTE_TYPE(type) \ 214 + .core_note_type = (NT_ ## type), \ 215 + .core_note_name = (NN_ ## type) 216 216 217 217 /** 218 218 * struct user_regset_view - available regsets
+1 -1
kernel/fork.c
··· 2743 2743 } 2744 2744 #endif 2745 2745 2746 - noinline static int copy_clone_args_from_user(struct kernel_clone_args *kargs, 2746 + static noinline int copy_clone_args_from_user(struct kernel_clone_args *kargs, 2747 2747 struct clone_args __user *uargs, 2748 2748 size_t usize) 2749 2749 {