NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-alpha/57701: alpha kernel is built with RWX segment



The following reply was made to PR port-alpha/57701; it has been noted by GNATS.

From: Jason Thorpe <thorpej%me.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: port-alpha-maintainer%netbsd.org@localhost,
 gnats-admin%netbsd.org@localhost,
 netbsd-bugs%netbsd.org@localhost
Subject: Re: port-alpha/57701: alpha kernel is built with RWX segment
Date: Sat, 18 Nov 2023 04:57:12 -0800

 Sorry, I responded from my phone last night, and wanted to add some =
 additional context from a proper keyboard.
 
 > On Nov 17, 2023, at 7:50 PM, campbell+netbsd%mumble.net@localhost wrote:
 >=20
 >> Description:
 > =
 /space/tools/bin/../lib/gcc/alpha--netbsd/10.5.0/../../../../alpha--netbsd=
 /bin/ld: warning: cc1 has a LOAD segment with RWX permissions
 
 Notice my comment was about =E2=80=9Ccc1=E2=80=9D, i.e. the C compiler =
 back-end.  Not about the kernel.
 
 > The kernel image should have finer-grained permissions so the CPU =
 doesn't allow, e.g., writing to the text segment.
 
 Doing this for the kernel image would be mostly just a waste of memory, =
 because the kernel is loaded into and executed from K0SEG, which is a =
 direct-mapped segment with no permission enforcement other than =E2=80=9Cn=
 ot accessible from user mode".  The likelihood of *that* being changed =
 is zero, so there=E2=80=99s no point in adding space between the =
 sections to page-align them.
 
 -- thorpej
 


Home | Main Index | Thread Index | Old Index