<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/arch/powerpc/kernel/head_44x.S, branch master</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=master</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-10-19T06:12:46Z</updated>
<entry>
<title>powerpc/44x: Introduce _PAGE_READ and remove _PAGE_USER</title>
<updated>2023-10-19T06:12:46Z</updated>
<author>
<name>Christophe Leroy</name>
<email>christophe.leroy@csgroup.eu</email>
</author>
<published>2023-09-25T18:31:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=93820bfeefc4a125a6cedd1ee1a956eeb3eb2580'/>
<id>urn:sha1:93820bfeefc4a125a6cedd1ee1a956eeb3eb2580</id>
<content type='text'>
44x MMU has 6 page protection bits:
- R, W, X for supervisor
- R, W, X for user

It means that it can support X without R.

To do that, _PAGE_READ flag is needed but there is no bit available
for it in PTE. On the other hand the only real use of _PAGE_USER is
to implement PAGE_NONE by clearing _PAGE_USER.

As _PAGE_NONE can also be implemented by clearing _PAGE_READ,
remove _PAGE_USER and add _PAGE_READ. In order to insert bits in
one go during TLB miss, move _PAGE_ACCESSED and put _PAGE_READ
just after _PAGE_DIRTY so that _PAGE_DIRTY is copied into SW and
_PAGE_READ into SR at once.

With that change, 44x now also honors execute-only protection.

Signed-off-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/043e17987b260b99b45094138c6cb2e89e63d499.1695659959.git.christophe.leroy@csgroup.eu

</content>
</entry>
<entry>
<title>powerpc/nohash: Add _PAGE_WRITE to supplement _PAGE_RW</title>
<updated>2023-10-19T06:12:46Z</updated>
<author>
<name>Christophe Leroy</name>
<email>christophe.leroy@csgroup.eu</email>
</author>
<published>2023-09-25T18:31:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d20506d4728c3b7408e84d9aececbcb78c3061ee'/>
<id>urn:sha1:d20506d4728c3b7408e84d9aececbcb78c3061ee</id>
<content type='text'>
Several places, _PAGE_RW maps to write permission and don't
always imply read. To make it more clear, do as book3s/64 in
commit c7d54842deb1 ("powerpc/mm: Use _PAGE_READ to indicate
Read access") and use _PAGE_WRITE when more relevant.

For the time being _PAGE_WRITE is equivalent to _PAGE_RW but that
will change when _PAGE_READ gets added in following patches.

Signed-off-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/1f79b88db54d030ada776dc9845e0e88345bfc28.1695659959.git.christophe.leroy@csgroup.eu

</content>
</entry>
<entry>
<title>powerpc: remove unneeded #include &lt;asm/export.h&gt;</title>
<updated>2023-08-16T13:54:48Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2023-08-06T15:09:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3eb3f168e83aa7a7b8477507cf4b08b9515b4b13'/>
<id>urn:sha1:3eb3f168e83aa7a7b8477507cf4b08b9515b4b13</id>
<content type='text'>
There is no EXPORT_SYMBOL line there, hence #include &lt;asm/export.h&gt;
is unneeded.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/20230806150954.394189-1-masahiroy@kernel.org

</content>
</entry>
<entry>
<title>powerpc: allow minimum sized kernel stack frames</title>
<updated>2022-12-02T06:54:09Z</updated>
<author>
<name>Nicholas Piggin</name>
<email>npiggin@gmail.com</email>
</author>
<published>2022-11-27T12:49:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=90f1b43196c5e79f6c986a359011a19857984c27'/>
<id>urn:sha1:90f1b43196c5e79f6c986a359011a19857984c27</id>
<content type='text'>
This affects only 64-bit ELFv2 kernels, and reduces the minimum
asm-created stack frame size from 112 to 32 byte on those kernels.

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20221127124942.1665522-16-npiggin@gmail.com

</content>
</entry>
<entry>
<title>powerpc/32: Remove _ENTRY() macro</title>
<updated>2022-02-07T10:03:10Z</updated>
<author>
<name>Christophe Leroy</name>
<email>christophe.leroy@csgroup.eu</email>
</author>
<published>2021-11-30T12:04:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=27e21e8f128a56d3462f0fe2fd3a59c02cc002b1'/>
<id>urn:sha1:27e21e8f128a56d3462f0fe2fd3a59c02cc002b1</id>
<content type='text'>
_ENTRY() is now redundant with _GLOBAL(). Remove it.

Signed-off-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/62a35f8dde2bb74c8d0d7a5430cce07a5a3a6fb6.1638273868.git.christophe.leroy@csgroup.eu

</content>
</entry>
<entry>
<title>powerpc/kuap: Wire-up KUAP on 44x</title>
<updated>2021-12-09T11:41:20Z</updated>
<author>
<name>Christophe Leroy</name>
<email>christophe.leroy@csgroup.eu</email>
</author>
<published>2021-10-19T07:29:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f6fad4fb55936f0d613cea08341d187d691d6440'/>
<id>urn:sha1:f6fad4fb55936f0d613cea08341d187d691d6440</id>
<content type='text'>
This adds KUAP support to 44x. This is done by checking
the content of SPRN_PID at the time it is read and written
into SPRN_MMUCR.

Signed-off-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/7d6c3f1978a26feada74b084f651e8cf1e3b3a47.1634627931.git.christophe.leroy@csgroup.eu

</content>
</entry>
<entry>
<title>powerpc/44x: Activate KUEP at all time</title>
<updated>2021-12-09T11:41:17Z</updated>
<author>
<name>Christophe Leroy</name>
<email>christophe.leroy@csgroup.eu</email>
</author>
<published>2021-10-19T07:29:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ee2631603fdbab6f76e86ea87f7a03ebc3a1ef85'/>
<id>urn:sha1:ee2631603fdbab6f76e86ea87f7a03ebc3a1ef85</id>
<content type='text'>
On 44x, KUEP is implemented by clearing SX bit during TLB miss
for user pages. The impact is minimal and not worth neither
boot time nor build time selection.

Activate it at all time.

Signed-off-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/2414d662558e7fb27d1ed41c8e47c591d576acac.1634627931.git.christophe.leroy@csgroup.eu

</content>
</entry>
<entry>
<title>powerpc/booke: Avoid link stack corruption in several places</title>
<updated>2021-08-25T03:35:47Z</updated>
<author>
<name>Christophe Leroy</name>
<email>christophe.leroy@csgroup.eu</email>
</author>
<published>2021-08-24T07:56:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f5007dbf4da729baa850b33a64dc3cc53757bdf8'/>
<id>urn:sha1:f5007dbf4da729baa850b33a64dc3cc53757bdf8</id>
<content type='text'>
Use bcl 20,31,+4 instead of bl in order to preserve link stack.

See commit c974809a26a1 ("powerpc/vdso: Avoid link stack corruption
in __get_datapage()") for details.

Signed-off-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/e9fbc285eceb720e6c0e032ef47fe8b05f669b48.1629791751.git.christophe.leroy@csgroup.eu

</content>
</entry>
<entry>
<title>powerpc: Define swapper_pg_dir[] in C</title>
<updated>2021-06-16T14:09:10Z</updated>
<author>
<name>Christophe Leroy</name>
<email>christophe.leroy@csgroup.eu</email>
</author>
<published>2021-06-07T10:56:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e72421a085a8dc81c71b0daeb89612279c2c621c'/>
<id>urn:sha1:e72421a085a8dc81c71b0daeb89612279c2c621c</id>
<content type='text'>
Don't duplicate swapper_pg_dir[] in each platform's head.S

Define it in mm/pgtable.c

Define MAX_PTRS_PER_PGD because on book3s/64 PTRS_PER_PGD is
not a constant.

Signed-off-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/5e3f1b8a4695c33ccc80aa3870e016bef32b85e1.1623063174.git.christophe.leroy@csgroup.eu

</content>
</entry>
<entry>
<title>powerpc: Define empty_zero_page[] in C</title>
<updated>2021-06-16T14:09:10Z</updated>
<author>
<name>Christophe Leroy</name>
<email>christophe.leroy@csgroup.eu</email>
</author>
<published>2021-06-07T10:56:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=45b30fafe528601f1a4449c9d68d8ebe7bbc39ad'/>
<id>urn:sha1:45b30fafe528601f1a4449c9d68d8ebe7bbc39ad</id>
<content type='text'>
At the time being, empty_zero_page[] is defined in each
platform head.S.

Define it in mm/mem.c instead, and put it in BSS section instead
of the DATA section. Commit 5227cfa71f9e ("arm64: mm: place
empty_zero_page in bss") explains why it is interesting to have
it in BSS.

Signed-off-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/5838caffa269e0957c5a50cc85477876220298b0.1623063174.git.christophe.leroy@csgroup.eu

</content>
</entry>
</feed>
