Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3085786yba; Mon, 8 Apr 2019 10:46:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqxgAtBe7vsHCGtw08R0cg4yf5o3sJyt4E7sLXddAL+eniC5n4qTyZG0VLgtGJbOi1RmVsI7 X-Received: by 2002:a63:e445:: with SMTP id i5mr29639008pgk.383.1554745599667; Mon, 08 Apr 2019 10:46:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554745599; cv=none; d=google.com; s=arc-20160816; b=H91XsczBw5Ye2A7z6wJfrLt1p6MiKTdLN88r4ByxaT3z92SP6M+NL+Rvb+MndSb98M +yn+5Ib9DmYyLKY7+qhIxz/To7xTXoeRAqELb4hRGo0gqwHnv8SI8b6nBt7glDBfoqr2 F7vDdV9GTr1Wr8YJSBkBF4IzNB4byyjt/56Nf/f+Kx9ulpGpQb1/0uVfUYCrnzYpsyMg 58/78EXGkvYDHIbYdB5e87fkHK9l4n6j2o9BeL13wSOD62XmbM5sZ0Oypb0RgnYB/I4U Ae7bGjmvjFjHocXmDHCO8sn3r3Qzw4noX6FUgDQOVApRAgKDkUdZIVdqmCb1AQ9bc/Fm ihKQ== 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; bh=7oU2R7T33s2tnjJsp0wjI3iJIbSJpEaMOv4pUTQmlh0=; b=MfFFkx9A13w35HsdE6uzCqfhzPOrknne57xe6COq90xFACUPcRxkunaeou/6kqNx1B RwBb9Zl1pbtAh1+UiG4iE6DH9j6UkZr8pIH9vrB/jdrYOl8aV/9mtglcgVWDQ9p0+A6/ MlM+1w0CK3K89pUuW9hXWWeTOK0bqX4dVE/FFqzM+jAzMD7SUlyDL6mPVAh4OQvNUwiA 8B/71y/DaOQecqqxMEtayj4rI4qs8dWNMR6SBQvCVaia2f+uzyZ2I7W8VCreB7Xq+6N/ WLsNYLziTfrVhFAdKJP2JTihWt1JIDFo4nTX7yg4Ef1xGOZxi727t0RYx7qLbkHxlGHc CBIA== 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 u1si345672pls.43.2019.04.08.10.46.22; Mon, 08 Apr 2019 10:46:39 -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 S1728901AbfDHQgf (ORCPT + 99 others); Mon, 8 Apr 2019 12:36:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49680 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726726AbfDHQge (ORCPT ); Mon, 8 Apr 2019 12:36:34 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 880B7859FB; Mon, 8 Apr 2019 16:36:34 +0000 (UTC) Received: from treble (ovpn-120-231.rdu2.redhat.com [10.10.120.231]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E65591A7D1; Mon, 8 Apr 2019 16:36:33 +0000 (UTC) Date: Mon, 8 Apr 2019 11:36:32 -0500 From: Josh Poimboeuf To: Andy Lutomirski Cc: Thomas Gleixner , LKML , X86 ML , Sean Christopherson Subject: Re: [patch V2 28/29] x86/irq/64: Remap the IRQ stack with guard pages Message-ID: <20190408163632.zssld3xhrcekfi77@treble> References: <20190405150658.237064784@linutronix.de> <20190405150930.967389183@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 08 Apr 2019 16:36:34 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 08, 2019 at 09:18:00AM -0700, Andy Lutomirski wrote: > On Sun, Apr 7, 2019 at 11:46 PM Thomas Gleixner wrote: > > > > On Sun, 7 Apr 2019, Andy Lutomirski wrote: > > > On Sun, Apr 7, 2019 at 3:44 PM Thomas Gleixner wrote: > > > > Actually we have: save_stack_trace() > > > > > > > > > > Like I did here: > > > > > > https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/log/?h=WIP.x86/stackguards > > > > Kinda, but what that code wants is to skip any entry before 'caller'. So we > > either add something like save_stack_trace_from() which is trivial on x86 > > because unwind_start() already has an argument to hand in the start of > > stack or we filter out the entries up to 'caller' in that code. > > > > > > Whoops! > > I could add a save_stack_trace_from() or I could add a "caller" > argument to struct stack_trace. Any preference as to which looks > better? The latter seems a little nicer to me. The current official way to do that is to use the stack_trace "skip" field. That's a hack though because it relies on inlining decisions. It would be nicer if the skip interface were pointer-based like your suggestion. -- Josh