Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp4799795rwb; Mon, 8 Aug 2022 07:15:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR6VLCNBLYTRu+IBemWtMEZBMm76uC7hvgexbcdXLgx2pU0wZtPm02s/b8Bs8qIBNU3XM1vc X-Received: by 2002:a17:906:9b09:b0:730:c38c:e11c with SMTP id eo9-20020a1709069b0900b00730c38ce11cmr13445633ejc.684.1659968108207; Mon, 08 Aug 2022 07:15:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659968108; cv=none; d=google.com; s=arc-20160816; b=KSl3A16PE5Ch2PLnAacRSd82ba8TFcjCy3b4t0IzRvI4tUw/IYH7B53IUSfosQxp4s rkgI4yOpy4YdIyOlynucAlfBpS+keFliRuk+/OzaDFQZJVoVFiT3SPGciBHOviWGC6TQ B1EZGDF/P39sD1oo78UBx3kgk6DeB2JmgzEYOoomoaYucOSfjE0St9s42NfDmAHm2ybv ZZIW3BEsTv51pLgi/SCqQwvRe9uEOp53M7rQIAbBLWSwLD183l5evkhLgJGmH2EJIc50 WLT6gmEJe1z43QQJRwJ3x66/9mMqy9FVDZZ90bAKiF6/zxdIn3NA6HNuDVB3liHWyGC3 JfMA== 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; bh=kIlCAnM3zHxtVwi6L3cPJu+V175ItChk2zdhBDC4D3Q=; b=goAMJAGFTunDGoOYFisSkjh0YvieCj5kuZOBR9j2cQcP7Nbas+oFDqc1WPrx0blAIQ ngwuqPpPRIyb9kRoi/vnkfXIQ6g4SstI9ZYFEvRUeOVIlXoT8g8V4c2DCxMjQAl4i5UR Ok4uttiTVYvOyjWJP/IjW9vhsU877nd7erSQJaSCmVsqkDFYsJHrudimsgVKVBa/eAJ+ RcHkolkgNIuxcgc5X2lPKPOSXnAooyo3+CW0nNvCuanvrwCeoPG8/zorHN0r04YoOMNA f5BLCtihXzUGrKIkSx86k+BQFQ4KDmwvRynqXf35u0CENfWjykjMCKexu4CpD5n3dStb 4hCQ== ARC-Authentication-Results: i=1; mx.google.com; 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 a14-20020a509e8e000000b0043cd18d34e1si7052878edf.177.2022.08.08.07.14.40; Mon, 08 Aug 2022 07:15:08 -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; 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 S242800AbiHHOCT (ORCPT + 99 others); Mon, 8 Aug 2022 10:02:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243206AbiHHOCR (ORCPT ); Mon, 8 Aug 2022 10:02:17 -0400 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD9B2E0AF; Mon, 8 Aug 2022 07:02:15 -0700 (PDT) Received: from mail-ej1-f46.google.com ([209.85.218.46]) by mrelayeu.kundenserver.de (mreue109 [213.165.67.113]) with ESMTPSA (Nemesis) id 1Mwfj2-1nSnnA0iPS-00y8yM; Mon, 08 Aug 2022 16:02:14 +0200 Received: by mail-ej1-f46.google.com with SMTP id i14so16780530ejg.6; Mon, 08 Aug 2022 07:02:14 -0700 (PDT) X-Gm-Message-State: ACgBeo1ziLCAzM7ozxXEF1rdjbouTD7Z22m3whQlKpDi7UzfxX30WDUN n39TE7T53yVKulLPa6tdu+pZn1dkRUMJQx1pouM= X-Received: by 2002:a17:907:7395:b0:730:b636:2c89 with SMTP id er21-20020a170907739500b00730b6362c89mr13943270ejc.547.1659967333768; Mon, 08 Aug 2022 07:02:13 -0700 (PDT) MIME-Version: 1.0 References: <163410.1659964655@warthog.procyon.org.uk> In-Reply-To: <163410.1659964655@warthog.procyon.org.uk> From: Arnd Bergmann Date: Mon, 8 Aug 2022 16:01:57 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC][PATCH] uapi: Remove the inclusion of linux/mount.h from uapi/linux/fs.h To: David Howells Cc: linux-fsdevel@vger.kernel.org, Ian Kent , Alexander Viro , Christian Brauner , linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:1reflZM1aKn3EqKV2wtpAFNNyOuaYsSRArZwiFPIJiG2MRgtBgZ pKnqPzexya65U7wThtAsuWNVQUTcKwP3VgWZGINf1iAEhgRBChXvXTmctN0XHgLp/i7v52H Cfw/xMhzLSMBZJGKcFlrhf3JUJTGXwiOJladLDaUk3fCXi1FdSokdjlYJm/K2WvDf5B6YwX CN3LchDPQdgnmNhrGxufg== X-UI-Out-Filterresults: notjunk:1;V03:K0:bIGL7TTs/Dw=:ALnb+EAd32wsDMBtVCqNB5 5IpF+pVJvEOLFeYzryC8lo3wfPJjHVP4eyq9iKhtXW9QGjA1hJDRmipPaAraDJScB2IixGG9R CJm1C45YWeMEuxHhvj7osYyAowo//cQrIkQAQ0No4MnO7tCTnQNDnL4w05updue12zRDpBJgB HbOx9Q45PhWLVg903VO6A+MSqzyP7CcSIwrcWohUYaEodkgwfK0a94HGQRHCRjteaGs/RJvQ+ C9jR/dCiBif19Ofi1zBgOewi/J4poghpPVSmoRlDwg10H5QhC7Fh69VcNjeUT9Qb7B8/52BJ/ HST3GWnIZFo9+D6hNiRRGchB5VE5iuflT6518nSslD1rci0g8Wj7LPQ1myxTck4TPJmKGJc4b rVAs7jkfwID120dp8hzD+7kwya5GOP/HWUY5L2m3oFyurv/+GyP00qKa7AXgrKC0eVA/YmsGu 7v1P2lHzUldW8lX3iORu1qinPyfcECj9twgcsgUTJvWDHLEwSGZo1xupx5329lhAQoezRDygg mM2jED/ye+a4I+ucIkroUFJGZDgHw+uVyOpLniY17Hu5/4pWDpqv7Ntbp72364MAmV6aOIjmz 1pqPqkxXCRywPjm0QVz88mVfAzJxgNZaDUFMmPdZWaBTNFPUWriOpUt/2rKnjNB/bdt02RXB7 ATLbW+MQSOwHPQ3WTUg2A63wOBrieEQMSyeEMhPpJJEpa0KjO1HquksYGj9JArZQUTpper+oC WRp45cdgxHmm8rp0r/0nuP+jd370ZeHMZxqrFQ== X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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, Aug 8, 2022 at 3:17 PM David Howells wrote: > > Hi, > > We're seeing issues in autofs and xfstests whereby linux/mount.h (the UAPI > version) as included indirectly by linux/fs.h is conflicting with > sys/mount.h (there's a struct and an enum). > > Would it be possible to just remove the #include from linux/fs.h (as patch > below) and rely on those hopefully few things that need mount flags that don't > use the glibc header for them working around it by configuration? > > David > --- > uapi: Remove the inclusion of linux/mount.h from uapi/linux/fs.h > > Remove the inclusion of from uapi/linux/fs.h as it > interferes with definitions in sys/mount.h - but linux/fs.h is needed by > various things where mount flags and structs are not. > > Note that this will likely have the side effect of causing some build > failures. > > Reported-by: Ian Kent > Signed-off-by: David Howells > cc: Alexander Viro > cc: Christian Brauner > cc: linux-fsdevel@vger.kernel.org > cc: linux-api@vger.kernel.org I think that's probably ok. Looking through the results from https://codesearch.debian.net/search?q=MS_RDONLY combined with the list of results from https://codesearch.debian.net/search?q=linux/fs.h I found 95 packages that mention both /somewhere/ in the code, see below for a complete list. I did not try an exhaustive search but found that almost all of these reference the two in different files. The only counterexample I found is https://sources.debian.org/src/trinity/1.9+git20200331.4d2343bd18c7b-2/syscalls/mount.c/?hl=13#L13 so this will likely break and have to get fixed to includle or instead of linux/fs.h, but that is probably acceptable. There may be others like it, but not a ton of them. Arnd 8<--- android-framework-23 android-platform-art android-platform-frameworks-base android-platform-system-core android-platform-system-extras android-platform-tools apparmor audit avfs bazel-bootstrap bcachefs-tools bpfcc busybox cargo cde ceph chromium criu cryptmount docker.io e2fsprogs elogind emscripten falcosecurity-libs firefox firefox-esr fstransform gcc-10 gcc-11 gcc-12 gcc-9 gcc-snapshot gfarm glibc glusterfs gnumach golang-1.11 golang-1.15 golang-1.16 golang-1.17 golang-1.18 golang-1.19 golang-github-containers-storage golang-golang-x-sys golang-inet-netstack hashrat hurd icingadb kfreebsd-10 klibc kubernetes kvmtool libblockdev libexplain librsvg libvirt linux linux-apfs-rw lxc manpages-l10n mergerfs mozjs91 mtd-utils network-manager nilfs-tools ntfs-3g ocfs2-tools ostree partclone ploop qemu quota rust-libc rustc sash snapd strace stress-ng suricata systemd systemtap testdisk thunderbird tiny-initramfs tomoyo-tools toybox trinity u-boot uclibc umview util-linux virtualbox webhook zfs-linux zulucrypt