[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f9074e8d-9314-9d7d-7bf5-5b5538c8be8d@intel.com>
Date: Tue, 3 Aug 2021 07:32:39 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Lukas Bulwahn <lukas.bulwahn@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
x86@...nel.org, Randy Dunlap <rdunlap@...radead.org>
Cc: "H . Peter Anvin" <hpa@...or.com>,
Darren Hart <dvhart@...radead.org>,
Andy Shevchenko <andy@...radead.org>,
Lubomir Rintel <lkundrak@...sk>, Pavel Machek <pavel@....cz>,
Lee Jones <lee.jones@...aro.org>,
"Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Linus Walleij <linus.walleij@...aro.org>,
platform-driver-x86@...r.kernel.org,
kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org,
Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH 0/9] Kconfig symbol clean-up on ./arch/x86/
On 8/3/21 4:35 AM, Lukas Bulwahn wrote:
> - a reference to STRICT_IOMEM in arch/x86/mm/init.c
> unclear to me: which exact config this refers to
Are you referring to the reference in this comment?
> + /*
> + * This must follow RAM test, since System RAM is considered a
> + * restricted resource under CONFIG_STRICT_IOMEM.
> + */
> + if (iomem_is_exclusive(pagenr << PAGE_SHIFT)) {
> + /* Low 1MB bypasses iomem restrictions. */
> + if (pagenr < 256)
> + return 1;
...
That came from here:
> commit a4866aa812518ed1a37d8ea0c881dc946409de94
> Author: Kees Cook <keescook@...omium.org>
> Date: Wed Apr 5 09:39:08 2017 -0700
>
> mm: Tighten x86 /dev/mem with zeroing reads
Which also added this hunk:
> #ifdef CONFIG_STRICT_DEVMEM
> +static inline int page_is_allowed(unsigned long pfn)
> +{
> + return devmem_is_allowed(pfn);
> +}
and talks about CONFIG_STRICT_DEVMEM in the changelog:
> mm: Tighten x86 /dev/mem with zeroing reads
>
> Under CONFIG_STRICT_DEVMEM, reading System RAM through /dev/mem is
> disallowed. However, on x86, the first 1MB was always allowed for BIOS
...
It's a pretty safe guess that STRICT_IOMEM refers to CONFIG_STRICT_DEVMEM.
Powered by blists - more mailing lists