[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <72fdfc26-470b-75e3-cfc4-ffce0045b458@suse.com>
Date: Fri, 2 Sep 2022 18:05:05 +0200
From: Juergen Gross <jgross@...e.com>
To: Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>
Cc: linux-kernel@...r.kernel.org, x86@...nel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Tim Chen <tim.c.chen@...ux.intel.com>,
Josh Poimboeuf <jpoimboe@...nel.org>,
Andrew Cooper <Andrew.Cooper3@...rix.com>,
Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>,
Johannes Wikner <kwikner@...z.ch>,
Alyssa Milburn <alyssa.milburn@...ux.intel.com>,
Jann Horn <jannh@...gle.com>, "H.J. Lu" <hjl.tools@...il.com>,
Joao Moreira <joao.moreira@...el.com>,
Joseph Nuzman <joseph.nuzman@...el.com>,
Steven Rostedt <rostedt@...dmis.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
K Prateek Nayak <kprateek.nayak@....com>,
Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH v2 01/59] x86/paravirt: Ensure proper alignment
On 02.09.22 15:06, Peter Zijlstra wrote:
> From: Thomas Gleixner <tglx@...utronix.de>
>
> The entries in the .parainstr sections are 8 byte aligned and the
> corresponding C struct makes the array offset 16 bytes.
>
> Though the pushed entries are only using 12 bytes. .parainstr_end is
> therefore 4 bytes short.
>
> That works by chance because it's only used in a loop:
>
> for (p = start; p < end; p++)
>
> But this falls flat when calculating the number of elements:
>
> n = end - start
>
> That's obviously off by one.
>
> Ensure that the gap is filled and the last entry is occupying 16 bytes.
>
> Cc: Juergen Gross <jgross@...e.com>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Reviewed-by: Juergen Gross <jgross@...e.com>
Juergen
Download attachment "OpenPGP_0xB0DE9DD628BF132F.asc" of type "application/pgp-keys" (3099 bytes)
Download attachment "OpenPGP_signature" of type "application/pgp-signature" (496 bytes)
Powered by blists - more mailing lists