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: <20200729161938.GB2678@hirez.programming.kicks-ass.net>
Date:   Wed, 29 Jul 2020 18:19:38 +0200
From:   peterz@...radead.org
To:     Matthew Wilcox <willy@...radead.org>
Cc:     mingo@...nel.org, will@...nel.org, a.darwish@...utronix.de,
        tglx@...utronix.de, paulmck@...nel.org, bigeasy@...utronix.de,
        rostedt@...dmis.org, linux-kernel@...r.kernel.org, corbet@....net,
        davem@...emloft.net, netdev@...r.kernel.org,
        linux-doc@...r.kernel.org, viro@...iv.linux.org.uk,
        linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 2/5] seqlock: Fold seqcount_LOCKNAME_t definition

On Wed, Jul 29, 2020 at 05:33:41PM +0200, peterz@...radead.org wrote:
> On Wed, Jul 29, 2020 at 03:55:07PM +0100, Matthew Wilcox wrote:
> > On Wed, Jul 29, 2020 at 03:52:51PM +0200, Peter Zijlstra wrote:
> > > Manual repetition is boring and error prone.
> > 
> > Yes, but generated functions are hard to grep for, and I'm pretty sure
> > that kernel-doc doesn't know how to expand macros into comments that it
> > can then extract documentation from.
> > 
> > I've been thinking about how to cure this (mostly in the context
> > of page-flags.h).  I don't particularly like the C preprocessor, but
> > m4 is worse and defining our own preprocessing language seems like a
> > terrible idea.
> > 
> > So I was thinking about moving the current contents of page-flags.h
> > to include/src/page-flags.h, making linux/page-flags.h depend on
> > src/page-flags.h and run '$(CPP) -C' to generate it.  I've been a little
> > busy recently and haven't had time to do more than muse about this, but
> > I think it might make sense for some of our more heavily macro-templated
> > header files.
> 
> Use ctags and add to scripts/tags.sh.

I'll make the below into a proper patch.

---

diff --git a/scripts/tags.sh b/scripts/tags.sh
index 4e18ae5282a6..63b21881a873 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -211,6 +211,8 @@ regex_c=(
 	'/\<DEVICE_ATTR_\(RW\|RO\|WO\)(\([[:alnum:]_]\+\)/dev_attr_\2/'
 	'/\<DRIVER_ATTR_\(RW\|RO\|WO\)(\([[:alnum:]_]\+\)/driver_attr_\2/'
 	'/\<\(DEFINE\|DECLARE\)_STATIC_KEY_\(TRUE\|FALSE\)\(\|_RO\)(\([[:alnum:]_]\+\)/\4/'
+	'/^SEQCOUNT_LOCKTYPE(\([^,]*\),[[:space:]]*\([^,]*\),[^)]*)/seqcount_\2_t/'
+	'/^SEQCOUNT_LOCKTYPE(\([^,]*\),[[:space:]]*\([^,]*\),[^)]*)/seqcount_\2_init/'
 )
 regex_kconfig=(
 	'/^[[:blank:]]*\(menu\|\)config[[:blank:]]\+\([[:alnum:]_]\+\)/\2/'

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ