Received: by 10.223.164.202 with SMTP id h10csp2622987wrb; Mon, 27 Nov 2017 21:30:35 -0800 (PST) X-Google-Smtp-Source: AGs4zMb1OkS1rMaejEIHEAm3up2hqr/kxPKBQ9jl3d+NvTBUfLMGakDoQ4xS8/tYBZ6XVhM6Rdsb X-Received: by 10.99.125.23 with SMTP id y23mr39921422pgc.345.1511847035605; Mon, 27 Nov 2017 21:30:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511847035; cv=none; d=google.com; s=arc-20160816; b=cNA2P7MN7P7oJ2WikktNCKrRBOzr69r0d3mX+B1HiDLOUNoMsD3DU536/n77qnWG3B OJOpSNsA/IG1CHmX3X4RGvk9OqCs9WFCbg5lDiNxaUU4cIAq+JI12S7wjA5LVvzxwQW8 orllGDaTP7+isjSzZgCf9ka6E3c/NOqdux7UMvQgPT+Hu5bvDg2k8vbAm9glKPHjIDM3 lwG56tcEQPN5E2CBUas15dLkysHZkeF8UvWZ/msv2Am5h/oHXsYiN8IKqw1jxVm6/dYg VH1Rr1dbpLN7t0MP4y0FGlk48nq25SXxIR1L4U/XIxn/doF+Y2fhZUqg4TdLh0yIarAa yE0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=qwt87nCr+uBqMubDnrxvbhOTGazet7XrijrdSrLhKy4=; b=UDjVIdKUrSvYlv1qfCp8KtyLFQweMwj+ZhOywpfolxa8dlWMFtu/roQWuBUBykO03K xwjZwoSsDCHIx+gWaQbd7FdiLMFHf59Rk152RkRzWQ7ekjU8TeUlWFYTOKQmUf43eM5U Gd5OO2ommyXB57t4YZOCSyxCz9qkoUaxyIlkUYD6piJMCu2EvaCVsyqQd27IJ98XGr7q FJix4kd4iFfhnvkcTwLizeEwmrqvZ2PD5RNcAvvn9yipiXBqtH1oXFqTRlSWA5WCeHz8 zxBMbboqQiPJ+LTXglvmRLHN7I3vMygppv4L4JnF9OqbD7TfZe4gMB8CPBB/P/qI8Dvq SZHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=xON7qiLp; 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 e93si25267727plk.231.2017.11.27.21.30.24; Mon, 27 Nov 2017 21:30:35 -0800 (PST) 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; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=xON7qiLp; 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 S1751648AbdK1F3u (ORCPT + 77 others); Tue, 28 Nov 2017 00:29:50 -0500 Received: from mail-io0-f169.google.com ([209.85.223.169]:37029 "EHLO mail-io0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750850AbdK1F3r (ORCPT ); Tue, 28 Nov 2017 00:29:47 -0500 Received: by mail-io0-f169.google.com with SMTP id v21so39058844ioi.4 for ; Mon, 27 Nov 2017 21:29:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=qwt87nCr+uBqMubDnrxvbhOTGazet7XrijrdSrLhKy4=; b=xON7qiLp7Vu//LALf3WIcii9yx9zZgVhXfZnMD+hGiUfSUDkp3QD7wE2ym4ODSlbJB ZZJq/O63CUCxY30286/Zn1Y9a3zsQrBo7Oses+oeemKdtcLwT0zRivOBzC8XnsZ1kJ1K QETTkX/X8k4ngMA1iedJq7dHuI0z3cuEGkApCO9FvfVl0bDyGT84y/wrxZpOm1e6Ru1n oKN7eYKX/YFpdUWfcwwmijvW7vhSmX9Qm6LqYsCA1A/KxEKuJNldgrSOexqhdgGbIufj BywYMSydJa+aa9WvFwAxwSpdWyQONDtK4EWxAjo5E4afyjC50QbwysMgI3kHagypQamb Wa+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=qwt87nCr+uBqMubDnrxvbhOTGazet7XrijrdSrLhKy4=; b=gDtdSjdNO98VGJxKHqss1GrfGTyQQ3HegCtyr3wFjVuNp1q6R3OZYepVIJKtIysvqa o/rrb1OTx4TOfvcTwRr36w0e4js5E9ATIthodnuvUwA5FfkPutDgPDSEnkLAdneqMort GRzr7UHa/APMwFuixwtGCyOPcok3w5ltVC7B86FVwJ5+wObNI2qtBxF+d/n8v8FLRzGy uq3ywTR7jB+ShqUr46EugyVIKK3QWsCmksNIGbJluLcSYWuhRDaDT6FR3A05xS32xps3 HM9OWY3H7us3othcIIAN8P7aPfCNG44JoyUXr/BylFJ2U7U0ERaIG4QCwCC4tzimBMwY gW3Q== X-Gm-Message-State: AJaThX5UM7p+b4V9hbGcFUJVd7N0+runOcP0/iwfx2W8TlkYUzjotbbA HEZT7tD/yYNPlvmax6ASahmYwpv+3VTIzL6l7GeDGA== X-Received: by 10.107.183.1 with SMTP id h1mr13247378iof.183.1511846987072; Mon, 27 Nov 2017 21:29:47 -0800 (PST) MIME-Version: 1.0 Received: by 10.2.133.35 with HTTP; Mon, 27 Nov 2017 21:29:26 -0800 (PST) In-Reply-To: <20171128042943.ebs6yzduthakxxk4@treble> References: <20171127104529.12435-1-mingo@kernel.org> <20171127104529.12435-12-mingo@kernel.org> <20171128042943.ebs6yzduthakxxk4@treble> From: Andy Lutomirski Date: Mon, 27 Nov 2017 21:29:26 -0800 Message-ID: Subject: Re: [PATCH 11/21] x86/dumpstack: Handle stack overflow on all stacks To: Josh Poimboeuf Cc: Linus Torvalds , Ingo Molnar , Linux Kernel Mailing List , Dave Hansen , Thomas Gleixner , "H . Peter Anvin" , Peter Zijlstra , Borislav Petkov Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 27, 2017 at 8:29 PM, Josh Poimboeuf wrote: > On Mon, Nov 27, 2017 at 11:26:30AM -0800, Linus Torvalds wrote: >> On Mon, Nov 27, 2017 at 2:45 AM, Ingo Molnar wrote: >> > From: Andy Lutomirski >> > >> > We currently special-case stack overflow on the task stack. We're >> > going to start putting special stacks in the fixmap with a custom >> > layout, so they'll have guard pages, too. Teach the unwinder to be >> > able to unwind an overflow of any of the stacks. >> >> Why isn't this together with 01/21? The two cases seem to be entirely >> identical and fundamentally the same issue. > > Yeah, they probably do belong in the same patch. > >> In fact, maybe the whole "stack overflow" special cases should be in >> "get_stack_info()" itself, rather than be special-cased in the >> callers? > > I would be nervous about doing that. Several of the get_stack_info() > callers rely on it being honest. > > In fact, looking deeper at the above patch, it doesn't seem convincingly > safe to me. What if the adjacent page doesn't exist? Then when the > oops dumping code dereferences the 'stack' variable, you get an oops in > your oops. > Isn't the oops dumping code supposed to dereference everything using a special safe function? Anyway, get_stack_info() wouldn't really be lying. It would just be returning something where begin..end doesn't contain the requested pointer. From 1585282743746277540@xxx Tue Nov 28 04:30:36 +0000 2017 X-GM-THRID: 1585216063813693983 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread