Received: by 10.223.164.202 with SMTP id h10csp507173wrb; Mon, 6 Nov 2017 10:16:03 -0800 (PST) X-Google-Smtp-Source: ABhQp+QEz03g7tlrDNmFXfHfl3/UpUbjPeiHnd9UGrWdc8Wne8a9HYMmuzZleJp6QA4t2ufZR8aK X-Received: by 10.99.126.84 with SMTP id o20mr16209339pgn.220.1509992163688; Mon, 06 Nov 2017 10:16:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509992163; cv=none; d=google.com; s=arc-20160816; b=0ODBSNXQn2JeABSXh0vrSubzk4wUCmjgYioaQqZNl8BYvWjuuarFHHO1/HYosA7M+N Efi2b4nl0skuD40RGZkuHaaYKvpa0wrT4n9ebMfZ0ZNj3pfEL15hCUFnZojS4v/Zg14J oIHU5EHKuEdv92RHpDWUDtJe/0FKzTr7/j3ow/+u2CTmyizvpTW/wIrMahVfGsQqlCXp cYZTPqHASRJoEdnzxFhjQArzSCzzE69xzJAxZr+4O3hpNJ3od5NiAigLA5mWCLUY5j2r bregtA+ObDYCMITIWlVX3ucLjN6P+zeVMw06+vJmXOm0vKNm8DvcGNv0tk7+rqdFOH00 CBrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=tSP9S6nOZizbDoUqQVdqGqxbZLWbCvtj4coZzO9rdC4=; b=usPUFqB5GXEVFyswtLGDWTEZWSgwJkN7CVi72I0SsY29shPToFa/EcjMYr85WyHLjW FfkePvPM3WBdzZhIq6KV5caYsWFyWHY8Q/+sTD1Z1mYfy6n3UyQK7OHjh5ebgBerLxu9 lXXNAdpuZODfH4btUMszdp+qBPZKT2g+E78FwEvA526TurnSWM5+jCqr4MWsR6qNFcxh 15l+6UIJFvb86YERh/8lemF/vlyk8KcAePXMSmopjzI789qVs4OU3sg9Ks/MZ3juYOJa iPYOAUEC1XBF8nGWLavnaT55QTfOBp6jheQgacAd6vtkyOPIAhQQzJzGBXkLIUls3LcD 5fIw== 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 y38si10584258plh.61.2017.11.06.10.15.50; Mon, 06 Nov 2017 10:16:03 -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; 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 S1754455AbdKFQ5E (ORCPT + 96 others); Mon, 6 Nov 2017 11:57:04 -0500 Received: from mga14.intel.com ([192.55.52.115]:43751 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754434AbdKFQ5D (ORCPT ); Mon, 6 Nov 2017 11:57:03 -0500 Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Nov 2017 08:56:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,353,1505804400"; d="scan'208";a="146541447" Received: from sofia.sh.intel.com (HELO sofia) ([10.239.147.120]) by orsmga004.jf.intel.com with ESMTP; 06 Nov 2017 08:56:45 -0800 Date: Tue, 7 Nov 2017 00:56:48 +0800 From: "Liu, Changcheng" To: Josh Poimboeuf , Petr Mladek , Sergey Senozhatsky , changcheng.liu@intel.com Cc: Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] lib_backtrace: fix kernel text address leak Message-ID: <20171106165648.GA95243@sofia> References: <20171106052511.GB69364@sofia> <20171106080528.GA1298@jagdpanzerIV> <20171106105203.GC69364@sofia> <20171106131147.ouihd4ug5ah3vb6a@treble> <20171106164847.GD69364@sofia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171106164847.GD69364@sofia> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Don't leak idle function address in NMI backtrace. Signed-off-by: Liu Changcheng diff --git a/lib/nmi_backtrace.c b/lib/nmi_backtrace.c index 46e4c749..61a6b5a 100644 --- a/lib/nmi_backtrace.c +++ b/lib/nmi_backtrace.c @@ -93,8 +93,8 @@ bool nmi_cpu_backtrace(struct pt_regs *regs) if (cpumask_test_cpu(cpu, to_cpumask(backtrace_mask))) { arch_spin_lock(&lock); if (regs && cpu_in_idle(instruction_pointer(regs))) { - pr_warn("NMI backtrace for cpu %d skipped: idling at pc %#lx\n", - cpu, instruction_pointer(regs)); + pr_warn("NMI backtrace for cpu %d skipped: idling at %pS\n", + cpu, (void *)instruction_pointer(regs)); } else { pr_warn("NMI backtrace for cpu %d\n", cpu); if (regs) -- 2.7.4 From 1583338614296935305@xxx Mon Nov 06 17:29:30 +0000 2017 X-GM-THRID: 1583338614296935305 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread