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: <aYiOoZMkq_d48vCZ@smile.fi.intel.com>
Date: Sun, 8 Feb 2026 15:24:49 +0200
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Jonathan Cameron <jic23@...nel.org>
Cc: Rodrigo Alencar <455.rodrigo.alencar@...il.com>,
	rodrigo.alencar@...log.com, linux-kernel@...r.kernel.org,
	linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
	linux-doc@...r.kernel.org, David Lechner <dlechner@...libre.com>,
	Andy Shevchenko <andy@...nel.org>,
	Lars-Peter Clausen <lars@...afoo.de>,
	Michael Hennerich <Michael.Hennerich@...log.com>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Jonathan Corbet <corbet@....net>
Subject: Re: [PATCH v6 2/8] iio: core: add fixed point parsing with 64-bit
 parts

On Sat, Feb 07, 2026 at 05:02:28PM +0000, Jonathan Cameron wrote:
> On Wed, 4 Feb 2026 12:34:52 +0200
> Andy Shevchenko <andriy.shevchenko@...el.com> wrote:
> > On Wed, Feb 04, 2026 at 10:28:05AM +0000, Rodrigo Alencar wrote:
> > > On 26/02/04 11:57AM, Andy Shevchenko wrote:  
> > > > On Wed, Feb 04, 2026 at 09:42:55AM +0000, Rodrigo Alencar wrote:  
> > > > > On 26/02/04 03:45AM, Andy Shevchenko wrote:  
> > > > > > On Fri, Jan 30, 2026 at 10:06:43AM +0000, Rodrigo Alencar via B4 Relay wrote:  

...

> > > > > > There is a development in the parse_integer in the lib/. I reviewed that series
> > > > > > and hopefully it will go in. With that done, we better reuse the lib/ function.
> > > > > > 
> > > > > > https://lore.kernel.org/linux-hardening/20260202115451.290173-1-dmantipov@yandex.ru/  
> > > > > 
> > > > > In this patch, I see that it updates the overflow check, but I am not
> > > > > seeing that function being exposed to other kernel modules.  
> > > > 
> > > > Can the IIO be compiled as a module? If so, then we would need to export that
> > > > function. (Note, we may export only for the exact module(s) in question, so
> > > > nobody else will be able to use it. See EXPORT_SYMBOL_FOR_MODULES() macro.)  
> > > 
> > > Yes, one can have an industrialio.ko.
> > > Then, would it be fine to use:
> > > 
> > > EXPORT_SYMBOL_FOR_MODULES(_parse_integer_limit, "industrialio");
> > > 
> > > in lib/kstrtox.c; and:
> > > 
> > > #include "../../lib/kstrtox.h"
> > > 
> > > in drivers/iio/industrialio-core.c
> > > 
> > > that does not look pretty.  
> > 
> > Yeah, but I think it's fine as long as we have an associated FIXME.
> > In any case Jonathan is the one who makes a decision here.
> 
> You've lost me. Why do we need to restrict this function to use
> by specific modules?

Because it should not be used outside the lib/* to begin with.
The mentioned series relaxed that a bit, but the idea behind is
still the same. We rather should have a front-end wrappers like
safe_strtox() or so to do the job, not the parse_integer*() one(s).

> We normally only bother with that dance when
> there is a big footgun or something deep in core kernel code where
> we want to be very careful who uses it.

That's exactly the case.

> To me it doesn't seem appropriate here.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ