On 2018-05-24 12:23, Ralf Ramsauer wrote:
> On 05/24/2018 09:22 AM, Jan Kiszka wrote:
>> We need more distance to the loader binary as it is growing with the
>> relocation of its command line parameter section. To account for future
>> changes as well, increase the gap.
>>
>> It's useless the make the address relative to the reset address because
>> the x86 loader only supports reset address 0.
>>
>> Signed-off-by: Jan Kiszka <[email protected]>
>> ---
>>
>> Ralf, I'm prepending this and patch 2 in next so that your series does
>> not break x86 linux loading: HEAP_BASE moved...
>>
>>  inmates/tools/x86/linux-loader.c | 2 +-
>>  tools/jailhouse-cell-linux       | 2 +-
>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/inmates/tools/x86/linux-loader.c 
>> b/inmates/tools/x86/linux-loader.c
>> index cca6056b..18417a6b 100644
>> --- a/inmates/tools/x86/linux-loader.c
>> +++ b/inmates/tools/x86/linux-loader.c
>> @@ -12,7 +12,7 @@
>>  
>>  #include <inmate.h>
>>  
>> -#define ZERO_PAGE_ADDR              HEAP_BASE
>> +#define ZERO_PAGE_ADDR              0x10000
> 
> Hmm, for the x86 binary, stack_top is at 0x7000 at the moment. So
> 0x10000 is fine, but we should keep an eye on it.
> 
> Nevertheless, there might be another solution: what about overloading
> the weak definition of the cmdline[] array for the linux-loader and
> expand it to, let's say 2*PAGE_SIZE?
> 
> Then we could e.g., place the cmdline args at 0x1000 and the ZERO_PAGE
> at 0x2000, and we ensure that this location won't move around.
> 

I made the buffer 3*PAGE_SIZE and switched to that pattern. Patches will
follow, just need to sort out some compiler issues around that. Thanks!

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to