[PATCH v3 0/4] efi: stmm: Fix for incorrect buffer allocation and cleanups

Jan Kiszka posted 4 patches 1 month, 1 week ago
drivers/firmware/efi/stmm/tee_stmm_efi.c | 61 +++++++++++-------------
1 file changed, 27 insertions(+), 34 deletions(-)
[PATCH v3 0/4] efi: stmm: Fix for incorrect buffer allocation and cleanups
Posted by Jan Kiszka 1 month, 1 week ago
Changes in v3:
 - improve description of patch 3

Changes in v2:
 - simplify page allocation approach
 - switch to returning EFI_DEVICE_ERROR on ENOMEM
 - drop efi return value argument from setup_mm_hdr

One critical fix for the EFI StMM driver, one error return code
adjustment and two smaller cleanups.

Note that the suggestion to convert tee_shm_register_kernel_buf to take
pages instead of buffer addresses is not forgotten, just in the backlog.
I wanted to avoid that the critical fix has to wait for me finding time
to refactor the API as well.

Jan

Jan Kiszka (4):
  efi: stmm: Fix incorrect buffer allocation method
  efi: stmm: Do not return EFI_OUT_OF_RESOURCES on internal errors
  efi: stmm: Drop unused EFI error from setup_mm_hdr arguments
  efi: stmm: Drop unneeded null pointer check

 drivers/firmware/efi/stmm/tee_stmm_efi.c | 61 +++++++++++-------------
 1 file changed, 27 insertions(+), 34 deletions(-)

-- 
2.43.0
Re: [PATCH v3 0/4] efi: stmm: Fix for incorrect buffer allocation and cleanups
Posted by Sumit Garg 1 month, 1 week ago
On Mon, Aug 25, 2025 at 06:07:09PM +0200, Jan Kiszka wrote:
> Changes in v3:
>  - improve description of patch 3
> 
> Changes in v2:
>  - simplify page allocation approach
>  - switch to returning EFI_DEVICE_ERROR on ENOMEM
>  - drop efi return value argument from setup_mm_hdr
> 
> One critical fix for the EFI StMM driver, one error return code
> adjustment and two smaller cleanups.
> 
> Note that the suggestion to convert tee_shm_register_kernel_buf to take
> pages instead of buffer addresses is not forgotten, just in the backlog.
> I wanted to avoid that the critical fix has to wait for me finding time
> to refactor the API as well.
> 
> Jan
> 
> Jan Kiszka (4):
>   efi: stmm: Fix incorrect buffer allocation method
>   efi: stmm: Do not return EFI_OUT_OF_RESOURCES on internal errors
>   efi: stmm: Drop unused EFI error from setup_mm_hdr arguments
>   efi: stmm: Drop unneeded null pointer check
> 
>  drivers/firmware/efi/stmm/tee_stmm_efi.c | 61 +++++++++++-------------
>  1 file changed, 27 insertions(+), 34 deletions(-)

LGTM, for the series:

Acked-by: Sumit Garg <sumit.garg@oss.qualcomm.com>

-Sumit
Re: [PATCH v3 0/4] efi: stmm: Fix for incorrect buffer allocation and cleanups
Posted by Ard Biesheuvel 1 month, 1 week ago
On Tue, 26 Aug 2025 at 13:00, Sumit Garg <sumit.garg@kernel.org> wrote:
>
> On Mon, Aug 25, 2025 at 06:07:09PM +0200, Jan Kiszka wrote:
> > Changes in v3:
> >  - improve description of patch 3
> >
> > Changes in v2:
> >  - simplify page allocation approach
> >  - switch to returning EFI_DEVICE_ERROR on ENOMEM
> >  - drop efi return value argument from setup_mm_hdr
> >
> > One critical fix for the EFI StMM driver, one error return code
> > adjustment and two smaller cleanups.
> >
> > Note that the suggestion to convert tee_shm_register_kernel_buf to take
> > pages instead of buffer addresses is not forgotten, just in the backlog.
> > I wanted to avoid that the critical fix has to wait for me finding time
> > to refactor the API as well.
> >
> > Jan
> >
> > Jan Kiszka (4):
> >   efi: stmm: Fix incorrect buffer allocation method
> >   efi: stmm: Do not return EFI_OUT_OF_RESOURCES on internal errors
> >   efi: stmm: Drop unused EFI error from setup_mm_hdr arguments
> >   efi: stmm: Drop unneeded null pointer check
> >
> >  drivers/firmware/efi/stmm/tee_stmm_efi.c | 61 +++++++++++-------------
> >  1 file changed, 27 insertions(+), 34 deletions(-)
>
> LGTM, for the series:
>
> Acked-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
>

Thanks all - I've queued these up now.