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: <7a5cf18b6141453988247cfa4d4dcd49@AcuMS.aculab.com>
Date: Sun, 28 Jul 2024 11:17:19 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Lorenzo Stoakes' <lorenzo.stoakes@...cle.com>
CC: 'Linus Torvalds' <torvalds@...uxfoundation.org>, Jens Axboe
	<axboe@...nel.dk>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "Matthew Wilcox (Oracle)"
	<willy@...radead.org>, Christoph Hellwig <hch@...radead.org>, Andrew Morton
	<akpm@...ux-foundation.org>, Andy Shevchenko
	<andriy.shevchenko@...ux.intel.com>, Dan Carpenter
	<dan.carpenter@...aro.org>, Arnd Bergmann <arnd@...nel.org>,
	"Jason@...c4.com" <Jason@...c4.com>, "pedro.falcato@...il.com"
	<pedro.falcato@...il.com>, Mateusz Guzik <mjguzik@...il.com>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: RE: [PATCH 0/7] minmax: reduce compilation time

From: Lorenzo Stoakes
> Sent: 27 July 2024 19:59
> 
> On Sat, Jul 27, 2024 at 08:08:39AM GMT, David Laight wrote:
> > ...
> > > and it will spit out
> > >
> > >   Longest line is drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c:1136 (2346kB)
> > >      '   ((((((pkt_size) + __builtin_choose_expr((sizeof(int) ==
> > > sizeof(*(8 ? ((void *)((long)((__builtin_...'
> > >
> > > to tell me that we have that insane 2.2 *megabyte* line due to the
> > > MVPP2_SKB_HEADROOM thing, and I should apply this patch:
> > >
> > > -#define MVPP2_SKB_HEADROOM     min(max(XDP_PACKET_HEADROOM, NET_SKB_PAD), 224)
> > > +#define MVPP2_SKB_HEADROOM
> > > MIN_T(int,MAX_T(int,XDP_PACKET_HEADROOM, NET_SKB_PAD), 224)
> > >
> > > to fix it.
> 
> Yeah sorry just saw you had already addresed this Linus... I just went with a
> clamp()_t in my patch.
> 
> >
> > Or (if I've got is right):
> > #define MVPP2_SKB_HEADROOM clamp(XDP_PACKET_HEADROOM, NET_SKB_PAD, 224)
> >
> 
> I'm pretty sure you can clamp_t(int, ...) here safely based on usage.

Why doesn't a plain clamp() work?
The xxx_t() variants really shouldn't be used very often.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ