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: <20251016004640.GB2948@system.software.com>
Date: Thu, 16 Oct 2025 09:46:40 +0900
From: Byungchul Park <byungchul@...com>
To: Arnd Bergmann <arnd@...db.de>
Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org, kernel_team@...ynix.com,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Damien Le Moal <damien.lemoal@...nsource.wdc.com>,
	linux-ide@...r.kernel.org,
	Andreas Dilger <adilger.kernel@...ger.ca>,
	linux-ext4@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Will Deacon <will@...nel.org>, Thomas Gleixner <tglx@...utronix.de>,
	Steven Rostedt <rostedt@...dmis.org>,
	Joel Fernandes <joel@...lfernandes.org>,
	Sasha Levin <sashal@...nel.org>,
	Daniel Vetter <daniel.vetter@...ll.ch>, duyuyang@...il.com,
	Johannes Berg <johannes.berg@...el.com>, Tejun Heo <tj@...nel.org>,
	Theodore Ts'o <tytso@....edu>, Matthew Wilcox <willy@...radead.org>,
	Dave Chinner <david@...morbit.com>,
	Amir Goldstein <amir73il@...il.com>, kernel-team@....com,
	linux-mm@...ck.org, Andrew Morton <akpm@...ux-foundation.org>,
	Michal Hocko <mhocko@...nel.org>, Minchan Kim <minchan@...nel.org>,
	Johannes Weiner <hannes@...xchg.org>, vdavydov.dev@...il.com,
	SeongJae Park <sj@...nel.org>, jglisse@...hat.com,
	Dennis Zhou <dennis@...nel.org>, Christoph Lameter <cl@...ux.com>,
	Pekka Enberg <penberg@...nel.org>,
	David Rientjes <rientjes@...gle.com>,
	Vlastimil Babka <vbabka@...e.cz>, ngupta@...are.org,
	linux-block@...r.kernel.org, Josef Bacik <josef@...icpanda.com>,
	linux-fsdevel@...r.kernel.org, Jan Kara <jack@...e.cz>,
	Jeff Layton <jlayton@...nel.org>,
	Dan Williams <dan.j.williams@...el.com>,
	Christoph Hellwig <hch@...radead.org>,
	"Darrick J. Wong" <djwong@...nel.org>,
	dri-devel@...ts.freedesktop.org, rodrigosiqueiramelo@...il.com,
	melissa.srw@...il.com, hamohammed.sa@...il.com,
	harry.yoo@...cle.com, chris.p.wilson@...el.com,
	Gwan-gyeong Mun <gwan-gyeong.mun@...el.com>,
	max.byungchul.park@...il.com, Boqun Feng <boqun.feng@...il.com>,
	Waiman Long <longman@...hat.com>, yunseong.kim@...csson.com,
	ysk@...lloc.com, Yeoreum Yun <yeoreum.yun@....com>,
	Netdev <netdev@...r.kernel.org>,
	Matthew Brost <matthew.brost@...el.com>, her0gyugyu@...il.com,
	Jonathan Corbet <corbet@....net>,
	Catalin Marinas <catalin.marinas@....com>,
	Borislav Petkov <bp@...en8.de>,
	Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
	"H. Peter Anvin" <hpa@...or.com>, Andy Lutomirski <luto@...nel.org>,
	Sumit Semwal <sumit.semwal@...aro.org>, gustavo@...ovan.org,
	Christian König <christian.koenig@....com>,
	Andi Shyti <andi.shyti@...nel.org>,
	Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
	"Liam R. Howlett" <Liam.Howlett@...cle.com>,
	Mike Rapoport <rppt@...nel.org>,
	Suren Baghdasaryan <surenb@...gle.com>,
	Luis Chamberlain <mcgrof@...nel.org>,
	Petr Pavlu <petr.pavlu@...e.com>, da.gomez@...nel.org,
	Sami Tolvanen <samitolvanen@...gle.com>,
	"Paul E. McKenney" <paulmck@...nel.org>,
	Frederic Weisbecker <frederic@...nel.org>,
	neeraj.upadhyay@...nel.org, joelagnelf@...dia.com,
	Josh Triplett <josh@...htriplett.org>,
	"Uladzislau Rezki (Sony)" <urezki@...il.com>,
	Lai Jiangshan <jiangshanlai@...il.com>, qiang.zhang@...ux.dev,
	Juri Lelli <juri.lelli@...hat.com>,
	Vincent Guittot <vincent.guittot@...aro.org>,
	Dietmar Eggemann <dietmar.eggemann@....com>,
	Benjamin Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
	Valentin Schneider <vschneid@...hat.com>,
	Chuck Lever <chuck.lever@...cle.com>, neil@...wn.name,
	okorniev@...hat.com, Dai Ngo <Dai.Ngo@...cle.com>,
	Tom Talpey <tom@...pey.com>, trondmy@...nel.org,
	Anna Schumaker <anna@...nel.org>, Kees Cook <kees@...nel.org>,
	Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
	Clark Williams <clrkwllms@...nel.org>,
	Mark Rutland <mark.rutland@....com>, ada.coupriediaz@....com,
	kristina.martsenko@....com,
	Kefeng Wang <wangkefeng.wang@...wei.com>,
	Mark Brown <broonie@...nel.org>,
	Kevin Brodsky <kevin.brodsky@....com>,
	David Woodhouse <dwmw@...zon.co.uk>,
	Shakeel Butt <shakeel.butt@...ux.dev>,
	Alexei Starovoitov <ast@...nel.org>, Zi Yan <ziy@...dia.com>,
	Yu Zhao <yuzhao@...gle.com>,
	Baolin Wang <baolin.wang@...ux.alibaba.com>, usamaarif642@...il.com,
	joel.granados@...nel.org, Wei Yang <richard.weiyang@...il.com>,
	Geert Uytterhoeven <geert+renesas@...der.be>,
	tim.c.chen@...ux.intel.com, linux <linux@...blig.org>,
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
	lillian@...r-ark.net, Huacai Chen <chenhuacai@...nel.org>,
	francesco@...la.it, guoweikang.kernel@...il.com, link@...o.com,
	Josh Poimboeuf <jpoimboe@...nel.org>,
	Masahiro Yamada <masahiroy@...nel.org>,
	Christian Brauner <brauner@...nel.org>,
	Thomas Weißschuh <thomas.weissschuh@...utronix.de>,
	Oleg Nesterov <oleg@...hat.com>, Mateusz Guzik <mjguzik@...il.com>,
	Andrii Nakryiko <andrii@...nel.org>, wangfushuai@...du.com,
	linux-doc@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-media@...r.kernel.org, linaro-mm-sig@...ts.linaro.org,
	linux-i2c@...r.kernel.org, Linux-Arch <linux-arch@...r.kernel.org>,
	linux-modules@...r.kernel.org, rcu <rcu@...r.kernel.org>,
	linux-nfs@...r.kernel.org, linux-rt-devel@...ts.linux.dev
Subject: Re: [PATCH v17 01/47] llist: move llist_{head,node} definition to
 types.h

On Fri, Oct 03, 2025 at 01:19:33AM +0200, Arnd Bergmann wrote:
> On Thu, Oct 2, 2025, at 15:53, Mathieu Desnoyers wrote:
> > On 2025-10-02 04:24, Greg KH wrote:
> >> On Thu, Oct 02, 2025 at 05:12:01PM +0900, Byungchul Park wrote:
> >>> llist_head and llist_node can be used by some other header files.  For
> >>> example, dept for tracking dependencies uses llist in its header.  To
> >>> avoid header dependency, move them to types.h.
> >>
> >> If you need llist in your code, then include llist.h.  Don't force all
> >> types.h users to do so as there is not a dependency in types.h for
> >> llist.h.
> >>
> >> This patch shouldn't be needed as you are hiding "header dependency" for
> >> other files.
> >
> > I agree that moving this into a catch-all types.h is not what we should
> > aim for.
> >
> > However, it's a good practice to move the type declarations to a
> > separate header file, so code that only cares about type and not
> > implementation of static inline functions can include just that.
> >
> > Perhaps we can move struct llist_head and struct llist_node to a new
> > include/linux/llist_types.h instead ?
> 
> We have around a dozen types of linked lists, and the most common
> two of them are currently defined in linux/types.h, while the
> rest of them are each defined in the same header as the inteface
> definition.
> 
> Duplicating each of those headers by splitting out the trivial
> type definition doesn't quite seem right either, as we'd end
> up with even more headers that have to be included indirectly
> in each compilation unit.
> 
> Maybe a shared linux/list_types.h would work, to specifically

I found a way to resolve my issue, but I thought it's good idea
regardless of my issue and took a quick look.  However, it seems like
there's an overwhelming amount of work since it might require to replace
all the existing include <linux/types.h> for use of list things with the
new one :-).

	Byungchul

> contain all the list_head variants that are meant to be included
> in larger structures?
> 
>     Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ