From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1FDBC7EE2E for ; Thu, 1 Jun 2023 20:48:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232390AbjFAUsq (ORCPT ); Thu, 1 Jun 2023 16:48:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232583AbjFAUso (ORCPT ); Thu, 1 Jun 2023 16:48:44 -0400 Received: from mail-oo1-xc34.google.com (mail-oo1-xc34.google.com [IPv6:2607:f8b0:4864:20::c34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91DD819F for ; Thu, 1 Jun 2023 13:48:42 -0700 (PDT) Received: by mail-oo1-xc34.google.com with SMTP id 006d021491bc7-557d1360112so862535eaf.3 for ; Thu, 01 Jun 2023 13:48:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1685652522; x=1688244522; 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=ELf/zkRePONHTGzrk/i/VUoCMd1oMZvqTvJnqJDJ1xI=; b=UffwDji+JYy1TTchdaMJV/zMDfuEESReFBA49XtmWleQqqOWKTi76DzgK0hZQ0mWRH 4C+xrzIygr4GSk9OwqIY0YouY5NNplcq7kLTmVsh9ZmkqD9E486OPZ55zzR/HvdDwgpp llFDNlueaByPFd27TEhM4fbPc8yv08qZtgY6k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685652522; x=1688244522; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ELf/zkRePONHTGzrk/i/VUoCMd1oMZvqTvJnqJDJ1xI=; b=B/069BzwAm3CgpnJegcf3lJYC0b5KKg7CLI+qPE0TUVwjTVw/dd4P0A//n8pUjBgD3 usVbF+kCvO1HqcdLhsbx+d2lI+0J6ooWkfley490thwjW6jspDKqCVJCXL9JHFQuE5Lp HWZrud0ymJINK7uleGevOzXJg42aUysj0UOzp353/+jZnJLPTAD5IobIdCKL8v/m/Hop +j7E/nyJFWMlBsxHxW2yp7v8cjg0rco6lhhEvtAQ62VwvwvQjW8qmkZgbfx+Tr9GjWzS Tr1Ca9ub+WV2Lw4vahCACuklWm3SjdKo5AWv1dyiuS5Hs1wX/KuS/sE7LuIP8jHeujOW /CxA== X-Gm-Message-State: AC+VfDyXevftOeJ1r+tSyyRIaaKZWupa8NdwIPwbkJKRo+putcO30Mtp Zxyt5ALAgD7rFRNZLxSyOqa3Quhh0hhNwziwec4DrQ== X-Google-Smtp-Source: ACHHUZ5QHgkOvg57BcOHAl/rVyRFlXZ6p1Xl7WZDqS4FGNBStWyf6S7TVkxX1Ccj4enMf94fpCtCtVCZImPHqevf7Sg= X-Received: by 2002:a4a:4585:0:b0:555:9b48:93de with SMTP id y127-20020a4a4585000000b005559b4893demr5514916ooa.5.1685652521710; Thu, 01 Jun 2023 13:48:41 -0700 (PDT) MIME-Version: 1.0 References: <20230518204549.3139044-1-enlightened@chromium.org> <1225a567-4ff5-462e-0db6-1a88a748d787@digikod.net> In-Reply-To: From: Jeff Xu Date: Thu, 1 Jun 2023 13:48:30 -0700 Message-ID: Subject: Re: [PATCH v2] lsm: adds process attribute getter for Landlock To: =?UTF-8?B?TWlja2HDq2wgU2FsYcO8bg==?= Cc: Casey Schaufler , Paul Moore , Shervin Oloumi , linux-security-module@vger.kernel.org, jorgelo@chromium.org, keescook@chromium.org, groeck@chromium.org, allenwebb@chromium.org, gnoack3000@gmail.com, areber@redhat.com, criu@openvz.org, linux-api@vger.kernel.org, jannh@google.com, brauner@kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org Hi Paul, On Wed, May 31, 2023 at 6:26=E2=80=AFAM Micka=C3=ABl Sala=C3=BCn wrote: > >>> > >>> > >> If I understand correctly: > >> 1> A new lsm syscall - lsm_get_pid_attr(): Landlock will return the > >> process's landlock sandbox status: true/false. > > > > There would have to be a new LSM_ATTR_ENFORCMENT to query. > > Each LSM could then report what, if any, value it choose to. > > I can't say whether SELinux would take advantage of this. > > I don't see that Smack would report this attribute. > > I think such returned status for LSM_ATTR_ENFORCMENT query would make > sense, but the syscall could also return -EPERM and other error codes. > > > > > >> > >> Is this a right fit for SELinux to also return the process's enforcing > >> mode ? such as enforcing/permissive. > > Paul could answer that, but I think it would be simpler to have two > different queries, something like LSM_ATTR_ENFORCMENT and > LSM_ATTR_PERMISSIVE queries. > Hi Paul, what do you think ? Could SELinux have something like this. Thanks! -Jeff