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=-6.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 9BA12C43464 for ; Sat, 19 Sep 2020 05:27:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3E18820773 for ; Sat, 19 Sep 2020 05:27:53 +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="HYIAMttN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3E18820773 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 C700B900002; Sat, 19 Sep 2020 01:27:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BF9EE6B005A; Sat, 19 Sep 2020 01:27:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AC49D900002; Sat, 19 Sep 2020 01:27:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0177.hostedemail.com [216.40.44.177]) by kanga.kvack.org (Postfix) with ESMTP id 973E86B0055 for ; Sat, 19 Sep 2020 01:27:52 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 618C8362D for ; Sat, 19 Sep 2020 05:27:52 +0000 (UTC) X-FDA: 77278679184.29.army95_5a034f727131 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id 3A271180868FA for ; Sat, 19 Sep 2020 05:27:52 +0000 (UTC) X-HE-Tag: army95_5a034f727131 X-Filterd-Recvd-Size: 2641 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf48.hostedemail.com (Postfix) with ESMTP for ; Sat, 19 Sep 2020 05:27:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=JUeG2dqbaHdKowqeP15/7T7efjP+aGqq3V/awNZ2MV0=; b=HYIAMttNNTlX0fOvNkBm47uUVZ Kb1YdFIrA86VJO7ChdMMI/5lItCp4KsY7Ou51+H+dyQfPZRoa0XRgydYAS9GuZZzERNFktzljDqog RFf0EpIdMN8t7SJeQdSZjq9sHja7H3TvX+QUxXJ0IRBFWi2erv+CzMVIqJKEbL0Xpa4J2xhN9qpU/ ee9jlBfQYAECp1odxOGv9wf3vfRR8jdiSIt7DxjZXT24oOdlpb89k0lmgmLLW8gJgIxDRuWLWZsE2 usVR142K1GG1M3JhmAv+ZqVZH0ADZj3e4kbg9HXghbXpUQZ2oNYX0ajiCkI8Am1xpCUXJvX38d4VM 6fhc93gw==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJVPW-0000NO-DG; Sat, 19 Sep 2020 05:27:46 +0000 Date: Sat, 19 Sep 2020 06:27:46 +0100 From: Christoph Hellwig To: Arnd Bergmann Cc: Christoph Hellwig , Russell King , Alexander Viro , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v2 2/9] ARM: traps: use get_kernel_nofault instead of set_fs() Message-ID: <20200919052746.GG30063@infradead.org> References: <20200918124624.1469673-1-arnd@arndb.de> <20200918124624.1469673-3-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200918124624.1469673-3-arnd@arndb.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html 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 Fri, Sep 18, 2020 at 02:46:17PM +0200, Arnd Bergmann wrote: > ARM uses set_fs() and __get_user() to allow the stack dumping code to > access possibly invalid pointers carefully. These can be changed to the > simpler get_kernel_nofault(), and allow the eventual removal of set_fs(). > > dump_instr() will print either kernel or user space pointers, > depending on how it was called. For dump_mem(), I assume we are only > interested in kernel pointers, and the only time that this is called > with user_mode(regs)==true is when the regs themselves are unreliable > as a result of the condition that caused the trap. > > Signed-off-by: Arnd Bergmann Looks good, Reviewed-by: Christoph Hellwig