From: Kees Cook <keescook@chromium.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Joerg Roedel <joro@8bytes.org>,
x86@kernel.org, hpa@zytor.com, Arnd Bergmann <arnd@arndb.de>,
Heiko Carstens <hca@linux.ibm.com>,
Joerg Roedel <jroedel@suse.de>,
Bob Haarman <inglorion@google.com>,
hjl.tools@gmail.com, Arvind Sankar <nivedita@alum.mit.edu>,
Dmitry Safonov <0x7f454c46@gmail.com>,
linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org
Subject: Re: [PATCH] x86, vmlinux.lds: Page-Align end of ..page_aligned sections
Date: Tue, 21 Jul 2020 14:18:50 -0700 [thread overview]
Message-ID: <202007211416.1A2B618DE@keescook> (raw)
In-Reply-To: <87r1t43a8e.fsf@nanos.tec.linutronix.de>
On Tue, Jul 21, 2020 at 10:05:05PM +0200, Thomas Gleixner wrote:
> Kees,
>
> Kees Cook <keescook@chromium.org> writes:
> > On Tue, Jul 21, 2020 at 11:34:48AM +0200, Joerg Roedel wrote:
> >> From: Joerg Roedel <jroedel@suse.de>
> >>
> >> Align the end of the .bss..page_aligned and .data..page_aligned section
> >> on page-size too. Otherwise the linker might place other objects on the
> >> page of the last ..page_aligned object. This is inconsistent with other
> >> objects in those sections, which all have their own page.
> >
> > What problem was actually encountered? (i.e. why is it a problem for the
> > other data to be in the page of the page-aligned data? shouldn't those
> > data have their own, separate, alignment hint?)
>
> See: lore.kernel.org/r/87sgdmm8u4.fsf@nanos.tec.linutronix.de
Ah-ha: "But with explicit sections which store only page aligned objects
there is an implicit guarantee that the object is alone in the page
in which it is placed. That works for all objects except the last
one. That's inconsistent."
Understood now. The bit in this commit log for "which all have their own
page" wasn't clear to me about _why_ (it was coming from .page_aligned,
which means both aligned and dedicated).
Reviewed-by: Kees Cook <keescook@chromium.org>
--
Kees Cook
prev parent reply other threads:[~2020-07-21 21:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-21 9:34 [PATCH] x86, vmlinux.lds: Page-Align end of ..page_aligned sections Joerg Roedel
2020-07-21 18:44 ` Kees Cook
2020-07-21 20:05 ` Thomas Gleixner
2020-07-21 21:18 ` Kees Cook [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202007211416.1A2B618DE@keescook \
--to=keescook@chromium.org \
--cc=0x7f454c46@gmail.com \
--cc=arnd@arndb.de \
--cc=hca@linux.ibm.com \
--cc=hjl.tools@gmail.com \
--cc=hpa@zytor.com \
--cc=inglorion@google.com \
--cc=joro@8bytes.org \
--cc=jroedel@suse.de \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nivedita@alum.mit.edu \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox