lkml.org 
[lkml]   [2021]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 0/9] Kconfig symbol clean-up on ./arch/x86/
From
Date
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@chromium.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.

\
 
 \ /
  Last update: 2021-08-03 16:33    [W:0.126 / U:1.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site