From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yb1-f181.google.com (mail-yb1-f181.google.com [209.85.219.181]) (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 AC0601A83E7 for ; Mon, 27 Jan 2025 21:23:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738012999; cv=none; b=N+55+B6R9HdSobi3QiyX+bp07kNjhKS5h1ofYA01dso6xNtU6d3b/UCtK0SUP5kl1k+h59/vrpmDqYovTQkwQZZ2gCPSBA8ytiON1Acq68gsov6qW5ZZZdcwwjQGWM+Y7U84XY8ADcTrVSSjQv122w2CDokwqf7OH5NNgP+vTyw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738012999; c=relaxed/simple; bh=XAyVRpnsN3psIErJlMt7zXtv2npL60nto/i5id7ai5s=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=RpEI0hjZawWkDZsE9sA239UjzJCIG6IO1HYv26UND4AC1GSeaGsezC5kyCSDZxvrtxTeNHKCEQNI6FDsMwqbTQFPPwBsMk0r4ig31RKi9bXec08mqgVyOYsl+MuUxitNazlOSOBgMpv1ZIugygnBBZXdJqBDVndJQ8K98vZWIA8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=paul-moore.com; spf=pass smtp.mailfrom=paul-moore.com; dkim=pass (2048-bit key) header.d=paul-moore.com header.i=@paul-moore.com header.b=IL6qGAdP; arc=none smtp.client-ip=209.85.219.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=paul-moore.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=paul-moore.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=paul-moore.com header.i=@paul-moore.com header.b="IL6qGAdP" Received: by mail-yb1-f181.google.com with SMTP id 3f1490d57ef6-e5773c5901aso9681867276.1 for ; Mon, 27 Jan 2025 13:23:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore.com; s=google; t=1738012995; x=1738617795; 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=XAyVRpnsN3psIErJlMt7zXtv2npL60nto/i5id7ai5s=; b=IL6qGAdP5KtEU89F6UIipJRoq4GL+ZhA3eAAkGqA4SrDh2TYRUAF8DRvUZgaMK+4Em Vju0utuOfqEV1TK7KYxBVastQt5wpBxkkdonXc8DXT9wUvL3Cqto44Qc60CG29f+RV+9 DACf/0mKDPDIs8FdEYC1UXQOV+1d0MvgLqw4Ru5YsoWIkSPoiDHFS0EHKAk6FWeUkaB6 +JRCJR3+V7ULJ4i7DtH0Ev2VWq4XIEr80GK+hHjpsVggPeLqUblieuofzX65wZL9kksq BbEo4qE9nkXEm36GuprA9WhIeou12fGcioXTjGRlogmf4wW+5GXiTcfXx4vYU9DkUlx1 EouQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738012995; x=1738617795; 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=XAyVRpnsN3psIErJlMt7zXtv2npL60nto/i5id7ai5s=; b=DV82TY0k/7tzxHBPDTwpbxtJmb9w1pZRN8h4yR2nkpPdPTdFK3NZBueZR/rnuhAluX IPOCIjs0tVk7pBSDr7eV+8y/Y5+U3AVbcj5PXBL8seScmKhyV5dw2hbPGaRukNgs4r4t g8Z487CqGhNQqDpW3i5OIX+SJlwLDx4W6pVZwhqN1vDpdy/EvXunFMGjWQKzk4l+yxlo SxwHK2HlEmlsV+7PgbwSRuEqFIYTO+Oq+F4QBfOEuZZARXvlWQIHzgPePhy7ijy80BgE Zp+l6urxcljBAMuD0He4GBktlCUvmq10/PDCPSrUGi71ZiSNDwg/xEOwgP9DhlJjYunW JhQA== X-Forwarded-Encrypted: i=1; AJvYcCVvRc2JZmeqvG5YtjDYRILxRJgq7+x/8JZGmpVMVq04YnEzOGv+kOyS2QxT21dYrnVo+2BvnLc4VhQ9Mf0=@vger.kernel.org X-Gm-Message-State: AOJu0YzakaxpVWzCRuTxij2K0rH40bJsw4MgXqJWail75aDhM53y4s0j iYYdB0ynQ9dMMAMXitrln2hF3XrQ/vLCClJVtNxO5dRM0KZLKZoml8vgGeAivqRkBTj6uShdYeC oFgGqdu9lcUldbeO6dsI/qJ/4H6pMlDjeJsk9 X-Gm-Gg: ASbGncsU9XPmFL2MZP1K/Czfh7/PX7XhzLGEzjURQYvPv8liFg3wj6hAFnkvTo1fY9j 2dKDPHfXSO732kCl5so1uX/ga8XcGTPHwb5tTkr9X49EzzIuiKhOiApZq3Liw X-Google-Smtp-Source: AGHT+IF5t5BkdSOg4TSJrHoTqiHeMhIdCAWFpEFPilYMsqGS822/Rm3nUcgF1QsJ8yeEYre5K2r6eTgn+B9c1RFUO7c= X-Received: by 2002:a05:690c:7342:b0:6ea:88d4:fd4f with SMTP id 00721157ae682-6f7976f7cc0mr9495627b3.18.1738012995453; Mon, 27 Jan 2025 13:23:15 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20250127155723.67711-1-hamzamahfooz@linux.microsoft.com> <20250127155723.67711-2-hamzamahfooz@linux.microsoft.com> In-Reply-To: From: Paul Moore Date: Mon, 27 Jan 2025 16:23:04 -0500 X-Gm-Features: AWEUYZk_66DBXYyyXGpF3__XoAd1UXYaUgnN9Z9hxMeEkqEEj3wnGpO9yXQUN_Q Message-ID: Subject: Re: [PATCH v3 2/2] lsm,io_uring: add LSM hooks for io_uring_setup() To: Casey Schaufler Cc: Hamza Mahfooz , linux-kernel@vger.kernel.org, James Morris , "Serge E. Hallyn" , Jens Axboe , Pavel Begunkov , Stephen Smalley , Ondrej Mosnacek , =?UTF-8?Q?Bram_Bonn=C3=A9?= , =?UTF-8?Q?Thi=C3=A9baud_Weksteen?= , =?UTF-8?Q?Christian_G=C3=B6ttsche?= , Masahiro Yamada , linux-security-module@vger.kernel.org, io-uring@vger.kernel.org, selinux@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jan 27, 2025 at 12:18=E2=80=AFPM Casey Schaufler wrote: > On 1/27/2025 7:57 AM, Hamza Mahfooz wrote: > > It is desirable to allow LSM to configure accessibility to io_uring > > because it is a coarse yet very simple way to restrict access to it. So= , > > add an LSM for io_uring_allowed() to guard access to io_uring. > > I don't like this at all at all. It looks like you're putting in a hook > so that io_uring can easily deflect any responsibility for safely > interacting with LSMs. That's not how this works Casey, unless you're seeing something different? This is an additional access control point for io_uring, largely to simplify what a LSM would need to do to help control a process' access to io_uring, it does not replace any of the io_uring LSM hooks or access control points. --=20 paul-moore.com