Article View: org.kernel.vger.selinux-refpolicy
Article #1Re: [PATCH] selinux: support wildcard match in genfscon
From: Takaya Saeki
Date: Fri, 21 Mar 2025 09:02
Date: Fri, 21 Mar 2025 09:02
31 lines
5782 bytes
5782 bytes
On Wed, Mar 19, 2025 at 11:13 PM Inseob Kim <inseob@google.com> wrote: > > > > or introducing a new syntax that does > > > wildcard full match such as `genfsconwildcard`? > > > > That seems pretty awful to me too. > > > > If you can't be bothered to actually update the policy as you should > > be doing when enabling a new policy capability, add the same hack you > > were proposing for the kernel to the compiler/linker toolchain and > > just start adding the '*' wildcard at the end of the paths. > > I think adding a new syntax is cleaner than adding a knob or breaking the > compatibility. On Android, property_contexts introduced a new syntax adding > '<prefix|exact> <type>' at the end of the entries. How about a syntax like > 'genfs sysfs /devices/*/wakeup/ u:object_r:wakeup:s0 wildcard'? If an entry > have 'wildcard' at the end, it's a new type of entry. Entries without wildcard > are not affected. > > -- > Inseob Kim | Software Engineer | inseob@google.com I and Inseob synced offline and I let him know we have newer v2 and v3 patches. While we might discuss backward-compatibility efforts for user-space libselinux, we settled down the design in the kernel space.
Technical Details
Message-ID:
<CAH9xa6dAw_EVJ=78LTaCUdUSiJX7q5N60y4oMFOtMsugZZSocg@mail.gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf9.newsdeef.eu!nntp.lore.kernel.org!not-for-mailReferences:
<CAHC9VhSVpDDGW7rKVCYiOtgq71yfXRWDWegyEx3Zp-BoS9dj5A@mail.gmail.com> <20250319141328.3931393-1-inseob@google.com>Show Full Headers
Complete Article Headers
Message-ID: <CAH9xa6dAw_EVJ=78LTaCUdUSiJX7q5N60y4oMFOtMsugZZSocg@mail.gmail.com>
Subject: Re: [PATCH] selinux: support wildcard match in genfscon
Date: Fri, 21 Mar 2025 18:02:19 +0900
From: Takaya Saeki <takayas@chromium.org>
References: <CAHC9VhSVpDDGW7rKVCYiOtgq71yfXRWDWegyEx3Zp-BoS9dj5A@mail.gmail.com> <20250319141328.3931393-1-inseob@google.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf9.newsdeef.eu!nntp.lore.kernel.org!not-for-mail
Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 34822111AD
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.41
ARC-Seal: ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1742547754; cv=none; b=sfQZa8r7rJ73VyVOP/5GSs9oCLxJYYvQ7FFdq2+MDePJWSOytOIHCWqUhVBzkoVKUeCrqgNVWvH9Ju+RaJnDvXqVyKRqhEImyKb7JJqUZUeICzVWrZi/cYg2B5y0All9U0WZBEzxHzxwvEFTCSpEnObIGz1uBOq/d+7Rr+m90EU=
ARC-Message-Signature: ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1742547754; c=relaxed/simple;
bh=jv8dMAPFcWGYlJPrgsLh91mYREX5ZpUyUOBYh5Cl5s0=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=syItUZq9cRRBnBaXNRyFZFAt0lMXcgzXlGiDLvYKnPQ9LTGwDY2yXr8BaA6bmy4w9ZmA0Uy2kHsFd9ng5V4ulCYWayeRpPFA0x+WUULBY64xAn4yCyGFSocUqY0MihhHJYUsfkgV9TYxADYvJIDBI20LIoC7FMls38qQDFQXTqY=
ARC-Authentication-Results: ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=Bhtpq1g8; arc=none smtp.client-ip=209.85.167.41
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Bhtpq1g8"
Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-54ad1e75f49so1503803e87.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=chromium.org; s=google; t=1742547751; x=1743152551; darn=vger.kernel.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=jv8dMAPFcWGYlJPrgsLh91mYREX5ZpUyUOBYh5Cl5s0=;
b=Bhtpq1g8pK/Jgu/liURGkTWVV1jJPjaeM1pQFyP0jrG9ZiMX5wNK6jwvzOSt7nL/TD
0VwUy1z7Nifi/TJDQHchdIQDp01xW2ILhIsK1hg0ShLV+huNyUQhHalwZzO/sItHHvSQ
tdau8Dt7CijkbtoTgU6+NvyLItYZSrBvnNqXc=
X-Forwarded-Encrypted: i=1; AJvYcCXMHJgfs0oP4pRlRmUpO304hfhcxlsq1B3csdqi2qDp6IT6G4YR8L7jKRHnnk9fdxnIhk4LV+H4Aq0fLOAp0b2T7g==@vger.kernel.org
X-Gm-Message-State: AOJu0YxlguvUJzqDTz5ah0iU81UXX2W3mu1U6XW/e/ApfJDK/w3JQytz
XKvY3nwFRzOgCxetLo/AtfEBEECV1hKreAZbSrqjzbqu74076Md2NNxYvINi0sPEgvmmE3oNsrY
M0MPKjirz/gXPSlZfovQOi0qpHeHAg6bBGB4=
X-Gm-Gg: ASbGncvvGI1qMR/09Hehg5Cb+lMY4tymgjjPpbv82u1d1AANXUzN1NfPYItcTXEsiWN
MPfhMRCqzoKKDaexyAA1hg4rJBrv29yfi4uxdpyJS7r0BciOUmmGQJVH/GSWEFDA7hlogesSy6U
eqyjNpzvhKaoX6XT6O4qnOvWb6qulJ1dxqfpf80Qgn/9Mpj2tgJkjXRT0=
X-Received: by 2002:a05:6512:3f05:b0:549:4e79:dd5f with SMTP id
2adb3069b0e04-54ad64f7da2mr986364e87.37.1742547751133; Fri, 21 Mar 2025
Precedence: bulk
X-Mailing-List: selinux-refpolicy@vger.kernel.org
List-Id: <selinux-refpolicy.vger.kernel.org>
List-Subscribe: <mailto:selinux-refpolicy+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:selinux-refpolicy+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
In-Reply-To: <20250319141328.3931393-1-inseob@google.com>
X-Gm-Features: AQ5f1JrckEJEy5Yy3RbGNtOTlmRVYQ4DNAemj9Din63M-7aMg2aFGE_1dqmhEDo
To: Inseob Kim <inseob@google.com>
Cc: paul@paul-moore.com, cgzones@googlemail.com, jeffv@google.com,
nnk@google.com, omosnace@redhat.com, selinux-refpolicy@vger.kernel.org,
selinux@vger.kernel.org, stephen.smalley.work@gmail.com, tweek@google.com,
uekawa@chromium.org
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Newsgroups: org.kernel.vger.selinux-refpolicy,org.kernel.vger.selinux