Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2697216imu; Mon, 19 Nov 2018 04:49:18 -0800 (PST) X-Google-Smtp-Source: AJdET5eGOcSKOb0oms0Ma7cKhgoR1eyPqcC7vLm2jDdPqezGl1aVfuLsoVHKPpuZq3vbp52rgLFu X-Received: by 2002:a63:6445:: with SMTP id y66mr20534328pgb.250.1542631758054; Mon, 19 Nov 2018 04:49:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542631758; cv=none; d=google.com; s=arc-20160816; b=x86/5MVSokadV/yytK228gbzMVUyVgcXkxZAVFN+7aD5BdPHuukqg7iTIjxnlB4vve V4cqbRINIucRbmwdAlIVV4j0xZHaF3XZu7qRH9TOTIpqSK+zAFZw/yImmzhGDfCBhl8w 5b4o5qIBOHJ8UwgUGcZnTf+CUGdhke2+O+AvHbjOaDFk8lnlmgpqCmVc/6lR/42D+a+W WksOkFsTL/J+/2JVOkkchMWTyFmdZPvDQv6kBMGCOFO8rvX2jw8V7SahQtbrcWYb7Awk WlTREe5bn8q0X8xVlAEATKF1PuocJZxfc58+8uEFeiEJ8UaPYct0hQGLqWOn7tZb9oa9 ABNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=CzNXpwAdtR3iY+9G5RVr+vp0LqD/ot2WLW+qRGPev38=; b=uK/iBSZS2wH/Tu3kFFzH4LYt/Up91vYDjjIzfm9VChQ2PH8MxUizFUIXpo94+AiMRx AYHFVP9fY6rg3/X9TDAxfPRrdDJBOUYi0wrh9UA2yVD8mFCBk8rpWsx76FFibTk2URXH O32ytQS3yFI1bBvH+2udrKiAiFKNuVLXuN1ym3musxLkGR/tH0U9Y3i9hxgbI68Lv0yl ezgrUQaxZ3EEbjx64+LbXcL0ckAi9owZKCjuLJ3d9AjAGyXETZqnEANjGYRU3X8D86/7 TgjUQs0Y7R9w/xri9rwXU64FZrJfPYKaDHRViDycUuhXzqIK9mvdQNNMpSQS36VWf/hh 2bQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=qfSY7qTo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c5si33301714pgq.434.2018.11.19.04.49.03; Mon, 19 Nov 2018 04:49:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=qfSY7qTo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728886AbeKSXLh (ORCPT + 99 others); Mon, 19 Nov 2018 18:11:37 -0500 Received: from mail-it1-f194.google.com ([209.85.166.194]:52527 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728701AbeKSXLh (ORCPT ); Mon, 19 Nov 2018 18:11:37 -0500 Received: by mail-it1-f194.google.com with SMTP id i7so1812492iti.2 for ; Mon, 19 Nov 2018 04:48:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CzNXpwAdtR3iY+9G5RVr+vp0LqD/ot2WLW+qRGPev38=; b=qfSY7qTo0h0WfNwN2LLHPHzPsbzTOc8+h0SYADApOviZ46Swusf3iBsyvF+JofJTdZ 8EEg97VoaLM44uwMZrHOC9AW6oAcBixYUTRY5aMmbEJwNClYxHED/33xMvSyLHetiPLR 6fJzFdG6xxteVCZlmNpu4WgrKab9Mo7vbMcD8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CzNXpwAdtR3iY+9G5RVr+vp0LqD/ot2WLW+qRGPev38=; b=H0FK10eNbVkOjLPf5OFqDbiIqdlh3TXWLY5v/J5ntQm30Ym3fn8699brLNyDu4S6FV ysCH29EstfD3AhN0kGe5Po4BAmgpycRCfFrXiWF1I52tOLGKUKNrYf4TVe/3aZDtowJo 2l1vBsazSVJkLoeZUkU4MQspeLJLJMuifzyMG/9Iqt7+BTAginVs7AL/Kte4WisyJ08I 2Dk9vcyVMUrOZLA01Qucy4Vl23slrysXd7d093erYP2CLpqQFw57Vrt+sKY9tWhuWScW E4Vb+fzzMnAWCMLbzWvUA0CvwQNWI+shRcFWJpmpl42lEAfX8VWv9oeqt9QSqd5oVESS McLQ== X-Gm-Message-State: AA+aEWYZdoxoLdPENvAM+RtDi1CPWZH38uiH08lUNpMnbtPrNey+IV+N M65g7BpV+MlDk/EJJk6QxhkBwBZUjU4PzU/H0ldncw== X-Received: by 2002:a24:a08a:: with SMTP id o132mr8295536ite.1.1542631685319; Mon, 19 Nov 2018 04:48:05 -0800 (PST) MIME-Version: 1.0 References: <218e806e61cd5ae2fd38f9d546f953f86c763b58.1542149969.git.rgb@redhat.com> In-Reply-To: <218e806e61cd5ae2fd38f9d546f953f86c763b58.1542149969.git.rgb@redhat.com> From: Miklos Szeredi Date: Mon, 19 Nov 2018 13:47:53 +0100 Message-ID: Subject: Re: [RFC PATCH ghak100 V1 1/2] audit: avoid fcaps on MNT_FORCE To: Richard Guy Briggs Cc: linux-fsdevel@vger.kernel.org, Al Viro , linux-kernel@vger.kernel.org, linux-audit@redhat.com, Paul Moore , Eric Paris , sgrubb@redhat.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 16, 2018 at 6:34 PM Richard Guy Briggs wrote: > > Don't fetch fcaps when umount2 is called with MNT_FORCE to avoid a > process hang while it waits for the missing resource to (possibly never) > re-appear. The patch would be pretty good if the dependence on MNT_FORCE wasn't added. As it is, it's buggy in more ways than one: - It does the opposite of the above (i.e. skips fcaps *unless* MNT_FORCE is set) - sets LOOKUP_NO_REVAL from caller of path lookup, which is invalid (LOOKUP_NO_REVAL is used only internally by path lookup) - the fact that *_path_mountpoint_at() shouldn't touch the mount root is independent of MNT_FORCE I still don't quite understand what audit is trying to do here, but apparently it's okay to skip getxattr in the MNT_FORCE case. So why is it not okay to skip it in the non-MNT_FORCE case? Thanks, Miklos