lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202007211416.1A2B618DE@keescook>
Date:   Tue, 21 Jul 2020 14:18:50 -0700
From:   Kees Cook <keescook@...omium.org>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     Joerg Roedel <joro@...tes.org>, x86@...nel.org, hpa@...or.com,
        Arnd Bergmann <arnd@...db.de>,
        Heiko Carstens <hca@...ux.ibm.com>,
        Joerg Roedel <jroedel@...e.de>,
        Bob Haarman <inglorion@...gle.com>, hjl.tools@...il.com,
        Arvind Sankar <nivedita@...m.mit.edu>,
        Dmitry Safonov <0x7f454c46@...il.com>,
        linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org
Subject: Re: [PATCH] x86, vmlinux.lds: Page-Align end of ..page_aligned
 sections

On Tue, Jul 21, 2020 at 10:05:05PM +0200, Thomas Gleixner wrote:
> Kees,
> 
> Kees Cook <keescook@...omium.org> writes:
> > On Tue, Jul 21, 2020 at 11:34:48AM +0200, Joerg Roedel wrote:
> >> From: Joerg Roedel <jroedel@...e.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@...os.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@...omium.org>

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ