[PATCH 1/2] arm/mm : omit [_text, _stext) from kernel code region

Russell King (Oracle) linux at armlinux.org.uk
Mon Mar 6 03:06:05 PST 2023


On Mon, Mar 06, 2023 at 02:51:54PM +0900, Jungseung Lee wrote:
> The resource reservations in /proc/iomem made for the kernel code did
> not reflect the gaps between pagetable and text.
> 
> In particular, if the CONFIG_STRICT_KERNEL_RWX option is turned on,
> the wrong area is shown as the kernel code area.
> 
> Fix it by removing [_text, _stext) from kernel code region.
> 
> Before:
> 04000000-2f7fffff : System RAM
>   04008000-04cfffff : Kernel code
>   04e00000-05369a27 : Kernel data
> 
> After :
> 04000000-2f7fffff : System RAM
>   04100000-04cfffff : Kernel code
>   04e00000-05369a27 : Kernel data

And why do you think this is correct? Isn't the head text, which
isn't discarded and is located at 0x04008000, still part of kernel
code?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!



More information about the linux-arm-kernel mailing list