Re: [PATCH v2 43/62] x86/alternative: Define ELF section entry size for alternatives

2025-05-09 Thread Borislav Petkov
On Fri, May 09, 2025 at 02:54:00PM -0700, Josh Poimboeuf wrote: > On Fri, May 09, 2025 at 11:36:35PM +0200, Borislav Petkov wrote: > > On Fri, May 09, 2025 at 01:17:07PM -0700, Josh Poimboeuf wrote: > > > +#define ALTINSTR_SIZE14 > > > > We have sizeof(struct alt_instr) to offer... >

Re: [PATCH v2 43/62] x86/alternative: Define ELF section entry size for alternatives

2025-05-09 Thread Josh Poimboeuf
On Fri, May 09, 2025 at 11:36:35PM +0200, Borislav Petkov wrote: > On Fri, May 09, 2025 at 01:17:07PM -0700, Josh Poimboeuf wrote: > > +#define ALTINSTR_SIZE 14 > > We have sizeof(struct alt_instr) to offer... Right, but IIRC, sizeof(struct alt_instr) isn't available at macro expansi

Re: [PATCH v2 43/62] x86/alternative: Define ELF section entry size for alternatives

2025-05-09 Thread Borislav Petkov
On Fri, May 09, 2025 at 01:17:07PM -0700, Josh Poimboeuf wrote: > +#define ALTINSTR_SIZE14 We have sizeof(struct alt_instr) to offer... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette

[PATCH v2 43/62] x86/alternative: Define ELF section entry size for alternatives

2025-05-09 Thread Josh Poimboeuf
In preparation for the objtool klp diff subcommand, define the entry size for the .altinstructions section in its ELF header. This will allow tooling to extract individual entries. Signed-off-by: Josh Poimboeuf --- arch/x86/include/asm/alternative.h | 7 +-- arch/x86/kernel/alternative.c