[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aS2lBui4JSe3uI3m@tycho.pizza>
Date: Mon, 1 Dec 2025 07:24:06 -0700
From: Tycho Andersen <tycho@...nel.org>
To: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@...onical.com>
Cc: kees@...nel.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, Andy Lutomirski <luto@...capital.net>,
Will Drewry <wad@...omium.org>, Jonathan Corbet <corbet@....net>,
Shuah Khan <shuah@...nel.org>, Andrei Vagin <avagin@...il.com>,
Christian Brauner <brauner@...nel.org>,
Stéphane Graber <stgraber@...raber.org>
Subject: Re: [PATCH v1 2/6] seccomp: prepare seccomp_run_filters() to support
more than one listener
On Mon, Dec 01, 2025 at 01:23:59PM +0100, Alexander Mikhalitsyn wrote:
> +/**
> + * struct seccomp_filter_matches - container for seccomp filter match results
> + *
> + * @n: A number of filters matched.
> + * @filters: An array of (struct seccomp_filter) pointers.
> + * Holds pointers to filters that matched during evaluation.
> + * A first one in the array is the one with the least permissive
> + * action result.
> + *
> + * If final action result is less (or more) permissive than SECCOMP_RET_USER_NOTIF,
> + * only the most restrictive filter is stored in the array's first element.
> + * If final action result is SECCOMP_RET_USER_NOTIF, we need to track
> + * all filters that resulted in the same action to support multiple listeners
> + * in seccomp tree.
> + */
> +struct seccomp_filter_matches {
> + unsigned char n;
> + struct seccomp_filter *filters[MAX_LISTENERS_PER_PATH];
Maybe a __counted_by() for this?
Tycho
Powered by blists - more mailing lists