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: <Zv2DEHipdoUoeyp-@x1>
Date: Wed, 2 Oct 2024 14:29:52 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Kuan-Wei Chiu <visitorckw@...il.com>
Cc: Ingo Molnar <mingo@...nel.org>, Jiri Olsa <jolsa@...nel.org>,
	Namhyung Kim <namhyung@...nel.org>, Ian Rogers <irogers@...gle.com>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Kan Liang <kan.liang@...ux.intel.com>, linux-kernel@...r.kernel.org,
	linux-perf-users@...r.kernel.org,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 0/2] check_headers.sh with hunk exceptions
 (lib/list_sort.c tools/ copy)

On Thu, Oct 03, 2024 at 01:21:02AM +0800, Kuan-Wei Chiu wrote:
> On Mon, Sep 30, 2024 at 05:21:34PM -0300, Arnaldo Carvalho de Melo wrote:
> > From: Arnaldo Carvalho de Melo <acme@...hat.com>
> > 	Please take a look, as per tools/include/uapi/README we carry
> > copies of kernel files for various reasons and check when it drifts, in
> > this case we need another way to accept diffs while checking, its all
> > spelled out in the individual patches, please ack.

> > Arnaldo Carvalho de Melo (2):
> >   tools check_headers.sh: Add check variant that excludes some hunks
> >   perf tools: Cope with differences for lib/list_sort.c copy from the kernel

> LGTM. For the series:
 
> Acked-by: Kuan-Wei Chiu <visitorckw@...il.com>

Adding it to that cset before pushing to the written in stone
perf-tools/perf-tools branch.
 
> While reviewing the patches, I noticed that there was already a
> difference between lib/list_sort.c and tools/lib/list_sort.c regarding
> an additional #include <linux/bug.h>. This prompted me to investigate
> the reason for this discrepancy. From what I can see, both files only
> seem to require only three headers:

> #include <linux/compiler.h> /* for likely() macro */
> #include <linux/export.h> /* for EXPORT_SYMBOL() macro */
> #include <linux/list_sort.h> /* for list_sort() and linux/types.h */
 
> I'll check the git history and run build tests to confirm. If only
> these headers are needed, I'll submit a cleanup patch.

tools/ is a sidecar or sorts for the kernel, that tries to add value to
kernel developers while not getting in their way.

Sometimes things we discover while using more widely things that were
designed for use in the kernel source may be of help to kernel
developers, if this is one such case, great!

But IIRC that linux/bug.h discrepancy, without further checking, was
something already somehow accepted via:

+check lib/list_sort.c                '-I "^#include <linux/bug.h>"'

in the cset that introduced the copy:

  92ec3cc94c2cb60d ("tools lib: Adopt list_sort() from the kernel sources")

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ