Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751036AbdGaRO7 (ORCPT ); Mon, 31 Jul 2017 13:14:59 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:33158 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750709AbdGaRO5 (ORCPT ); Mon, 31 Jul 2017 13:14:57 -0400 From: Mikael Pettersson X-Google-Original-From: "Mikael Pettersson" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <22911.25997.495345.538443@gargle.gargle.HOWL> Date: Mon, 31 Jul 2017 19:14:53 +0200 To: Mikael Pettersson Cc: Anatoly Pugachev , David Miller , Sparc kernel list , Linux Kernel list Subject: Re: strace-4.18 test suite oopses sparc64 4.12 and 4.13-rc kernels In-Reply-To: <22908.31076.708982.410201@gargle.gargle.HOWL> References: <22906.17109.563338.559874@gargle.gargle.HOWL> <20170727.221009.2117810548718510128.davem@davemloft.net> <22906.63899.54749.700924@gargle.gargle.HOWL> <22908.31076.708982.410201@gargle.gargle.HOWL> X-Mailer: VM 8.1.2 under 25.2.1 (x86_64-redhat-linux-gnu) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2245 Lines: 49 Mikael Pettersson writes: > Anatoly Pugachev writes: > > On Fri, Jul 28, 2017 at 11:45 AM, Mikael Pettersson > > wrote: > > > It's an rpmbuild --rebuild of Fedora's strace-4.18-1.fc24.src.rpm, but according to the > > > build log the following should do it: > > > > > > export CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -grecord-gcc-switches -m32 -mcpu=ultrasparc' > > > ./configure --build=sparcv9-unknown-linux-gnu --host=sparcv9-unknown-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/u > > > sr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --local > > > statedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info > > > make -j2 > > > make -j2 -k check VERBOSE=1 > > > > cant' reproduce it here on debian sparc64 LDOM: > > DaveM was also unable to reproduce it. > > I'll be investigating a possible kernel miscompile next. I don't think it's a miscompile. First I recompiled 4.13-rc2 with each of gcc-7, gcc-6, and gcc-5, each bootstrapped and regtested from the head of the respective FSF GCC branch: no change, kernel 4.11 works while kernels >= 4.12 OOPS. So a miscompile seems unlikely. Then I ran a git bisect between v4.11 (good) and v4.12 (bad), booting each kernel and trying the problematic strace test binaries. That identified the following as the first bad commit: commit 31af2f36d50e3b9b2fb7f17aa430c11c91f946c4 Author: Al Viro Date: Tue Mar 21 17:04:45 2017 -0400 sparc: switch to RAW_COPY_USER ... and drop zeroing in sparc32. Signed-off-by: Al Viro That touches the CPU model specific assembly code in arch/sparc/lib/ for copy_{to,from}_user and changes how it's wired into the rest of the kernel. There's different code for different UltraSPARC and Niagara generations, so if there is a bug in e.g. the USIII code, you won't see it on Niagara. Unfortunately I don't see anything obviously wrong in Al's patch... /Mikael