Re: [PATCH] ACPI: OSL: Initialize output value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/21/23 23:05, Rafael J. Wysocki wrote:
So wouldn't it be better to avoid modifying *value at all if
raw_pci_read() returns an error?

Avoiding of modification of *value at all seems better idea to me than setting it to arbitrary initializing value, indeed.

In that case, buffer initialization can be ditched, and *value set only in case of success.

And if it returns a success, why wouldn't it be trusted?

My concern is, that raw_pci_read() wraps platform-specific handlers, that should conform to the next rules:

1) in case of success, they must set value32 (or else, uninitialized data would leak to acpi_os_read_pci_configuration caller);

2) they should use passed &value32 only to set it (or else, uninitialized data would be used/passed somewhere, is it safe?);

Is there any way to be sure, that all the existing and future platform-specific pci-read handlers conform?




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux