From patchwork Fri Oct 21 19:30:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Paul Adrian Glaubitz X-Patchwork-Id: 9389931 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9703B60780 for ; Fri, 21 Oct 2016 19:30:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CBF82A09D for ; Fri, 21 Oct 2016 19:30:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6D4482A0AD; Fri, 21 Oct 2016 19:30:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_TVD_MIME_EPI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B10A02A09D for ; Fri, 21 Oct 2016 19:30:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935708AbcJUTau (ORCPT ); Fri, 21 Oct 2016 15:30:50 -0400 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]:58142 "EHLO outpost1.zedat.fu-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933928AbcJUTat (ORCPT ); Fri, 21 Oct 2016 15:30:49 -0400 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.85) with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (envelope-from ) id <1bxfWe-000Oe5-5M>; Fri, 21 Oct 2016 21:30:44 +0200 Received: from p57a9b275.dip0.t-ipconnect.de ([87.169.178.117] helo=[192.168.178.40]) by inpost2.zedat.fu-berlin.de (Exim 4.85) with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (envelope-from ) id <1bxfWd-002MsV-R8>; Fri, 21 Oct 2016 21:30:44 +0200 Subject: Re: [sh]: glibc file offset problems since 2.24 To: Rich Felker References: <53fb3565-53cc-fa22-403f-b7220a5fa4d4@physik.fu-berlin.de> <20161021183652.GY19318@brightrain.aerifal.cx> Cc: Linux-sh list , debian-superh@lists.debian.org, kkojima@gcc.gnu.org, olegendo@gcc.gnu.org, James Clarke , Michael Karcher From: John Paul Adrian Glaubitz Message-ID: Date: Fri, 21 Oct 2016 21:30:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161021183652.GY19318@brightrain.aerifal.cx> X-Originating-IP: 87.169.178.117 X-ZEDAT-Hint: A Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 10/21/2016 08:36 PM, Rich Felker wrote: > glibc commit 071af4769fcdfe2cd349157b01f27c9571478ace looks like a > likely culprit. It was between 2.23 and 2.24 and is related to this > musl commit which may be easier to understand: Indeed that looks very suspicious, thanks for pointing this out. James Clarke (CC'ed) has suggested the attached patch on IRC which I'm testing right now. Adrian diff --git a/sysdeps/unix/sysv/linux/sh/pread.c b/sysdeps/unix/sysv/linux/sh/pread.c index d3f99f3..be8efb1 100644 --- a/sysdeps/unix/sysv/linux/sh/pread.c +++ b/sysdeps/unix/sysv/linux/sh/pread.c @@ -19,5 +19,5 @@ /* SH4 ABI does not really require argument alignment for 64-bits, but the kernel interface for pread adds a dummy long argument before the offset. */ -#define __ALIGNMENT_ARG +#define __ALIGNMENT_ARG 0, #include diff --git a/sysdeps/unix/sysv/linux/sh/pread64.c b/sysdeps/unix/sysv/linux/sh/pread64.c index b2e8a25..5d1eaac 100644 --- a/sysdeps/unix/sysv/linux/sh/pread64.c +++ b/sysdeps/unix/sysv/linux/sh/pread64.c @@ -19,5 +19,5 @@ /* SH4 ABI does not really require argument alignment for 64-bits, but the kernel interface for pread adds a dummy long argument before the offset. */ -#define __ALIGNMENT_ARG +#define __ALIGNMENT_ARG 0, #include diff --git a/sysdeps/unix/sysv/linux/sh/pwrite.c b/sysdeps/unix/sysv/linux/sh/pwrite.c index 391ed5e..329c64f 100644 --- a/sysdeps/unix/sysv/linux/sh/pwrite.c +++ b/sysdeps/unix/sysv/linux/sh/pwrite.c @@ -19,5 +19,5 @@ /* SH4 ABI does not really require argument alignment for 64-bits, but the kernel interface for pwrite adds a dummy long argument before the offset. */ -#define __ALIGNMENT_ARG +#define __ALIGNMENT_ARG 0, #include diff --git a/sysdeps/unix/sysv/linux/sh/pwrite64.c b/sysdeps/unix/sysv/linux/sh/pwrite64.c index 683a5d9..d510780 100644 --- a/sysdeps/unix/sysv/linux/sh/pwrite64.c +++ b/sysdeps/unix/sysv/linux/sh/pwrite64.c @@ -17,7 +17,7 @@ . */ /* SH4 ABI does not really require argument alignment for 64-bits, but - the kernel interface for pread adds a dummy long argument before the + the kernel interface for pwrite adds a dummy long argument before the offset. */ -#define __ALIGNMENT_ARG +#define __ALIGNMENT_ARG 0, #include