verifiers: Fallout cleanup
cover verifiers: Fallout cleanup
Hey,
Yeah, fallout cleanup after verifiers introduction. Sorry about that.
Now I test build all x86 and ARM supported platforms. I am going to add others to my test script soon to avoid such mess in the future.
Daniel
grub-core/loader/arm64/xen_boot.c | 8 ++++---- grub-core/loader/i386/xen.c | 14 +++++++------- include/grub/file.h | 5 +++++ 3 files changed, 16 insertions(+), 11 deletions(-)
Daniel Kiper (2):
verifiers: Xen fallout cleanup
verifiers: ARM Xen fallout cleanup
PATCH 2/2 verifiers: ARM Xen fallout cleanup
ARM Xen fallout cleanup after commit ca0a4f689 (verifiers: File type for fine-grained signature-verification controlling).
--- grub-core/loader/arm64/xen_boot.c | 8 ++++---- include/grub/file.h | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-)
grub-core/loader/arm64/xen_boot.c +4 -4
@@ -429,9 +429,9 @@ grub_cmd_xen_module (grub_command_t cmd __attribute__((unused)),grub_dprintf ("xen_loader" ,"Init module and node info\n" ); -if (nounzip) -grub_file_filter_disable_compression (); - file =grub_file_open (argv[0 ]); + file =grub_file_open (argv[0 ],GRUB_FILE_TYPE_XEN_MODULE + | (nounzip ?GRUB_FILE_TYPE_NO_DECOMPRESS + :GRUB_FILE_TYPE_NONE ));if (!file) goto fail;
@@ -463,7 +463,7 @@ grub_cmd_xen_hypervisor (grub_command_t cmd __attribute__ ((unused)), goto fail; } - file =grub_file_open (argv[0 ]); + file =grub_file_open (argv[0 ],GRUB_FILE_TYPE_XEN_HYPERVISOR );if (!file) goto fail;
include/grub/file.h +5 -0
@@ -42,6 +42,11 @@ enum grub_file_type/* Multiboot module. */ GRUB_FILE_TYPE_MULTIBOOT_MODULE , +/* Xen hypervisor - used on ARM only. */ +GRUB_FILE_TYPE_XEN_HYPERVISOR , +/* Xen module - used on ARM only. */ +GRUB_FILE_TYPE_XEN_MODULE , +GRUB_FILE_TYPE_BSD_KERNEL ,GRUB_FILE_TYPE_FREEBSD_ENV , GRUB_FILE_TYPE_FREEBSD_MODULE,
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 1/2 verifiers: Xen fallout cleanup
In reply to Daniel KiperXen fallout cleanup after commit ca0a4f689 (verifiers: File type for fine-grained signature-verification controlling).
--- grub-core/loader/i386/xen.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
grub-core/loader/i386/xen.c +7 -7
@@ -645,10 +645,10 @@ grub_cmd_xen (grub_command_t cmd __attribute__ ((unused)),grub_xen_reset (); -grub_create_loader_cmdline (argc -1 , argv +1 , - (char *) xen_state.next_start.cmd_line, -sizeof (xen_state.next_start.cmd_line) -1 ); - err =grub_verify_string (xen_state.next_start.cmd_line,GRUB_VERIFY_MODULE_CMDLINE ); + err =grub_create_loader_cmdline (argc -1 , argv +1 , + (char *) xen_state.next_start.cmd_line, +sizeof (xen_state.next_start.cmd_line) -1 , +GRUB_VERIFY_KERNEL_CMDLINE );if (err)return err;
@@ -910,9 +910,9 @@ grub_cmd_module (grub_command_t cmd __attribute__ ((unused)),if (err) goto fail; -grub_create_loader_cmdline (argc -1 , argv +1 , -get_virtual_current_address (ch), cmdline_len); - err =grub_verify_string (get_virtual_current_address (ch),GRUB_VERIFY_MODULE_CMDLINE ); + err =grub_create_loader_cmdline (argc -1 , argv +1 , +get_virtual_current_address (ch), cmdline_len, +GRUB_VERIFY_MODULE_CMDLINE );if (err) goto fail;
Signature · 1 line
2.11.0
PATCH 2/2 verifiers: ARM Xen fallout cleanup
In reply to Daniel KiperARM Xen fallout cleanup after commit ca0a4f689 (verifiers: File type for fine-grained signature-verification controlling).
--- grub-core/loader/arm64/xen_boot.c | 8 ++++---- include/grub/file.h | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-)
grub-core/loader/arm64/xen_boot.c +4 -4
@@ -429,9 +429,9 @@ grub_cmd_xen_module (grub_command_t cmd __attribute__((unused)),grub_dprintf ("xen_loader" ,"Init module and node info\n" ); -if (nounzip) -grub_file_filter_disable_compression (); - file =grub_file_open (argv[0 ]); + file =grub_file_open (argv[0 ],GRUB_FILE_TYPE_XEN_MODULE + | (nounzip ?GRUB_FILE_TYPE_NO_DECOMPRESS + :GRUB_FILE_TYPE_NONE ));if (!file) goto fail;
@@ -463,7 +463,7 @@ grub_cmd_xen_hypervisor (grub_command_t cmd __attribute__ ((unused)), goto fail; } - file =grub_file_open (argv[0 ]); + file =grub_file_open (argv[0 ],GRUB_FILE_TYPE_XEN_HYPERVISOR );if (!file) goto fail;
include/grub/file.h +5 -0
@@ -42,6 +42,11 @@ enum grub_file_type/* Multiboot module. */ GRUB_FILE_TYPE_MULTIBOOT_MODULE , +/* Xen hypervisor - used on ARM only. */ +GRUB_FILE_TYPE_XEN_HYPERVISOR , +/* Xen module - used on ARM only. */ +GRUB_FILE_TYPE_XEN_MODULE , +GRUB_FILE_TYPE_BSD_KERNEL ,GRUB_FILE_TYPE_FREEBSD_ENV , GRUB_FILE_TYPE_FREEBSD_MODULE,
Signature · 1 line
2.11.0
PATCH 1/2 verifiers: Xen fallout cleanup
In reply to Daniel KiperXen fallout cleanup after commit ca0a4f689 (verifiers: File type for fine-grained signature-verification controlling).
--- grub-core/loader/i386/xen.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
grub-core/loader/i386/xen.c +7 -7
@@ -645,10 +645,10 @@ grub_cmd_xen (grub_command_t cmd __attribute__ ((unused)),grub_xen_reset (); -grub_create_loader_cmdline (argc -1 , argv +1 , - (char *) xen_state.next_start.cmd_line, -sizeof (xen_state.next_start.cmd_line) -1 ); - err =grub_verify_string (xen_state.next_start.cmd_line,GRUB_VERIFY_MODULE_CMDLINE ); + err =grub_create_loader_cmdline (argc -1 , argv +1 , + (char *) xen_state.next_start.cmd_line, +sizeof (xen_state.next_start.cmd_line) -1 , +GRUB_VERIFY_KERNEL_CMDLINE );if (err)return err;
@@ -910,9 +910,9 @@ grub_cmd_module (grub_command_t cmd __attribute__ ((unused)),if (err) goto fail; -grub_create_loader_cmdline (argc -1 , argv +1 , -get_virtual_current_address (ch), cmdline_len); - err =grub_verify_string (get_virtual_current_address (ch),GRUB_VERIFY_MODULE_CMDLINE ); + err =grub_create_loader_cmdline (argc -1 , argv +1 , +get_virtual_current_address (ch), cmdline_len, +GRUB_VERIFY_MODULE_CMDLINE );if (err) goto fail;
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [GRUB PATCH 1/2] verifiers: Xen fallout cleanup
In reply to Daniel KiperQuoted 14 lines · Daniel Kiper
Xen fallout cleanup after commit
ca0a4f689(verifiers: File type for fine-grained signature-verification controlling).Signed-off-by Daniel Kiper <[email protected]>--- grub-core/loader/i386/xen.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)grub-core/loader/i386/xen.c +0
-0@@ -645,10 +645,10 @@ grub_cmd_xen (grub_command_t cmd __attribute__ ((unused)),
grub-core/loader/i386/xen.c grub_cmd_xen (grub_command_t cmd __attribute__ ((unused)), · line 651
Quoted 10 lines
grub-core/loader/i386/xen.c +4
-4grub_xen_reset (); -grub_create_loader_cmdline (argc -1 , argv +1 , - (char *) xen_state.next_start.cmd_line, -sizeof (xen_state.next_start.cmd_line) -1 ); - err =grub_verify_string (xen_state.next_start.cmd_line,GRUB_VERIFY_MODULE_CMDLINE ); + err =grub_create_loader_cmdline (argc -1 , argv +1 , + (char *) xen_state.next_start.cmd_line, +sizeof (xen_state.next_start.cmd_line) -1 , +GRUB_VERIFY_KERNEL_CMDLINE );
How did this compile previously if you were missing an argument to grub_create_loader_cmdline?
Quoted 7 lines
grub-core/loader/i386/xen.c +0
-0if (err)return err;@@ -910,9 +910,9 @@ grub_cmd_module (grub_command_t cmd __attribute__ ((unused)),if (err) goto fail;
grub-core/loader/i386/xen.c grub_cmd_module (grub_command_t cmd __attribute__ ((unused)), · line 918
Quoted 10 lines
grub-core/loader/i386/xen.c +3
-3-grub_create_loader_cmdline (argc -1 , argv +1 , -get_virtual_current_address (ch), cmdline_len); - err =grub_verify_string (get_virtual_current_address (ch),GRUB_VERIFY_MODULE_CMDLINE ); + err =grub_create_loader_cmdline (argc -1 , argv +1 , +get_virtual_current_address (ch), cmdline_len, +GRUB_VERIFY_MODULE_CMDLINE );if (err) goto fail;
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [GRUB PATCH 2/2] verifiers: ARM Xen fallout cleanup
In reply to Daniel KiperQuoted 14 lines · Daniel Kiper
ARM Xen fallout cleanup after commit
ca0a4f689(verifiers: File type for fine-grained signature-verification controlling).Signed-off-by Daniel Kiper <[email protected]>--- grub-core/loader/arm64/xen_boot.c | 8 ++++---- include/grub/file.h | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-)grub-core/loader/arm64/xen_boot.c +0
-0
grub-core/loader/arm64/xen_boot.c grub_cmd_xen_module (grub_command_t cmd __attribute__((unused)), · line 434
Quoted 9 lines
grub-core/loader/arm64/xen_boot.c +3
-3@@ -429,9 +429,9 @@ grub_cmd_xen_module (grub_command_t cmd __attribute__((unused)),grub_dprintf ("xen_loader" ,"Init module and node info\n" ); -if (nounzip) -grub_file_filter_disable_compression (); - file =grub_file_open (argv[0 ]); + file =grub_file_open (argv[0 ],GRUB_FILE_TYPE_XEN_MODULE + | (nounzip ?GRUB_FILE_TYPE_NO_DECOMPRESS + :GRUB_FILE_TYPE_NONE ));
Same question, how did this compile if you were missing an argument? I guess maybe you were not building xen bits in and you missed fixing this up?
Quoted 19 lines
grub-core/loader/arm64/xen_boot.c +1
-1if (!file) goto fail;@@ -463,7 +463,7 @@ grub_cmd_xen_hypervisor (grub_command_t cmd __attribute__ ((unused)), goto fail; } - file =grub_file_open (argv[0 ]); + file =grub_file_open (argv[0 ],GRUB_FILE_TYPE_XEN_HYPERVISOR );if (!file) goto fail;include/grub/file.h +0
-0@@ -42,6 +42,11 @@ enum grub_file_type/* Multiboot module. */
include/grub/file.h enum grub_file_type · line 52
Quoted 10 lines
include/grub/file.h +5
-0GRUB_FILE_TYPE_MULTIBOOT_MODULE , +/* Xen hypervisor - used on ARM only. */ +GRUB_FILE_TYPE_XEN_HYPERVISOR , +/* Xen module - used on ARM only. */ +GRUB_FILE_TYPE_XEN_MODULE , +GRUB_FILE_TYPE_BSD_KERNEL ,GRUB_FILE_TYPE_FREEBSD_ENV , GRUB_FILE_TYPE_FREEBSD_MODULE,
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [GRUB PATCH 1/2] verifiers: Xen fallout cleanup
In reply to Ross PhilipsonQuoted 17 lines · Ross Philipson
Quoted 16 lines · Daniel Kiper
Xen fallout cleanup after commit
ca0a4f689(verifiers: File type for fine-grained signature-verification controlling).Signed-off-by Daniel Kiper <[email protected]>--- grub-core/loader/i386/xen.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)grub-core/loader/i386/xen.c +0
-0@@ -645,10 +645,10 @@ grub_cmd_xen (grub_command_t cmd __attribute__ ((unused)),grub_xen_reset ();
Quoted 11 lines
grub-core/loader/i386/xen.c grub_cmd_xen (grub_command_t cmd __attribute__ ((unused)), · line 651
Quoted 8 lines
grub-core/loader/i386/xen.c +4
-4-grub_create_loader_cmdline (argc -1 , argv +1 , - (char *) xen_state.next_start.cmd_line, -sizeof (xen_state.next_start.cmd_line) -1 ); - err =grub_verify_string (xen_state.next_start.cmd_line,GRUB_VERIFY_MODULE_CMDLINE ); + err =grub_create_loader_cmdline (argc -1 , argv +1 , + (char *) xen_state.next_start.cmd_line, +sizeof (xen_state.next_start.cmd_line) -1 , +GRUB_VERIFY_KERNEL_CMDLINE );How did this compile previously if you were missing an argument to
grub_create_loader_cmdline?
This is only build if xen platform is enabled. Otherwise this file is not used.
Daniel
Ross Philipson
Reviewed-byRe: [GRUB PATCH 1/2] verifiers: Xen fallout cleanup
Quoted 30 lines · Daniel Kiper
Quoted 17 lines · Ross Philipson
Quoted 16 lines · Daniel Kiper
Xen fallout cleanup after commit
ca0a4f689(verifiers: File type for fine-grained signature-verification controlling).Signed-off-by Daniel Kiper <[email protected]>--- grub-core/loader/i386/xen.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)grub-core/loader/i386/xen.c +0
-0@@ -645,10 +645,10 @@ grub_cmd_xen (grub_command_t cmd __attribute__ ((unused)),grub_xen_reset ();Quoted 11 lines
grub-core/loader/i386/xen.c grub_cmd_xen (grub_command_t cmd __attribute__ ((unused)), · line 651
Quoted 8 lines
grub-core/loader/i386/xen.c +4
-4-grub_create_loader_cmdline (argc -1 , argv +1 , - (char *) xen_state.next_start.cmd_line, -sizeof (xen_state.next_start.cmd_line) -1 ); - err =grub_verify_string (xen_state.next_start.cmd_line,GRUB_VERIFY_MODULE_CMDLINE ); + err =grub_create_loader_cmdline (argc -1 , argv +1 , + (char *) xen_state.next_start.cmd_line, +sizeof (xen_state.next_start.cmd_line) -1 , +GRUB_VERIFY_KERNEL_CMDLINE );How did this compile previously if you were missing an argument to
grub_create_loader_cmdline?
Quoted 2 lines
This is only build if xen platform is enabled. Otherwise this file is not used.
Ack, that is what I was starting to guess happened. For the series:
Quoted 3 lines
Daniel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel