Re: [PATCH v2 7/9] get the random phy addr according to slot_area info

2015-03-04 Thread Baoquan He
On 03/04/15 at 04:12pm, Yinghai Lu wrote: > On Wed, Mar 4, 2015 at 1:35 PM, Yinghai Lu wrote: > > On Wed, Mar 4, 2015 at 7:39 AM, Baoquan He wrote: > >> > >> I got the reason and made a debug patch to fix it. Could you please > >> apply it on top of this patchset and try again? Then it will

Re: [PATCH v2 7/9] get the random phy addr according to slot_area info

2015-03-04 Thread Baoquan He
On 03/04/15 at 04:30pm, Yinghai Lu wrote: > On Wed, Mar 4, 2015 at 7:39 AM, Baoquan He wrote: > > Hi Yinghai, > > > > I got the reason and made a debug patch to fix it. Could you please > > apply it on top of this patchset and try again? Then it will behave well > > and just return 0x13c00

Re: [PATCH v2 7/9] get the random phy addr according to slot_area info

2015-03-04 Thread Yinghai Lu
On Wed, Mar 4, 2015 at 7:39 AM, Baoquan He wrote: > Hi Yinghai, > > I got the reason and made a debug patch to fix it. Could you please > apply it on top of this patchset and try again? Then it will behave well > and just return 0x13c00 since no random is got. > the fix should be fold into

Re: [PATCH v2 7/9] get the random phy addr according to slot_area info

2015-03-04 Thread Yinghai Lu
On Wed, Mar 4, 2015 at 1:35 PM, Yinghai Lu wrote: > On Wed, Mar 4, 2015 at 7:39 AM, Baoquan He wrote: >> >> I got the reason and made a debug patch to fix it. Could you please >> apply it on top of this patchset and try again? Then it will behave well >> and just return 0x13c00 since no

Re: [PATCH v2 7/9] get the random phy addr according to slot_area info

2015-03-04 Thread Baoquan He
On 03/04/15 at 01:28pm, Kees Cook wrote: > On Mon, Mar 2, 2015 at 6:58 AM, Baoquan He wrote: > > -static unsigned long find_random_addr(unsigned long minimum, > > +static unsigned long find_random_phy_addr(unsigned long minimum, > > unsigned long size) > > {

Re: [PATCH v2 7/9] get the random phy addr according to slot_area info

2015-03-04 Thread Yinghai Lu
On Wed, Mar 4, 2015 at 7:39 AM, Baoquan He wrote: > > I got the reason and made a debug patch to fix it. Could you please > apply it on top of this patchset and try again? Then it will behave well > and just return 0x13c00 since no random is got. random_base can not be move down? Thanks

Re: [PATCH v2 7/9] get the random phy addr according to slot_area info

2015-03-04 Thread Kees Cook
On Mon, Mar 2, 2015 at 6:58 AM, Baoquan He wrote: > Now random value can be used to get related slot info stored in > slot_area, mainly use slot_area.num to position which slot is target. > With this slot its starting address is returned as the physical > address where kernel will put. > >

Re: [PATCH v2 7/9] get the random phy addr according to slot_area info

2015-03-04 Thread Baoquan He
Hi Yinghai, I got the reason and made a debug patch to fix it. Could you please apply it on top of this patchset and try again? Then it will behave well and just return 0x13c00 since no random is got. Please check the attachment. Thanks Baoquan On 03/03/15 at 12:45am, Yinghai Lu wrote: >

Re: [PATCH v2 7/9] get the random phy addr according to slot_area info

2015-03-04 Thread Baoquan He
On 03/03/15 at 08:14am, Yinghai Lu wrote: > On Tue, Mar 3, 2015 at 3:42 AM, Baoquan He wrote: > > > > Here input means the region where kernel was linked to load? > > > > In normal kernel the linked address is 0x100. In your input region > > the result of ALIGN(0x13f5ed3b4,

Re: [PATCH v2 7/9] get the random phy addr according to slot_area info

2015-03-04 Thread Baoquan He
Hi Yinghai, I got the reason and made a debug patch to fix it. Could you please apply it on top of this patchset and try again? Then it will behave well and just return 0x13c00 since no random is got. Please check the attachment. Thanks Baoquan On 03/03/15 at 12:45am, Yinghai Lu wrote:

Re: [PATCH v2 7/9] get the random phy addr according to slot_area info

2015-03-04 Thread Kees Cook
On Mon, Mar 2, 2015 at 6:58 AM, Baoquan He b...@redhat.com wrote: Now random value can be used to get related slot info stored in slot_area, mainly use slot_area.num to position which slot is target. With this slot its starting address is returned as the physical address where kernel will put.

Re: [PATCH v2 7/9] get the random phy addr according to slot_area info

2015-03-04 Thread Yinghai Lu
On Wed, Mar 4, 2015 at 7:39 AM, Baoquan He b...@redhat.com wrote: I got the reason and made a debug patch to fix it. Could you please apply it on top of this patchset and try again? Then it will behave well and just return 0x13c00 since no random is got. random_base can not be move down?

Re: [PATCH v2 7/9] get the random phy addr according to slot_area info

2015-03-04 Thread Baoquan He
On 03/04/15 at 01:28pm, Kees Cook wrote: On Mon, Mar 2, 2015 at 6:58 AM, Baoquan He b...@redhat.com wrote: -static unsigned long find_random_addr(unsigned long minimum, +static unsigned long find_random_phy_addr(unsigned long minimum, unsigned long

Re: [PATCH v2 7/9] get the random phy addr according to slot_area info

2015-03-04 Thread Yinghai Lu
On Wed, Mar 4, 2015 at 1:35 PM, Yinghai Lu ying...@kernel.org wrote: On Wed, Mar 4, 2015 at 7:39 AM, Baoquan He b...@redhat.com wrote: I got the reason and made a debug patch to fix it. Could you please apply it on top of this patchset and try again? Then it will behave well and just return

Re: [PATCH v2 7/9] get the random phy addr according to slot_area info

2015-03-04 Thread Yinghai Lu
On Wed, Mar 4, 2015 at 7:39 AM, Baoquan He b...@redhat.com wrote: Hi Yinghai, I got the reason and made a debug patch to fix it. Could you please apply it on top of this patchset and try again? Then it will behave well and just return 0x13c00 since no random is got. the fix should be

Re: [PATCH v2 7/9] get the random phy addr according to slot_area info

2015-03-04 Thread Baoquan He
On 03/04/15 at 04:30pm, Yinghai Lu wrote: On Wed, Mar 4, 2015 at 7:39 AM, Baoquan He b...@redhat.com wrote: Hi Yinghai, I got the reason and made a debug patch to fix it. Could you please apply it on top of this patchset and try again? Then it will behave well and just return

Re: [PATCH v2 7/9] get the random phy addr according to slot_area info

2015-03-04 Thread Baoquan He
On 03/04/15 at 04:12pm, Yinghai Lu wrote: On Wed, Mar 4, 2015 at 1:35 PM, Yinghai Lu ying...@kernel.org wrote: On Wed, Mar 4, 2015 at 7:39 AM, Baoquan He b...@redhat.com wrote: I got the reason and made a debug patch to fix it. Could you please apply it on top of this patchset and try

Re: [PATCH v2 7/9] get the random phy addr according to slot_area info

2015-03-04 Thread Baoquan He
On 03/03/15 at 08:14am, Yinghai Lu wrote: On Tue, Mar 3, 2015 at 3:42 AM, Baoquan He b...@redhat.com wrote: Here input means the region where kernel was linked to load? In normal kernel the linked address is 0x100. In your input region the result of ALIGN(0x13f5ed3b4,

Re: [PATCH v2 7/9] get the random phy addr according to slot_area info

2015-03-03 Thread Yinghai Lu
On Tue, Mar 3, 2015 at 3:42 AM, Baoquan He wrote: > > Here input means the region where kernel was linked to load? > > In normal kernel the linked address is 0x100. In your input region > the result of ALIGN(0x13f5ed3b4, CONFIG_PHYSICAL_ALIGN) is 0x14000. > And size of this region is

Re: [PATCH v2 7/9] get the random phy addr according to slot_area info

2015-03-03 Thread Baoquan He
On 03/03/15 at 12:45am, Yinghai Lu wrote: > On Mon, Mar 2, 2015 at 6:58 AM, Baoquan He wrote: > > Now random value can be used to get related slot info stored in > > slot_area, mainly use slot_area.num to position which slot is target. > > With this slot its starting address is returned as the

Re: [PATCH v2 7/9] get the random phy addr according to slot_area info

2015-03-03 Thread Yinghai Lu
On Mon, Mar 2, 2015 at 6:58 AM, Baoquan He wrote: > Now random value can be used to get related slot info stored in > slot_area, mainly use slot_area.num to position which slot is target. > With this slot its starting address is returned as the physical > address where kernel will put. > > @@

Re: [PATCH v2 7/9] get the random phy addr according to slot_area info

2015-03-03 Thread Yinghai Lu
On Mon, Mar 2, 2015 at 6:58 AM, Baoquan He b...@redhat.com wrote: Now random value can be used to get related slot info stored in slot_area, mainly use slot_area.num to position which slot is target. With this slot its starting address is returned as the physical address where kernel will put.

Re: [PATCH v2 7/9] get the random phy addr according to slot_area info

2015-03-03 Thread Yinghai Lu
On Tue, Mar 3, 2015 at 3:42 AM, Baoquan He b...@redhat.com wrote: Here input means the region where kernel was linked to load? In normal kernel the linked address is 0x100. In your input region the result of ALIGN(0x13f5ed3b4, CONFIG_PHYSICAL_ALIGN) is 0x14000. And size of this

Re: [PATCH v2 7/9] get the random phy addr according to slot_area info

2015-03-03 Thread Baoquan He
On 03/03/15 at 12:45am, Yinghai Lu wrote: On Mon, Mar 2, 2015 at 6:58 AM, Baoquan He b...@redhat.com wrote: Now random value can be used to get related slot info stored in slot_area, mainly use slot_area.num to position which slot is target. With this slot its starting address is returned

[PATCH v2 7/9] get the random phy addr according to slot_area info

2015-03-02 Thread Baoquan He
Now random value can be used to get related slot info stored in slot_area, mainly use slot_area.num to position which slot is target. With this slot its starting address is returned as the physical address where kernel will put. Signed-off-by: Baoquan He --- arch/x86/boot/compressed/aslr.c | 34

[PATCH v2 7/9] get the random phy addr according to slot_area info

2015-03-02 Thread Baoquan He
Now random value can be used to get related slot info stored in slot_area, mainly use slot_area.num to position which slot is target. With this slot its starting address is returned as the physical address where kernel will put. Signed-off-by: Baoquan He b...@redhat.com ---