[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251218101113.GM3707891@noisy.programming.kicks-ass.net>
Date: Thu, 18 Dec 2025 11:11:13 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: mingo@...hat.com, acme@...nel.org, namhyung@...nel.org,
linux-kernel@...r.kernel.org, Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
James Clark <james.clark@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>,
Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>, linux-perf-users@...r.kernel.org
Subject: Re: [PATCH] perf/x86/uncore: clean up const mismatch
On Thu, Dec 18, 2025 at 10:59:25AM +0100, Greg Kroah-Hartman wrote:
> On Thu, Dec 18, 2025 at 09:55:51AM +0100, Peter Zijlstra wrote:
> > On Wed, Dec 17, 2025 at 01:42:41PM +0100, Greg Kroah-Hartman wrote:
> > > In some cmp functions, a const pointer is cast out to a non-const
> > > pointer by using container_of() which is not correct. Fix this up by
> > > properly marking the pointers as const, which preserves the correct
> > > type of the pointer passed into the functions.
> >
> > How did you find this? My builds do not complain and all that.
>
> I have a local change that turns container_of() into container_of_const():
> https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/commit/?h=container_of_const_mess&id=ea8cab3db2b5a56c5ef63d0e32accce58eb9bb2c
> that I'm using to sweep the tree and fix up all of the places we have
> gotten this wrong. And wow, have we gotten it wrong in so many
> places...
>
> It's a slow grind, I'll get there eventually and then will merge a patch
> that forces container_of() to catch this type of thing so it will not
> come back in the future. Maybe a year or so, no real rush :)
OK, meanwhile I'll see this patch is merged :-)
Powered by blists - more mailing lists