Received: by 10.192.165.148 with SMTP id m20csp2353948imm; Sun, 22 Apr 2018 05:41:19 -0700 (PDT) X-Google-Smtp-Source: AIpwx48Faw1QttUP8MtJZ7xjqu2s3iq3WJd/EhOLE137hKp8DQl32DZt1sssFJPtYlVK7D2sQUXW X-Received: by 2002:a17:902:bb8c:: with SMTP id m12-v6mr17453019pls.53.1524400879203; Sun, 22 Apr 2018 05:41:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524400879; cv=none; d=google.com; s=arc-20160816; b=pdPCPWvYacWvTzkguqPEM8TK4mOos+CCSyan2v9AWFB9Oio3wJ4/EIKBF63lalN+Bb 5JbhgFcn3GYJ/ZxtDMQIjITvOi31puFuKYBjYw8iK+g+diUWLZYSWJFbcolCbIXx55I3 +SwdXXk88bY1j9APMjNRNiXaiHBo0cjrDzU9cFSfksbxi55t6vPe9qSK2Xin4CHC/4VC bnLbwENNSH4b1i9bHb2Lu62YBMYhaEYlh7yJuhPuUc2DqZYOBxQWs+xH3XZdJT3MJ/PY 27xnCpfBQNjoIEpwHxGfWHHZtQcNXQsudVb6Odc0bY+z7lKS2//AhFTMdWEPTeAzgbOq uMrA== 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=XNCfJtB/O4thbrk2HCsmb8tu4gv6VXYIkjxoT5Ti7v8=; b=VgkIYfkjQlfLlcLZmEM/T1zD5bXggiGDC5io/qTjtjFjlqd/8cvXeZuio5VBBHvotC WM5WO8f0QlygfNC0gRX+pC+cTfdzUZw/25j1u+YuzaguYuyeNB06oW4jCw4cVwG5v74W 8mL2ta2e1H3cynS/arWRtMsANZb8FmLvGsWLuByE/agD4rpcSLgxwxMtIj9oSor39J+E F630Aq8yrqMns3hDGufvlyijpzVbQW1O85taOeymjzBiMZ5oyhT5nhD2eshkDG+HzCEP nGoY9gZGshWaavZv5hkYPpnJ61JlOgEt2f85Zsj9OEDr0VDWOD5Eu0E4LCk9bWCl89dj BdCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=R1JwNAR1; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g3-v6si9000970plp.471.2018.04.22.05.41.04; Sun, 22 Apr 2018 05:41:18 -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=@gmail.com header.s=20161025 header.b=R1JwNAR1; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752074AbeDVMix (ORCPT + 99 others); Sun, 22 Apr 2018 08:38:53 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:36115 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751265AbeDVMis (ORCPT ); Sun, 22 Apr 2018 08:38:48 -0400 Received: by mail-qt0-f193.google.com with SMTP id q13-v6so14685234qtl.3; Sun, 22 Apr 2018 05:38:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=XNCfJtB/O4thbrk2HCsmb8tu4gv6VXYIkjxoT5Ti7v8=; b=R1JwNAR16EUoAIjDIp1Zy9eV2Qn3/r7F9yTiNvQ1hEuqnbyQ3TgPtiN6d6E4OGwnd2 d5+LKGIMpmJDSDQShG1cpLrrkrch1IAsSi+xWmvxb94WTHj6QVRBhsj0AcwV9H9/SDnq ZEtgCudQYctyhUhD4RhMy5wepCWDSq7t8pE/pyYkvlf9aa3pbRdXKc+DKfz7VZojKl4V Ch10B/To2Wdnzx7II4FkmAHKilR+abet5itpEJkfiRQlzDU6Z7Nk/mMvXqYtl/R6GKHZ 5MSGb+4SC3c0fG0YM+9Sgp2FQ4u/SbsUdlnD/NUhlV7k2EEGdDE8p8ktuLAs8z1FxQjI UOdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=XNCfJtB/O4thbrk2HCsmb8tu4gv6VXYIkjxoT5Ti7v8=; b=cuhBVmK6zgfOKq2QRAnpGB8H7CkakkYcVsCnf2zNlf3nO/zn1b8JBj3uwLQFYMA5Qq lvhUAlUNsg43cbuAS6Ekzy8eAiAF1g/9adwbttEoSEsK9S16QURRmpABYOLaPmmMxqGp cjs/lkc0OSs5lCjmxq59gprrgmwLCUFknqb+58etSlW51yf5mYGFu93bpwapmliabTXe GiSFkMhuw0DM2/1MNSSHnZe8Hw77HkgizxD6oWIOmpH4v8zioQYOaU/PfSsZjDNEKX6g vTqF8tNlP65Se64Fsmjfg9mp37WqUKg0YuETACM7cJwjKYhs9bCRHaXGxCeH8VYZyG3m g00g== X-Gm-Message-State: ALQs6tD/SnSPL4lThpE7O/n9Qtpa1ExpFL4w+D+pnkJiGYSeKUu/ku2n /Ek9zKZO9x4aToEWi5pLgpVdwHmrrv0tGLUzNCc= X-Received: by 2002:ac8:21b4:: with SMTP id 49-v6mr10065155qty.315.1524400726996; Sun, 22 Apr 2018 05:38:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.46.18 with HTTP; Sun, 22 Apr 2018 05:38:45 -0700 (PDT) In-Reply-To: References: <20180420130346.3178914-1-arnd@arndb.de> From: "H.J. Lu" Date: Sun, 22 Apr 2018 05:38:45 -0700 Message-ID: Subject: Re: [PATCH] x86: ipc: fix x32 version of shmid64_ds and msqid64_ds To: Arnd Bergmann 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 , Thorsten Glaser , 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 Fri, Apr 20, 2018 at 7:38 AM, Arnd Bergmann wrote: > On Fri, Apr 20, 2018 at 3:53 PM, Jeffrey Walton wrote: >>> +#if !defined(__x86_64__) || !defined(__ilp32__) >>> #include >>> +#else >> >> I understand there's some progress having Clang compile the kernel. >> Clang treats __ILP32__ and friends differently than GCC. I believe >> ILP32 shows up just about everywhere there are 32-bit ints, longs and >> pointers. You might find it on Aarch64 or you might find it on MIPS64 >> when using Clang. >> >> I think that means this may be a little suspicious: >> >> > +#if !defined(__x86_64__) || !defined(__ilp32__) >> >> I kind of felt LLVM was wandering away from the x32 ABI, but the LLVM >> devs insisted they were within their purview. Also see >> https://lists.llvm.org/pipermail/cfe-dev/2015-December/046300.html. >> >> Sorry about the top-post. I just wanted to pick out that one piece. > > It seems I made a typo and it needs to be __ILP32__ rather than > __ilp32__ (corrected that locally, will resend once we have resolved > this). > > Aside from that, the #if check seems to be correct to me: this > is an x86-specific header, so it won't ever be seen on other > architectures. On x86-32, __x86_64__ isn't set, so we don't care > about whether __ilp32__ is set or not, and on x86-64 (lp64), > __ilp32__ is never set, so we still get the asm-generic header. > 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. -- H.J.