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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 28 Oct 2020 14:26:12 +1100 (AEDT) From: Finn Thain <fthain@...egraphics.com.au> To: Tom Rix <trix@...hat.com> cc: linux-kernel@...r.kernel.org, clang-built-linux@...glegroups.com, linux-pm@...r.kernel.org, linux-crypto@...r.kernel.org, qat-linux@...el.com, amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org, linux-iio@...r.kernel.org, linux-rdma@...r.kernel.org, linux-mmc@...r.kernel.org, netdev@...r.kernel.org, linux-mediatek@...ts.infradead.org, linux-amlogic@...ts.infradead.org, linux-stm32@...md-mailman.stormreply.com, linux-rtc@...r.kernel.org, linux-scsi@...r.kernel.org, linux-aspeed@...ts.ozlabs.org, linux-samsung-soc@...r.kernel.org, linux-btrfs@...r.kernel.org, linux-nfs@...r.kernel.org, tipc-discussion@...ts.sourceforge.net, alsa-devel@...a-project.org, linux-rpi-kernel@...ts.infradead.org, linux-tegra@...r.kernel.org Subject: Re: [RFC] clang tooling cleanups On Tue, 27 Oct 2020, trix@...hat.com wrote: > This rfc will describe > An upcoming treewide cleanup. > How clang tooling was used to programatically do the clean up. > Solicit opinions on how to generally use clang tooling. > This tooling is very impressive. It makes possible an idea that I had a while ago, to help make code review more efficient. It works like this. Suppose a patch, p, is the difference between the new tree, n, and the old tree, o. That is, p = n - o. Now let clang-tidy be the transformation 't'. This gets you a much more readable patch submission, P = t(n) - t(o). The only difficulty is that, if I submit P intead of p then 'git am' will probably reject it. This is solved by a little tooling around git, such that, should a patch P fail to apply, the relevant files are automatically reformatted with the officially endorsed transformation t, to generate a minimal cleanup patch, such that P can be automatically applied on top. If the patch submission process required* that every patch submission was generated like P and not like p, it would immediately eliminate all clean-up patches from the workload of all reviewers, and also make the reviewers' job easier because all submissions are now formatted correctly, and also avoid time lost to round-trips, such as, "you can have a reviewed-by if you respin to fix some minor style issues". * Enforcing this, e.g. with checkpatch, is slightly more complicated, but it works the same way: generate a minimal cleanup patch for the relevant files, apply the patch-to-be-submitted, and finally confirm that the modified files are unchanged under t.
Powered by blists - more mailing lists