lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220826124603.4a28a154@endymion.delvare>
Date:   Fri, 26 Aug 2022 12:46:03 +0200
From:   Jean Delvare <jdelvare@...e.de>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     linux-iio <linux-iio@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Jonathan Cameron <jic23@...nel.org>,
        Lars-Peter Clausen <lars@...afoo.de>
Subject: Re: [PATCH] iio:accel:dmard06: Optimize when CONFIG_OF isn't set

Hi Andy,

On Thu, 25 Aug 2022 23:12:43 +0300, Andy Shevchenko wrote:
> On Thu, Aug 25, 2022 at 3:54 PM Jean Delvare <jdelvare@...e.de> wrote:
> >
> > When CONFIG_OF isn't set, we can optimize out dmard06_of_match as it
> > will never be used.  
> 
> NACK. There is a magic PRP0001 for ACPI case.

OK, I wasn't aware of this. As of_match_device() is a stub when
CONFIG_OF isn't set, I thought the table could never be used. But now I
see that the acpi subsystem accesses the table directly, so you are
correct, the optimization I suggested is bogus.

Now I'm curious, is there a well-defined subset of device names that
can be found in an ACPI table? If not, does that mean that any driver
with an OF entry could match, therefore of_match_ptr() should be
removed from the kernel entirely?

Another possibility would be to stub out of_match_ptr() only if neither
CONFIG_OF nor CONFIG_ACPI is set. But I'm not sure that would be worth,
as I expected either to be set on almost all kernels in practice
(except on s390x, but you wouldn't build any of these drivers there
anyway).

-- 
Jean Delvare
SUSE L3 Support

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ