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]
Date:   Tue, 26 Apr 2022 23:01:40 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Sven Peter <sven@...npeter.dev>
Cc:     Arnd Bergmann <arnd@...db.de>, Hector Martin <marcan@...can.st>,
        Alyssa Rosenzweig <alyssa@...enzweig.io>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzk+dt@...nel.org>,
        Keith Busch <kbusch@...nel.org>, Jens Axboe <axboe@...com>,
        Christoph Hellwig <hch@....de>,
        Sagi Grimberg <sagi@...mberg.me>,
        Marc Zyngier <maz@...nel.org>, Janne Grunau <j@...nau.net>,
        DTML <devicetree@...r.kernel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-nvme@...ts.infradead.org
Subject: Re: [PATCH v3 5/6] soc: apple: Add RTKit IPC library

On Tue, Apr 26, 2022 at 10:15 PM Sven Peter <sven@...npeter.dev> wrote:
>
> Apple SoCs such as the M1 come with multiple embedded co-processors
> running proprietary firmware. Communication with those is established
> over a simple mailbox using the RTKit IPC protocol.
>
> This cannot be implement inside the mailbox subsystem since on top
> of communication over channels we also need support for starting,
> hibernating and resetting these co-processors. We also need to
> handle shared memory allocations differently depending on the
> co-processor and don't want to split that across multiple drivers.
>
> Signed-off-by: Sven Peter <sven@...npeter.dev>

Reviewed-by: Arnd Bergmann <arnd@...db.de>

> +bool apple_rtkit_is_running(struct apple_rtkit *rtk)
> +{
> +       if (rtk->crashed)
> +               return false;
> +       if ((rtk->iop_power_state & 0xff) != APPLE_RTKIT_PWR_STATE_ON)
> +               return false;
> +       if ((rtk->ap_power_state & 0xff) != APPLE_RTKIT_PWR_STATE_ON)
> +               return false;
> +       return true;
> +}
> +EXPORT_SYMBOL_GPL(apple_rtkit_is_running);
> +
> +bool apple_rtkit_is_crashed(struct apple_rtkit *rtk)
> +{
> +       return rtk->crashed;
> +}
> +EXPORT_SYMBOL_GPL(apple_rtkit_is_crashed);

I noticed that you use EXPORT_SYMBOL_GPL() here, but a more permissive
EXPORT_SYMBOL() in the SART driver. Is that intentional? I would have
assumed that both are similarly private to the apple SoCs and would be the
_GPL type, but this is something you get to pick as the author.


> +
> +#if IS_ENABLED(CONFIG_APPLE_RTKIT)
> +

Same comment about the #if as for the SART driver: I'd prefer it without the
conditional compilation.

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ