On 21.11.2023 21:15, Andrew Cooper wrote: > Rework the logic in __start_xen() to not potentially pass NULL into > cmdline_cook(). This makes the logic easier to follow too, and the rest of > __start_xen() is safe when initialising cmdline to the empty string. > > Update cmdline_cook() to take and return const pointers, and write a > description of what it does. It now requires a non-NULL input and guarentees > to return a pointer somewhere in the 'p' string. > > Note this only compiles because strstr() launders the const off the pointer > when assigning to the mutable kextra, but that logic only mutates the > mbi->cmdline buffer. > > Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>
Reviewed-by: Jan Beulich <jbeul...@suse.com>