From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 89D8A3161A1 for ; Wed, 18 Feb 2026 12:36:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=170.10.129.124 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771418195; cv=pass; b=PNkREu/BKgQ2UJiQEfI1SRFvsmDng6VpGvnnsCI37CV733pNZwho9BdDY7h1JljVek29tKbbjIB1WCRbj9tRohVgqMI2Yj33qrWUzj7D8UIKtmrWw5MjRVAAZEz60tp21SwTYpYCb2aWRzz8uc2+feihxP5Manu9jXheHO1AEWQ= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771418195; c=relaxed/simple; bh=0fG8sI+zWvMFlOr7IghYSSJ1KnweFDqAywl+kGXxNz4=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=XAe4QZ4AcB0hjdnvDmILi9M0gYWebsfMzGhi2paMHQV89/La0ZU9pXpVyYUzVPo2PngJaYzdKZ3Ec42SVKp3iaMsjpuxh91Non1v6JNy2gN6DqE4mqmnRq6CIRdmEW3HhENUuLoF2k7Kbk8KsGo9bto4mQctVKnrmcXDIJ6au5w= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=R3dIbMAd; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=FOPvrSFF; arc=pass smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="R3dIbMAd"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="FOPvrSFF" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1771418193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/lUydylowWncnRbTO/OJoTPHGFixcaTcELf8O4xesYA=; b=R3dIbMAdE1WDrVuzn8p7w4oEVLiUat2W5aWGrBr59Aa+aEK9/DIe3HoeOVVDLKrWC/rufG L0zr6XAzzq9N+XPVplX8QxlTHZShIFaYF6/R6r8r9C+vzOeipaKyq+FTEMrHhCoVzNoLpv OCrEyu3cEV8pn5VjI3bJ5sSLv1Pzn1w= Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-193-mbTI2lpLN5Sr175K00qi1Q-1; Wed, 18 Feb 2026 07:36:32 -0500 X-MC-Unique: mbTI2lpLN5Sr175K00qi1Q-1 X-Mimecast-MFC-AGG-ID: mbTI2lpLN5Sr175K00qi1Q_1771418191 Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-2aad5fc5b2fso57314395ad.1 for ; Wed, 18 Feb 2026 04:36:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1771418191; cv=none; d=google.com; s=arc-20240605; b=YfOowT45cQax5mlqokThxFnD/wULWxEko/QYIiBg+wCmQ5B4HDy+zjuHB+aj+soreH ORV8+6zinLTF3XlsQVmoOdfxu3UKEHmBI7dw8RDvn2iFDel9UjWz7CA4Su9GyJ/zGzfD Jb8kY1yRIF/ihc2cGGD0B8QK8kfCDzT3y76RcvwYp2OtVw3w3yMQoab++xIFbgPu0MzQ FQd125ymxbZlmN3QgQUrnMHYJWWqYlG9NLRfSrAva0BfYVbV78ggfgyOG6U5smrORJUJ WTj4SqOy3/9s8Jr4bspgzDF9k8IOPFGq4amVisp9zjwATfuZsl4A2FiV5TG3uQOVOliI UnZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=/lUydylowWncnRbTO/OJoTPHGFixcaTcELf8O4xesYA=; fh=y89giqOePMIOP4kLtqrPRlGlDaOUYmn9nftbG3MwWPs=; b=ZVgs0sD2VhQdW/2/Zfr7FpuvrLJrrhyXdMkBjsexMuus7Xvg/JRlxV0k0JL9jaW+bY HFmY8l7ZqB0UzH5hkOYpkrYgyBiUi9oZCPWohI1E9oV9K3xfstiL4waQ7Gci3ERnhlwu aCyFHHC/Dlj2gMomZI9TBbbFbM4+9ntuM4qQo4NW6J2nW7dRxN1Gft+clHUOu8Veswrc 4dNPJzq6NOXpZSEh7J/11/rEjyLwommfnE1/H0LUKSAjbr6TW9RWxLt492fYwTm8Jyw8 Y33RybFmep94ZnsGKps6EijuxhFZ5DILeM6ipBl0tHuL4AXJi+/IxzIcEoKVl3lT/CFl SMaw==; darn=vger.kernel.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1771418191; x=1772022991; 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=/lUydylowWncnRbTO/OJoTPHGFixcaTcELf8O4xesYA=; b=FOPvrSFF8bzz1Ja+OiZEv+rXfuVir/toA3cAmiieNqo1OgDIlCdscjGZKV9DnluXtT KkRkT8Weg1vgmFhTagcYY17mLgRXBP9mSyHuycCDkasVyh19FUeqnLhylWRGjtPF0tGA ypszko3iyjVMYLOBQQ4Mz6ivTUatho5zNWtgIV6tt8KtsXvnSzs+J4mZ339oqLLrGxr+ 4fwW3AO+5aAy/9uVXbMtxXpW4eHuyg3YVlmOGPY/vM/tiiQWfGhLQnLiGKwjhIPYI/+R YWS6P4d8e+TUc1LT/enVZuHOFv7JnOZHXoz4zlpj6ygw82Q9Iy7wUqoR0j244cUxr7cE Nvng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771418191; x=1772022991; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=/lUydylowWncnRbTO/OJoTPHGFixcaTcELf8O4xesYA=; b=inYoMaziVcSo87SF29SlrZy5E94/gSxm3swFYwKXwcjAVafDAW8RLBN8QGNh7EzmC6 yx4VI+9DRXR4PZpFz8GmILWGLQD64zo2b99HUKfoAGKSCKgjI5ahB3FFpX0jDOU5SAHj xUcsl7v0XgRcaeSZmIaCmhKNtHtH9i7MuHO24fCihVbc7qpvaSqmnjfzBB4ZuIkhdW4S v56Jltyp4SJeW8HTh5wrJ7ZM3LHGkud/NkQPofmxPBLCgxq65II2dH7HAhJfrw7dYzx2 eS5T8pN5wNrnOF5ghfRzyFe/b4A71GgB3P0GakedgsgUOpjrSOBDw/Kb98lUHWzzDURi V2OA== X-Forwarded-Encrypted: i=1; AJvYcCWl8eHTadTqFAtib3BYtHLWOw+WdtVnPuOMLhjXs3r8AXiKvrSBaD8RsplS76NKHUEfuFbqA7NNE3bPYbU=@vger.kernel.org X-Gm-Message-State: AOJu0YxX/SlAd8owXJrbk1TPO63m5V9I1FYTdyM+7ZIkrkOozqQcfH83 I4kG6phhLTiEt6oSfXUbJLUvXqtUbBvH/QbWDu39Squi9s50KLI1Ad0ZmZLW8N4y3ssXykiMNpi Cs0p5mO8td18KESP7kX2Qs3y/PU7HG+ESJneqKmCPQNofyxu8tw5zsJseWGlAKZX9wl0xzyb5Ng xWrzHobvxNyvaA0YatiBchSQaa2KZbEfDySqMPKqdo X-Gm-Gg: AZuq6aKcHa2az9yPxZv5+NRIzv0uG4njZtVb33rdfGkxrsBWEZmhuGdixhZW4c8Z/sd mjxJCzYtS5LrUArTxut3b6ibjsYg8GiVk7O4BFKsa7hcGDYyPGGc6Pz3qjyRi/3ajw8t3HpaFwg Q4B8RcbQ6ub85I4eMLJi2JuQ3ecYFcmG45r/ttuxuOBPz2G0QGEksBIJnEKdTk/F4povviBF0MU AN9 X-Received: by 2002:a17:903:1a10:b0:29d:a26c:34b6 with SMTP id d9443c01a7336-2ad50fbc316mr16329955ad.50.1771418191223; Wed, 18 Feb 2026 04:36:31 -0800 (PST) X-Received: by 2002:a17:903:1a10:b0:29d:a26c:34b6 with SMTP id d9443c01a7336-2ad50fbc316mr16329765ad.50.1771418190809; Wed, 18 Feb 2026 04:36:30 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20260216150625.793013-1-omosnace@redhat.com> In-Reply-To: From: Ondrej Mosnacek Date: Wed, 18 Feb 2026 13:36:18 +0100 X-Gm-Features: AaiRm51HYWR6w0-EcsphJc410XncNKnjGKv9rOIgL6E3XvZhdcve7uAr9h1HcsM Message-ID: Subject: Re: [PATCH 0/2] fanotify: avid some premature LSM checks To: Jan Kara Cc: Amir Goldstein , Matthew Bobrowski , linux-fsdevel@vger.kernel.org, linux-security-module@vger.kernel.org, selinux@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Feb 17, 2026 at 12:09=E2=80=AFPM Jan Kara wrote: > > On Mon 16-02-26 16:06:23, Ondrej Mosnacek wrote: > > Restructure some of the validity and security checks in > > fs/notify/fanotify/fanotify_user.c to avoid generating LSM access > > denials in the audit log where hey shouldn't be. > > > > Ondrej Mosnacek (2): > > fanotify: avoid/silence premature LSM capability checks > > fanotify: call fanotify_events_supported() before path_permission() > > and security_path_notify() > > > > fs/notify/fanotify/fanotify_user.c | 50 ++++++++++++++---------------- > > 1 file changed, 23 insertions(+), 27 deletions(-) > > The series looks good to me as well. Thanks! I'll commit the series to my > tree once the merge window closes and fixup the comment formatting on > commit. No need to resend. Great, thanks! --=20 Ondrej Mosnacek Senior Software Engineer, Linux Security - SELinux kernel Red Hat, Inc.