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: <aQUOEU5Srvxvw_ye@google.com>
Date: Fri, 31 Oct 2025 12:29:21 -0700
From: Namhyung Kim <namhyung@...nel.org>
To: Ian Rogers <irogers@...gle.com>
Cc: Howard Chu <howardchu95@...il.com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Kan Liang <kan.liang@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
	linux-perf-users@...r.kernel.org
Subject: Re: [PATCH] perf trace: Increase syscall handler map size to 1024

On Fri, Oct 31, 2025 at 12:25:41PM -0700, Ian Rogers wrote:
> On Fri, Oct 31, 2025 at 12:08 PM Namhyung Kim <namhyung@...nel.org> wrote:
> >
> > On Thu, Oct 30, 2025 at 01:47:55PM -0700, Ian Rogers wrote:
> > > On Mon, Oct 13, 2025 at 1:22 PM Ian Rogers <irogers@...gle.com> wrote:
> > > >
> > > > On Thu, Aug 21, 2025 at 9:45 AM Ian Rogers <irogers@...gle.com> wrote:
> > > > >
> > > > > On Tue, May 20, 2025 at 3:14 PM Namhyung Kim <namhyung@...nel.org> wrote:
> > > > > >
> > > > > > Hi Ian,
> > > > > >
> > > > > > On Tue, May 20, 2025 at 08:05:37AM -0700, Ian Rogers wrote:
> > > > > > > On Mon, May 19, 2025 at 4:36 PM Howard Chu <howardchu95@...il.com> wrote:
> > > > > > > >
> > > > > > > > Hello Namhyung,
> > > > > > > >
> > > > > > > > On Mon, May 19, 2025 at 4:25 PM Namhyung Kim <namhyung@...nel.org> wrote:
> > > > > > > > >
> > > > > > > > > The syscalls_sys_{enter,exit} map in augmented_raw_syscalls.bpf.c has
> > > > > > > > > max entries of 512.  Usually syscall numbers are smaller than this but
> > > > > > > > > x86 has x32 ABI where syscalls start from 512.
> > > > > > > > >
> > > > > > > > > That makes trace__init_syscalls_bpf_prog_array_maps() fail in the middle
> > > > > > > > > of the loop when it accesses those keys.  As the loop iteration is not
> > > > > > > > > ordered by syscall numbers anymore, the failure can affect non-x32
> > > > > > > > > syscalls.
> > > > > > > > >
> > > > > > > > > Let's increase the map size to 1024 so that it can handle those ABIs
> > > > > > > > > too.  While most systems won't need this, increasing the size will be
> > > > > > > > > safer for potential future changes.
> > > > > > >
> > > > > > > Do we need to worry about MIPS where syscalls can be offset by 1000s?
> > > > > > > https://lore.kernel.org/lkml/8ed7dfb2-1e4d-4aa4-a04b-0397a89365d1@app.fastmail.com/
> > > > > >
> > > > > > Argh..
> > > > > >
> > > > > > > We could do with a map that combines BPF_MAP_TYPE_HASH with the tails
> > > > > > > calls of BPF_MAP_TYPE_PROG_ARRAY.
> > > > > >
> > > > > > Right, it'd complicate things but I think it's doable.
> > > > >
> > > > > Should we merge the x32 fix while waiting for the hash fix?
> > > >
> > > > Just a reminder that this is still not resolved.
> >
> > What do you mean by the x32 fix?
> 
> This patch is the x32 fix. Your commit message says:
> "Usually syscall numbers are smaller than this but x86 has x32 ABI
> where syscalls start from 512."

Oh, you meant this patch. :)

> 
> We started discussing a hash table based fix because of MIPS, etc.

Right, I'll merge this as an interim solution.

Thanks,
Namhyung


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ