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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 15 Sep 2022 19:47:28 +0300
From:   Evgenii Shatokhin <e.shatokhin@...ro.com>
To:     Jassi Brar <jassisinghbrar@...il.com>
CC:     <linux-kernel@...r.kernel.org>, Ilya Kuznetsov <ilya@...ro.com>,
        <linux@...ro.com>, Evgenii Shatokhin <e.shatokhin@...ro.com>
Subject: [PATCH 0/2] mailbox: Fix error handling in mbox_send_message()

This series fixes a couple issues I found while experimenting with mailbox device drivers:

1. If one tries to send a message via the mailbox using mbox_send_message(), and the controller driver for the mailbox device returns any error, mbox_send_message() returns -ETIME when in blocking mode. This is confusing at least.

2. If the mbox controller driver fails to send a message, mbox_send_message() needlessly waits for the message to be sent. That ends when the waiting timeout has been expired. However, the pointer to the message remains in the queue of the mbox framework (chan->msg_data) and the framework will try to process it over and over again, when one tries to send other messages. If the driver rejects the message each time because it is invalid (some drivers do that), this will prevent anyone from using that mailbox channel.

Evgenii Shatokhin (2):
  mailbox: Propagate errors from .send_data() callback to
    mbox_send_message()
  mailbox: Error out early if the mbox driver has failed to submit the
    message

 drivers/mailbox/mailbox.c | 30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)

-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ