Linux for S/390 and zSeries uses the multiple address space facility of the
architecture to allow the movement of data between kernel and userland:
Control Register 7 (secondary space control) and Control Register 13 (Home
space control) are set to the user pgdir. The Kernel is running in its own,
disjunct address space, and running in primary address space. A "Copy
to/from user" is done via access register mode with access registers (AR2
and AR4) set to 0 or 1. For that purpose we need set up CR 7 with the user
pgd.

-----Original Message-----
How does the kernel access user arguments?

In other Linux implementations the kernel is mapped to the upper 1G of the
virtual address.  This leaves 3G to the user processes.  This mapping allows
the kernel to use addresses passed as arguments without any translation, and
it allows the kernel to access user space directly.  All Unix systems I know
of (and Windows) do something similar, although they usually divide the
address space into two 2G regions.

Reply via email to