Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3110505yba; Mon, 8 Apr 2019 11:19:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqzodVFexPfF0MGp/WUtyetYakptB5FkIrvKvNH49ZXFDUajva+FjhVP93FP9G9DtucXJjYl X-Received: by 2002:a65:43c3:: with SMTP id n3mr30599724pgp.375.1554747586468; Mon, 08 Apr 2019 11:19:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554747586; cv=none; d=google.com; s=arc-20160816; b=HPTeOi25BlFopE54ohdH7Fxw6Ui3BM0djyC3AC69PkxgwQkbCx1+22fhzwrzSXgSGo G5DBdcQR3yo4sPhnxiO56MfG1zAXPFI5hQfk/COCdSk/vm6hDVM4IhpV6ws3PS51WBXo Hzx2Nu7bAR6xsH2iIcFnvdKyYtHSr1iklvemiLJW/o2S5qdizfPlP18OemiyIWA+xqRz KmjnVuIL2qCUqnM7gkZBn8c2no3XM9qoTPC8qEFzfdCh70YoTfjle3ssl7lMmxKB7YMd dxF/Ypv6MZkuVmrhMcFS3GX7UhCZtifFGl0UBGz2uXRrm0fLm0/KFvUEj4R54aae6PBh tGyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=jea5Skd6ekD9OFUKJ1zXd2SCvMmCSgRiwcqok7ziNDE=; b=nvfHmQIya2cfV9WtJGBMiJkkE86RYl86kE6oqh4qI6Fbued7MoBRFOOj3zclTKo5be 2jwQLDAvehK/jEDwB/fW61V33WVmSAXpG0pKT9yWCPP7fp7l0AEhXERSzW9OWZiX8FyB KsecdpyQvb0gdBn7+wPhBbxOh5CZyHb7OLHyuG8mwGFH6fA5bLSpOILkjfzb7QYEJ8Vc 2LzMULUHrBmbdvtQbi68RNii+wqrfovDMb8Rwez8AjvzB1hlkF0WcrSXLUWk9fLWNAYv w0KmqAV6BdrW9d4+t5fjFZDT567Np+ItPmPL1+R9RU7YRxFmCanJh1NxsjmgHFFSs5oO FWFg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v47si26635214pgn.117.2019.04.08.11.19.31; Mon, 08 Apr 2019 11:19:46 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727361AbfDHQpC (ORCPT + 99 others); Mon, 8 Apr 2019 12:45:02 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:53414 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726253AbfDHQpC (ORCPT ); Mon, 8 Apr 2019 12:45:02 -0400 Received: from p5492ee6e.dip0.t-ipconnect.de ([84.146.238.110] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1hDXOB-0002vn-Eu; Mon, 08 Apr 2019 18:44:55 +0200 Date: Mon, 8 Apr 2019 18:44:49 +0200 (CEST) From: Thomas Gleixner To: Andy Lutomirski cc: LKML , X86 ML , Josh Poimboeuf , Sean Christopherson Subject: Re: [patch V2 28/29] x86/irq/64: Remap the IRQ stack with guard pages In-Reply-To: Message-ID: References: <20190405150658.237064784@linutronix.de> <20190405150930.967389183@linutronix.de> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 8 Apr 2019, 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 whole interface with struct stack_trace sucks. Why is skip and max entries in that struct and not an argument? I went through all the call sites and it just makes me shudder. That terminate trace with ULONG_MAX is another horrible hack which is then undone on several callsites again. Before we add more hacky stuff to it, lets cleanup that whole mess first. Thanks, tglx