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] [day] [month] [year] [list]
Message-ID: <da788554-1962-4fca-8318-278e9224af59@ti.com>
Date: Fri, 24 Oct 2025 09:08:09 -0500
From: Andrew Davis <afd@...com>
To: Beleswar Prasad Padhi <b-padhi@...com>, Hari Nagalla <hnagalla@...com>,
        <jassisinghbrar@...il.com>, <linux-kernel@...r.kernel.org>
CC: <hiagofranco@...il.com>, <u-kumar1@...com>
Subject: Re: [RFC PATCH] mailbox: omap-mailbox: Flush out pending msgs before
 entering suspend

On 10/23/25 11:48 PM, Beleswar Prasad Padhi wrote:
> Hi Hari,
> 
> On 23/10/25 22:48, Hari Nagalla wrote:
>> On 10/22/25 23:38, Beleswar Prasad Padhi wrote:
>>>> I'm still not convinced just throwing out messages is the correct thing
>>>> to do here, but for now at very least let's print some warning here when
>>>> messages get zapped.
>>>
>>> I am also considering:
>>> 1. Mailbox queues for RTOS-RTOS communication could be
>>> firewalled for safety/FFI usecases. In that case, the above flush
>>> would result in an exception.
>> Yes, flushing all mailbox messages during suspend is not a good solution, as there can be in flight RTOS-RTOS communications for non participating cores.
>>> 2. This driver is common to OMAP SoCs which supported proper
>>> suspend/resume, meaning those rprocs could consume pending
>>> messages in resume. So clearing out messages from Linux
>>> might not be the best thing to do here.
>>>
>>> What else can we do here? Should we just fallback to letting
>>> Linux see only it's required queues for IPC? By setting
>>> "ti,mbox-num-fifos = <4>"?
>> This makes the assumption that the first 4 FIFOs of the mailbox are used? and why 4? are you assuming first 2 for Linux IPC and next 2 for RTOS-RTOS communications?
> 
> 
> 4 is just an example. The mailbox FIFO assignment is also
> a firmware configuration. So the idea was to let Linux only
> care about the FIFOs it uses for Linux<->RTOS
> communication, ignoring the ones used for
> RTOS<->RTOS communication.
> 

The issue is Linux is still shutting down the whole mailbox, so it
can't just care about it's own FIFOs as it is still deleting all
stored messages, whether it checks them or not.

>>
>> How about, let the mailbox driver simply save and restore the config registers and ignore the FIFO messages? i.e if they are lost with the main domain going into OFF, so be it.
> 
> 
> Hmm, this was how it was until 2016 when commit
> 9f0cee984a25 ("mailbox/omap: check for any unread
> messages during suspend") was added. Do you
> suggest reverting 9f0cee984a25? Hope it doesn't
> break any existing usecases for OMAP platforms.
> 

Checking for unread messages during suspend is still correct,
what we then do when we find them is the open question. We can:

  * Not suspend (current situation)
  * Suspend anyway, deleting them but with a warning
  * Save and restore them

Ignoring the problem by reverting 9f0cee984a25 is not a solution.

Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ