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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <93243310-22cf-4d44-810c-17629b46a33e@kernel.dk>
Date: Sat, 27 Jul 2024 09:38:54 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Linus Torvalds <torvalds@...uxfoundation.org>,
 Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
Cc: David Laight <David.Laight@...lab.com>,
 "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

On 7/27/24 9:30 AM, Jens Axboe wrote:
> On 7/26/24 4:48 PM, Linus Torvalds wrote:
>> I didn't even look at what the issue was with the
>> bio_for_each_segment() expansion, in the hope that Jens will make that
>> one look better.
> 
> I did take a quick look, pretty obviously bvec_iter_bvec() which makes
> it horrible, which came from Kent's immutable work quite a while ago.
> Not sure yet what to do about it, will spend some time on this next
> week.

Maybe something like this, totally untested...

diff --git a/include/linux/bvec.h b/include/linux/bvec.h
index f41c7f0ef91e..9ccccddadde2 100644
--- a/include/linux/bvec.h
+++ b/include/linux/bvec.h
@@ -130,12 +130,15 @@ struct bvec_iter_all {
 	(mp_bvec_iter_page((bvec), (iter)) +			\
 	 mp_bvec_iter_page_idx((bvec), (iter)))
 
-#define bvec_iter_bvec(bvec, iter)				\
-((struct bio_vec) {						\
-	.bv_page	= bvec_iter_page((bvec), (iter)),	\
-	.bv_len		= bvec_iter_len((bvec), (iter)),	\
-	.bv_offset	= bvec_iter_offset((bvec), (iter)),	\
-})
+static inline struct bio_vec bvec_iter_bvec(struct bio_vec *bv,
+					    struct bvec_iter iter)
+{
+	return (struct bio_vec) {
+		.bv_page	= bvec_iter_page(bv, iter),
+		.bv_len		= bvec_iter_len(bv, iter),
+		.bv_offset	= bvec_iter_offset(bv, iter)
+	};
+}
 
 static inline bool bvec_iter_advance(const struct bio_vec *bv,
 		struct bvec_iter *iter, unsigned bytes)
 
-- 
Jens Axboe


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ