[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87le10p3ak.ffs@tglx>
Date: Tue, 13 Aug 2024 22:37:39 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Alistair Popple <apopple@...dia.com>
Cc: Dan Williams <dan.j.williams@...el.com>, dave.hansen@...ux.intel.com,
luto@...nel.org, peterz@...radead.org, max8rr8@...il.com,
linux-kernel@...r.kernel.org, x86@...nel.org, jhubbard@...dia.com, Kees
Cook <keescook@...omium.org>
Subject: Re: [PATCH 1/1] x86/ioremap: Use is_vmalloc_addr in iounmap
On Tue, Aug 13 2024 at 10:20, Thomas Gleixner wrote:
> On Tue, Aug 13 2024 at 11:33, Alistair Popple wrote:
>>> On Mon, Aug 12 2024 at 12:03, Thomas Gleixner wrote:
>>>
>>> +#ifndef PHYSMEM_END
>>> +# define PHYSMEM_END (1UL << (MAX_PHYSMEM_BITS-PAGE_SHIFT))
>>
>> However I think this should be:
>>
>> # define PHYSMEM_END ((1UL << MAX_PHYSMEM_BITS) - 1)
>
> Bah.
Aside of that the x86 define must not be inside
CONFIG_DYNAMIC_MEMORY_LAYOUT, it needs to be:
#ifdef CONFIG_RANDOMIZE_MEMORY
# define PHYSMEM_END physmem_end
#endif
because CONFIG_DYNAMIC_MEMORY_LAYOUT is also selected by 5-level page
tables independent of KASLR. It does not need an else clause either
because that is covered by the generic fallback.
I'll send out a proper patch later.
Thanks,
tglx
Powered by blists - more mailing lists