Re: [PATCH] Mini-OS: x86: zero out .bss segment at boot

2024-02-07 Thread Jürgen Groß
On 07.02.24 13:02, Samuel Thibault wrote: Jürgen Groß, le mer. 07 févr. 2024 12:43:03 +0100, a ecrit: On 07.02.24 12:34, Samuel Thibault wrote: Jürgen Groß, le mer. 07 févr. 2024 12:16:44 +0100, a ecrit: On 07.02.24 12:00, Samuel Thibault wrote: Jürgen Groß, le mer. 07 févr. 2024 11:42:20 +01

Re: [PATCH] Mini-OS: x86: zero out .bss segment at boot

2024-02-07 Thread Samuel Thibault
Jürgen Groß, le mer. 07 févr. 2024 12:43:03 +0100, a ecrit: > On 07.02.24 12:34, Samuel Thibault wrote: > > Jürgen Groß, le mer. 07 févr. 2024 12:16:44 +0100, a ecrit: > > > On 07.02.24 12:00, Samuel Thibault wrote: > > > > Jürgen Groß, le mer. 07 févr. 2024 11:42:20 +0100, a ecrit: > > > > > while

Re: [PATCH] Mini-OS: x86: zero out .bss segment at boot

2024-02-07 Thread Jürgen Groß
On 07.02.24 12:34, Samuel Thibault wrote: Jürgen Groß, le mer. 07 févr. 2024 12:16:44 +0100, a ecrit: On 07.02.24 12:00, Samuel Thibault wrote: Jürgen Groß, le mer. 07 févr. 2024 11:42:20 +0100, a ecrit: while implementing kexec in Mini-OS. Oh, nice :D For that I need it for sure. It nee

Re: [PATCH] Mini-OS: x86: zero out .bss segment at boot

2024-02-07 Thread Samuel Thibault
Jürgen Groß, le mer. 07 févr. 2024 12:16:44 +0100, a ecrit: > On 07.02.24 12:00, Samuel Thibault wrote: > > Jürgen Groß, le mer. 07 févr. 2024 11:42:20 +0100, a ecrit: > > > while implementing kexec in Mini-OS. > > > > Oh, nice :D > > > > > For that I need it for sure. > > > > It needs to be don

Re: [PATCH] Mini-OS: x86: zero out .bss segment at boot

2024-02-07 Thread Jürgen Groß
On 07.02.24 12:00, Samuel Thibault wrote: Jürgen Groß, le mer. 07 févr. 2024 11:42:20 +0100, a ecrit: while implementing kexec in Mini-OS. Oh, nice :D For that I need it for sure. It needs to be done by kexec itself then. That's another option, yes. The question is whether we want to su

Re: [PATCH] Mini-OS: x86: zero out .bss segment at boot

2024-02-07 Thread Samuel Thibault
Jürgen Groß, le mer. 07 févr. 2024 11:42:20 +0100, a ecrit: > while implementing kexec in Mini-OS. Oh, nice :D > For that I need it for sure. It needs to be done by kexec itself then. Samuel

Re: [PATCH] Mini-OS: x86: zero out .bss segment at boot

2024-02-07 Thread Jan Beulich
On 07.02.2024 11:46, Juergen Gross wrote: > On 07.02.24 11:39, Jan Beulich wrote: >> On 07.02.2024 11:31, Juergen Gross wrote: >>> --- a/arch/x86/setup.c >>> +++ b/arch/x86/setup.c >>> @@ -184,6 +184,8 @@ arch_init(void *par) >>> { >>> static char hello[] = "Bootstrapping...\n"; >>> >>> +

Re: [PATCH] Mini-OS: x86: zero out .bss segment at boot

2024-02-07 Thread Andrew Cooper
On 07/02/2024 10:42 am, Jürgen Groß wrote: > On 07.02.24 11:38, Samuel Thibault wrote: >> Juergen Gross, le mer. 07 févr. 2024 11:31:38 +0100, a ecrit: >>> The .bss segment should be zeroed at very early boot. >> >> Is that not done by the elf loader of Xen? > > It might be done by Xen tools today,

Re: [PATCH] Mini-OS: x86: zero out .bss segment at boot

2024-02-07 Thread Jan Beulich
On 07.02.2024 11:42, Jürgen Groß wrote: > On 07.02.24 11:38, Samuel Thibault wrote: >> Juergen Gross, le mer. 07 févr. 2024 11:31:38 +0100, a ecrit: >>> The .bss segment should be zeroed at very early boot. >> >> Is that not done by the elf loader of Xen? > > It might be done by Xen tools today, b

Re: [PATCH] Mini-OS: x86: zero out .bss segment at boot

2024-02-07 Thread Juergen Gross
On 07.02.24 11:39, Jan Beulich wrote: On 07.02.2024 11:31, Juergen Gross wrote: --- a/arch/x86/setup.c +++ b/arch/x86/setup.c @@ -184,6 +184,8 @@ arch_init(void *par) { static char hello[] = "Bootstrapping...\n"; + memset(&__bss_start, 0, &_end - &__bss_start); Doesn't / shouldn't

Re: [PATCH] Mini-OS: x86: zero out .bss segment at boot

2024-02-07 Thread Jürgen Groß
On 07.02.24 11:38, Samuel Thibault wrote: Juergen Gross, le mer. 07 févr. 2024 11:31:38 +0100, a ecrit: The .bss segment should be zeroed at very early boot. Is that not done by the elf loader of Xen? It might be done by Xen tools today, but I'm quite sure it is not part of the ABI. The hype

Re: [PATCH] Mini-OS: x86: zero out .bss segment at boot

2024-02-07 Thread Jan Beulich
On 07.02.2024 11:31, Juergen Gross wrote: > --- a/arch/x86/setup.c > +++ b/arch/x86/setup.c > @@ -184,6 +184,8 @@ arch_init(void *par) > { > static char hello[] = "Bootstrapping...\n"; > > + memset(&__bss_start, 0, &_end - &__bss_start); Doesn't / shouldn't the loader guarantee this?

Re: [PATCH] Mini-OS: x86: zero out .bss segment at boot

2024-02-07 Thread Samuel Thibault
Juergen Gross, le mer. 07 févr. 2024 11:31:38 +0100, a ecrit: > The .bss segment should be zeroed at very early boot. Is that not done by the elf loader of Xen? > While adding the extern declaration of __bss_start for x86, make it > together with the other linker table defined section boundaries