Received: by 10.192.165.148 with SMTP id m20csp2709603imm; Sun, 22 Apr 2018 13:18:44 -0700 (PDT) X-Google-Smtp-Source: AIpwx48y6Pz4QBsh+Wp6+/2CgjvyABwz/SJDrig+FoO+gCEpTP2/UVRvnP9u7vEwBW9v4oTwUOdN X-Received: by 2002:a17:902:2006:: with SMTP id n6-v6mr18455131pla.125.1524428324064; Sun, 22 Apr 2018 13:18:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524428324; cv=none; d=google.com; s=arc-20160816; b=chXufI0Z5+/1CvBMtoT5JNpu7M+5H5/KQUOLd4/poGqXlHYcYIaZDXYLQNQWfyeA0N w0BwzrZm4qxDDFCjl4Y49SfXNbtg6kwINcxG23ENVJnjlbOlZlGf9/aFWjymIM9myJRv PofL/nOZRqagcm1uwBQV8NExo2ZmxA6uGxWTapRd/vKhbOIWdOTXzU9IMpAuCA8+1+66 93VZ6LqT8mmFCBOY5cFV7d/5kwT6viP7I86fnCFZXe2ppsZPifOx98FOQIfommjPCH2q 1OfwkLJiSknRBz8EiS1z++0v0ZT6yz+N0tW8ghvlHLDu/0CLEGjtiNG0meYHwKJVumKy 3eqg== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=yuVRF9qkSzb1K/ULzAFo8OAgna4w5IsHqAaDsAjc0cQ=; b=H9QUhOBVwVKMKxqknXzCpxPVR0sGXmGKa3rvwci53J9CSF2sbQo8bmBDzwF3x4yUNH adzVdGyDMyYVUv3Z5SBvyuMgOGtEwbc6T6C3g3I3B4IYKMvxQltThrwuwtI3V81MuN/z tIBpJEiGCM+ux50DC/+S6gH03APFb2lBF9EYROVWsxHpSggIyqmOwFvfn2wus3+2XXMc 5XfkZJf9fify+opklLd8/AomeRy4r2S4b0VmIAhr6ScQryOSoJT5I+hdR7kHV8z3ziRN ZampqDS0FyYrbx6B7aKF9KZ73Lu4XjixbxdmH8/9FzMyVUPBEVzmrDHMUdtAYuN2SJFF f9gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Z34Q7+Xx; 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 j23si9505987pfn.63.2018.04.22.13.18.29; Sun, 22 Apr 2018 13:18:44 -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=fail header.i=@gmail.com header.s=20161025 header.b=Z34Q7+Xx; 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 S1753601AbeDVUR0 (ORCPT + 99 others); Sun, 22 Apr 2018 16:17:26 -0400 Received: from mail-qk0-f194.google.com ([209.85.220.194]:33476 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753485AbeDVURU (ORCPT ); Sun, 22 Apr 2018 16:17:20 -0400 Received: by mail-qk0-f194.google.com with SMTP id c70so5261946qkg.0; Sun, 22 Apr 2018 13:17:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=yuVRF9qkSzb1K/ULzAFo8OAgna4w5IsHqAaDsAjc0cQ=; b=Z34Q7+XxEMQpIMPs8BLgz2Ycg/1UwY6T2aLzIztECjrA2SWRGyJo2T3mqU6liyojuf /MJbT0yHV962xjqBf/5wm1JYlvSBGu9L71cK4doCRySPCzy+rJdm32ecMoHylvBcS5JI jNc1sXYU7UrYuvAlUDYhalOVgjZ3Jnoc1wVNBuP+yL7oXxo0j43iU+r0ZCfbKZwEOBQO ofauod9Vs8slgczUY30G8I9TF2l+z0fmWlmXmsyH8r26ZI8MdoIw6yQcnNB29v6Rd2pC YO8+0tKWzEpGg4QLO+QaF8QAdOze4O6f3/R/xlUaHOT3nS8RZ1AbxQGWLtjkJzZtejRn LD9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=yuVRF9qkSzb1K/ULzAFo8OAgna4w5IsHqAaDsAjc0cQ=; b=Jc7y46Yq+bsgsr4uEA11s9DLD3mm16DMwPTRoXZLsDH/JY15zPRX/XKhsZXFLhJbfj 0KCMszrLHWnCzTE8l6Ur7VpAaWmIlr+uj/Qs+IL4n0dt0fK/oz25fXrvTheGxs0eE4dV npD0zbyIHpnPjlk4/PdBb68c3mQkZ7PYsl0yH3F6TaEV9gBBXco2r9qkViHydeN7SSkk 0rOiYakhx4ve8/lM9UiRTfuOhEOmlRmKj7dkRUciV2Ij4B2l5A9TfLG84eM5IVkCAbGx opjyzy/QbaTsyytngyR81v+mQcNp3eh8FkzVI4AOEKibSHW8vfy07E7avuNRF4xo+174 9Z4w== X-Gm-Message-State: ALQs6tDpcoEyWU1jsPpdYsJwYakLoCtKuP87YZtvHueYzv6+07C//y/y 7zev9BPWGsQ3Rbwa1YZfIWQmmyMU+N82AbxpZJY= X-Received: by 10.55.76.146 with SMTP id z140mr20804120qka.224.1524428239312; Sun, 22 Apr 2018 13:17:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.185.25 with HTTP; Sun, 22 Apr 2018 13:17:18 -0700 (PDT) In-Reply-To: References: <20180420130346.3178914-1-arnd@arndb.de> From: Arnd Bergmann Date: Sun, 22 Apr 2018 22:17:18 +0200 X-Google-Sender-Auth: B6d4cgFTHaZiRsNw6qgLg5lSQCk Message-ID: Subject: Re: [PATCH] x86: ipc: fix x32 version of shmid64_ds and msqid64_ds To: "H.J. Lu" Cc: Jeffrey Walton , "the arch/x86 maintainers" , Thomas Gleixner , Ingo Molnar , "Eric W . Biederman" , y2038 Mailman List , LKML , Linux API , linux-arch , GNU C Library , Deepa Dinamani , Al Viro , Albert ARIBAUD , linux-s390 , Martin Schwidefsky , Catalin Marinas , Will Deacon , "open list:RALINK MIPS ARCHITECTURE" , James Hogan , Ralf Baechle , linuxppc-dev , sparclinux , Ben Hutchings , Daniel Schepler , Adam Borowski , John Paul Adrian Glaubitz , "# 3.4.x" , "H. Peter Anvin" 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 Sun, Apr 22, 2018 at 2:38 PM, H.J. Lu wrote: > On Fri, Apr 20, 2018 at 7:38 AM, Arnd Bergmann wrote: >> On Fri, Apr 20, 2018 at 3:53 PM, Jeffrey Walton wrote: > > Glibc has correct header files for system calls. I have a very old > program to check if Linux kernel header files are correct for user > space: > > https://github.com/hjl-tools/linux-header > > It needs update to check uapi. Simply running 'make' on a regular distro shows this output: --- kernel.x32.out 2018-04-22 22:10:16.053432423 +0200 +++ glibc.x32.out 2018-04-22 22:10:16.073432838 +0200 @@ -10,9 +10,9 @@ size of daddr_t: 4 size of __ipc_pid_t: 4 size of struct ipc_perm: 48 size of mqd_t: 4 -size of struct msqid_ds: 144 +size of struct msqid_ds: 120 size of struct semid_ds: 104 -size of struct shmid_ds: 136 +size of struct shmid_ds: 112 size of struct shminfo: 72 size of struct timeval: 16 size of struct timespec: 16 @@ -22,8 +22,8 @@ size of struct mq_attr: 64 size of struct rlimit: 16 size of struct rusage: 144 size of struct stat: 144 -size of struct statfs: 64 -size of struct statfs64: 88 +size of struct statfs: 120 +size of struct statfs64: 120 size of struct timex: 208 size of struct msginfo: 32 size of struct msgbuf: 16 This seems plausible, the statfs structure clearly has the same problem as msqid_ds/shmid_ds based on its usage of '__statfs_word' which is now defined as '__u32' rather than '__kernel_long_t'. It should be trivial to override __statfs_word from arch/x86/include/uapi/asm/statfs.h I've checked the other uses of __BITS_PER_LONG in the uapi headers now, and all the others are either not relevant for x32 (either definition is fine) or it has to be __BITS_PER_LONG=32. Arnd