All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Ghiti <alex@ghiti.fr>
To: Michael Ellerman <mpe@ellerman.id.au>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Anup Patel <Anup.Patel@wdc.com>,
	Atish Patra <Atish.Patra@wdc.com>, Zong Li <zong.li@sifive.com>,
	linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-riscv@lists.infradead.org
Subject: Re: [PATCH v5 0/4] vmalloc kernel mapping and relocatable kernel
Date: Wed, 8 Jul 2020 00:21:42 -0400	[thread overview]
Message-ID: <8f47d523-5c01-1614-dbb0-d938f07be65f@ghiti.fr> (raw)
In-Reply-To: <20200607075949.665-1-alex@ghiti.fr>

Hi Palmer,

Le 6/7/20 à 3:59 AM, Alexandre Ghiti a écrit :
> This patchset originally implemented relocatable kernel support but now
> also moves the kernel mapping into the vmalloc zone.
>                                                                                   
> The first patch explains why we need to move the kernel into vmalloc
> zone (instead of memcpying it around). That patch should ease KASLR
> implementation a lot.
>                                                                                   
> The second patch allows to build relocatable kernels but is not selected
> by default.
>                                                                                   
> The third and fourth patches take advantage of an already existing powerpc
> script that checks relocations at compile-time, and uses it for riscv.
>                                                                                   
> Changes in v5:
>    * Add "static __init" to create_kernel_page_table function as reported by
>      Kbuild test robot
>    * Add reviewed-by from Zong
>    * Rebase onto v5.7
> 
> Changes in v4:
>    * Fix BPF region that overlapped with kernel's as suggested by Zong
>    * Fix end of module region that could be larger than 2GB as suggested by Zong
>    * Fix the size of the vm area reserved for the kernel as we could lose
>      PMD_SIZE if the size was already aligned on PMD_SIZE
>    * Split compile time relocations check patch into 2 patches as suggested by Anup
>    * Applied Reviewed-by from Zong and Anup
>                                                                                   
> Changes in v3:
>    * Move kernel mapping to vmalloc
>                                                                                   
> Changes in v2:
>    * Make RELOCATABLE depend on MMU as suggested by Anup
>    * Rename kernel_load_addr into kernel_virt_addr as suggested by Anup
>    * Use __pa_symbol instead of __pa, as suggested by Zong
>    * Rebased on top of v5.6-rc3
>    * Tested with sv48 patchset
>    * Add Reviewed/Tested-by from Zong and Anup
> 
> Alexandre Ghiti (4):
>    riscv: Move kernel mapping to vmalloc zone
>    riscv: Introduce CONFIG_RELOCATABLE
>    powerpc: Move script to check relocations at compile time in scripts/
>    riscv: Check relocations at compile time
> 
>   arch/powerpc/tools/relocs_check.sh |  18 +----
>   arch/riscv/Kconfig                 |  12 +++
>   arch/riscv/Makefile                |   5 +-
>   arch/riscv/Makefile.postlink       |  36 +++++++++
>   arch/riscv/boot/loader.lds.S       |   3 +-
>   arch/riscv/include/asm/page.h      |  10 ++-
>   arch/riscv/include/asm/pgtable.h   |  38 ++++++---
>   arch/riscv/kernel/head.S           |   3 +-
>   arch/riscv/kernel/module.c         |   4 +-
>   arch/riscv/kernel/vmlinux.lds.S    |   9 ++-
>   arch/riscv/mm/Makefile             |   4 +
>   arch/riscv/mm/init.c               | 121 +++++++++++++++++++++++++----
>   arch/riscv/mm/physaddr.c           |   2 +-
>   arch/riscv/tools/relocs_check.sh   |  26 +++++++
>   scripts/relocs_check.sh            |  20 +++++
>   15 files changed, 259 insertions(+), 52 deletions(-)
>   create mode 100644 arch/riscv/Makefile.postlink
>   create mode 100755 arch/riscv/tools/relocs_check.sh
>   create mode 100755 scripts/relocs_check.sh
> 

Do you have any remark regarding this series ?

Thanks,

Alex

WARNING: multiple messages have this Message-ID (diff)
From: Alex Ghiti <alex@ghiti.fr>
To: Michael Ellerman <mpe@ellerman.id.au>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Anup Patel <Anup.Patel@wdc.com>,
	Atish Patra <Atish.Patra@wdc.com>, Zong Li <zong.li@sifive.com>,
	linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-riscv@lists.infradead.org
Subject: Re: [PATCH v5 0/4] vmalloc kernel mapping and relocatable kernel
Date: Wed, 8 Jul 2020 00:21:42 -0400	[thread overview]
Message-ID: <8f47d523-5c01-1614-dbb0-d938f07be65f@ghiti.fr> (raw)
In-Reply-To: <20200607075949.665-1-alex@ghiti.fr>

Hi Palmer,

Le 6/7/20 à 3:59 AM, Alexandre Ghiti a écrit :
> This patchset originally implemented relocatable kernel support but now
> also moves the kernel mapping into the vmalloc zone.
>                                                                                   
> The first patch explains why we need to move the kernel into vmalloc
> zone (instead of memcpying it around). That patch should ease KASLR
> implementation a lot.
>                                                                                   
> The second patch allows to build relocatable kernels but is not selected
> by default.
>                                                                                   
> The third and fourth patches take advantage of an already existing powerpc
> script that checks relocations at compile-time, and uses it for riscv.
>                                                                                   
> Changes in v5:
>    * Add "static __init" to create_kernel_page_table function as reported by
>      Kbuild test robot
>    * Add reviewed-by from Zong
>    * Rebase onto v5.7
> 
> Changes in v4:
>    * Fix BPF region that overlapped with kernel's as suggested by Zong
>    * Fix end of module region that could be larger than 2GB as suggested by Zong
>    * Fix the size of the vm area reserved for the kernel as we could lose
>      PMD_SIZE if the size was already aligned on PMD_SIZE
>    * Split compile time relocations check patch into 2 patches as suggested by Anup
>    * Applied Reviewed-by from Zong and Anup
>                                                                                   
> Changes in v3:
>    * Move kernel mapping to vmalloc
>                                                                                   
> Changes in v2:
>    * Make RELOCATABLE depend on MMU as suggested by Anup
>    * Rename kernel_load_addr into kernel_virt_addr as suggested by Anup
>    * Use __pa_symbol instead of __pa, as suggested by Zong
>    * Rebased on top of v5.6-rc3
>    * Tested with sv48 patchset
>    * Add Reviewed/Tested-by from Zong and Anup
> 
> Alexandre Ghiti (4):
>    riscv: Move kernel mapping to vmalloc zone
>    riscv: Introduce CONFIG_RELOCATABLE
>    powerpc: Move script to check relocations at compile time in scripts/
>    riscv: Check relocations at compile time
> 
>   arch/powerpc/tools/relocs_check.sh |  18 +----
>   arch/riscv/Kconfig                 |  12 +++
>   arch/riscv/Makefile                |   5 +-
>   arch/riscv/Makefile.postlink       |  36 +++++++++
>   arch/riscv/boot/loader.lds.S       |   3 +-
>   arch/riscv/include/asm/page.h      |  10 ++-
>   arch/riscv/include/asm/pgtable.h   |  38 ++++++---
>   arch/riscv/kernel/head.S           |   3 +-
>   arch/riscv/kernel/module.c         |   4 +-
>   arch/riscv/kernel/vmlinux.lds.S    |   9 ++-
>   arch/riscv/mm/Makefile             |   4 +
>   arch/riscv/mm/init.c               | 121 +++++++++++++++++++++++++----
>   arch/riscv/mm/physaddr.c           |   2 +-
>   arch/riscv/tools/relocs_check.sh   |  26 +++++++
>   scripts/relocs_check.sh            |  20 +++++
>   15 files changed, 259 insertions(+), 52 deletions(-)
>   create mode 100644 arch/riscv/Makefile.postlink
>   create mode 100755 arch/riscv/tools/relocs_check.sh
>   create mode 100755 scripts/relocs_check.sh
> 

Do you have any remark regarding this series ?

Thanks,

Alex

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  parent reply	other threads:[~2020-07-08  4:21 UTC|newest]

Thread overview: 89+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-07  7:59 [PATCH v5 0/4] vmalloc kernel mapping and relocatable kernel Alexandre Ghiti
2020-06-07  7:59 ` [PATCH v5 1/4] riscv: Move kernel mapping to vmalloc zone Alexandre Ghiti
2020-06-11 21:34   ` Atish Patra
2020-06-11 21:34     ` Atish Patra
2020-06-11 21:34     ` Atish Patra
2020-06-12 12:30     ` Alex Ghiti
2020-06-12 12:30       ` Alex Ghiti
2020-06-12 12:30       ` Alex Ghiti
2020-07-09  5:05   ` Palmer Dabbelt
2020-07-09  5:05     ` Palmer Dabbelt
2020-07-09  5:05     ` Palmer Dabbelt
2020-07-09  8:15     ` Zong Li
2020-07-09  8:15       ` Zong Li
2020-07-09  8:15       ` Zong Li
2020-07-09 11:11     ` Alex Ghiti
2020-07-09 11:11       ` Alex Ghiti
2020-07-09 11:11       ` Alex Ghiti
2020-07-21 18:36       ` Alex Ghiti
2020-07-21 18:36         ` Alex Ghiti
2020-07-21 18:36         ` Alex Ghiti
2020-07-21 19:05         ` Palmer Dabbelt
2020-07-21 19:05           ` Palmer Dabbelt
2020-07-21 19:05           ` Palmer Dabbelt
2020-07-21 23:12           ` Benjamin Herrenschmidt
2020-07-21 23:12             ` Benjamin Herrenschmidt
2020-07-21 23:12             ` Benjamin Herrenschmidt
2020-07-21 23:48             ` Palmer Dabbelt
2020-07-21 23:48               ` Palmer Dabbelt
2020-07-21 23:48               ` Palmer Dabbelt
2020-07-22  2:21               ` Benjamin Herrenschmidt
2020-07-22  2:21                 ` Benjamin Herrenschmidt
2020-07-22  2:21                 ` Benjamin Herrenschmidt
2020-07-22  4:50                 ` Michael Ellerman
2020-07-22  4:50                   ` Michael Ellerman
2020-07-22  4:50                   ` Michael Ellerman
2020-07-22  5:46                   ` Palmer Dabbelt
2020-07-22  5:46                     ` Palmer Dabbelt
2020-07-22  5:46                     ` Palmer Dabbelt
2020-07-22  9:43           ` Arnd Bergmann
2020-07-22  9:43             ` Arnd Bergmann
2020-07-22  9:43             ` Arnd Bergmann
2020-07-22  9:43             ` Arnd Bergmann
2020-07-22 19:52             ` Palmer Dabbelt
2020-07-22 19:52               ` Palmer Dabbelt
2020-07-22 19:52               ` Palmer Dabbelt
2020-07-22 20:22               ` Arnd Bergmann
2020-07-22 20:22                 ` Arnd Bergmann
2020-07-22 20:22                 ` Arnd Bergmann
2020-07-22 20:22                 ` Arnd Bergmann
2020-07-22 21:05                 ` Atish Patra
2020-07-22 21:05                   ` Atish Patra
2020-07-22 21:05                   ` Atish Patra
2020-07-22 21:05                   ` Atish Patra
2020-07-24  7:20                   ` Arnd Bergmann
2020-07-24  7:20                     ` Arnd Bergmann
2020-07-24  7:20                     ` Arnd Bergmann
2020-07-24  7:20                     ` Arnd Bergmann
2020-07-23  5:32           ` Alex Ghiti
2020-07-23  5:32             ` Alex Ghiti
2020-07-23  5:32             ` Alex Ghiti
2020-07-21 23:11         ` Benjamin Herrenschmidt
2020-07-21 23:11           ` Benjamin Herrenschmidt
2020-07-21 23:11           ` Benjamin Herrenschmidt
2020-07-21 23:36           ` Palmer Dabbelt
2020-07-21 23:36             ` Palmer Dabbelt
2020-07-21 23:36             ` Palmer Dabbelt
2020-07-23  5:36             ` Alex Ghiti
2020-07-23  5:36               ` Alex Ghiti
2020-07-23  5:36               ` Alex Ghiti
2020-07-23  5:21           ` Alex Ghiti
2020-07-23  5:21             ` Alex Ghiti
2020-07-23  5:21             ` Alex Ghiti
2020-07-23 22:33             ` Benjamin Herrenschmidt
2020-07-23 22:33               ` Benjamin Herrenschmidt
2020-07-23 22:33               ` Benjamin Herrenschmidt
2020-07-24  8:14               ` Arnd Bergmann
2020-07-24  8:14                 ` Arnd Bergmann
2020-07-24  8:14                 ` Arnd Bergmann
2020-07-24  8:14                 ` Arnd Bergmann
2020-06-07  7:59 ` [PATCH v5 2/4] riscv: Introduce CONFIG_RELOCATABLE Alexandre Ghiti
2020-06-07  7:59   ` Alexandre Ghiti
2020-06-10 14:10   ` Jerome Forissier
2020-06-11 19:43     ` Alex Ghiti
2020-06-07  7:59 ` [PATCH v5 3/4] powerpc: Move script to check relocations at compile time in scripts/ Alexandre Ghiti
2020-06-07  7:59   ` Alexandre Ghiti
2020-06-07  7:59 ` [PATCH v5 4/4] riscv: Check relocations at compile time Alexandre Ghiti
2020-06-07  7:59   ` Alexandre Ghiti
2020-07-08  4:21 ` Alex Ghiti [this message]
2020-07-08  4:21   ` [PATCH v5 0/4] vmalloc kernel mapping and relocatable kernel Alex Ghiti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8f47d523-5c01-1614-dbb0-d938f07be65f@ghiti.fr \
    --to=alex@ghiti.fr \
    --cc=Anup.Patel@wdc.com \
    --cc=Atish.Patra@wdc.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=paulus@samba.org \
    --cc=zong.li@sifive.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.