Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp490331pxu; Thu, 15 Oct 2020 08:51:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzE4/8y4whCa9X7jWOvI0kjYkD79H2ty+w4m0mWbHuunDYzDmUPufUUkGZzDMB0lxjC4Bk6 X-Received: by 2002:a05:6402:176c:: with SMTP id da12mr5143433edb.28.1602777115065; Thu, 15 Oct 2020 08:51:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602777115; cv=none; d=google.com; s=arc-20160816; b=pgs4Zl+hiG4FrGR8S4NhzR2QyEmsWW9F/L3YiPyWZ3C7oKJJj6QQeL3SvLXg4g+sDF eruW6Y5vB0InB7gRnxzhrAimEhH53yGk4HeMWI9Cv2Nb8+sHQfDxC7iqdkQAV6AGmFRE FOacjbtg9+p4kDBz0P4ZPSmbBkKV1eSfZf9AxRvAcCvddMIl+jUXPYHehv5WzJMelZVw 9xfc0teB+r48itr2sttZsU57mg7Sn2ZLuXeL3Am/4dY/Rh4YbpIwH2mByY2X/dlo9CUn VnB0jGVjFjX4VM2iw7VFDM458einQRvcEEbhHYMagnXUbRjkPe3cORO739jIJz7Qe6/a ZxiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=AeuWtlVpD8ffKjSV2dmxTrcBmBjjpfKDnYVKjfFi89U=; b=rtA52YLvf77gcW+D1mpSIQ0mcGPnCbEj+/BWMx9/GLC1DpU2Kgfa0iT6Ip5M6DIpKy P90s0sOKryLgqpkzaqjhfu0ZvOoWeCQA2sMqC0XTO3PQ3xVMhMKQLvR4ocM/p5jhaEFf cZQz3o7NCLSMFkRxYdsW36QS1V0dnHSqgODTbcU6VaQbl8d6ZeChzlpzw2hWw/CI7iKi xpae1hN49iVmKZQodXjdjYTOWULibGVF6a0elQD7sS5ElsuFd6Wnn6i7PodwAHaCGloK acSfBg0BuihTvnaFCUa8AtBXHTCuzRlKOXmmaKo+u5UrPB3KxWozt9fvBGrMnOz4x6Ys SQ8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y93si2337798edy.356.2020.10.15.08.51.19; Thu, 15 Oct 2020 08:51:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389806AbgJOPte (ORCPT + 99 others); Thu, 15 Oct 2020 11:49:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:45008 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389713AbgJOPte (ORCPT ); Thu, 15 Oct 2020 11:49:34 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B3AAA21D41; Thu, 15 Oct 2020 15:49:33 +0000 (UTC) Date: Thu, 15 Oct 2020 11:49:31 -0400 From: Steven Rostedt To: Masami Hiramatsu Cc: LKML , Ingo Molnar Subject: Re: [PATCH v3 0/3] tracing: Show real address instead of hashed pointer Message-ID: <20201015114931.1c9803ae@gandalf.local.home> In-Reply-To: <160277369795.29307.6792451054602907237.stgit@devnote2> References: <160277369795.29307.6792451054602907237.stgit@devnote2> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 15 Oct 2020 23:54:58 +0900 Masami Hiramatsu wrote: > Hi, > > Here is the 3rd version of the series for real address printing in trace log. > > Here is the previous version, I've fixed [1/3] to use krealloc(), fix memory > allocation error check and add __printf() attribute, according to Steve's > comment. > > https://lore.kernel.org/lkml/160275239876.115066.10891356497426857018.stgit@devnote2/ > > > Since trace_seq_printf() use in-kernel vsprintf() at last, the %p is always > converted to the hash value instead of real address. > > For the dmesg it maybe secure, but for the ftrace, I think it is > meaningless because > > - tracefs is used by root user, so no need to hide it. > - tracefs user can access percpu/cpu*/trace_pipe_raw which stores real > address on the trace buffer. > - external commands like perf doesn't convert to the hash value. > > And when debugging kernel, we would like to know real address which tells > us the address is in which area in the kernel by comparing with kernel > memory mapping. > > However, to compare the trace log with dmesg, we also need a bridging > information. So 3/3 gives the options/hash-ptr knob which switches > the output format. > Thanks Masami, I'm going to hold off on adding this for this merge window, and look at applying it for the next window. -- Steve