This eliminates the following sparse warning:
drivers/tty/serial/ucc_uart.c:286:6: warning: symbol 'qe_uart_set_mctrl'
was not declared. Should it be static?
Reported-by: Hulk Robot
Signed-off-by: Jason Yan
---
drivers/tty/serial/ucc_uart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion
-by: Hulk Robot
Signed-off-by: Jason Yan
---
arch/powerpc/platforms/ps3/spu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/ps3/spu.c b/arch/powerpc/platforms/ps3/spu.c
index 1193c294b8d0..0c252478e556 100644
--- a/arch/powerpc/platforms/ps3/spu.c
+++ b
addr_cena;
| ^
Reported-by: Hulk Robot
Signed-off-by: Jason Yan
---
drivers/soc/fsl/dpio/qbman-portal.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/soc/fsl/dpio/qbman-portal.c
b/drivers/soc/fsl/dpio/qbman-portal.c
index 0ab85bfb116f..659b4a570d5b 100644
---
defconfig with CONFIG_RANDOMIZE_BASE
set.
Fixes: 2b0e86cc5de6 ("powerpc/fsl_booke/32: implement KASLR infrastructure")
Cc: sta...@vger.kernel.org
Signed-off-by: Arseny Solokha
---
arch/powerpc/mm/nohash/kaslr_booke.c | 1 +
1 file changed, 1 insertion(+)
Reviewed-by: Jason Yan
In i2c_powermac_register_devices(), variable 'found_onyx' is bool and
assigned '0' and 'true' in different places. Use 'false' instead of '0'.
This fixes the following coccicheck warning:
drivers/i2c/busses/i2c-powermac.c:318:6-16: WARNING: Assignment of 0/1
to bool variable
Signed-off-by: Jason
instructions to 64-bit.
v2->v3:
Fix build error when KASLR is disabled.
v1->v2:
Add __kaslr_offset for the secondary cpu boot up.
Jason Yan (6):
powerpc/fsl_booke/kaslr: refactor kaslr_legal_offset() and
kaslr_early_init()
powerpc/fsl_booke/64: introduce reloc_kernel_entr
Hi Michael,
What's the status of this series?
Thanks,
Jason
在 2020/3/30 10:20, Jason Yan 写道:
This is a try to implement KASLR for Freescale BookE64 which is based on
my earlier implementation for Freescale BookE32:
https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=131718
Fix the following coccicheck warning:
drivers/soc/fsl/guts.c:120:2-3: Unneeded semicolon
Reported-by: Hulk Robot
Signed-off-by: Jason Yan
---
drivers/soc/fsl/guts.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/fsl/guts.c b/drivers/soc/fsl/guts.c
index
ping...
在 2020/3/30 10:20, Jason Yan 写道:
This is a try to implement KASLR for Freescale BookE64 which is based on
my earlier implementation for Freescale BookE32:
https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=131718=*
The implementation for Freescale BookE64 is similar
Signed-off-by: Jason Yan
---
drivers/tty/hvc/hvcs.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
index ee0604cd9c6b..55105ac38f89 100644
--- a/drivers/tty/hvc/hvcs.c
+++ b/drivers/tty/hvc/hvcs.c
@@ -196,8 +196,6 @@ module_param
Some code refactor in kaslr_legal_offset() and kaslr_early_init(). No
functional change. This is a preparation for KASLR fsl_booke64.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc
The BSS section has already cleared out in the first pass. No need to
clear it again. This can save some time when booting with KASLR
enabled.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Now we support both 32 and 64 bit KASLR for fsl booke. Add document for
64 bit part and rename kaslr-booke32.rst to kaslr-booke.rst.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc
The original kernel still exists in the memory, clear it now.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Nicholas Piggin
Cc: Kees Cook
---
arch/powerpc/mm/nohash/kaslr_booke.c | 4
:1 mapping has been setup.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Nicholas Piggin
Cc: Kees Cook
---
arch/powerpc/Kconfig | 2 +-
arch/powerpc/kernel/exceptions
lr_offset by symbol instead of magic offsets.
Use IS_ENABLED(CONFIG_PPC32) instead of #ifdef CONFIG_PPC32.
Change kaslr-booke32 to kaslr-booke in index.rst
Switch some instructions to 64-bit.
v2->v3:
Fix build error when KASLR is disabled.
v1->v2:
Add __kaslr_offset for the seconda
Like the 32bit code, we introduce reloc_kernel_entry() helper to prepare
for the KASLR 64bit version. And move the C declaration of this function
out of CONFIG_PPC32 and use long instead of int for the parameter 'addr'.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael
_PPC32) instead of #ifdef CONFIG_PPC32.
Change kaslr-booke32 to kaslr-booke in index.rst
Switch some instructions to 64-bit.
v2->v3:
Fix build error when KASLR is disabled.
v1->v2:
Add __kaslr_offset for the secondary cpu boot up.
Jason Yan (6):
powerpc/fsl_booke/kaslr: refact
ping...
在 2020/3/6 14:40, Jason Yan 写道:
This is a try to implement KASLR for Freescale BookE64 which is based on
my earlier implementation for Freescale BookE32:
https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=131718=*
The implementation for Freescale BookE64 is similar
The original kernel still exists in the memory, clear it now.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Nicholas Piggin
Cc: Kees Cook
---
arch/powerpc/mm/nohash/kaslr_booke.c | 4
The BSS section has already cleared out in the first pass. No need to
clear it again. This can save some time when booting with KASLR
enabled.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Now we support both 32 and 64 bit KASLR for fsl booke. Add document for
64 bit part and rename kaslr-booke32.rst to kaslr-booke.rst.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc
Like the 32bit code, we introduce reloc_kernel_entry() helper to prepare
for the KASLR 64bit version. And move the C declaration of this function
out of CONFIG_PPC32 and use long instead of int for the parameter 'addr'.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael
:1 mapping has been setup.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Nicholas Piggin
Cc: Kees Cook
---
arch/powerpc/Kconfig | 2 +-
arch/powerpc/kernel/exceptions
to kaslr-booke in index.rst
Switch some instructions to 64-bit.
v2->v3:
Fix build error when KASLR is disabled.
v1->v2:
Add __kaslr_offset for the secondary cpu boot up.
Jason Yan (6):
powerpc/fsl_booke/kaslr: refactor kaslr_legal_offset() and
kaslr_early_init()
powerpc/fs
Some code refactor in kaslr_legal_offset() and kaslr_early_init(). No
functional change. This is a preparation for KASLR fsl_booke64.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc
在 2020/3/5 5:21, Scott Wood 写道:
On Wed, 2020-02-26 at 18:16 +1100, Daniel Axtens wrote:
Hi Jason,
This is a try to implement KASLR for Freescale BookE64 which is based on
my earlier implementation for Freescale BookE32:
https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=131718
在 2020/3/5 5:53, Scott Wood 写道:
On Thu, 2020-02-06 at 10:58 +0800, Jason Yan wrote:
The original kernel still exists in the memory, clear it now.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul
在 2020/3/5 5:49, Scott Wood 写道:
On Thu, 2020-02-06 at 10:58 +0800, Jason Yan wrote:
The BSS section has already cleared out in the first pass. No need to
clear it again. This can save some time when booting with KASLR
enabled.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc
在 2020/3/5 5:44, Scott Wood 写道:
On Thu, 2020-02-06 at 10:58 +0800, Jason Yan wrote:
The implementation for Freescale BookE64 is similar as BookE32. One
difference is that Freescale BookE64 set up a TLB mapping of 1G during
booting. Another difference is that ppc64 needs the kernel to be
64K
在 2020/3/2 16:47, Scott Wood 写道:
On Mon, 2020-03-02 at 15:12 +0800, Jason Yan wrote:
在 2020/3/2 11:24, Scott Wood 写道:
On Mon, 2020-03-02 at 10:17 +0800, Jason Yan wrote:
在 2020/3/1 6:54, Scott Wood 写道:
On Sat, 2020-02-29 at 15:27 +0800, Jason Yan wrote:
Turnning to %p may
在 2020/3/2 11:24, Scott Wood 写道:
On Mon, 2020-03-02 at 10:17 +0800, Jason Yan wrote:
在 2020/3/1 6:54, Scott Wood 写道:
On Sat, 2020-02-29 at 15:27 +0800, Jason Yan wrote:
Turnning to %p may not be a good idea in this situation. So
for the REG logs printed when dumping stack, we can disable
在 2020/3/1 6:54, Scott Wood 写道:
On Sat, 2020-02-29 at 15:27 +0800, Jason Yan wrote:
在 2020/2/29 12:28, Scott Wood 写道:
On Fri, 2020-02-28 at 14:47 +0800, Jason Yan wrote:
在 2020/2/28 13:53, Scott Wood 写道:
I don't see any debug setting for %pK (or %p) to always print the
actual
address
在 2020/2/29 12:28, Scott Wood 写道:
On Fri, 2020-02-28 at 14:47 +0800, Jason Yan wrote:
在 2020/2/28 13:53, Scott Wood 写道:
On Wed, 2020-02-26 at 16:18 +0800, Jason Yan wrote:
Hi Daniel,
在 2020/2/26 15:16, Daniel Axtens 写道:
Maybe replacing the REG format string in KASLR mode would
在 2020/2/28 13:53, Scott Wood 写道:
On Wed, 2020-02-26 at 16:18 +0800, Jason Yan wrote:
Hi Daniel,
在 2020/2/26 15:16, Daniel Axtens 写道:
Hi Jason,
This is a try to implement KASLR for Freescale BookE64 which is based on
my earlier implementation for Freescale BookE32:
https
在 2020/2/26 19:41, Daniel Axtens 写道:
I suspect that you will find it easier to convince people to accept a
change to %pK than removal:)
BTW, I have a T4240RDB so I might be able to test this series at some
point - do I need an updated bootloader to pass in a random seed, or is
the kernel
e to do this, maybe we can use "%pK" so that they will be
hidden from unprivileged users.
Thanks,
Jason
Regards,
Daniel
v2->v3:
Fix build error when KASLR is disabled.
v1->v2:
Add __kaslr_offset for the secondary cpu boot up.
Jason Yan (6):
powerpc/fsl_bo
在 2020/2/26 13:04, Christophe Leroy 写道:
---
This works for me. Only had to leave the #ifdef around the map_mem_in_cams()
Also had to set linear_sz and ram for the alternative case, otherwise I get
Great. Thank you for the illustration.
Jason
在 2020/2/26 10:40, Jason Yan 写道:
在 2020/2/20 21:48, Christophe Leroy 写道:
Le 06/02/2020 à 03:58, Jason Yan a écrit :
The implementation for Freescale BookE64 is similar as BookE32. One
difference is that Freescale BookE64 set up a TLB mapping of 1G during
booting. Another difference
在 2020/2/20 21:50, Christophe Leroy 写道:
Le 06/02/2020 à 03:58, Jason Yan a écrit :
Now we support both 32 and 64 bit KASLR for fsl booke. Add document for
64 bit part and rename kaslr-booke32.rst to kaslr-booke.rst.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael
在 2020/2/20 21:49, Christophe Leroy 写道:
Le 06/02/2020 à 03:58, Jason Yan a écrit :
The original kernel still exists in the memory, clear it now.
No such problem with PPC32 ? Or is that common ?
PPC32 did this in relocate_init() in fsl_booke.c because PPC32 will not
reach
在 2020/2/20 21:48, Christophe Leroy 写道:
Le 06/02/2020 à 03:58, Jason Yan a écrit :
The implementation for Freescale BookE64 is similar as BookE32. One
difference is that Freescale BookE64 set up a TLB mapping of 1G during
booting. Another difference is that ppc64 needs the kernel to be
64K
在 2020/2/20 21:40, Christophe Leroy 写道:
Le 06/02/2020 à 03:58, Jason Yan a écrit :
Some code refactor in kaslr_legal_offset() and kaslr_early_init(). No
functional change. This is a preparation for KASLR fsl_booke64.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael
ping...
on 2020/2/13 11:00, Jason Yan wrote:
Hi everyone, any comments or suggestions?
Thanks,
Jason
on 2020/2/6 10:58, Jason Yan wrote:
This is a try to implement KASLR for Freescale BookE64 which is based on
my earlier implementation for Freescale BookE32:
https://patchwork.ozlabs.org
Hi everyone, any comments or suggestions?
Thanks,
Jason
on 2020/2/6 10:58, Jason Yan wrote:
This is a try to implement KASLR for Freescale BookE64 which is based on
my earlier implementation for Freescale BookE32:
https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=131718
The original kernel still exists in the memory, clear it now.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Nicholas Piggin
Cc: Kees Cook
---
arch/powerpc/mm/nohash/kaslr_booke.c | 4
Now we support both 32 and 64 bit KASLR for fsl booke. Add document for
64 bit part and rename kaslr-booke32.rst to kaslr-booke.rst.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc
Some code refactor in kaslr_legal_offset() and kaslr_early_init(). No
functional change. This is a preparation for KASLR fsl_booke64.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc
:1 mapping has been setup.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Nicholas Piggin
Cc: Kees Cook
---
arch/powerpc/Kconfig | 2 +-
arch/powerpc/kernel/exceptions
The BSS section has already cleared out in the first pass. No need to
clear it again. This can save some time when booting with KASLR
enabled.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
ter ideas, I would be happy to hear that.
Thank you all.
v2->v3:
Fix build error when KASLR is disabled.
v1->v2:
Add __kaslr_offset for the secondary cpu boot up.
Jason Yan (6):
powerpc/fsl_booke/kaslr: refactor kaslr_legal_offset() and
kaslr_early_init()
powerpc/fsl_b
Like the 32bit code, we introduce reloc_kernel_entry() helper to prepare
for the KASLR 64bit version. And move the C declaration of this function
out of CONFIG_PPC32 and use long instead of int for the parameter 'addr'.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael
Some code refactor in kaslr_legal_offset() and kaslr_early_init(). No
functional change. This is a preparation for KASLR fsl_booke64.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc
Now we support both 32 and 64 bit KASLR for fsl booke. Add document for
64 bit part and rename kaslr-booke32.rst to kaslr-booke.rst.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc
The original kernel still exists in the memory, clear it now.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Nicholas Piggin
Cc: Kees Cook
---
arch/powerpc/mm/nohash/kaslr_booke.c | 4
Like the 32bit code, we introduce reloc_kernel_entry() helper to prepare
for the KASLR 64bit version. And move the C declaration of this function
out of CONFIG_PPC32 and use long instead of int for the parameter 'addr'.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael
:1 mapping has been setup.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Nicholas Piggin
Cc: Kees Cook
---
arch/powerpc/Kconfig | 2 +-
arch/powerpc/kernel/exceptions
ter ideas, I would be happy to hear that.
Thank you all.
v1->v2:
Add __kaslr_offset for the secondary cpu boot up.
Jason Yan (6):
powerpc/fsl_booke/kaslr: refactor kaslr_legal_offset() and
kaslr_early_init()
powerpc/fsl_booke/64: introduce reloc_kernel_entry() helper
power
The BSS section has already cleared out in the first pass. No need to
clear it again. This can save some time when booting with KASLR
enabled.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Now we support both 32 and 64 bit KASLR for fsl booke. Add document for
64 bit part and rename kaslr-booke32.rst to kaslr-booke.rst.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc
The BSS section has already cleared out in the first pass. No need to
clear it again. This can save some time when booting with KASLR
enabled.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
The original kernel still exists in the memory, clear it now.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Nicholas Piggin
Cc: Kees Cook
---
arch/powerpc/mm/nohash/kaslr_booke.c | 4
ter ideas, I would be happy to hear that.
Thank you all.
Jason Yan (6):
powerpc/fsl_booke/kaslr: refactor kaslr_legal_offset() and
kaslr_early_init()
powerpc/fsl_booke/64: introduce reloc_kernel_entry() helper
powerpc/fsl_booke/64: implement KASLR for fsl_booke64
powerpc/fsl_booke/64:
Like the 32bit code, we introduce reloc_kernel_entry() helper to prepare
for the KASLR 64bit version. And move the C declaration of this function
out of CONFIG_PPC32 and use long instead of int for the parameter 'addr'.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael
Some code refactor in kaslr_legal_offset() and kaslr_early_init(). No
functional change. This is a preparation for KASLR fsl_booke64.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc
. This can save some code to creat another TLB map at
early boot. The disadvantage is that we only have about 1G/64K = 16384
slots to put the kernel in.
Signed-off-by: Jason Yan
Cc: Scott Wood
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
On 2019/11/13 17:23, Michael Ellerman wrote:
It needs to use PTRRELOC() for the kernstart_virt_addr accesses.
I've made that change and squashed it into the series. I've pushed that
as a branch to here:
https://github.com/linuxppc/linux/commits/topic/kaslr-book3e32
That boots for me on
On 2019/11/2 18:38, Michael Ellerman wrote:
Jason Yan writes:
Hi Michael, Can you pull this to linux-next so that we can test it on
linux-next for some time?
Yes I plan to, I've just been busy doing other things.
As Scott said it's in linux-next anyway.
Yeah, I found it in linux-next
On 2019/11/2 1:01, Scott Wood wrote:
On Thu, 2019-10-31 at 10:01 +0800, Jason Yan wrote:
Hi Michael, Can you pull this to linux-next so that we can test it on
linux-next for some time?
Thanks,
Jason
FWIW, my tree is included in linux-next.
Ah, I found it in linux-next. Thank you so
: Document KASLR implementation (2019-10-21 16:09:16
-0500)
Jason Yan (12):
powerpc: unify definition of M_IF_NEEDED
powerpc: move memstart_addr and kernstart_addr to init-common.c
powerpc: introduce
On 2019/10/10 2:46, Scott Wood wrote:
On Wed, 2019-10-09 at 16:41 +0800, Jason Yan wrote:
Hi Scott,
On 2019/10/9 15:13, Scott Wood wrote:
On Wed, 2019-10-09 at 14:10 +0800, Jason Yan wrote:
Hi Scott,
Would you please take sometime to test this?
Thank you so much.
On 2019/9/24 13:52
Hi Scott,
On 2019/10/9 15:13, Scott Wood wrote:
On Wed, 2019-10-09 at 14:10 +0800, Jason Yan wrote:
Hi Scott,
Would you please take sometime to test this?
Thank you so much.
On 2019/9/24 13:52, Jason Yan wrote:
Hi Scott,
Can you test v7 to see if it works to load a kernel at a non-zero
Hi Scott,
Would you please take sometime to test this?
Thank you so much.
On 2019/9/24 13:52, Jason Yan wrote:
Hi Scott,
Can you test v7 to see if it works to load a kernel at a non-zero address?
Thanks,
On 2019/9/20 17:45, Jason Yan wrote:
This series implements KASLR for powerpc
Hi Scott,
Can you test v7 to see if it works to load a kernel at a non-zero address?
Thanks,
On 2019/9/20 17:45, Jason Yan wrote:
This series implements KASLR for powerpc/fsl_booke/32, as a security
feature that deters exploit attempts relying on knowledge of the location
of kernel internals
The original kernel still exists in the memory, clear it now.
Signed-off-by: Jason Yan
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Nicholas Piggin
Cc: Kees Cook
Reviewed-by: Christophe Leroy
Reviewed-by: Diana Craciun
Add document to explain how we implement KASLR for fsl_booke32.
Signed-off-by: Jason Yan
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Nicholas Piggin
Cc: Kees Cook
---
Documentation/powerpc/kaslr-booke32.rst | 42
When kaslr is enabled, the kernel offset is different for every boot.
This brings some difficult to debug the kernel. Dump out the kernel
offset when panic so that we can easily debug the kernel.
This code is derived from x86/arm64 which has similar functionality.
Signed-off-by: Jason Yan
Cc
Like all other architectures such as x86 or arm64, include KASLR offset
in VMCOREINFO ELF notes to assist in debugging. After this, we can use
crash --kaslr option to parse vmcore generated from a kaslr kernel.
Note: The crash tool needs to support --kaslr too.
Signed-off-by: Jason Yan
Cc
One may want to disable kaslr when boot, so provide a cmdline parameter
'nokaslr' to support this.
Signed-off-by: Jason Yan
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Nicholas Piggin
Cc: Kees Cook
Reviewed-by: Diana
are not suitable to map the kernel directly in a randomized
region, so we chose to copy the kernel to a proper place and restart to
relocate.
The offset of the kernel was not randomized yet(a fixed 64M is set). We
will randomize it in the next patch.
Signed-off-by: Jason Yan
Cc: Diana Craciun
Cc: Michael
/kaslr.c such as rotate_xor(). Credit goes to Kees and
Ard.
Signed-off-by: Jason Yan
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Nicholas Piggin
Cc: Kees Cook
Reviewed-by: Diana Craciun
Tested-by: Diana Craciun
Reviewed
Add a new helper reloc_kernel_entry() to jump back to the start of the
new kernel. After we put the new kernel in a randomized place we can use
this new helper to enter the kernel and begin to relocate again.
Signed-off-by: Jason Yan
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Add a new helper create_kaslr_tlb_entry() to create a tlb entry by the
virtual and physical address. This is a preparation to support boot kernel
at a randomized address.
Signed-off-by: Jason Yan
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul
Now the kernel base is a fixed value - KERNELBASE. To support KASLR, we
need a variable to store the kernel base.
Signed-off-by: Jason Yan
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Nicholas Piggin
Cc: Kees Cook
Reviewed
M_IF_NEEDED is defined too many times. Move it to a common place and
rename it to MAS2_M_IF_NEEDED which is much readable.
Signed-off-by: Jason Yan
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Nicholas Piggin
Cc: Kees Cook
These two variables are both defined in init_32.c and init_64.c. Move
them to init-common.c and make them __ro_after_init.
Signed-off-by: Jason Yan
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Nicholas Piggin
Cc: Kees Cook
d_line
- Do not print kaslr offset if kaslr is disabled
Jason Yan (12):
powerpc: unify definition of M_IF_NEEDED
powerpc: move memstart_addr and kernstart_addr to init-common.c
powerpc: introduce kernstart_virt_addr to store the kernel base
powerpc/fsl_booke/32: introduce create_kaslr_tlb_en
Hi Scott,
On 2019/8/28 12:05, Scott Wood wrote:
On Fri, 2019-08-09 at 18:07 +0800, Jason Yan wrote:
This series implements KASLR for powerpc/fsl_booke/32, as a security
feature that deters exploit attempts relying on knowledge of the location
of kernel internals.
Since CONFIG_RELOCATABLE has
On 2019/8/28 13:47, Christophe Leroy wrote:
Le 28/08/2019 à 06:54, Scott Wood a écrit :
On Fri, Aug 09, 2019 at 06:07:54PM +0800, Jason Yan wrote:
This patch add support to boot kernel from places other than KERNELBASE.
Since CONFIG_RELOCATABLE has already supported, what we need to do
On 2019/8/28 12:59, Scott Wood wrote:
On Tue, 2019-08-27 at 23:05 -0500, Scott Wood wrote:
On Fri, 2019-08-09 at 18:07 +0800, Jason Yan wrote:
Freescale Book-E
parts expect lowmem to be mapped by fixed TLB entries(TLB1). The TLB1
entries are not suitable to map the kernel directly
On 2019/8/28 12:05, Scott Wood wrote:
On Fri, 2019-08-09 at 18:07 +0800, Jason Yan wrote:
This series implements KASLR for powerpc/fsl_booke/32, as a security
feature that deters exploit attempts relying on knowledge of the location
of kernel internals.
Since CONFIG_RELOCATABLE has already
On 2019/8/28 12:54, Scott Wood wrote:
On Fri, Aug 09, 2019 at 06:07:54PM +0800, Jason Yan wrote:
This patch add support to boot kernel from places other than KERNELBASE.
Since CONFIG_RELOCATABLE has already supported, what we need to do is
map or copy kernel to a proper place and relocate
Hi Scott,
Thanks for your reply.
On 2019/8/28 6:07, Scott Wood wrote:
On Fri, Aug 09, 2019 at 06:07:52PM +0800, Jason Yan wrote:
Add a new helper create_tlb_entry() to create a tlb entry by the virtual
and physical address. This is a preparation to support boot kernel at a
randomized address
A polite ping :)
What else should I do now?
Thanks
On 2019/8/19 14:12, Jason Yan wrote:
Hi Michael,
Is there anything more I should do to get this feature meeting the
requirements of the mainline?
Thanks,
Jason
On 2019/8/9 18:07, Jason Yan wrote:
This series implements KASLR for powerpc
as
initialized prior to bootup")
Signed-off-by: Jason Yan
---
drivers/soc/fsl/qbman/bman.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/fsl/qbman/bman.c b/drivers/soc/fsl/qbman/bman.c
index f4fb527d8301..c5dd026fe889 100644
--- a/drivers/soc/fsl/qbman/bman.c
+
Hi Michael,
Is there anything more I should do to get this feature meeting the
requirements of the mainline?
Thanks,
Jason
On 2019/8/9 18:07, Jason Yan wrote:
This series implements KASLR for powerpc/fsl_booke/32, as a security
feature that deters exploit attempts relying on knowledge
Like all other architectures such as x86 or arm64, include KASLR offset
in VMCOREINFO ELF notes to assist in debugging. After this, we can use
crash --kaslr option to parse vmcore generated from a kaslr kernel.
Note: The crash tool needs to support --kaslr too.
Signed-off-by: Jason Yan
Cc
Add document to explain how we implement KASLR for fsl_booke32.
Signed-off-by: Jason Yan
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Nicholas Piggin
Cc: Kees Cook
---
Documentation/powerpc/kaslr-booke32.rst | 42
One may want to disable kaslr when boot, so provide a cmdline parameter
'nokaslr' to support this.
Signed-off-by: Jason Yan
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Nicholas Piggin
Cc: Kees Cook
Reviewed-by: Diana
The original kernel still exists in the memory, clear it now.
Signed-off-by: Jason Yan
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Nicholas Piggin
Cc: Kees Cook
Reviewed-by: Christophe Leroy
Reviewed-by: Diana Craciun
1 - 100 of 195 matches
Mail list logo