arm64: increase command line size to 2048
Subsystems (2)
PATCH 1/2 arm64: increase command line size to 2048
Otherwise, we can hit the current 512 chars limit before hitting the Linux kernel's one, where allows 2048 chars in arm64.
--- kexec/arch/arm64/kexec-arm64.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kexec/arch/arm64/kexec-arm64.h +1 -1
@@ -15,7 +15,7 @@#define BOOT_BLOCK_VERSION 17#define BOOT_BLOCK_LAST_COMP_VERSION 16 -#define COMMAND_LINE_SIZE 512 +#define COMMAND_LINE_SIZE 2048/* from kernel */ #define KiB (x) ((x) * 1024UL)#define MiB (x) (KiB(x) * 1024UL)
Signature · 7 lines
2.7.4 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
PATCH 2/2 arm64: error out if kernel command line is too long
Currently, in arm64, kexec silently truncates kernel command line longer than COMMAND_LINE_SIZE - 1. Error out in that case as some other architectures already do that. The error message is copied from x86_64.
--- kexec/arch/arm64/kexec-arm64.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
kexec/arch/arm64/kexec-arm64.c +8 -1
@@ -536,8 +536,15 @@ int arm64_load_other_segments(struct kexec_info *info,char command_line[COMMAND_LINE_SIZE ] ="" ;if (arm64_opts.command_line) { +if (strlen (arm64_opts.command_line) > +sizeof (command_line) -1 ) { +fprintf (stderr, +"Kernel command line too long for kernel!\n" ); +return EFAILED ; + } +strncpy (command_line, arm64_opts.command_line, -sizeof (command_line)); +sizeof (command_line) -1 ); command_line[sizeof (command_line) -1 ] =0 ; }
Signature · 7 lines
2.7.4 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH 2/2] arm64: error out if kernel command line is too long
Quoted 9 lines · Munehisa Kamata
Currently, in arm64, kexec silently truncates kernel command line longer than
COMMAND_LINE_SIZE- 1. Error out in that case as some other architectures already do that. The error message is copied fromx86_64.Suggested-by Tom Kirchner <[email protected]>Signed-off-by Munehisa Kamata <[email protected]>--- kexec/arch/arm64/kexec-arm64.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
Hi,
This looks fine to me but I will wait to see if there are other reviews before applying.
Quoted 32 lines
kexec/arch/arm64/kexec-arm64.c +8
-1@@ -536,8 +536,15 @@ int arm64_load_other_segments(struct kexec_info *info,char command_line[COMMAND_LINE_SIZE ] ="" ;if (arm64_opts.command_line) { +if (strlen (arm64_opts.command_line) > +sizeof (command_line) -1 ) { +fprintf (stderr, +"Kernel command line too long for kernel!\n" ); +return EFAILED ; + } +strncpy (command_line, arm64_opts.command_line, -sizeof (command_line)); +sizeof (command_line) -1 ); command_line[sizeof (command_line) -1 ] =0 ; }Signature · 8 lines
-- 2.7.4 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Simon Horman
AppliedRe: [PATCH 2/2] arm64: error out if kernel command line is too long
Quoted 12 lines · Simon Horman
Quoted 9 lines · Munehisa Kamata
Currently, in arm64, kexec silently truncates kernel command line longer than
COMMAND_LINE_SIZE- 1. Error out in that case as some other architectures already do that. The error message is copied fromx86_64.Suggested-by Tom Kirchner <[email protected]>Signed-off-by Munehisa Kamata <[email protected]>--- kexec/arch/arm64/kexec-arm64.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
Quoted 6 lines
Hi,
This looks fine to me but I will wait to see if there are other reviews before applying.
Reviewed-by Simon Horman <[email protected]>
Thanks, applied.
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 4 lines · Munehisa Kamata
Otherwise, we can hit the current 512 chars limit before hitting the Linux kernel's one, where allows 2048 chars in arm64.
Signed-off-by Munehisa Kamata <[email protected]>
Hi,
This looks fine to me but I will wait to see if there are other reviews before applying.
Quoted 26 lines
--- kexec/arch/arm64/kexec-arm64.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kexec/arch/arm64/kexec-arm64.h +1
-1@@ -15,7 +15,7 @@#define BOOT_BLOCK_VERSION 17#define BOOT_BLOCK_LAST_COMP_VERSION 16 -#define COMMAND_LINE_SIZE 512 +#define COMMAND_LINE_SIZE 2048/* from kernel */ #define KiB (x) ((x) * 1024UL)#define MiB (x) (KiB(x) * 1024UL)Signature · 7 lines
2.7.4 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Simon Horman
AppliedQuoted 4 lines · Simon Horman
Quoted 3 lines · Munehisa Kamata
Otherwise, we can hit the current 512 chars limit before hitting the Linux kernel's one, where allows 2048 chars in arm64.
Quoted 8 lines
Quoted 1 line
Signed-off-by Munehisa Kamata <[email protected]>Hi,
This looks fine to me but I will wait to see if there are other reviews before applying.
Reviewed-by Simon Horman <[email protected]>
Thanks, applied.
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec