[PATCH 0/2] Regset cleanups

From: Rick Edgecombe
Date: Fri Oct 21 2022 - 18:19:12 EST


These two cleanups came out of the shadow stack series[0]. Resending them
separately for earlier consideration. They were also posted as separate
cleanups once before[1]. Note, Eric Biederman had suggested to change the
pre-existing format of REGSET_FOO32 to REGSET32_FOO. This was missed in an
earlier revision, and the changes are now added in this version.

There should be no functional change. To verify this, testing included checking
for binary differences in ptrace.o by:
1. Have the config be a 64 bit kernel with CONFIG_IA32_EMULATION=y
2. Adjust stock v6.1-rc1 and these changes to have the same line numbers for
the bulk of the code in ptrace.c by adding blank lines.
3. Remove BUILD_BUG_ONs() from new changes.
4. strip and objdump both versions.
5. Compare and find disassembly was identical.

[0] https://lore.kernel.org/lkml/20220929222936.14584-1-rick.p.edgecombe@xxxxxxxxx/
[1] https://lore.kernel.org/lkml/20220315201706.7576-1-rick.p.edgecombe@xxxxxxxxx/


Rick Edgecombe (2):
x86: Separate out x86_regset for 32 and 64 bit
x86: Improve formatting of user_regset arrays

arch/x86/kernel/ptrace.c | 174 ++++++++++++++++++++++++---------------
1 file changed, 108 insertions(+), 66 deletions(-)


base-commit: 9abf2313adc1ca1b6180c508c25f22f9395cc780
--
2.17.1