|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] xen/link: Move SCHEDULER_ARRAY into .rodata
On 11/13/26 8:31 AM, Orzel, Michal wrote: On 12-Nov-26 19:36, Andrew Cooper wrote:This is a list of pointers which is only ever read.I think that's not true. See sched_test_func() macro in scheduler_init() that assigns NULL in case the scheduler does not implement the required hook. The same happens a few lines below if the scheduler's global_init() fails. Neither NULL assignment can trigger today (both global_init() implementations return 0 and all in-tree schedulers provide thehooks), but I think the writes need dropping first, and the entries want to become "const struct sched_ops *const" (both in REGISTER_SCHEDULER() and the __{start,end}_schedulers_array declarations) so the compiler enforces the property. It would also be nice to rename .data.schedulers to .rodata.schedulers while moving it. The linker script placement itself looks fine to me. ~ Oleksii In the ARM linker file, fix some adjacent misalignment. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- CC: Jan Beulich <jbeulich@xxxxxxxx> CC: Roger Pau Monné <roger@xxxxxxxxxxxxxx> CC: Teddy Astie <teddy.astie@xxxxxxxxxx> CC: Stefano Stabellini <sstabellini@xxxxxxxxxx> CC: Julien Grall <julien@xxxxxxx> CC: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx> CC: Bertrand Marquis <bertrand.marquis@xxxxxxx> CC: Michal Orzel <michal.orzel@xxxxxxx> CC: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx> CC: Baptiste Le Duc <baptiste.le-duc@xxxxxxxxxx> CC: Timothy Pearson <tpearson@xxxxxxxxxxxxxxxxxxxxx> --- xen/arch/arm/xen.lds.S | 6 +++--- xen/arch/ppc/xen.lds.S | 2 +- xen/arch/riscv/xen.lds.S | 2 +- xen/arch/x86/xen.lds.S | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S index 613511390ff4..d1bb6c62d208 100644 --- a/xen/arch/arm/xen.lds.S +++ b/xen/arch/arm/xen.lds.S @@ -51,9 +51,10 @@ SECTIONS. = ALIGN(PAGE_SIZE);
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |