On 10/08/17 15:02, Wei Liu wrote: > On Wed, Aug 09, 2017 at 09:06:53AM +0200, Juergen Gross wrote: >> Where possible check validity of parameters in _cmdline_parse() and >> issue a warning message in case of an error detected. >> >> Cc: Andrew Cooper <andrew.coop...@citrix.com> >> Cc: George Dunlap <george.dun...@eu.citrix.com> >> Cc: Ian Jackson <ian.jack...@eu.citrix.com> >> Cc: Jan Beulich <jbeul...@suse.com> >> Cc: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> >> Cc: Stefano Stabellini <sstabell...@kernel.org> >> Cc: Tim Deegan <t...@xen.org> >> Cc: Wei Liu <wei.l...@citrix.com> >> Signed-off-by: Juergen Gross <jgr...@suse.com> >> --- >> xen/common/kernel.c | 44 ++++++++++++++++++++++++++++++++++---------- >> 1 file changed, 34 insertions(+), 10 deletions(-) >> >> diff --git a/xen/common/kernel.c b/xen/common/kernel.c >> index ce7cb8adb5..3fd3abe79c 100644 >> --- a/xen/common/kernel.c >> +++ b/xen/common/kernel.c >> @@ -23,9 +23,11 @@ enum system_state system_state = SYS_STATE_early_boot; >> xen_commandline_t saved_cmdline; >> static const char __initconst opt_builtin_cmdline[] = CONFIG_CMDLINE; >> >> -static void __init assign_integer_param( >> +static int __init assign_integer_param( >> const struct kernel_param *param, uint64_t val) >> { >> + unsigned int bits = param->len * 8; >> + > > BITS_PER_BYTE here.
Okay. > > Otherwise: > > Reviewed-by: Wei Liu <wei.l...@citrix.com> BTW: I've spotted a problem with parse_bool() in my patch: It should accept an empty string as "true", as specifying e.g. "sync_console" should set this option instead of issuing an error message. Does your R-b: still stand with the correction below? @@ -176,7 +200,8 @@ int __init parse_bool(const char *s) !strcmp("on", s) || !strcmp("true", s) || !strcmp("enable", s) || - !strcmp("1", s) ) + !strcmp("1", s) || + !strcmp("", s) ) return 1; return -1; Thanks, Juergen _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel