From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88CE0CA9EB9 for ; Wed, 23 Oct 2019 18:31:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 43B432053B for ; Wed, 23 Oct 2019 18:31:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="rsvCoTqT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 43B432053B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E63296B0003; Wed, 23 Oct 2019 14:31:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E14FB6B0006; Wed, 23 Oct 2019 14:31:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D02676B0007; Wed, 23 Oct 2019 14:31:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0237.hostedemail.com [216.40.44.237]) by kanga.kvack.org (Postfix) with ESMTP id AABB56B0003 for ; Wed, 23 Oct 2019 14:31:48 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 4B54D8249980 for ; Wed, 23 Oct 2019 18:31:48 +0000 (UTC) X-FDA: 76075893096.28.start20_49dc4cae9dc16 X-HE-Tag: start20_49dc4cae9dc16 X-Filterd-Recvd-Size: 2761 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Wed, 23 Oct 2019 18:31:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=t1mBW2Y77bGoe4WyUZsFuThZaILNwh36eHCTT5RAVak=; b=rsvCoTqTHI+J3MI9MkOQOuOnF 9s0u54rool374MNQEGYKvm4GADQMerw1aowjTT9z4cJVLlP9M+7ubDgkjOKG3A4f4miNHqEnZR+b5 w+pQEWhVSDKbGJGys2SQr43YskveRg0rKJ502puTLy6198xk52XF7mGsso6ce6A0pX9zfsScIIjPr LZwJdLVabsvUIaFstToI3hMaNptxoNtmGoNwMhhgc7UngsgbGfXYQxTQItoKDFZmcnnlt1tQVuIn+ VVpbzWMmnt/u9zjiy5p6fGye2pjOr90jN18a90Z7dGRpA9zwO+Xk+ekinkSxUcuGQIWWbqLahGxTr nXKNYoLjg==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1iNLQ4-0000bL-Bt; Wed, 23 Oct 2019 18:31:40 +0000 Date: Wed, 23 Oct 2019 11:31:40 -0700 From: Matthew Wilcox To: Thomas Gleixner Cc: Cyrill Gorcunov , LKML , Ingo Molnar , Peter Zijlstra , linux-mm@kvack.org, Catalin Marinas , x86@kernel.org, Josh Poimboeuf Subject: Re: [PATCH] x86/dumpstack/64: Don't evaluate exception stacks before setup Message-ID: <20191023183140.GC2963@bombadil.infradead.org> References: <20191019114421.GK9698@uranus.lan> <20191022142325.GD12121@uranus.lan> <20191022145619.GE12121@uranus.lan> <20191023135943.GK12121@uranus.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Oct 23, 2019 at 08:05:49PM +0200, Thomas Gleixner wrote: > Prevent this by checking the validity of the cea_exception_stack base > address and bailing out if it is zero. Could also initialise cea_exception_stack to -1? That would lead to it being caught by ... > end = begin + sizeof(struct cea_exception_stacks); > /* Bail if @stack is outside the exception stack area. */ > if (stk < begin || stk >= end) this existing check.