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: <69383bc9.050a0220.3cbaa0.7757@mx.google.com>
Date: Tue, 9 Dec 2025 16:09:57 +0100
From: Christian Marangi <ansuelsmth@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] resource: add WARN_ON_ONCE for resource_size() and
 document misusage

On Tue, Dec 09, 2025 at 05:07:09PM +0200, Andy Shevchenko wrote:
> On Tue, Dec 09, 2025 at 12:25:38PM +0200, Ilpo Järvinen wrote:
> > On Mon, 8 Dec 2025, Christian Marangi wrote:
> 
> ...
> 
> > >  static inline resource_size_t resource_size(const struct resource *res)
> > >  {
> > > +	WARN_ON_ONCE(!res->flags);
> > 
> > As lkp also found out, you need to add #include <linux/bug.h>
> 
> Since it's header, we may use better one from asm, i.e. asm/bug.h.
> This will give finer granularity and less possible tangled dependencies
> in the future.
>

Will change in v3 I assume minor touch up to wording might be needed so
it's not a problem.

> > >  	return res->end - res->start + 1;
> > >  }
> 
> 
> -- 
> With Best Regards,
> Andy Shevchenko
> 
> 

-- 
	Ansuel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ