LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Yan <yanaijie@huawei.com>
To: Diana Madalina Craciun <diana.craciun@nxp.com>,
	"mpe@ellerman.id.au" <mpe@ellerman.id.au>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"christophe.leroy@c-s.fr" <christophe.leroy@c-s.fr>,
	"benh@kernel.crashing.org" <benh@kernel.crashing.org>,
	"paulus@samba.org" <paulus@samba.org>,
	"npiggin@gmail.com" <npiggin@gmail.com>,
	"keescook@chromium.org" <keescook@chromium.org>,
	"kernel-hardening@lists.openwall.com"
	<kernel-hardening@lists.openwall.com>
Cc: "wangkefeng.wang@huawei.com" <wangkefeng.wang@huawei.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"jingxiangfeng@huawei.com" <jingxiangfeng@huawei.com>,
	"zhaohongjiang@huawei.com" <zhaohongjiang@huawei.com>,
	"thunder.leizhen@huawei.com" <thunder.leizhen@huawei.com>,
	"fanchengyang@huawei.com" <fanchengyang@huawei.com>,
	"yebin10@huawei.com" <yebin10@huawei.com>
Subject: Re: [PATCH v3 06/10] powerpc/fsl_booke/32: implement KASLR infrastructure
Date: Mon, 5 Aug 2019 13:40:27 +0800	[thread overview]
Message-ID: <356a9697-8208-3a63-8358-77422be482b2@huawei.com> (raw)
In-Reply-To: <VI1PR0401MB24637B79618C29684168D831FFD90@VI1PR0401MB2463.eurprd04.prod.outlook.com>

Hi Diana,

On 2019/8/2 16:41, Diana Madalina Craciun wrote:
>> diff --git a/arch/powerpc/kernel/fsl_booke_entry_mapping.S b/arch/powerpc/kernel/fsl_booke_entry_mapping.S
>> index de0980945510..6d2967673ac7 100644
>> --- a/arch/powerpc/kernel/fsl_booke_entry_mapping.S
>> +++ b/arch/powerpc/kernel/fsl_booke_entry_mapping.S
>> @@ -161,17 +161,16 @@ skpinv:	addi	r6,r6,1				/* Increment */
>>   	lis	r6,(MAS1_VALID|MAS1_IPROT)@h
>>   	ori	r6,r6,(MAS1_TSIZE(BOOK3E_PAGESZ_64M))@l
>>   	mtspr	SPRN_MAS1,r6
>> -	lis	r6,MAS2_VAL(PAGE_OFFSET, BOOK3E_PAGESZ_64M, M_IF_NEEDED)@h
>> -	ori	r6,r6,MAS2_VAL(PAGE_OFFSET, BOOK3E_PAGESZ_64M, M_IF_NEEDED)@l
>> -	mtspr	SPRN_MAS2,r6
>> +	lis     r6,MAS2_EPN_MASK(BOOK3E_PAGESZ_64M)@h
>> +	ori     r6,r6,MAS2_EPN_MASK(BOOK3E_PAGESZ_64M)@l
>> +	and     r6,r6,r20
>> +	ori	r6,r6,M_IF_NEEDED@l
>> +	mtspr   SPRN_MAS2,r6
>>   	mtspr	SPRN_MAS3,r8
>>   	tlbwe
>>   
>>   /* 7. Jump to KERNELBASE mapping */
> The code has changed, but the comment reflects the old code (it no
> longer jumps to KERNELBASE, but to kimage_vaddr). This is true for step
> 6 as well.
> 

Good catch, I will update the comment.

Thanks,
Jason


  reply	other threads:[~2019-08-05  5:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-31  9:43 [PATCH v3 00/10] implement KASLR for powerpc/fsl_booke/32 Jason Yan
2019-07-31  9:43 ` [PATCH v3 01/10] powerpc: unify definition of M_IF_NEEDED Jason Yan
2019-07-31  9:43 ` [PATCH v3 02/10] powerpc: move memstart_addr and kernstart_addr to init-common.c Jason Yan
2019-07-31  9:43 ` [PATCH v3 03/10] powerpc: introduce kimage_vaddr to store the kernel base Jason Yan
2019-07-31  9:43 ` [PATCH v3 04/10] powerpc/fsl_booke/32: introduce create_tlb_entry() helper Jason Yan
2019-07-31  9:43 ` [PATCH v3 05/10] powerpc/fsl_booke/32: introduce reloc_kernel_entry() helper Jason Yan
2019-07-31  9:43 ` [PATCH v3 06/10] powerpc/fsl_booke/32: implement KASLR infrastructure Jason Yan
2019-08-02  8:41   ` Diana Madalina Craciun
2019-08-05  5:40     ` Jason Yan [this message]
2019-07-31  9:43 ` [PATCH v3 07/10] powerpc/fsl_booke/32: randomize the kernel image offset Jason Yan
2019-07-31  9:43 ` [PATCH v3 08/10] powerpc/fsl_booke/kaslr: clear the original kernel if randomized Jason Yan
2019-07-31  9:43 ` [PATCH v3 09/10] powerpc/fsl_booke/kaslr: support nokaslr cmdline parameter Jason Yan
2019-07-31  9:43 ` [PATCH v3 10/10] powerpc/fsl_booke/kaslr: dump out kernel offset information on panic Jason Yan
2019-08-01 14:36 ` [PATCH v3 00/10] implement KASLR for powerpc/fsl_booke/32 Diana Madalina Craciun
2019-08-02  0:48   ` Jason Yan
2019-08-02  8:48 ` Diana Madalina Craciun

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=356a9697-8208-3a63-8358-77422be482b2@huawei.com \
    --to=yanaijie@huawei.com \
    --cc=benh@kernel.crashing.org \
    --cc=christophe.leroy@c-s.fr \
    --cc=diana.craciun@nxp.com \
    --cc=fanchengyang@huawei.com \
    --cc=jingxiangfeng@huawei.com \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=paulus@samba.org \
    --cc=thunder.leizhen@huawei.com \
    --cc=wangkefeng.wang@huawei.com \
    --cc=yebin10@huawei.com \
    --cc=zhaohongjiang@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox