Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2846725rwl; Mon, 27 Mar 2023 06:11:19 -0700 (PDT) X-Google-Smtp-Source: AK7set9D8w19ZMUKIqZscFrj/gKMSh/F0DUP6/FpuitvJuzOZkmaoNVpMyEDw7OQBsk3MiHIeFFM X-Received: by 2002:a05:6a20:4f1f:b0:d9:6079:acae with SMTP id gi31-20020a056a204f1f00b000d96079acaemr10468076pzb.46.1679922679476; Mon, 27 Mar 2023 06:11:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679922679; cv=none; d=google.com; s=arc-20160816; b=z1mABMSWO0tNl0M4KGpTGN1GeP1OVWmKlp3cEmu2G9nFvBf7jRJOz0oJfhF3gUgObF 15Rf75Ltn60q+3+u6oEmGF3SwJ+a9WuGHijs9qBlxDW1UYhsakrUEbh666lIHNf9Oivh L2/EbVOrfFIqYa8naCfE3GzQ9F6lvb4kpvIvgWRk84A4an97KKP5GqZ7WpnsNE4wJdU2 fmS1RDi7sVufM63giHwJYLef8k2U7PZEkxoYLQYEDmKBmou18Ql8J+9R6ExW4zZuVMc5 DhEKzjMhaXVnCF6GUiTrHQcRF1Cx77NnE61aPRKP70/J+boMl0PL5H4M3QzAWgDmztBa fOrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature:dkim-signature; bh=CXZqjw6DO5AjfIiN36DH9kZPxN2/wzuNoGnQ8fzH+PE=; b=vlX5k7xC0yQsiySKWO+Z8ZhGmiYiY3t45P7QRM8qdz/tejB2jJMoJy025ztTYTKW+o 2eSA5BVGvrH4bxkwZDv4Z1AMZUa5VV5v79gJ7UF4e/u6Tz0uyhtipz1VO3QG5N9WCDyN 9SW175ftSDHUkX8YQ1QoS1VdFVZgH6l7rkQIpWqnYnceHOD0zzkpRT/g5vhWttxzTg8l yz1JSbFk1GBwBDM/EooV+IfXU1NEifN+kFiPQaKe41DWXuD6rqiowybe7mgGW4GaQEmC v7BIelcEIG56ga2uR93Q9itL3bNoad8HylFJr1aFJG6gDkbJ3tRD56WKF45TOkltY7U6 09aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tycho.pizza header.s=fm1 header.b="X0//ka+U"; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b="GwrM/3jf"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j129-20020a625587000000b006280b5e8f42si16636787pfb.336.2023.03.27.06.11.07; Mon, 27 Mar 2023 06:11:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@tycho.pizza header.s=fm1 header.b="X0//ka+U"; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b="GwrM/3jf"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231960AbjC0NGu (ORCPT + 99 others); Mon, 27 Mar 2023 09:06:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231946AbjC0NGt (ORCPT ); Mon, 27 Mar 2023 09:06:49 -0400 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8268A9; Mon, 27 Mar 2023 06:06:47 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 0A9145C00B0; Mon, 27 Mar 2023 09:06:46 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 27 Mar 2023 09:06:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tycho.pizza; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1679922406; x=1680008806; bh=CX Zqjw6DO5AjfIiN36DH9kZPxN2/wzuNoGnQ8fzH+PE=; b=X0//ka+UUFa9e+F/AF ySHE0i1QCYTEEP6x8t6nEFxMHJVjQ9GQYKkGxjng95WavJb58MFtoqVOAy6dHjQ8 aN8BsoQY/ZYZFhfu5/Iu0Wxuu/YeBwoS+FEyXbaiuvtUbpJNUoBA9IeXu2MKRJ2q tE5EiV6rewGYXUs10ZKRF/jCmVsQ/JyhlbCleYDGDpxBlwlxty1wCf4EJws+rG/U MlXKJUSmyMRJDvLsuyjP9VCiYn4vQjOXB2UnW/l2Uurl6XVoWroU/V7CRP0trzUR ZOXa7gK2DQA+MDSdP7ubTxftTzAUtHYZ4aaoI74CPZO+PGKau9ahamZln2uAzSKq 9FiA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1679922406; x=1680008806; bh=CXZqjw6DO5Ajf IiN36DH9kZPxN2/wzuNoGnQ8fzH+PE=; b=GwrM/3jfGfQZ0cHOjBirDJ6tGm5IW T/N0b/3pfjpl+qrGY5X+2Qz5MWdSou9aVxzvOStqFIXt7orI8SOkaxmRKmIwDI1T 8eOApRJOunn4tAQ5TNZ7rvJ9cGjdw6evrJIs2OcHYQit5ttTbv7GFkHW4/fUECQ7 wvxsWkFJpFbauEX0FnSXKl/6D2VWxw85UA/Cq1fq978TM2v9ULmX0YBAb7Djs/bl aOyxZPFYWM/nT81JbQaWOsoyY2LAHMWLW2RYAG04WUn1H+VSuYQ3GELOZrDYsGK4 x2QLbKK4HC1efBwUZ9qfnadCGPWP4oDM0anSu0EF3Hwht8FxKL288/0gw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdehvddgheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepvfihtghh ohcutehnuggvrhhsvghnuceothihtghhohesthihtghhohdrphhiiiiirgeqnecuggftrf grthhtvghrnhepueettdetgfejfeffheffffekjeeuveeifeduleegjedutdefffetkeel hfelleetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epthihtghhohesthihtghhohdrphhiiiiirg X-ME-Proxy: Feedback-ID: i21f147d5:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 27 Mar 2023 09:06:44 -0400 (EDT) Date: Mon, 27 Mar 2023 07:06:44 -0600 From: Tycho Andersen To: Christian Brauner Cc: aloktiagi , viro@zeniv.linux.org.uk, willy@infradead.org, David.Laight@aculab.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, keescook@chromium.org, hch@infradead.org Subject: Re: [RFC v4 2/2] file, epoll: Implement do_replace() and eventpoll_replace() Message-ID: References: <20230324063422.1031181-2-aloktiagi@gmail.com> <20230324082344.xgze2vu3ds2kubcz@wittgenstein> <20230327090106.zylztuk77vble7ye@wittgenstein> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230327090106.zylztuk77vble7ye@wittgenstein> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 27, 2023 at 11:01:06AM +0200, Christian Brauner wrote: > On Fri, Mar 24, 2023 at 07:43:13AM -0600, Tycho Andersen wrote: > > Perhaps we could add a flag that people could set from SECCOMP_ADDFD > > asking for this extra behavior? > > + if (fd > 0 && addfd->ioctl_flags & SECCOMP_ADDFD_FLAG_EPOLL) { > + /* > + * - retrieve old struct file that addfd->fd refered to if any. > + * - call your epoll seccomp api to update the references in the epoll instance > + */ > epoll_seccomp_notify() > + } > + > + if (fd > 0 && addfd->ioctl_flags & SECCOMP_ADDFD_FLAG_IO_URING) { > + /* > + * - call your io_uring seccomp api to update the references in the io_uring instance > + */ > io_uring_seccomp_notify() > + } Looks reasonable to me, thanks. Tycho