Re: [PATCH v3 05/19] x86, boot: Fix run_size calculation

2016-03-08 Thread Kees Cook
On Mon, Mar 7, 2016 at 8:57 PM, Baoquan He wrote: > On 03/07/16 at 03:10pm, Kees Cook wrote: >> On Fri, Mar 4, 2016 at 8:25 AM, Baoquan He wrote: >> > From: Yinghai Lu >> > >> > Firstly, current run_size is calculated via shell script >> > arch/x86/tools/calc_run_size.sh. It gets file offset and

Re: [PATCH v3 05/19] x86, boot: Fix run_size calculation

2016-03-07 Thread Baoquan He
On 03/07/16 at 03:10pm, Kees Cook wrote: > On Fri, Mar 4, 2016 at 8:25 AM, Baoquan He wrote: > > From: Yinghai Lu > > > > Firstly, current run_size is calculated via shell script > > arch/x86/tools/calc_run_size.sh. It gets file offset and mem size of section > > .bss and .brk in vmlinux, then ad

Re: [PATCH v3 05/19] x86, boot: Fix run_size calculation

2016-03-07 Thread Kees Cook
On Fri, Mar 4, 2016 at 8:25 AM, Baoquan He wrote: > From: Yinghai Lu > > Firstly, current run_size is calculated via shell script > arch/x86/tools/calc_run_size.sh. It gets file offset and mem size of section > .bss and .brk in vmlinux, then add them as follows: > > run_size=$(( $offsetA + $sizeA

[PATCH v3 05/19] x86, boot: Fix run_size calculation

2016-03-04 Thread Baoquan He
From: Yinghai Lu Firstly, current run_size is calculated via shell script arch/x86/tools/calc_run_size.sh. It gets file offset and mem size of section .bss and .brk in vmlinux, then add them as follows: run_size=$(( $offsetA + $sizeA + $sizeB )) However this is completely wrong. The offset is t