[PATCH RFC 0/4] x86/fixmap: Unify FIXADDR_TOP

Hou Wenlong posted 4 patches 11 months, 3 weeks ago
Only 2 patches received!
There is a newer version of this series
arch/x86/entry/vsyscall/vsyscall_64.c |  7 +-----
arch/x86/include/asm/fixmap.h         | 28 ++++-------------------
arch/x86/include/asm/paravirt.h       |  7 ++++++
arch/x86/include/asm/paravirt_types.h |  4 ++++
arch/x86/include/asm/vsyscall.h       | 13 +++++++++++
arch/x86/kernel/head64.c              |  1 -
arch/x86/kernel/head_64.S             |  6 ++---
arch/x86/kernel/paravirt.c            |  4 ++++
arch/x86/mm/dump_pagetables.c         |  3 ++-
arch/x86/mm/fault.c                   |  1 -
arch/x86/mm/init_64.c                 |  2 +-
arch/x86/mm/ioremap.c                 |  5 ++---
arch/x86/mm/pgtable.c                 | 13 +++++++++++
arch/x86/mm/pgtable_32.c              |  3 ---
arch/x86/xen/mmu_pv.c                 | 32 +++++++++++++++++++--------
15 files changed, 77 insertions(+), 52 deletions(-)
[PATCH RFC 0/4] x86/fixmap: Unify FIXADDR_TOP
Posted by Hou Wenlong 11 months, 3 weeks ago
This patchset unifies FIXADDR_TOP as a variable for x86, allowing the
fixmap area to be movable and relocated with the kernel image in the
x86/PIE patchset [0]. This enables the kernel image to be relocated in
the top 512G of the address space.

[0] https://lore.kernel.org/lkml/cover.1682673542.git.houwenlong.hwl@antgroup.com

Hou Wenlong (4):
  x86/vsyscall: Don't use set_fixmap() to map vsyscall page
  x86/xen: Pin up to VSYSCALL_ADDR when vsyscall page is out of fixmap
    area
  x86/fixmap: Move vsyscall page out of fixmap area
  x86/fixmap: Unify FIXADDR_TOP

 arch/x86/entry/vsyscall/vsyscall_64.c |  7 +-----
 arch/x86/include/asm/fixmap.h         | 28 ++++-------------------
 arch/x86/include/asm/paravirt.h       |  7 ++++++
 arch/x86/include/asm/paravirt_types.h |  4 ++++
 arch/x86/include/asm/vsyscall.h       | 13 +++++++++++
 arch/x86/kernel/head64.c              |  1 -
 arch/x86/kernel/head_64.S             |  6 ++---
 arch/x86/kernel/paravirt.c            |  4 ++++
 arch/x86/mm/dump_pagetables.c         |  3 ++-
 arch/x86/mm/fault.c                   |  1 -
 arch/x86/mm/init_64.c                 |  2 +-
 arch/x86/mm/ioremap.c                 |  5 ++---
 arch/x86/mm/pgtable.c                 | 13 +++++++++++
 arch/x86/mm/pgtable_32.c              |  3 ---
 arch/x86/xen/mmu_pv.c                 | 32 +++++++++++++++++++--------
 15 files changed, 77 insertions(+), 52 deletions(-)


base-commit: f585d5177e1aad174fd6da0e3936b682ed58ced0
--
2.31.1
Re: [PATCH RFC 0/4] x86/fixmap: Unify FIXADDR_TOP
Posted by Thomas Gleixner 11 months ago
On Mon, May 15 2023 at 16:19, Hou Wenlong wrote:

> This patchset unifies FIXADDR_TOP as a variable for x86, allowing the
> fixmap area to be movable and relocated with the kernel image in the
> x86/PIE patchset [0]. This enables the kernel image to be relocated in
> the top 512G of the address space.

What for? What's the use case.

Please provide a proper argument why this is generally useful and
important.

Thanks,

        tglx
Re: [PATCH RFC 0/4] x86/fixmap: Unify FIXADDR_TOP
Posted by Dave Hansen 11 months ago
On 5/15/23 01:19, Hou Wenlong wrote:
> This patchset unifies FIXADDR_TOP as a variable for x86, allowing the
> fixmap area to be movable and relocated with the kernel image in the
> x86/PIE patchset [0]. This enables the kernel image to be relocated in
> the top 512G of the address space.

What problems does this patch set solve?  How might that solution be
visible to end users?  Why is this problem important to you?

Also, while you're waiting for someone to review _your_ code, have you
considered reviewing anyone else's code?  I don't think I've seen any
review activity from you lately.
Re: [PATCH RFC 0/4] x86/fixmap: Unify FIXADDR_TOP
Posted by Hou Wenlong 11 months ago
On Wed, Jun 07, 2023 at 08:49:15PM +0800, Dave Hansen wrote:
> On 5/15/23 01:19, Hou Wenlong wrote:
> > This patchset unifies FIXADDR_TOP as a variable for x86, allowing the
> > fixmap area to be movable and relocated with the kernel image in the
> > x86/PIE patchset [0]. This enables the kernel image to be relocated in
> > the top 512G of the address space.
> 
> What problems does this patch set solve?  How might that solution be
> visible to end users?  Why is this problem important to you?
> 
> Also, while you're waiting for someone to review _your_ code, have you
> considered reviewing anyone else's code?  I don't think I've seen any
> review activity from you lately.

Hello,

Sorry for bothering you. This patch is not important; it is just a part
of our PIE patchset. I should be more patient.

We want to build the kernel as PIE and allow the kernel image area,
including the fixmap area, to be placed at any virtual address. We have
also implemented a PV Linux guest based on PIE, which can be used in
software virtualization similar to Lguest. PIE makes the guest kernel
share the host kernel space similar to a normal userspace process.
Additionally, we are considering whether it is possible to use PIE and
PVOPS to implement a user-mode kernel.

Thank you for your advice. I will participate more actively in community
review activities. Sorry again for bothering you.

Thanks.
Re: [PATCH RFC 0/4] x86/fixmap: Unify FIXADDR_TOP
Posted by Thomas Gleixner 10 months, 4 weeks ago
On Thu, Jun 08 2023 at 17:33, Hou Wenlong wrote:
> On Wed, Jun 07, 2023 at 08:49:15PM +0800, Dave Hansen wrote:
>> What problems does this patch set solve?  How might that solution be
>> visible to end users?  Why is this problem important to you?
>
> We want to build the kernel as PIE and allow the kernel image area,
> including the fixmap area, to be placed at any virtual address.

You are still failing to tell us why you want that and which problem
this solves. Just that fact that you want to something is not an
argument.

> We have also implemented a PV Linux guest based on PIE, which can be
> used in software virtualization similar to Lguest. PIE makes the guest
> kernel share the host kernel space similar to a normal userspace
> process.  Additionally, we are considering whether it is possible to
> use PIE and PVOPS to implement a user-mode kernel.

That solves what?

Thanks,

        tglx
Re: [PATCH RFC 0/4] x86/fixmap: Unify FIXADDR_TOP
Posted by Hou Wenlong 11 months ago
On Mon, May 15, 2023 at 04:19:31PM +0800, Hou Wenlong wrote:
> This patchset unifies FIXADDR_TOP as a variable for x86, allowing the
> fixmap area to be movable and relocated with the kernel image in the
> x86/PIE patchset [0]. This enables the kernel image to be relocated in
> the top 512G of the address space.
> 
> [0] https://lore.kernel.org/lkml/cover.1682673542.git.houwenlong.hwl@antgroup.com
> 
> Hou Wenlong (4):
>   x86/vsyscall: Don't use set_fixmap() to map vsyscall page
>   x86/xen: Pin up to VSYSCALL_ADDR when vsyscall page is out of fixmap
>     area
>   x86/fixmap: Move vsyscall page out of fixmap area
>   x86/fixmap: Unify FIXADDR_TOP
> 
>  arch/x86/entry/vsyscall/vsyscall_64.c |  7 +-----
>  arch/x86/include/asm/fixmap.h         | 28 ++++-------------------
>  arch/x86/include/asm/paravirt.h       |  7 ++++++
>  arch/x86/include/asm/paravirt_types.h |  4 ++++
>  arch/x86/include/asm/vsyscall.h       | 13 +++++++++++
>  arch/x86/kernel/head64.c              |  1 -
>  arch/x86/kernel/head_64.S             |  6 ++---
>  arch/x86/kernel/paravirt.c            |  4 ++++
>  arch/x86/mm/dump_pagetables.c         |  3 ++-
>  arch/x86/mm/fault.c                   |  1 -
>  arch/x86/mm/init_64.c                 |  2 +-
>  arch/x86/mm/ioremap.c                 |  5 ++---
>  arch/x86/mm/pgtable.c                 | 13 +++++++++++
>  arch/x86/mm/pgtable_32.c              |  3 ---
>  arch/x86/xen/mmu_pv.c                 | 32 +++++++++++++++++++--------
>  15 files changed, 77 insertions(+), 52 deletions(-)
> 
> 
> base-commit: f585d5177e1aad174fd6da0e3936b682ed58ced0
> --
> 2.31.1
Hi,

Just wanted to send a kind ping on this patchset.

Thanks.