Received: by 10.192.165.156 with SMTP id m28csp839263imm; Thu, 19 Apr 2018 08:22:16 -0700 (PDT) X-Google-Smtp-Source: AIpwx49wPWzwRYheDa0WtdmIf+bkxAE5JrZgnuo0VWakiW81vIK43Dn0fZfuvecb0okgmc0QOJ/R X-Received: by 2002:a17:902:44a4:: with SMTP id l33-v6mr6481027pld.27.1524151335993; Thu, 19 Apr 2018 08:22:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524151335; cv=none; d=google.com; s=arc-20160816; b=IOnHk5McxSn1hGL18DPT9mD3LUXqFtrRYaF4lbXKDDi/+Im1yNQoZ1jeuzNuD9mS2A HvGv2jh1ZUXKGQ4DBS7kYVRAQnbUevlKV2WmIQFudxyFmirN7BFjzXyOXBWjIVWHpiPE I/7o4UFYwqCNZYxNKB0jNzKp40KxVHwIh21nPpKdCxr6gQSOnhBK32zQiTnqL9CjNcSZ 8Ukxajb8wLbWgaV2N3+EiKghxjRiMDkQmU3iSyXPoDOngGOqwwN7I6MamJhySKE7xtBk DlW70cxbO/zckKCjwmVfPlHZDIn9eKALE1gxN8L1+4fxJumcByAjZ/6MTUBGl4F2V0eb RfhQ== 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=NYguA8jYH//dgqip0jb2uvH/skODyyYlSWUMM7xZmW0=; b=URg0uPwlhcDzOpb9VBAgdXgRWE0WNI4IEFz1+ESyo/SaCWREdA2/mBoUMpy1f20dU9 v3q9/BfQyqia4erD1uQ6siG4F0qNZGYI4hAeAshSMYvGIe0LmAM/KgVMQ6x99z6vZx/8 E+TfFIKeUqiHE5ZKSi9GkJ/wQidN4GpqKIMaLL1ES/9qZ0roYu7Ud4z6qFsuElYbEnf6 oi9Ug93abc8jciAuLJdvOxRJ9aPhpmTaX6APtPrQr9PK+Bcauj2YsxqppNBTl+OoL107 20EffPgGo0gxd1KEGjttj5KXU2orWHno4bXA1cV/baPyhIDphQb4cqRLBQMHNnepDAj/ JXKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=TazQzDct; 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 n7si3112037pga.543.2018.04.19.08.22.01; Thu, 19 Apr 2018 08:22:15 -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=TazQzDct; 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 S1753373AbeDSPUb (ORCPT + 99 others); Thu, 19 Apr 2018 11:20:31 -0400 Received: from mail-qt0-f180.google.com ([209.85.216.180]:37520 "EHLO mail-qt0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751882AbeDSPU2 (ORCPT ); Thu, 19 Apr 2018 11:20:28 -0400 Received: by mail-qt0-f180.google.com with SMTP id w12-v6so6130289qti.4; Thu, 19 Apr 2018 08:20:28 -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=NYguA8jYH//dgqip0jb2uvH/skODyyYlSWUMM7xZmW0=; b=TazQzDctNnEgbgTlfKdCzWonkECBpt6TDdgh08WNoeKlZOvddjO6S69V/4Gvt2Rzoc yuakpAkWz37UiaT5JP1pCMHKNcc2EVkBtNIXuOS0JqPQabyoAesfVNwksD+wLghTG5/u RsOs/2aylSJ2ocDImNUKrVXNkgM41+Kwik1FmED1pJY4u0f4SO0gPDwXOvgvCSNDpb3y pT97A4ttnmTY6bQHCzQnJSozsN2wQds4f4fVcWZxbeUt25fg23aDVNQQ6zYrN4Q68iQb 9IYuP6uq9Utz4yvDKNEyZMtyxBBTDoBcINTrKTVzWF1p0/4UXwLHAx5z5fc6YubKWz20 56yQ== 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=NYguA8jYH//dgqip0jb2uvH/skODyyYlSWUMM7xZmW0=; b=UK23ZjCkiVleYuJqke4pdQkEhmQAQWVIKNacopbpfu/RIaokgm1PaCioU//cs/rLq1 VOE7XnwJuswqA55nEk78RhpC8GKoWRiYM42QBM5QXJYSqNUkYkaZM136eWsxwX3oiOJc imfJHf2+BarzN9Uf3hjGMIPOZWiUwVJnKMo+IdZhvzi9sdxJjJMBEk7e3gAKguRpNQ60 /BGbCtSIUD3vdvTkpj8/LZeHpVYGVobVuBc5Us2ZOhlsj5mxxe7EKGkMqMKDgdAJ9ulT 6Hb03R+TfnaRO39znnPCqlMbwWQIWW90xz8fq1TslSWZFCmzHL0TvIlM+bV2ofrtuDLW F7lg== X-Gm-Message-State: ALQs6tCpaiEmE8jdk0yss5X5XF+wSkjOzkPk9d9qxziWv/RTeasNawVe ySIieKd7tePc4CZ9gu1eR9gCSQUeLYB18uFdpzEL8UuL X-Received: by 2002:ac8:1c12:: with SMTP id a18-v6mr6690839qtk.280.1524151227466; Thu, 19 Apr 2018 08:20:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.185.25 with HTTP; Thu, 19 Apr 2018 08:20:26 -0700 (PDT) In-Reply-To: <87efjbnswr.fsf@xmission.com> References: <20180419143737.606138-1-arnd@arndb.de> <20180419143737.606138-2-arnd@arndb.de> <87efjbnswr.fsf@xmission.com> From: Arnd Bergmann Date: Thu, 19 Apr 2018 17:20:26 +0200 X-Google-Sender-Auth: IR-EMjEf3Q0OPA5FsBjeRvhowTg Message-ID: Subject: Re: [PATCH v3 01/17] y2038: asm-generic: Extend sysvipc data structures To: "Eric W. Biederman" Cc: y2038 Mailman List , Linux Kernel Mailing List , Linux API , linux-arch , GNU C Library , Thomas Gleixner , Deepa Dinamani , Al Viro , Albert ARIBAUD , linux-s390 , Martin Schwidefsky , "the arch/x86 maintainers" , Catalin Marinas , Will Deacon , "open list:RALINK MIPS ARCHITECTURE" , James Hogan , Ralf Baechle , linuxppc-dev , sparclinux 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, Apr 19, 2018 at 4:59 PM, Eric W. Biederman wrote: > Arnd Bergmann writes: >> >> struct msqid64_ds { >> struct ipc64_perm msg_perm; >> +#if __BITS_PER_LONG == 64 >> __kernel_time_t msg_stime; /* last msgsnd time */ >> -#if __BITS_PER_LONG != 64 >> - unsigned long __unused1; >> -#endif >> __kernel_time_t msg_rtime; /* last msgrcv time */ >> -#if __BITS_PER_LONG != 64 >> - unsigned long __unused2; >> -#endif >> __kernel_time_t msg_ctime; /* last change time */ >> -#if __BITS_PER_LONG != 64 >> - unsigned long __unused3; >> +#else >> + unsigned long msg_stime; /* last msgsnd time */ >> + unsigned long msg_stime_high; >> + unsigned long msg_rtime; /* last msgrcv time */ >> + unsigned long msg_rtime_high; >> + unsigned long msg_ctime; /* last change time */ >> + unsigned long msg_ctime_high; >> #endif > > I suspect you want to use __kernel_ulong_t here instead of a raw > unsigned long. If nothing else it seems inconsistent to use typedefs > in one half of the structure and no typedefs in the other half. Good catch, there is definitely something wrong here, but I think using __kernel_ulong_t for all members would also be wrong, as that still changes the layout on x32, which effectively is struct msqid64_ds { ipc64_perm msg_perm; u64 msg_stime; u32 __unused1; /* 32 bit implict padding */ u64 msg_rtime; u32 __unused2; /* 32 bit implict padding */ u64 msg_ctime; u32 __unused3; /* 32 bit implict padding */ __kernel_pid_t shm_cpid; /* pid of creator */ __kernel_pid_t shm_lpid; /* pid of last operator */ .... }; The choices here would be to either use a mix of __kernel_ulong_t and unsigned long, or taking the x32 version back into arch/x86/include/uapi/asm/ so the generic version at least makes some sense. I can't use __kernel_time_t for the lower half on 32-bit since it really should be unsigned. Arnd