Received: by 10.192.165.148 with SMTP id m20csp2503600imm; Sun, 6 May 2018 16:50:05 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpKkLXxhel2FNnYKjcWmr97qbkflrsSDAPiMSvcFdEWrb6PDouLRa+Ech1wy/gkUYOocuN5 X-Received: by 2002:a65:6645:: with SMTP id z5-v6mr24770375pgv.43.1525650605451; Sun, 06 May 2018 16:50:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525650605; cv=none; d=google.com; s=arc-20160816; b=LQbdSEDGKtbChDHf9mUYcbzq8Y5ru085idMnVBFi+7ogoVWp1ofAosIUwuqQmpKU8X BibyzSPMA8/FK5oXC6RkzIsUnKLRpV16ITsVNYrk1Sjsx5m/qu7iEjUjlaWzTBFfyvpl LUxEwgK/9qGIIWlYspJHZT1HD4opS24yu9/cc5kPa8Etg0peMR5F0FboIeoO4ZrQhIn0 RBEC2cQOLhDLmiMvZnUFv2fbXYKsnMldhzHnMoswxkiMCFy17/IFegYjtRDkUlCJ/Q4c Yo9FghzqXjKvdVZpoZ/U4/x1meCzU9p/nGDU1GPZ05myor+MyHfiLc6DahQsC57VKbql KbHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=2ujTmiUugn660hZInh5hxzZaLcmd4RjelDmDWhPb4k4=; b=kNvrHAim1iV6oG7IC0G0hzZtuQmB+ByrpGuqJ/DJMvFfcqLXPHWRL5zsmgsnTcQG7c iiOYa065vWHGGzxrA/Wgv/e6exRntdXIoKpcJ+/buV+25yYovwwc/zut26QbuEJ9bDwj H6HegCJ3tX9lp9tXySozVsbaL9NGn7HeEBFcWt4E3ZqfLieVcmXxDov8w1vX5u8DZ3y8 PsxY5xfzqIC1nC9EgtqBTF/v4hDlJE+bG6S+K6aOC/woH+sE0GubtHOYVe4p5HFH1h+Y 3IkzXkyBTR1KEQTQMPbhBIlQymyvMgchEgEE1fsOcz8DTRcmLAdg2ig3Ph2PQ28ivzjx oigQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n11-v6si13503202pgt.679.2018.05.06.16.49.50; Sun, 06 May 2018 16:50:05 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751901AbeEFXtk (ORCPT + 99 others); Sun, 6 May 2018 19:49:40 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:50500 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751625AbeEFXtg (ORCPT ); Sun, 6 May 2018 19:49:36 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E7ABC4270961; Sun, 6 May 2018 23:49:35 +0000 (UTC) Received: from treble (ovpn-120-124.rdu2.redhat.com [10.10.120.124]) by smtp.corp.redhat.com (Postfix) with SMTP id 7BFFB2024CA1; Sun, 6 May 2018 23:49:35 +0000 (UTC) Date: Sun, 6 May 2018 18:49:35 -0500 From: Josh Poimboeuf To: Vince Weaver Cc: Peter Zijlstra , Ingo Molnar , linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo , Thomas Gleixner , Andy Lutomirski Subject: Re: perf: fuzzer causes stack going in wrong direction warnings Message-ID: <20180506234935.yq6zxjetlpldpzz7@treble> References: <20180111192112.d35nkotzklicd27c@treble> <20180501135850.enx4waqd5d7yowlj@treble> <20180501220458.p3rgwzh3jcqt4jmm@treble> <20180502205009.codkvscnh4j4hm6b@treble> <20180504162557.iodmglq3duomz6c2@treble> <20180505182912.llj7jb3v7yd43t5h@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180505182912.llj7jb3v7yd43t5h@treble> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Sun, 06 May 2018 23:49:35 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Sun, 06 May 2018 23:49:35 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jpoimboe@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 05, 2018 at 01:29:12PM -0500, Josh Poimboeuf wrote: > On Sat, May 05, 2018 at 11:38:16AM -0400, Vince Weaver wrote: > > On Fri, 4 May 2018, Josh Poimboeuf wrote: > > > > > > The 'nmi_restore' warning points to a bug in my patch, but the others > > > are head scratchers. Here's a patch which combines the first two > > > patches, plus improves the existing warnings a bit. Can you try it? > > > > with that updated patch I hit > > > > May 4 21:51:20 haswell kernel: [19245.450607] WARNING: stack recursion on stack type 2 > > May 4 22:21:29 haswell kernel: [21055.268717] WARNING: can't dereference registers at 000000006546ba71 for ip ret_from_intr+0x6/0x1d > > May 4 22:36:22 haswell kernel: [21948.106762] WARNING: stack going in the wrong direction? ip=native_sched_clock+0xe/0x90 > > May 4 22:36:22 haswell kernel: [21948.115377] WARNING: stack going in the wrong direction? ip=native_sched_clock+0xe/0x90 > > May 4 22:36:22 haswell kernel: [21948.124086] WARNING: stack going in the wrong direction? ip=native_sched_clock+0xd/0x90 > > May 4 22:36:22 haswell kernel: [21948.124088] WARNING: stack going in the wrong direction? ip=intel_pmu_handle_irq+0x12/0x4a0 > > May 4 22:36:22 haswell kernel: [21948.124097] WARNING: stack going in the wrong direction? ip=native_sched_clock+0xe/0x90 > > May 4 22:36:22 haswell kernel: [21948.150189] WARNING: stack going in the wrong direction? ip=native_sched_clock+0xe/0x90 > > May 4 22:36:22 haswell kernel: [21948.150199] WARNING: stack going in the wrong direction? ip=intel_pmu_handle_irq+0xe/0x4a0 > > > > the last bit repeated for a few minutes (flooding the log with a few > > thousand entries that look mostly similar) > > Thanks. I can recreate now, so I'll stop bugging you for a bit. This > fuzzer is really good at finding unwinder issues. Deja vu. Most of these are related to perf PEBS, similar to the following issue: b8000586c90b ("perf/x86/intel: Cure bogus unwind from PEBS entries") This is basically the ORC version of that. setup_pebs_sample_data() is assembling a franken-pt_regs which ORC isn't happy about. RIP is inconsistent with some of the other registers (like RSP and RBP). Peter, any ideas? -- Josh