mbox series

[0/4] ACPI: sysfs: Fix some issues in create_of_modalias() and create_pnp_modalias()

Message ID cover.1698081019.git.christophe.jaillet@wanadoo.fr (mailing list archive)
Headers show
Series ACPI: sysfs: Fix some issues in create_of_modalias() and create_pnp_modalias() | expand

Message

Christophe JAILLET Oct. 23, 2023, 5:24 p.m. UTC
All issues have been introduced by the same commit, 8765c5ba1949 ("ACPI
/ scan: Rework modalias creation when "compatible" is present")

The first 2 patches fixe some issues related to string truncation checks
and to computation of the available space in the output buffer.

The 2 others are just some clean-ups.

Christophe JAILLET (4):
  ACPI: sysfs: Fix the check for a potential string truncation
  ACPI: sysfs: Fix a potential out-of-bound write in
    create_of_modalias()
  ACPI: sysfs: Remove some useless trailing NULL writes
  ACPI: sysfs: Remove some dead code

 drivers/acpi/device_sysfs.c | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

Comments

Rafael J. Wysocki Oct. 23, 2023, 8:09 p.m. UTC | #1
On Mon, Oct 23, 2023 at 7:32 PM Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
>
> All issues have been introduced by the same commit, 8765c5ba1949 ("ACPI
> / scan: Rework modalias creation when "compatible" is present")
>
> The first 2 patches fixe some issues related to string truncation checks
> and to computation of the available space in the output buffer.
>
> The 2 others are just some clean-ups.
>
> Christophe JAILLET (4):
>   ACPI: sysfs: Fix the check for a potential string truncation
>   ACPI: sysfs: Fix a potential out-of-bound write in
>     create_of_modalias()
>   ACPI: sysfs: Remove some useless trailing NULL writes
>   ACPI: sysfs: Remove some dead code
>
>  drivers/acpi/device_sysfs.c | 18 ++++++++----------
>  1 file changed, 8 insertions(+), 10 deletions(-)
>
> --

Thanks for the fixes!

I would combine patch [1/4] with patch [2/4] and patch [3/4] with
patch [4/4], though.

If that's OK, I can do that while applying the patches.
Christophe JAILLET Oct. 23, 2023, 8:47 p.m. UTC | #2
Le 23/10/2023 à 22:09, Rafael J. Wysocki a écrit :
> On Mon, Oct 23, 2023 at 7:32 PM Christophe JAILLET
> <christophe.jaillet@wanadoo.fr> wrote:
>>
>> All issues have been introduced by the same commit, 8765c5ba1949 ("ACPI
>> / scan: Rework modalias creation when "compatible" is present")
>>
>> The first 2 patches fixe some issues related to string truncation checks
>> and to computation of the available space in the output buffer.
>>
>> The 2 others are just some clean-ups.
>>
>> Christophe JAILLET (4):
>>    ACPI: sysfs: Fix the check for a potential string truncation
>>    ACPI: sysfs: Fix a potential out-of-bound write in
>>      create_of_modalias()
>>    ACPI: sysfs: Remove some useless trailing NULL writes
>>    ACPI: sysfs: Remove some dead code
>>
>>   drivers/acpi/device_sysfs.c | 18 ++++++++----------
>>   1 file changed, 8 insertions(+), 10 deletions(-)
>>
>> --
> 
> Thanks for the fixes!
> 
> I would combine patch [1/4] with patch [2/4] and patch [3/4] with
> patch [4/4], though.
> 
> If that's OK, I can do that while applying the patches.
> 

Hi,

up to you.
Either way is fine for me.

CJ