Re: [PATCH v5] x86/livepatch: align functions to ensure minimal distance between entry points

2024-01-23 Thread Jan Beulich
On 23.01.2024 10:32, Roger Pau Monné wrote: > On Tue, Jan 23, 2024 at 08:53:15AM +0100, Jan Beulich wrote: >> On 22.01.2024 18:27, Roger Pau Monné wrote: >>> On Mon, Jan 22, 2024 at 12:21:47PM +0100, Jan Beulich wrote: I'm further curious why .text.__x86_indirect_thunk_* is left past the

Re: [PATCH v5] x86/livepatch: align functions to ensure minimal distance between entry points

2024-01-23 Thread Roger Pau Monné
On Tue, Jan 23, 2024 at 08:53:15AM +0100, Jan Beulich wrote: > On 22.01.2024 18:27, Roger Pau Monné wrote: > > On Mon, Jan 22, 2024 at 12:21:47PM +0100, Jan Beulich wrote: > >> On 22.01.2024 12:02, Roger Pau Monne wrote: > >>> --- a/xen/arch/x86/xen.lds.S > >>> +++ b/xen/arch/x86/xen.lds.S > >>>

Re: [PATCH v5] x86/livepatch: align functions to ensure minimal distance between entry points

2024-01-22 Thread Jan Beulich
On 22.01.2024 18:27, Roger Pau Monné wrote: > On Mon, Jan 22, 2024 at 12:21:47PM +0100, Jan Beulich wrote: >> On 22.01.2024 12:02, Roger Pau Monne wrote: >>> --- a/xen/arch/x86/xen.lds.S >>> +++ b/xen/arch/x86/xen.lds.S >>> @@ -99,6 +99,10 @@ SECTIONS >>> *(.text) >>> #ifdef

Re: [PATCH v5] x86/livepatch: align functions to ensure minimal distance between entry points

2024-01-22 Thread Roger Pau Monné
On Mon, Jan 22, 2024 at 12:21:47PM +0100, Jan Beulich wrote: > On 22.01.2024 12:02, Roger Pau Monne wrote: > > The minimal function size requirements for an x86 livepatch are either 5 > > bytes > > (for jmp) or 9 bytes (for endbr + jmp), and always 4 bytes on Arm. Ensure > > that > > distance

Re: [PATCH v5] x86/livepatch: align functions to ensure minimal distance between entry points

2024-01-22 Thread Jan Beulich
On 22.01.2024 12:02, Roger Pau Monne wrote: > The minimal function size requirements for an x86 livepatch are either 5 bytes > (for jmp) or 9 bytes (for endbr + jmp), and always 4 bytes on Arm. Ensure > that > distance between functions entry points is always at least of the minimal > required

[PATCH v5] x86/livepatch: align functions to ensure minimal distance between entry points

2024-01-22 Thread Roger Pau Monne
The minimal function size requirements for an x86 livepatch are either 5 bytes (for jmp) or 9 bytes (for endbr + jmp), and always 4 bytes on Arm. Ensure that distance between functions entry points is always at least of the minimal required size for livepatch instruction replacement to be