Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3136172yba; Mon, 8 Apr 2019 11:57:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqwfx6J5DfiddfwVRJdHueoj2PTBpvFaA/awJkDUENwD5pvqS8Ho61N88kROWqyZGc+L/Rm8 X-Received: by 2002:a63:ff26:: with SMTP id k38mr29861289pgi.123.1554749857144; Mon, 08 Apr 2019 11:57:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554749857; cv=none; d=google.com; s=arc-20160816; b=owOJGVuihe/o1JxatZZd6FzNjFxgwsxVoeoiypZ3NEOxTzjvPbR0JUE5hisYAVMDkC Y34oHWA0N8U+30GQBQ2iGrKTPrz2DDHXnTqV9eXOP04hDlJLjyFBeM+pwJjEPXRDzXoX XoU4Ddfpwdf7oiX/YL9T0L5yIC0VLBR5EPHfN9fJB+g/xlNUFtuwhe0XH7BqJA97l3BW X3VZKQJfKVWjfjvKjcgh5iJuUyZk78DCL+N3TaxQ4akcIHoJXzdvze35W4ZdlW679Pa7 10Kw9U5ibu9/a5/BRzaQPHG43hCNASx63t8vLCOh8slLnnnlGbAiDjVn25H6t6VoyKeD 2U2A== 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=BCWkgm8ArlvDdzcK6uSa1RnzL0m6XMsVr7zX2zdnmc8=; b=yJdWYSFVR3RUdZAMxoiHjXS6JlWLq9ftZDj4u/bDvuYX34Gb2DXUp1T54w7tK2YAlI o2DYz/Lij/XUlsieVrESN6jb304IA/PSIqVYBcnuZttJNHCOt/ybQ6e6SfZjhPbsL7cO kOdbLtuHA8mVwO17GBnfuOHhcZIkgfEUBywjYe1sDI+WSzuy0Ip9QUEGkq8RMnZk/3T8 SijNWV5cjIdq672+R1rXUH3f0OOicXT3ut4cNrYoOayiF1iLzvIUD4Sh3cbMoKbVoZL4 Kr1zsMbfaFP7USmNgwH2pn54KZp29DhMynCdux5b3X24KxYLVEfNxixqtx6sjPgNh/Xa lpTQ== 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 m3si18521171pgv.28.2019.04.08.11.57.21; Mon, 08 Apr 2019 11:57:37 -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 S1728479AbfDHSTK (ORCPT + 99 others); Mon, 8 Apr 2019 14:19:10 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:53653 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727056AbfDHSTK (ORCPT ); Mon, 8 Apr 2019 14:19:10 -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 1hDYrK-0004zE-Te; Mon, 08 Apr 2019 20:19:07 +0200 Date: Mon, 8 Apr 2019 20:19:06 +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, Thomas Gleixner wrote: > 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. Bah, all that sucks. Because 'caller' is comes from __RET_IP__ and is not a pointer to the stack. So this really needs to be a filter which prevents storing an entry _before_ caller is seen on the stack. ftrace and kasan do some post stacktrace filtering as well just different. That's all bonkers. tglx