Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1941501rdb; Thu, 7 Dec 2023 13:12:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IEEcmDg6N87F/BY1/GgPR6D7k1q4n/m4sZJLMfznOdAcjqPhDYMYOA/vRqVJLTC8WiKV42r X-Received: by 2002:a05:6a20:258a:b0:18f:97c:8a31 with SMTP id k10-20020a056a20258a00b0018f097c8a31mr3751231pzd.92.1701983520938; Thu, 07 Dec 2023 13:12:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701983520; cv=none; d=google.com; s=arc-20160816; b=mD2cVxpbgHkcb+fKwEnwnQSYmv//7ifwuPqDzi5998CroESSYTPGIWE/GfPkA0bpEi U1mLHDnPlM3C2SbO5iuvbBE9q0iYKVP/+MInOP3TEl7DvwuJY5sPcGdyyVkOWoqPCYrE 75F5EK+n5mLutq6q2W7YDefCPXqx8XOCyVbt8urVfISHOeu4LMU9iIpYYRI2uT1Otgf8 8YHWl3z0SRt2y8+d4Vo4q7xoZ70NlNVthki9p0nsvafeG2UJaTabL4QMbBav3fhfPvIs m5dKJGk+YU6/wkvPFW3OGu38Tv6SXqgIPYdojNtT9mafBxEOo76AwsXY8oSY/kZzShNi 0oFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version :references:in-reply-to:cc:to:subject:from:dkim-signature; bh=gBBC3+RnZ4D0MUX3ZqGqN8vGIaNXSQk0kKGYcAtYiDo=; fh=4Tr33w8OpDscNYQ15C2t+yXFkK6nkqUx7ZV30tsKcuk=; b=budrcFlgyd3FFfDTRaKgGRa9nf0KzJYGEzerSYr4yOaHgjo+f53pmvCtHINYQluCz/ p5m96TknRh+GE1XaCeQ3T4ooCHHqvVOOtyUFcsVZCG32sZWOnVtduLp/Ab/P2hUmBQF6 pHP+EnrlwcieqdnmxM97BpfK19232Hr0LyY6cXX4g5gU9HzPhJjGxSXuDZrwWFgXjI14 c1m3bnSzb4y8EQukVvd+FetEnufPHjQ0ZqfEu6UOwaBt2DyHKznCu+2M/yOeNVYwkVSV W6iNuSIku+xnUXmHsuyrTIC32uYq1iXi7tLudYcuY/rEtArCQ3AGbGZR/W6K9Sn6ht1f R5aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=UDXzxEix; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id c20-20020a631c54000000b005c6607044easi283371pgm.738.2023.12.07.13.12.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 13:12:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=UDXzxEix; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id AC259804B02D; Thu, 7 Dec 2023 13:10:45 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443925AbjLGVKS (ORCPT + 99 others); Thu, 7 Dec 2023 16:10:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229671AbjLGVKO (ORCPT ); Thu, 7 Dec 2023 16:10:14 -0500 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84D44E9; Thu, 7 Dec 2023 13:10:21 -0800 (PST) Received: by mail-pj1-x102b.google.com with SMTP id 98e67ed59e1d1-286d701cabeso1403864a91.3; Thu, 07 Dec 2023 13:10:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701983421; x=1702588221; darn=vger.kernel.org; h=message-id:date:content-id:mime-version:references:in-reply-to:cc :to:subject:from:from:to:cc:subject:date:message-id:reply-to; bh=gBBC3+RnZ4D0MUX3ZqGqN8vGIaNXSQk0kKGYcAtYiDo=; b=UDXzxEixcsZP0AOw1m67vg70wH4Qj0tkkfVDXGIwGCo0fryMlyRAbM7hXdZnPEm0WQ tkZqX7+Deck3MAOnfZjw4zJGW1cfVfZSjt+voQ05wI8h2ZknXNr1FVa44uwDCX49DjBC H0Kkh1yPGpUydA+3P+X2AaIZaoQlaGTjNSE7gijegOcdwx1wQ3GEs1MU+tpBQvUlbRm2 cLwFNGd5JtXWGMr79iojT4FJtjP5rCtw5i9VE1pu09An9VibRRjPasaz+SZtO/KBZJvY LEo2Wx/6EoNSTZYQQqGd81zGjs4wX2FwmdsOrVciFeW6GgSZliuRDD0IBOSLBStmzeNa r2XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701983421; x=1702588221; h=message-id:date:content-id:mime-version:references:in-reply-to:cc :to:subject:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=gBBC3+RnZ4D0MUX3ZqGqN8vGIaNXSQk0kKGYcAtYiDo=; b=bPodEdpu95GkrV7tuTle4J1n/0zEjbRmMMw9IZuaVIY4mtGFc0hx5IVsEjPjexjeDm LGoe+hCIdJoDjZ0QO8O4RMaYT5E6lEzgo9yWz+/aZ8CuSIqeQT1FxQAGqMVHw5527hnH OOZr1dOXnjnARrYqHkSp4VLrnGwcqcB2NpklITm1zvzG0gqg5aphvbYhoQnOCCjWhsKd Dnnq7vXtjmwFsoD29gLNEGiIumm8VQUeDmTw4FJZHWq3Gy4sSu+WaXSj1UAioW19F4Ub +6fZup5yYqklhUkoUS+4T6oJXmtgx4mSG3RkZCh8WmPInZZKD/9bLf8OtVlWKPq1fd+O LH+A== X-Gm-Message-State: AOJu0YyyiOA2fOt7BvQ1AcgYwPP/EXl0kLPY7f1238P/EyIVGbGPiFRo qlPiAacF7MLh1DMG5wWEhVXb+KKYtnM= X-Received: by 2002:a17:90a:4e0f:b0:286:818c:27a2 with SMTP id n15-20020a17090a4e0f00b00286818c27a2mr3592885pjh.49.1701983420884; Thu, 07 Dec 2023 13:10:20 -0800 (PST) Received: from jromail.nowhere (h219-110-241-048.catv02.itscom.jp. [219.110.241.48]) by smtp.gmail.com with ESMTPSA id j8-20020a17090aeb0800b00286596711f1sm1852382pjz.19.2023.12.07.13.10.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 13:10:20 -0800 (PST) Received: from jro by jrotkm2 id 1rBLdS-0000Rz-2M ; Fri, 08 Dec 2023 06:10:18 +0900 From: "J. R. Okajima" Subject: Re: [PATCH] fs: Pass AT_GETATTR_NOSEC flag to getattr interface function To: Stefan Berger Cc: amir73il@gmail.com, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, linux-unionfs@vger.kernel.org, miklos@szeredi.hu, Stefan Berger , syzbot+a67fc5321ffb4b311c98@syzkaller.appspotmail.com, Alexander Viro , linux-fsdevel@vger.kernel.org, Tyler Hicks , Mimi Zohar , Christian Brauner In-Reply-To: <20231002125733.1251467-1-stefanb@linux.vnet.ibm.com> References: <20231002125733.1251467-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1733.1701983418.1@jrotkm2> Date: Fri, 08 Dec 2023 06:10:18 +0900 Message-ID: <1734.1701983418@jrotkm2> X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 07 Dec 2023 13:10:45 -0800 (PST) Stefan Berger: > When vfs_getattr_nosec() calls a filesystem's getattr interface function > then the 'nosec' should propagate into this function so that > vfs_getattr_nosec() can again be called from the filesystem's gettattr > rather than vfs_getattr(). The latter would add unnecessary security > checks that the initial vfs_getattr_nosec() call wanted to avoid. > Therefore, introduce the getattr flag GETATTR_NOSEC and allow to pass > with the new getattr_flags parameter to the getattr interface function. > In overlayfs and ecryptfs use this flag to determine which one of the > two functions to call. You are introducing two perfectly identical functions. ecryptfs_do_getattr() and ovl_do_getattr(). Why don't you provide one in a common place, such like include/linux/fs_stack.h? J. R. Okajima