[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMj1kXEDXnf7RpXp4nf7fy-0=8f54q=7MgGJm7L4W3FQwnZfwg@mail.gmail.com>
Date: Fri, 23 Jan 2026 08:27:40 +0100
From: Ard Biesheuvel <ardb@...nel.org>
To: Anshuman Khandual <anshuman.khandual@....com>
Cc: Ard Biesheuvel <ardb+git@...gle.com>, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, will@...nel.org,
catalin.marinas@....com, mark.rutland@....com,
Ryan Roberts <ryan.roberts@....com>, Liz Prucka <lizprucka@...gle.com>,
Seth Jenkins <sethjenkins@...gle.com>, Kees Cook <kees@...nel.org>,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH 4/4] arm64: Unmap kernel data/bss entirely from the linear map
On Fri, 23 Jan 2026 at 07:52, Anshuman Khandual
<anshuman.khandual@....com> wrote:
>
>
>
> On 19/01/26 10:17 PM, Ard Biesheuvel wrote:
> > From: Ard Biesheuvel <ardb@...nel.org>
> >
> > The linear aliases of the kernel text and rodata are mapped read-only as
> > well. Given that the contents of these regions are mostly identical to
> > the version in the loadable image, mapping them read-only is a
> > reasonable hardening measure.
> >
> > Data and bss, however, are now also mapped read-only but the contents of
> > these regions are more likely to contain data that we'd rather not leak.
> > So let's unmap these entirely in the linear map when the kernel is
> > running normally.
> >
> > Only when going into hibernation or waking up from it do these regions
> > need to be mapped, so take care of this using a PM notifier.
>
> Just curious - why do we need them mapped while going into or coming back
> from the hibernation ?
>
Because the kernel image is preserved/restored via the linear map. For
some reason, it appears to be sufficient for this mapping to be
read-only but unmapping it entirely results in failures to resume from
hibernation.
Powered by blists - more mailing lists