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: <9159c3a5-390f-4403-854d-9b5e87b58d8c@lunn.ch>
Date:   Wed, 21 Jun 2023 19:26:09 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     "Limonciello, Mario" <mario.limonciello@....com>
Cc:     Johannes Berg <johannes@...solutions.net>,
        Evan Quan <evan.quan@....com>, rafael@...nel.org,
        lenb@...nel.org, alexander.deucher@....com,
        christian.koenig@....com, Xinhui.Pan@....com, airlied@...il.com,
        daniel@...ll.ch, davem@...emloft.net, edumazet@...gle.com,
        kuba@...nel.org, pabeni@...hat.com, mdaenzer@...hat.com,
        maarten.lankhorst@...ux.intel.com, tzimmermann@...e.de,
        hdegoede@...hat.com, jingyuwang_vip@....com, lijo.lazar@....com,
        jim.cromie@...il.com, bellosilicio@...il.com,
        andrealmeid@...lia.com, trix@...hat.com, jsg@....id.au,
        arnd@...db.de, linux-kernel@...r.kernel.org,
        linux-acpi@...r.kernel.org, amd-gfx@...ts.freedesktop.org,
        dri-devel@...ts.freedesktop.org, linux-wireless@...r.kernel.org,
        netdev@...r.kernel.org
Subject: Re: [PATCH V4 1/8] drivers/acpi: Add support for Wifi band RF
 mitigations

> I think what you're asking for is another layer of indirection
> like CONFIG_WBRF in addition to CONFIG_ACPI_WBRF.
> 
> Producers would call functions like wbrf_supported_producer()
> where the source file is not guarded behind CONFIG_ACPI_WBRF,
> but instead by CONFIG_WBRF and locally use CONFIG_ACPI_WBRF within
> it.  So a producer could look like this:
> 
> bool wbrf_supported_producer(struct device *dev)
> {
> #ifdef CONFIG_ACPI_WBRF
>     struct acpi_device *adev = ACPI_COMPANION(dev);
> 
>     if (adev)
>         return check_acpi_wbrf(adev->handle,
>                        WBRF_REVISION,
>                        1ULL << WBRF_RECORD);
> #endif
>     return -ENODEV;
> 
> }
> EXPORT_SYMBOL_GPL(wbrf_supported_producer);
> 
> And then adding/removing could look something like this
> 
> int wbrf_add_exclusion(struct device *dev,
>                struct wbrf_ranges_in *in)
> {
> #ifdef CONFIG_ACPI_WBRF
>     struct acpi_device *adev = ACPI_COMPANION(dev);
> 
>     if (adev)
>         return wbrf_record(adev, WBRF_RECORD_ADD, in);
> #endif
>     return -ENODEV;
> }
> EXPORT_SYMBOL_GPL(wbrf_add_exclusion);
> 
> int wbrf_remove_exclusion(struct device *dev,
>                struct wbrf_ranges_in *in)
> {
> #ifdef CONFIG_ACPI_WBRF
>     struct acpi_device *adev = ACPI_COMPANION(dev);
> 
>     if (adev)
>         return wbrf_record(adev, WBRF_RECORD_REMOVE, in);
> #endif
>     return -ENODEV;
> }
> EXPORT_SYMBOL_GPL(wbrf_remove_exclusion);

Yes, this looks a lot better.

But what about notifications?

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ