[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 1/3] x86/EFI: Fix detection of buildid
On Fri, 6 Jun 2025, Jan Beulich wrote: > > But the argument I'm going to make this this: Why do you want a check, > > even if you can find a correct one (and as said before, I cannot)? > > > > This function is run exactly once. We've excluded "nothing given by the > > toolchain", and excluded "what the toolchain gave us was not the > > expected ELF note". The only thing left (modulo toolchain bugs) is the > > CodeView region, and if it's not a valid CodeView region then we've > > wasted a handful of cycles. > > Two reasons: Having code which cannot possibly do anything useful isn't > good. Misra calls the latest the body of the inner if() "unreachable code" > and objects to the presence of such in a build. (I'm pretty sure Eclair > wouldn't spot it, but that doesn't eliminate this being a violation of > the respective rule.) As far as I can tell this code can be reachable simply by having an appropriate test with Xen booted via a non-EFI method and a CodeView record being present. No code changes to Xen needed. > And then, based on your reasoning above, why don't you also drop the > #ifdef CONFIG_X86? Because while theoretically possible, today there is not a single test that would allow us to trigger this code on ARM. We would need to change Xen to do it first.
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |