Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4825674iob; Mon, 9 May 2022 02:31:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbB6rG54In51SBt3VhX+wSY3sT5mBoGuPxEHp4r97fCA68d13Z+OG5iiDEsWat0z42IV9a X-Received: by 2002:a17:90a:d715:b0:1d9:b55b:9a16 with SMTP id y21-20020a17090ad71500b001d9b55b9a16mr25393086pju.93.1652088675404; Mon, 09 May 2022 02:31:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652088675; cv=none; d=google.com; s=arc-20160816; b=w1LJiOOWKBF4eQ5K6sOdHNAh4D2mm64HgaDYoFSN6mftdSrbwkFqZv9v2D61adOzVk fzLkIlKiuUBNTFWrQ4jHcxQiIkvg+Aw7h2qgCZ5jBKcDAeZNlVxzy3/DO0XfNTAc0edV HP9x98MGGbHmTh/WyjmTM7d2xRA9aIC+SorGl7pBHaTmDO8JBTDnjvPPTeSLWYNfLbQa AKWFfWeRxDS6JWF2GbUupscc0SFvde98Un+xXNU9EImubrtQXVXdpRhAQBptjw3X3ZlT 7mPXj/SP22mBBTTqK/phblmi98MAp+jozMus0e2pgi3KsTo/w8dXZVwW8Lo8CDgVa6h0 nQnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=6KUqQF1hYwLVbFgt0lUUk/atcIlDD76wICPoFxoA1sk=; b=BgtkFi3WvoE7cPiqS2YKFsfYY8FIcXRl7Jq8jgvgXTVJRt9PXcrOH6vuUQdkGjWZ6K 1Zv9jnC0NIBHRCKEN2zh3ExOfAKcOPiwftPrS1ZdMT3k/UO33V3vI2QEKzsIA4LIqxcb lDHMTp41vlmnTm+p7RCdvb2id+ra3bbvtO2+Vvm1jjM0P9U6t2xxX6JF4TwHoa1ZtR1f dORGG5RN8B+GY3FDSPLaUyK593D9FNUk8QLG+dCKPdGYasPPvheiVJv6LyYoS7vyI3y2 P41v527YPzAjHCu0D/PA/csuI2X999tenXP6xFFb5CqeJmKk7NWxSx/v4fqDKSDCC2Ka +YaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fmVzt12U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id fa14-20020a17090af0ce00b001ce45fbb2f6si18052081pjb.180.2022.05.09.02.31.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 02:31:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fmVzt12U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6FFD71CD248; Mon, 9 May 2022 02:19:07 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382730AbiEERiB (ORCPT + 99 others); Thu, 5 May 2022 13:38:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382712AbiEERh6 (ORCPT ); Thu, 5 May 2022 13:37:58 -0400 Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A2CC54FB2; Thu, 5 May 2022 10:34:18 -0700 (PDT) Received: by mail-qt1-x82e.google.com with SMTP id x9so3691897qts.6; Thu, 05 May 2022 10:34:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6KUqQF1hYwLVbFgt0lUUk/atcIlDD76wICPoFxoA1sk=; b=fmVzt12UYi3gO1EmHrkXXLuqKTTb1ONpD6CjZXnHDx/+PI0UP23KcnMH796cgm1TgC PalvAa6gvkldEikr9RpUPKLFvCx7gUDHLc1VrhSfzdbUBrTqFxYV55HhKnZJbwXTe3Hd cedB4Q0BHJk8CKnB3H8UWaQ7P81WT/OK9/lo/Hh+17p+yh12pbebeZGHQ9MhL0yORmqf 0p9Sy8bQbRl0FaJtaXd507TO0ugYAvYJ08NAUM6zKqh0G2F7cilb/Wud8lQggsSbo9ev yEh0NNRoY6fvJ6PuKwZuVzVBjJMcvNykLxeS+ia6kFnRSslrD4DzE3IJbQxcc1GfJreb /yLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6KUqQF1hYwLVbFgt0lUUk/atcIlDD76wICPoFxoA1sk=; b=N6jhiS7d7DvfdYoyuMnR2gI/kUiyLZvQ7M3MmdqTTurlePgfKtSDVC0OR8fK+luzbx B5ZzZ5pgz4E2+FUTrKed8O8GIbarsr6W+o8TFUVmYUzVOX1EjP41YsIz35/xe/ApPXnh 30f04bhyQzfSgV9J2rMQwtxh1fupjeuBLPMSF21VguseTkJtmtYcMxE1gBHCkReiHKRF A52aHVP4/vx/u61oF7/JCwuEgGbYZoErmBuOZpC6gyP+oMC4kE+og87AthP+ttXxDz/h h/ylAKQ5CE2PnxDvwUa6GZ2zOsSrAy3C3pum6hKN3+ZCvD/oH3WhIiwpYUnrKhDV2CUb 2YLA== X-Gm-Message-State: AOAM533OatgzMH5iiLCKA6CbfrhHTrRc46+9OiQv/gqCYM9elt9Y0kbg F4Go9imh7YcOsBEFpJuhhr158TCACOmlXNh5o/a+/J6bVFt5IA== X-Received: by 2002:a05:622a:1052:b0:2f3:c085:6316 with SMTP id f18-20020a05622a105200b002f3c0856316mr2476847qte.2.1651772057529; Thu, 05 May 2022 10:34:17 -0700 (PDT) MIME-Version: 1.0 References: <17660b3f2817e5c0a19d1e9e5d40b53ff4561845.1651174324.git.rgb@redhat.com> <20220505144456.nw6slyqw4pjizl5p@quack3.lan> In-Reply-To: <20220505144456.nw6slyqw4pjizl5p@quack3.lan> From: Amir Goldstein Date: Thu, 5 May 2022 20:34:06 +0300 Message-ID: Subject: Re: [PATCH v2 2/3] fanotify: define struct members to hold response decision context To: Jan Kara Cc: Richard Guy Briggs , Paul Moore , Linux-Audit Mailing List , LKML , linux-fsdevel , Eric Paris , Steve Grubb Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 > One open question I have is what should the kernel do with 'info_type' in > response it does not understand (in the future when there are possibly more > different info types). It could just skip it because this should be just > additional info for introspection (the only mandatory part is in > fanotify_response, however it could surprise userspace that passed info is > just getting ignored. To solve this we would have to somewhere report > supported info types (maybe in fanotify fdinfo in proc). I guess we'll > cross that bridge when we get to it. > > Amir, what do you think? Regardless if and how we provide a way to enumerate supported info types, I would prefer to reject (EINVAL) unknown info types. We can provide a command FAN_RESPONSE_TEST to write a test response with FAN_NOFD and some extra info so the program can test if certain info types are supported. Thanks, Amir.