<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/include/asm-s390/pgtable.h, branch linux-2.6.21.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.21.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.21.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2007-02-05T20:18:17Z</updated>
<entry>
<title>[S390] noexec protection</title>
<updated>2007-02-05T20:18:17Z</updated>
<author>
<name>Gerald Schaefer</name>
</author>
<published>2007-02-05T20:18:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c1821c2e9711adc3cd298a16b7237c92a2cee78d'/>
<id>urn:sha1:c1821c2e9711adc3cd298a16b7237c92a2cee78d</id>
<content type='text'>
This provides a noexec protection on s390 hardware. Our hardware does
not have any bits left in the pte for a hw noexec bit, so this is a
different approach using shadow page tables and a special addressing
mode that allows separate address spaces for code and data.

As a special feature of our "secondary-space" addressing mode, separate
page tables can be specified for the translation of data addresses
(storage operands) and instruction addresses. The shadow page table is
used for the instruction addresses and the standard page table for the
data addresses.
The shadow page table is linked to the standard page table by a pointer
in page-&gt;lru.next of the struct page corresponding to the page that
contains the standard page table (since page-&gt;private is not really
private with the pte_lock and the page table pages are not in the LRU
list).
Depending on the software bits of a pte, it is either inserted into
both page tables or just into the standard (data) page table. Pages of
a vma that does not have the VM_EXEC bit set get mapped only in the
data address space. Any try to execute code on such a page will cause a
page translation exception. The standard reaction to this is a SIGSEGV
with two exceptions: the two system call opcodes 0x0a77 (sys_sigreturn)
and 0x0aad (sys_rt_sigreturn) are allowed. They are stored by the
kernel to the signal stack frame. Unfortunately, the signal return
mechanism cannot be modified to use an SA_RESTORER because the
exception unwinding code depends on the system call opcode stored
behind the signal stack frame.

This feature requires that user space is executed in secondary-space
mode and the kernel in home-space mode, which means that the addressing
modes need to be switched and that the noexec protection only works
for user space.
After switching the addressing modes, we cannot use the mvcp/mvcs
instructions anymore to copy between kernel and user space. A new
mvcos instruction has been added to the z9 EC/BC hardware which allows
to copy between arbitrary address spaces, but on older hardware the
page tables need to be walked manually.

Signed-off-by: Gerald Schaefer &lt;geraldsc@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>[S390] Get rid of a lot of sparse warnings.</title>
<updated>2007-02-05T20:16:47Z</updated>
<author>
<name>Heiko Carstens</name>
</author>
<published>2007-02-05T20:16:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2b67fc46061b2171fb8fbb55d1ac717abd533569'/>
<id>urn:sha1:2b67fc46061b2171fb8fbb55d1ac717abd533569</id>
<content type='text'>
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>[S390] Virtual memmap for s390.</title>
<updated>2006-12-08T14:56:07Z</updated>
<author>
<name>Heiko Carstens</name>
</author>
<published>2006-12-08T14:56:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f4eb07c17df2e6cf9bd58bfcd9cc9e05e9489d07'/>
<id>urn:sha1:f4eb07c17df2e6cf9bd58bfcd9cc9e05e9489d07</id>
<content type='text'>
Virtual memmap support for s390. Inspired by the ia64 implementation.

Unlike ia64 we need a mechanism which allows us to dynamically attach
shared memory regions.
These memory regions are accessed via the dcss device driver. dcss
implements the 'direct_access' operation, which requires struct pages
for every single shared page.
Therefore this implementation provides an interface to attach/detach
shared memory:

int add_shared_memory(unsigned long start, unsigned long size);
int remove_shared_memory(unsigned long start, unsigned long size);

The purpose of the add_shared_memory function is to add the given
memory range to the 1:1 mapping and to make sure that the
corresponding range in the vmemmap is backed with physical pages.
It also initialises the new struct pages.

remove_shared_memory in turn only invalidates the page table
entries in the 1:1 mapping. The page tables and the memory used for
struct pages in the vmemmap are currently not freed. They will be
reused when the next segment will be attached.
Given that the maximum size of a shared memory region is 2GB and
in addition all regions must reside below 2GB this is not too much of
a restriction, but there is room for improvement.

Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>[S390] Memory detection fixes.</title>
<updated>2006-12-04T14:40:56Z</updated>
<author>
<name>Heiko Carstens</name>
</author>
<published>2006-12-04T14:40:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8b62bc9642300471737bc3b77b2a4a2ead46dedb'/>
<id>urn:sha1:8b62bc9642300471737bc3b77b2a4a2ead46dedb</id>
<content type='text'>
VMALLOC_END on 31bit should be 0x8000000UL instead of 0x7fffffffL.
The page mask which is used to make sure memory_end is on 4MB/2MB
boundary is wrong and not needed. Therefore remove it.
Make sure a vmalloc area does also exist and work on (future)
machines with 4TB and more memory.

Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>[S390] Fix pte type checking.</title>
<updated>2006-10-18T16:30:51Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2006-10-18T16:30:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=833774849d50a59f58e9bdfc3d9c88e682b3596d'/>
<id>urn:sha1:833774849d50a59f58e9bdfc3d9c88e682b3596d</id>
<content type='text'>
handle_pte_fault uses pte_present, pte_none and pte_file to find out
the type of a pte. That is done without holding the page table lock.
This clashes with the way how ptep_clear_flush removes active page
table entries from the system. First the ipte instruction is used
to invalidate the pte and remove all plt entries for the page. The
ipte sets the hardware invalid bit without changing any other bit.
After the ipte finished the pte is cleared. A concurrent fault can
observe the the previously valid pte with the invalid bit set. With
the current encoding of the different pte types an invalidated
read-only pte can be misinterpreted as a swap-pte.

Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>[S390] Remove open-coded mem_map usage.</title>
<updated>2006-10-04T18:02:23Z</updated>
<author>
<name>Heiko Carstens</name>
</author>
<published>2006-10-04T18:02:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0b2b6e1ddce4696cb7afcbb15a654fe95428a498'/>
<id>urn:sha1:0b2b6e1ddce4696cb7afcbb15a654fe95428a498</id>
<content type='text'>
Use page_to_phys and pfn_to_page to avoid open-coded mem_map usage.

Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>[PATCH] convert s390 page handling macros to functions</title>
<updated>2006-09-29T16:18:03Z</updated>
<author>
<name>Heiko Carstens</name>
</author>
<published>2006-09-29T08:58:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2dcea57ae19275451a756a2d5bf96b329487b0e0'/>
<id>urn:sha1:2dcea57ae19275451a756a2d5bf96b329487b0e0</id>
<content type='text'>
Convert s390 page handling macros to functions.  In particular this fixes a
problem with s390's SetPageUptodate macro which uses its input parameter
twice which again can cause subtle bugs.

[akpm@osdl.org: build fix]
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[S390] Inline assembly cleanup.</title>
<updated>2006-09-28T14:56:43Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2006-09-28T14:56:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=94c12cc7d196bab34aaa98d38521549fa1e5ef76'/>
<id>urn:sha1:94c12cc7d196bab34aaa98d38521549fa1e5ef76</id>
<content type='text'>
Major cleanup of all s390 inline assemblies. They now have a common
coding style. Quite a few have been shortened, mainly by using register
asm variables. Use of the EX_TABLE macro helps  as well. The atomic ops,
bit ops and locking inlines new use the Q-constraint if a newer gcc
is used.  That results in slightly better code.

Thanks to Christian Borntraeger for proof reading the changes.

Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>[PATCH] Standardize pxx_page macros</title>
<updated>2006-09-26T15:48:51Z</updated>
<author>
<name>Dave McCracken</name>
</author>
<published>2006-09-26T06:31:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=46a82b2d5591335277ed2930611f6acb4ce654ed'/>
<id>urn:sha1:46a82b2d5591335277ed2930611f6acb4ce654ed</id>
<content type='text'>
One of the changes necessary for shared page tables is to standardize the
pxx_page macros.  pte_page and pmd_page have always returned the struct
page associated with their entry, while pte_page_kernel and pmd_page_kernel
have returned the kernel virtual address.  pud_page and pgd_page, on the
other hand, return the kernel virtual address.

Shared page tables needs pud_page and pgd_page to return the actual page
structures.  There are very few actual users of these functions, so it is
simple to standardize their usage.

Since this is basic cleanup, I am submitting these changes as a standalone
patch.  Per Hugh Dickins' comments about it, I am also changing the
pxx_page_kernel macros to pxx_page_vaddr to clarify their meaning.

Signed-off-by: Dave McCracken &lt;dmccr@us.ibm.com&gt;
Cc: Hugh Dickins &lt;hugh@veritas.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[S390] Cleanup in page table related code.</title>
<updated>2006-09-20T13:59:37Z</updated>
<author>
<name>Gerald Schaefer</name>
</author>
<published>2006-09-20T13:59:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9282ed929758b82f448a40d3c17319d794970624'/>
<id>urn:sha1:9282ed929758b82f448a40d3c17319d794970624</id>
<content type='text'>
Changed and simplified some page table related #defines and code.

Signed-off-by: Gerald Schaefer &lt;geraldsc@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
</feed>
