From patchwork Sun Jan 10 08:30:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 7994821 Return-Path: X-Original-To: patchwork-linux-parisc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A9E56BEEE5 for ; Sun, 10 Jan 2016 08:30:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CFE3C202E9 for ; Sun, 10 Jan 2016 08:30:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BA7DD202E6 for ; Sun, 10 Jan 2016 08:30:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752159AbcAJIaw (ORCPT ); Sun, 10 Jan 2016 03:30:52 -0500 Received: from mout.gmx.net ([212.227.17.20]:53490 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751887AbcAJIav (ORCPT ); Sun, 10 Jan 2016 03:30:51 -0500 Received: from ls3530.box ([92.203.18.244]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0M50aI-1Zz7oB0ERS-00zGTY; Sun, 10 Jan 2016 09:30:45 +0100 Date: Sun, 10 Jan 2016 09:30:42 +0100 From: Helge Deller To: linux-parisc@vger.kernel.org, James Bottomley , John David Anglin Subject: [PATCH] parisc: Fix __ARCH_SI_PREAMBLE_SIZE on parisc Message-ID: <20160110083042.GA7353@ls3530.box> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-Provags-ID: V03:K0:/sOJTdYOxTJd6P4F42vk4t/6TYjqEL5l+/HJ8HoA/TM0e//qMGO EPiUkSvlU0N2kIYw5dPKlOG5MPK0anxFPiwFrBjac6lDbCEHfb3Zvwff6dok/d2lcgB1ZyH WjuOloX50MzW+WszWVvHAy0EE77Uj7C0ADwvi7uEXpcR8/sNr3aeL7qFCyvBSAG+KnYjlY8 sXP2vnqBvtJck6UxoOKtQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:wDVRc+JwVis=:yxeVw89ba10cSpWBeADV3y ZRKpodxezwRBpYf7bS4HMuEc551Mo8NDhSMNXwwNkfJLmqnUc2oUlIkKIuaQ8wgnGVhb18zkY NRQTMhAvUjW52DYRKYdBgt5nCENN9Z/eJrVK8UDwmRB+W7nNJrqmkYuaFtWWPdJvMimvBpREw TZyPKIOAcepGjjdnChF9d34qC8lhrWohMEiePXTlhEYndHIjOtQbJ0XheCUUO70iBI9yLBmwn CVbTHnzjhZDdQotA25rzCHqZsTP1ai5Lt9+tfO9OdVjDkXmTNK0/kcCNu2XiR4k2jyftHeHz1 tPblzjU55oiDhBwHrdZunUXONui2hIR+odyKf6uokrKxGUa+LtgprLjO0fhnBKK3n3/gOVA6P /7Ge9zZ4zX6PTF7y5kazDlr0+QrZE/1ZRkDTFLSMb57pPD1UoVvN1U8dGSxBqyJPFI499d3zA nXXfMElSc/3wtXnJuTkTRo+AdGD2WIiVRZQFCzFOm0lvvPbw/xDE8rBF7l8PbnHd2UPtdRSa+ tb3YEDOairaKeVRxGs2gcGv5Wyv/YtPUeHGWYGVLG30nBrBKZbsBfos2jq+VTSthjqgR1Ic/g RRbFA7IqDk1rXMSH39LBXRWv4fpcZO6R4OPdG0cnOvy2zib7vbKBBF28QvvxQuai2LGBXF1Ou uoSMZFDbp0UqwH408MZviQnEiv8Mw48FeTyJVBeNQ+HeNyJnlw1DVYLGcD4sTbjNy194dNQD6 RCY0bhaSZ2nnEH7UjTktk+WPL7MeNytyJl8xt5zpk5CBTGcp1pNU/E76hVM= Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On a 64bit kernel build the compiler aligns the _sifields union in the struct siginfo_t on a 64bit address. The __ARCH_SI_PREAMBLE_SIZE define compensates for this alignment and thus fixes the wait testcase of the strace package. The symptoms of a wrong __ARCH_SI_PREAMBLE_SIZE value is that _sigchld.si_stime variable is missed to be copied and thus after a copy_siginfo() will have uninitialized values. Signed-off-by: Helge Deller Cc: stable@vger.kernel.org --- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/parisc/include/uapi/asm/siginfo.h b/arch/parisc/include/uapi/asm/siginfo.h index d703472..1c75565 100644 --- a/arch/parisc/include/uapi/asm/siginfo.h +++ b/arch/parisc/include/uapi/asm/siginfo.h @@ -1,6 +1,10 @@ #ifndef _PARISC_SIGINFO_H #define _PARISC_SIGINFO_H +#if defined(__LP64__) +#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) +#endif + #include #undef NSIGTRAP