From: Khalid Ali
I added Daniel review tag, as he requested from me by privious thread. He
reviewed this patch from another thread.
Best regards,
khaalid
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
Free mempath in case of failures.
Signed-off-by: Khalid Ali
---
grub-core/loader/efi/linux.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c
index 78ea07ca8..e1f3d5f48 100644
--- a/grub-core/loader/efi/linux.c
++
Free "dp" in case of failure.
Signed-off-by: Khalid Ali
---
grub-core/disk/efi/efidisk.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/grub-core/disk/efi/efidisk.c b/grub-core/disk/efi/efidisk.c
index 3b5ed5691..1db29880a 100644
--- a/grub-core/disk/efi/efidisk.c
+++ b/grub-core/dis
"handles" that "grub_efi_locate_handles" was allocated with "grub_malloc"
wasn't being freed.
Signed-off-by: Khalid Ali
Reviewed-by: Daniel Kiper
---
grub-core/commands/efi/lsefi.c | 1 +
grub-core/commands/efi/tpm.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/grub-core/commands/e
From: khaalid
The function prototype.
Signed-off-by: khaalid
---
include/grub/efi/efi.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h
index a5cd99e5a..3c38e2834 100644
--- a/include/grub/efi/efi.h
+++ b/include/grub/efi/efi.h
@@ -115,6 +
From: khaalid
As the the current spec UEFI 2.11 add remaining status codes. The first
patch set of this series accounts for.
Signed-off-by: Khalid Ali
---
include/grub/efi/api.h | 6 ++
1 file changed, 6 insertions(+)
diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
index b686
From: khaalid
This RFC patch introduces a UEFI error message printer that translates
UEFI status codes from hexadecimal values into human-readable strings.
The idea is inspired by the GNU C Library's "perror()" function, which
translates
"errno" values into descriptive error messages. Similar
From: khaalid
Free handles probably before return.
Signed-off-by: Khalid Ali
---
grub-core/commands/efi/tpm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/grub-core/commands/efi/tpm.c b/grub-core/commands/efi/tpm.c
index cbac69866..cb39b7bba 100644
--- a/grub-core/commands/efi/tpm.c
+
From: khaalid
Free "mempath" in case of failures.
Signed-off-by: Khalid Ali
---
grub-core/loader/efi/linux.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c
index 7c7db3e3a..507d3a343 100644
--- a/grub-core/l
From: khaalid
"handles" that "grub_efi_locate_handles" was allocated with "grub_malloc"
wasn't being freed.
Signed-off-by: Khalid Ali
---
grub-core/commands/efi/lsefi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/commands/efi/lsefi.c b/grub-core/commands/efi/
From: Khalid Ali
> TPCM(Trusted Platform Control Module) is a Chinese standard and has similar
> function
> to tpm, but tpcm adds the function of active monitoring and control to the
> system.
> It can realize active startup measurement when the system starts,as well as
> dynamic
> measurement
From: khaalid
On two places if `grub_efi_find_last_device_path` fails, then `dp` is
leaked.
Signed-off-by: Khalid Ali
---
grub-core/disk/efi/efidisk.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/grub-core/disk/efi/efidisk.c b/grub-core/disk/efi/efidisk.c
index 3b5ed5691..6c6fa374
From: khaalid
It was forgotten to free mempath entirely.
Signed-off-by: Khalid Ali
---
grub-core/loader/efi/linux.c | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c
index b45a3cc61..7c7db3e3a 100644
--- a/gr
From: khaalid
It was forgotten to free `handles` array of handles returned by
`grub_efi_locate_handle`. This is quite a large amount of memory, it depends
how many handles being returned which can be hundrends.
Signed-off-by: Khalid Ali
---
grub-core/commands/efi/lsefi.c | 2 +-
1 file change
From: khaalid
Well, i think the hex option is simpler in terms of code. Or maybe we
need to have centralized function for all UEFI error messages, however
this will complicate things a little bit as it requires modifications.
Just thought maybe we can extract high bit and treat like integer, thu
From: khaalid
As said in my privious patch.
The error message "cannot start image" seems better than "start_imaged
returned ..", to make it consistent with the other one.
Signed-off-by: khalid Ali
---
grub-core/loader/efi/linux.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff
From: khaalid
Hi Vladimir 'phcoder' Serbinenko,
I realize this patch is taking longer than expected,
and I’d like to avoid more back-and-forths that take time from both of us.
Would it be possible for us to work through the remaining points together more
directly or clarify the final expectatio
From: khaalid
> Vladimir 'phcoder' Serbinenko wrote:
> Please have a look at how to handle errors with realloc. You need to keep a
> copy of old pointer in case you have to free it. Some places in our codebase
> have similar memory leaks but it'> s not a reason to introduce more.
Well, i follo
From: khaalid
I followed the suggestion and implemented the option parsing using extcmd.
However, I feel this command is not ideal to have any arguments. Similar
commands like
lsefi, lsefimmap, and lsefisystab don’t take arguments—they simply dump data.
Since this command also just dumps variabl
From: khaalid
This command is intended to print or dump all UEFI runtime services.
The structure will look like efivar tool, since visually most people are
familiar with it. If the variable content is string then dump it as
string, otherwise for non string variables print them as raw hex; just
th
From: khaalid
This command is intended to print or dump all UEFI runtime services.
The structure will look like efivar tool, since visually most people are
familiar with it. If the variable content is string then dump it as
string, otherwise for non string variables print them as raw hex; just
th
From: khaalid
This command is intended to print or dump all UEFI runtime services.
The structure will look like efivar tool, since visually most people are
familiar with it. If the variable content is string then dump it as
string, otherwise for non string variables print them as raw hex; just
th
22 matches
Mail list logo