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: <1f20bb2b-f898-4e68-aee7-b4e9c7fcc32f@nokia.com>
Date: Mon, 24 Mar 2025 18:34:54 +0100
From: Elodie Decerle <elodie.decerle@...ia.com>
To: Maarten Brock <Maarten.Brock@...ls.nl>,
 Greg KH <gregkh@...uxfoundation.org>
Cc: "jacmet@...site.dk" <jacmet@...site.dk>,
 "jirislaby@...nel.org" <jirislaby@...nel.org>,
 "jakub.lewalski@...ia.com" <jakub.lewalski@...ia.com>,
 "linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] tty: serial: uartlite: ensure uart driver is registered

Hi,

On 18/03/2025 10:46, Maarten Brock wrote:
> [Some people who received this message don't often get email from maarten.brock@...ls.nl. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> CAUTION: This is an external email. Please be very careful when clicking links or opening attachments. See the URL nok.it/ext for additional information.
> 
> 
> 
> Hi,
> 
>>> When two instances of uart devices are probing, a concurrency race can
>>> occur.
>>>
>>> Adding a mutex lock around the uart_register_driver call in the probe
>>> function prevents this race condition and ensures that the uart driver
>>> structure is fully initialized and registered before it is used.
>>
>> So the problem that there is a single "state" for the driver as a whole.
>> That should be fixed up to be local to each individual device that is
>> added to the system.  Don't add a lock to paper over this as odds are
>> this is not the only place that will have problems.
>>
>> Are you just now having 2 of these devices in your system at the same
>> time?
> 
> In the past I have created a Zynq 7000 based system (dual core ARM) with
> 11 uartlites and I have not seen this problem. This was with a 5.10 kernel.
> 
> Maarten

Thanks for your fast reviewing and suggestion. In fact, we are using
multiple UART devices in our multi-cores system. The problem is
extremely rare and we could not even reproduce it so far. We'll provide
another version for this patch based on your comments, Greg.

Best regards,

Elodie

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ