Re: [PATCH 3/3] mm: Care about shadow stack guard gap when getting an unmapped area

Mark Brown <[email protected]>
Newsgroups gmane.linux.ports.ppc.embedded,gmane.linux.ports.arm.kernel,gmane.linux.ports.alpha,gmane.linux.kernel,gmane.linux.kernel.arc,gmane.linux.ports.parisc,gmane.linux.ports.sh.devel,gmane.linux.ports.sparc,gmane.linux.kernel.mm
Message-ID <[email protected]>
On Tue, Sep 03, 2024 at 06:49:46PM +0100, Lorenzo Stoakes wrote:
> On Mon, Sep 02, 2024 at 08:08:15PM GMT, Mark Brown wrote:

> > On x86 there is a custom arch_get_unmapped_area() which was updated by the
> > above commit to cover this case by specifying a start_gap for allocations
> > with VM_SHADOW_STACK. Both arm64 and RISC-V have equivalent features and
> > use the generic implementation of arch_get_unmapped_area() so let's make
> > the equivalent change there so they also don't get shadow stack pages
> > placed without guard pages.

> Don't you need to unwind that change in x86 now you're doing it in generic code?

No, x86 had a preexisting custom implementation for some other reason
(hence the "updated by the above commit" part above) - the shadow stack
support would most likely have been added in the core in the first place
were it not for that.
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmbXU1EACgkQJNaLcl1U
h9D6cgf/XDZdPu9OMFQe6TQgFZfL0q5O9mqkm+BWBPaJVUsfz+b1eJX8MY/X94i7
isw0bRIKXl4Rdgglf/Mjack/jKZI2dA1nVQtiA0++/6tT814x3Y/iykb6tAbghmy
uinhNXZQlV9/DYrMjNAbBcGeFlMlKmRBSrZEuoHwLuaOsQ3CfzCxB7zqsWtaxrBk
Ct7Jtsia48hr6Df5deBgMHgDTE6xyu7fxb9fDqVippx4fBJzXvjimEBvAG8OWp/z
77YIEDqfJ+JuDQvg3E5YL5EW1xarV++hvLacqfnaffNQFwngWwUWM8TyY7p5C4VK
LKP++oAShrv2wbyvnGgxkpomt/Eb5g==
=xc/U
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.