Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp32121ybv; Tue, 4 Feb 2020 15:51:37 -0800 (PST) X-Google-Smtp-Source: APXvYqw/uZoDuBLiQwP92PMpr96NiFLjsVNHwvnlBHitJHeBjNgvxDut+cfkTsytTtEBFwtwTtBQ X-Received: by 2002:a05:6830:13da:: with SMTP id e26mr22574403otq.97.1580860297647; Tue, 04 Feb 2020 15:51:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580860297; cv=none; d=google.com; s=arc-20160816; b=mRPaa0mgDy89bnzefy7urrg1aDyTnCyYO0iEx/T9SFmnUz9HG4XClGuVzU09XOZtmM PKEr8RiDzYPqOszI30DOBl1P6HBa6IPucYIdVCCRfmalcs8NysBDBgGeF5Db0fAz6pZV RM+R74FrT9xDhvWhWvCk1vtQccOBhBzjePsTPUF0N1T5tn4DNUpi0ZbJzJ6ep02WDdlf m28YjSbhNc9SdcelVixz8YPhDrSO2RxYEwiwMJmWdIpsrCcIAevBYMdqY5a6vRb7JGVW ouKXfLxphl43Q7QwoxZyaSTvls4P+BroSMoeQSa62nDD08u4Ux59GfDYf1MT8SaKX/Zi AUFg== 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=tSlSCku20FStpOcQykOPLBXpgF1lEZfJUZ3xezTMXUk=; b=qKSW76G6rGOhI75fW7AnV0sFw/WdHFWOAvCaXTbKvk9jMaIvsThlGeDcKuDUgIS9LE 1QH5k9N0HpKJenmWhozm12uloArmkgCrPtoU/hRhXK5gH9PekHhkdMwdPAOwp0IvjZzt 5UqAXw13vuOINkgDTjt7bidmq6l2+M3h4dNxIFB9zHDLN7glYlI7g4wDylQ9+1CSdX8i gAsDU1OI2PfRG4+Gh0+DFjeJekH9H1uwc4+cRFMSwoqAWLDzewGC68PcnmI3l1gPHAYC 6yldl6CNS53e1PmhrIFG8HqHPLxYLM3KiK9iTjI7b+j1w3BI72ANR17wlH9poYvN+dtd CCDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AqM0nw1e; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v141si10402882oif.161.2020.02.04.15.51.25; Tue, 04 Feb 2020 15:51:37 -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=pass header.i=@chromium.org header.s=google header.b=AqM0nw1e; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727959AbgBDXuH (ORCPT + 99 others); Tue, 4 Feb 2020 18:50:07 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:35567 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727861AbgBDXuD (ORCPT ); Tue, 4 Feb 2020 18:50:03 -0500 Received: by mail-ed1-f67.google.com with SMTP id f8so418699edv.2 for ; Tue, 04 Feb 2020 15:50:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tSlSCku20FStpOcQykOPLBXpgF1lEZfJUZ3xezTMXUk=; b=AqM0nw1eNjCw1+k0Q8gPthLOiplhEcyUDU1L86hW5DIcXaKozOr4BXTLWPs0JHGhhF alVySvV9VMo6EtoIdVq0nb41lFaCoZgWXwhoq+I/tYIJY/N3OL1zIZtahG1+9xv6fB6w raQiSGMOHrtUYsg9QkqlUDluzMpH7EkTmyzV0= 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=tSlSCku20FStpOcQykOPLBXpgF1lEZfJUZ3xezTMXUk=; b=DkqivSe0/EGOMmIbiu+8uRz8HBR7G+qMzHztUeUumMTKjJA9wdd0Dd7MVvPLtdP0iZ ILC8FlQdcIMN7c38wDRHosxzlnqNg/zHswOQ8qtgkZsLXF8PXomVsZRZNRy3fN6tyNAi Re/AyuhqgJeLE+aQKqpNVVRYbBHMYTty46LcB41WVDiloJnBAJQGV2Klizozlq7Cg7OW Xf5ghmV9qok7Rd85Lck71rQduyIDWgIDuPc+9lne49+bf3G5wfggunpYo9yDukonZMaD sR3Jn4BTNQcNmAQ2nhCAWGWcACBptnl5jmFctQKN27vroznfQe8oeT35FZjbJ4qxYuvt mRGA== X-Gm-Message-State: APjAAAXUVjDJNoToQexlt1qBwcVkFhlT0IEvAUCD8/BHgdmHKgR7e014 vCq3vR7QMD2Nxn9PkIjfQtUons+im2A= X-Received: by 2002:a17:906:f158:: with SMTP id gw24mr27669554ejb.315.1580860201192; Tue, 04 Feb 2020 15:50:01 -0800 (PST) Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com. [209.85.208.52]) by smtp.gmail.com with ESMTPSA id c19sm1467756ejm.47.2020.02.04.15.49.59 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Feb 2020 15:50:00 -0800 (PST) Received: by mail-ed1-f52.google.com with SMTP id cy15so410097edb.4 for ; Tue, 04 Feb 2020 15:49:59 -0800 (PST) X-Received: by 2002:a17:906:dbd5:: with SMTP id yc21mr3824734ejb.35.1580860199474; Tue, 04 Feb 2020 15:49:59 -0800 (PST) MIME-Version: 1.0 References: <20200204215014.257377-1-zwisler@google.com> In-Reply-To: From: Ross Zwisler Date: Tue, 4 Feb 2020 16:49:48 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5] Add a "nosymfollow" mount option. To: Raul Rangel , David Howells Cc: linux-kernel , Mattias Nissler , Alexander Viro , linux-fsdevel@vger.kernel.org, Benjamin Gordon , Micah Morton , Dmitry Torokhov , Jan Kara , Aleksa Sarai , Matthew Wilcox 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 Tue, Feb 4, 2020 at 3:11 PM Ross Zwisler wrote: > On Tue, Feb 4, 2020 at 2:53 PM Raul Rangel wrote: > > > --- a/include/uapi/linux/mount.h > > > +++ b/include/uapi/linux/mount.h > > > @@ -34,6 +34,7 @@ > > > #define MS_I_VERSION (1<<23) /* Update inode I_version field */ > > > #define MS_STRICTATIME (1<<24) /* Always perform atime updates */ > > > #define MS_LAZYTIME (1<<25) /* Update the on-disk [acm]times lazily */ > > > +#define MS_NOSYMFOLLOW (1<<26) /* Do not follow symlinks */ > > Doesn't this conflict with MS_SUBMOUNT below? > > > > > > /* These sb flags are internal to the kernel */ > > > #define MS_SUBMOUNT (1<<26) > > Yep. Thanks for the catch, v6 on it's way. It actually looks like most of the flags which are internal to the kernel are actually unused (MS_SUBMOUNT, MS_NOREMOTELOCK, MS_NOSEC, MS_BORN and MS_ACTIVE). Several are unused completely, and the rest are just part of the AA_MS_IGNORE_MASK which masks them off in the apparmor LSM, but I'm pretty sure they couldn't have been set anyway. I'll just take over (1<<26) for MS_NOSYMFOLLOW, and remove the rest in a second patch. If someone thinks these flags are actually used by something and I'm just missing it, please let me know.