lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 2 May 2013 09:34:00 +0200 From: Ingo Molnar <mingo@...nel.org> To: Robin Holt <holt@....com> Cc: Andrew Morton <akpm@...ux-foundation.org>, "H. Peter Anvin" <hpa@...or.com>, Russell King <linux@....linux.org.uk>, Guan Xuetao <gxt@...c.pku.edu.cn>, Miguel Boton <mboton.lkml@...il.com>, Russ Anderson <rja@....com>, Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, the arch/x86 maintainers <x86@...nel.org>, Arm Mailing List <linux-arm-kernel@...ts.infradead.org> Subject: Re: [PATCH -v7 11/11] Move arch/x86 reboot= handling to generic kernel. * Robin Holt <holt@....com> wrote: > Merge together the unicore32, arm, and x86 reboot= command line > parameter handling. Nice! > + switch (*str) { > +#if defined(CONFIG_X86) || defined(CONFIG_X86_64) > + case 'w': > + reboot_mode = REBOOT_WARM; > + break; > + > + case 'c': > + reboot_mode = REBOOT_COLD; > + break; > + > +#ifdef CONFIG_SMP > + case 's': > + if (isdigit(*(str+1))) { > + reboot_cpu = (int) (*(str+1) - '0'); > + if (isdigit(*(str+2))) > + reboot_cpu = reboot_cpu*10 + (int)(*(str+2) - '0'); > + } > + /* > + * We will leave sorting out the final value > + * when we are ready to reboot, since we might not > + * have detected BSP APIC ID or smp_num_cpu > + */ > + break; > +#endif /* CONFIG_SMP */ > + > +#else > + case 's': > + reboot_mode = REBOOT_WARM; > + case 'h': > + reboot_mode = REBOOT_COLD; > +#endif This architecture dependent bit is not so nice. I doubt the 's' parameter is used widely at all on x86 [it's more like a debug/hack parameter], so might as well just pick up a new character (for example capital 'S'?) and have the same parameters on every architecture. Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists