Andi Kleen <ak@xxxxxxx> wrote:On Wednesday 30 August 2006 20:59, H. Peter Anvin wrote:Alon Bar-Lev wrote:
It might be safer to rename everything. Then all users could be caughtThis is not entirely true...My opinion is that you should change saved_command_line (which already
All architectures sets saved_command_line variable...
So I can add __init to the saved_command_line and
copy its contents into kmalloced persistence_command_line at
main.c.
implies a copy) to be the kmalloc'd version and call the fixed-sized
buffer something else.
and audited. This would ensure saved_command_line is not accessed
before the kmalloc'ed copy exists.
If you set the new *saved_cmdline=saved_cmdline_init, the users don't need
to be adjusted at all, and you won't have trouble with code that may be
run before or after kmallocking (if it exists).