Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp525182ybi; Fri, 7 Jun 2019 12:01:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwiRxJHhN7U0tyMcJUbTKjT7iVwHS0vi5Xi46UwflwKrtxfyFywzrn/UWH5z8mcdkXAz0X8 X-Received: by 2002:a17:902:b695:: with SMTP id c21mr6151249pls.160.1559934116793; Fri, 07 Jun 2019 12:01:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559934116; cv=none; d=google.com; s=arc-20160816; b=ygqhM5qHmDLNRXFlDrSTTGSIxwX7Q8l38GvW6PFmKo6IauGnKiKEL6y1Aqy4Hl3C/B EK5jnoxLa0fqNV7ItYxW8zREsBm7YsxPoTORQJxvKaidkGdLR4elP7JiE3ZtCRtCRQFo cBDnzOraz4yDHUq2qy/sjk3q8hMz1iek8tLdR/6ILgJwbzCbsRslfDViOPw6WDd7CC1O QaEsrxhSc7S4IUprMrrQYSCmxFMzhwM3lfSJ4vmVijGZMCRJoBiM+2iixVpcTeGz0NU7 wLeQayJcNC10G/hjuR92Fo1s/2f5Znu+TgkDQXZsl0bZZEEJX9ULvKvnrlUiDGCzVoAZ 8yvA== 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=OEMW3nbrGj3f3FeLm8Kgn7OWvgoKhy/7m5/80se1Dk0=; b=Mgw8zCWw/rYXmV8u4bY2h8KrgjD5iEk504ZeryP5lyF006+8hlIYbOqUNqx4drOe3w QKGFNexCSVdjtdGX8IRRXvFXist8TTXBTZ1hzVXc331VBUfE8A7zcIHXGxab2V8AjWRA ugtIvbnm9QzStgL9LqrR3qxv500abHlD6YbUbbYr6AIzJ76P5jiV2qV8wj1/b9pD5C/o 8UwzJ3ROD1IgZJ3H17eiedtYW0QI61MtW0uGUhWErKXCth00BcIoH0/dvwMfVM51HboR BRr04iL+tAFra22LQemCKQ03eJNbv61rgF/b81J6bzuPlu3YC5Hgjm7160Ong+SIX04h +/IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=dxqcWtGp; 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 d3si2666225pju.69.2019.06.07.12.01.40; Fri, 07 Jun 2019 12:01:56 -0700 (PDT) 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=@linux-foundation.org header.s=google header.b=dxqcWtGp; 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 S1731591AbfFGS2R (ORCPT + 99 others); Fri, 7 Jun 2019 14:28:17 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:37362 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729864AbfFGS2R (ORCPT ); Fri, 7 Jun 2019 14:28:17 -0400 Received: by mail-lj1-f195.google.com with SMTP id 131so2581122ljf.4 for ; Fri, 07 Jun 2019 11:28:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OEMW3nbrGj3f3FeLm8Kgn7OWvgoKhy/7m5/80se1Dk0=; b=dxqcWtGpHywbdhRrcAXNaStWTUHq208llOuzD+TKm7VH2IqeG7+SsRF5YhrUq4AktU IvqSu1TZLgvJl+8nUSbjVyDprr2HKPJrom8CPywQp3mFswJGNt47FIgfsBgmTV9TunaX VkmqTaIBGjNL89U4Y46JVQVgz9ssjbSNKZbYY= 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=OEMW3nbrGj3f3FeLm8Kgn7OWvgoKhy/7m5/80se1Dk0=; b=PNMGpq9CEQdyP+Ahr+dcl8VNaexHaNN49AxHMSKHqvVmLQDUOOTft0FXsScXothz3k /hcbcZboNj3lp0ptmS8cPYS5hHP6gaLFlVO+iLpD7DgyJpsn7QTpphSotqhagiCeFq5p qduUafoIV5sEUiXzO4fQhX2lm6xWq638gJMvDmWM0U8GmaA26BytriCcN4uQpH/YVrMn 7XAZvaniWPyyuDTgi4dLGo5lTP1ovnUhJKKU98vrmv4aNYi899gxLi6vdorT7gAAFcLF Bi9p/aEkp6cqTFx56bNdgsf+3UN+AnI30vKzC9qW7q+F6dpneADj6eWUGXnOWIGGlVIl W7xg== X-Gm-Message-State: APjAAAXJIpsW2tBpWVu5BPNMjj4OxGFZ9elrRB9RAkrJlgPgr7RcFu+9 EgN8RMvyiiU7diKjyXXI9WkMxZ2PRww= X-Received: by 2002:a2e:206:: with SMTP id 6mr25819656ljc.59.1559932094918; Fri, 07 Jun 2019 11:28:14 -0700 (PDT) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com. [209.85.167.41]) by smtp.gmail.com with ESMTPSA id h11sm544740lfm.14.2019.06.07.11.28.13 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Fri, 07 Jun 2019 11:28:14 -0700 (PDT) Received: by mail-lf1-f41.google.com with SMTP id a9so2334199lff.7 for ; Fri, 07 Jun 2019 11:28:13 -0700 (PDT) X-Received: by 2002:ac2:59c9:: with SMTP id x9mr27242012lfn.52.1559932093560; Fri, 07 Jun 2019 11:28:13 -0700 (PDT) MIME-Version: 1.0 References: <20190319165123.3967889-1-arnd@arndb.de> <87tvd2j9ye.fsf@oldenburg2.str.redhat.com> In-Reply-To: <87tvd2j9ye.fsf@oldenburg2.str.redhat.com> From: Linus Torvalds Date: Fri, 7 Jun 2019 11:27:57 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] uapi: avoid namespace conflict in linux/posix_types.h To: Florian Weimer Cc: Joseph Myers , Arnd Bergmann , Linux API , linux-arch , Netdev , Laura Abbott , Paul Burton , Deepa Dinamani , Linux List Kernel Mailing 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 Thu, Jun 6, 2019 at 9:28 PM Florian Weimer wrote: > > This regression fix still hasn't been merged into Linus' tree. What is > going on here? .. it was never sent to me. That said, now that I see the patch, I wonder why we'd have that #ifdef __KERNEL__ in here: typedef struct { +#ifdef __KERNEL__ int val[2]; +#else + int __kernel_val[2]; +#endif } __kernel_fsid_t; and not just unconditionally do int __fsid_val[2] If we're changing kernel header files, it's easy enough to change the kernel users. I'd be more worried about user space that *uses* that thing, and currently accesses 'val[]' by name. So the patch looks a bit odd to me. How are people supposed to use fsid_t if they can't look at it? The man-page makes it pretty clear that fsid_t is complete garbage, but it's *documented* garbage: The f_fsid field Solaris, Irix and POSIX have a system call statvfs(2) that returns a struct statvfs (defined in ) containing an unsigned long f_fsid. Linux, SunOS, HP-UX, 4.4BSD have a system call statfs() that returns a struct statfs (defined in ) containing a fsid_t f_fsid, where fsid_t is defined as struct { int val[2]; }. The same holds for FreeBSD, except that it uses the include file . so that "val[]" name does seem to be pretty much required. In other words, I don't think the patch is acceptable. User space sees "val[]" and _needs_ to see it. Otherwise the type is entirely pointless. The proper fix is presumably do make sure the fsid_t type definitions aren't visible to user space at all in this context, and is only visible in . So now that I _do_ see the patch, there's no way I'll apply it. Linus