Received: by 10.223.164.202 with SMTP id h10csp460931wrb; Mon, 6 Nov 2017 09:29:31 -0800 (PST) X-Google-Smtp-Source: ABhQp+QiUN/aqUKc+pU8ylB8pqrGfYATrXcO23BW7CMJI0DEJxcv20T/xRY4D6nzEQ3y9V9OoV4f X-Received: by 10.84.225.145 with SMTP id u17mr15151285plj.369.1509989370912; Mon, 06 Nov 2017 09:29:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509989370; cv=none; d=google.com; s=arc-20160816; b=hOGEu+EphpP1KD6hrKFkNfcuo1nIcSkLDaRpHa+Ig7rFwAaD9hH0krg7m6s+U0493d X425fZQ4cfoF4v++8WZ92KT+rIzV//A5/GUV1rZZAEUQ6h8VoZGiPLQKE/nMh3Mr+gvS 64zw2xfkbeITaUVXJTfa0fxXLYnrO8H1/I7LVcfXTmNMxiG3ms5W5ra2Sb9wiUZg5uFU GCjkTx4ME2TFgls0mMEGdQNF4jBI1XEtOY/i6bOXgD/loN7ayPzb9LkeqSkoIb+RjhMJ EyuZT/S79MvEnG+JBee159tK7w1mS7zxxYLzJXtFi4flkdVUgRixXJQD1VjoeTJ9LXeg h+zg== 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:dmarc-filter:arc-authentication-results; bh=C35u2QP+uT2JssVhRL7WYtNjQL2ndBvgtm+eNcOEj8U=; b=tio/cFD3L2XerpfbUjl3qqBFyylqCX74fMnTCytdGePNdxbV5uM+gMxsQmvWnPqyMB 5o3Kqzjh9Xc7REyraaUzbBPaVOvUByd15KFQV0zbyR4t14OvyE3916BlFIpnKTljhdX9 komjXOMMqiqlSubY+DuDUh8tZHcIqMDTJO2aiACyXRsfsGIOYEy36zWp4uilUKnl13BD 6sXZvM6sMwRFIQjfqAav9/R7A82ic0Jkh9P62I2kxa7gzR/9l0TABBAlo0aP92d1r0Ds YfW6Lgm0QP6i53WnH1O/f6Q9gJdlLxc/saEmCinjUVp/H8uAMH8pOw4tbsBl+kqqR/vF Aiug== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b126si11514449pgc.595.2017.11.06.09.29.17; Mon, 06 Nov 2017 09:29:30 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754040AbdKFROE (ORCPT + 96 others); Mon, 6 Nov 2017 12:14:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48024 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753335AbdKFROD (ORCPT ); Mon, 6 Nov 2017 12:14:03 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D819D7F7B0; Mon, 6 Nov 2017 17:14:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D819D7F7B0 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jpoimboe@redhat.com Received: from treble (ovpn-121-77.rdu2.redhat.com [10.10.121.77]) by smtp.corp.redhat.com (Postfix) with SMTP id 34C115D9C7; Mon, 6 Nov 2017 17:14:02 +0000 (UTC) Date: Mon, 6 Nov 2017 11:14:01 -0600 From: Josh Poimboeuf To: "Liu, Changcheng" Cc: Petr Mladek , Sergey Senozhatsky , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] lib_backtrace: fix kernel text address leak Message-ID: <20171106171401.4h546bbvdon45or2@treble> References: <20171106052511.GB69364@sofia> <20171106080528.GA1298@jagdpanzerIV> <20171106105203.GC69364@sofia> <20171106131147.ouihd4ug5ah3vb6a@treble> <20171106164847.GD69364@sofia> <20171106165648.GA95243@sofia> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20171106165648.GA95243@sofia> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 06 Nov 2017 17:14:03 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 07, 2017 at 12:56:48AM +0800, Liu, Changcheng wrote: > 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) Sorry, I had a typo in my suggestion. The subject prefix should be: "nmi_backtrace" instead of "lib_backtrace". Also, when posting a followup patch, please remove the "Re: " from the subject so that it's clear that it's a new patch, and not a comment for the old one. Otherwise it looks great to me. Thanks! -- Josh From 1583307297844566418@xxx Mon Nov 06 09:11:44 +0000 2017 X-GM-THRID: 1583307297844566418 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread