Remove redundant and incorrect memset()
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 Remove redundant and incorrect memset()
Remove a redundant memset() call from efi_relocate_kernel() that was clearing memory that would be used by BSS in non-compressed images loaded with this function. This clear was redundant with the clearing done in the image itself, and also implemented incorrectly with a 0 length.
--- drivers/firmware/efi/efi-stub-helper.c | 2 -- 1 file changed, 2 deletions(-)
drivers/firmware/efi/efi-stub-helper.c +0 -2
@@ -567,8 +567,6 @@ static efi_status_t efi_relocate_kernel(efi_system_table_t *sys_table_arg,* have been allocated by UEFI, so we can safely use memcpy. */ memcpy ((void *)new_addr, (void *)cur_image_addr, image_size); -/* Zero any extra space we may have allocated for BSS. */ -memset ((void *)(new_addr + image_size), alloc_size - image_size,0 );/* Return the new address of the relocated image. */ *image_addr = new_addr;
Signature · 1 line
1.7.10.4
Quoted 8 lines · Roy Franz
Remove a redundant
memset()call fromefi_relocate_kernel()that was clearing memory that would be used by BSS in non-compressed images loaded with this function. This clear was redundant with the clearing done in the image itself, and also implemented incorrectly with a 0 length.Signed-off-by Roy Franz <[email protected]>Acked-by Mark Salter <[email protected]>
Note the title:
[PATCH] Remove redundant and incorrect memset()
if it's both redundant *and* incorrect then the other memset() must be incorrect too and must be removed as well ;-)
I suspect you wanted the title to say:
[PATCH] Remove redundant memset()
?
Thanks,
Ingo
Quoted 14 lines · Ingo Molnar
Quoted 8 lines · Roy Franz
Remove a redundant
memset()call fromefi_relocate_kernel()that was clearing memory that would be used by BSS in non-compressed images loaded with this function. This clear was redundant with the clearing done in the image itself, and also implemented incorrectly with a 0 length.Signed-off-by Roy Franz <[email protected]>Acked-by Mark Salter <[email protected]>Note the title:
Quoted 9 lines
[PATCH] Remove redundant and incorrect
memset()if it's both redundant *and* incorrect then the other
memset()must be incorrect too and must be removed as well ;-)I suspect you wanted the title to say:
[PATCH] Remove redundant
memset()
And more importantly:
[PATCH] boot,efi: Remove redundant memset()
A message that is not in the archive (sent off-list or not yet received): CAFECyb_ddUU8p87iOZ43PxW3h-E5cJ-0BUEr9i4Z-VrUez6=Jw@mail.gmail.com
Quoted 27 lines · Roy Franz
Quoted 26 lines · Ingo Molnar
Quoted 8 lines · Roy Franz
Remove a redundant
memset()call fromefi_relocate_kernel()that was clearing memory that would be used by BSS in non-compressed images loaded with this function. This clear was redundant with the clearing done in the image itself, and also implemented incorrectly with a 0 length.Signed-off-by Roy Franz <[email protected]>Acked-by Mark Salter <[email protected]>Note the title:
[PATCH] Remove redundant and incorrect
memset()if it's both redundant *and* incorrect then the other
memset()must be incorrect too and must be removed as well ;-)I suspect you wanted the title to say:
[PATCH] Remove redundant
memset()?
Quoted 8 lines
Quoted 3 lines
Thanks,
Ingo
Hi Ingo,
The memset being removed is redundant with a correctly implemented
memset in the kernel itself. The memset being removed is also incorrect,
with a hard coded length of 0.
So it was redundantly clearing nothing? ;-)
Anyway, I agree, the title makes sense.
Thanks,
Ingo