Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp107672ybt; Thu, 25 Jun 2020 16:37:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHMUDj14zEyfGpi8+gE5zrG/rwRtbxlu8WtwUuTFblwtBWU9S+FOniw5s8UfbmOrS49pwi X-Received: by 2002:aa7:c15a:: with SMTP id r26mr642663edp.21.1593128244937; Thu, 25 Jun 2020 16:37:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593128244; cv=none; d=google.com; s=arc-20160816; b=CqVZrWGItbr+f4iTd/m+PBT6MHHOqsi6NjeTmK3Ik/jnnkAJQB4UzjojXbHbCiQIHn 4HK1nJ9u9igLysY/YPJRtpIsxlqsOQRC/fIC3hoQHe5P28oagGozcEBzlOZgMXv3QR3l lBVKTgCmF0WYIzAqAfFRegq0Nu3W5WTEYAf6ORqlYu2YkmFVXw/g/bSliS2g4kz1otxs tIPLiqwbCLDK8XtsYnvbLac+1DU2MRl3PK1raNTH9/knlTm+BrsQhsokML5g9qCEot3p JTGM7huTZl1+x2AX/EchM+kiybgbeNJWKGLmSkHu9i7fEyIsjrKYHZ3TOjOcECb6wTGu dTog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=QPPK3kBNKaygr37eIBL2NH14o8ojaSRKAXG3ZctXctU=; b=VTg/u+G1kXVco9JMvgjVzXO//j9Eou1rGpOjts8UTWzxGguyDDh6EDRbBNunERZ/hK yhv9acjfcN6MO+qLLjMtHr0Coks8nn6wmSVXQEuXq2qIkx2N6PYuFeLRyrGNPxx6Hzua ElM/YAvoiAsG2h4DCIO/rcLKiI2NHUrVGP3eiyY3G1LIhxs2ckBxUzKtyz6bJygJ80vo moxcLaknT0dUTE7jOVHAsKRf/OIKa41orXedWoEiL7gDCQupI7XfYpwRSSBTbG+Yrc9v klc+XueFcha/pAAOn86smgzvGNWwRl/0HiWLbD2pTnUrpvpOrFZnDANIqW3ulz8LX91z xjIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="DQbv/4QS"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l24si2438139ejp.69.2020.06.25.16.37.01; Thu, 25 Jun 2020 16:37:24 -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; dkim=pass header.i=@chromium.org header.s=google header.b="DQbv/4QS"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405278AbgFYUvs (ORCPT + 99 others); Thu, 25 Jun 2020 16:51:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405069AbgFYUvr (ORCPT ); Thu, 25 Jun 2020 16:51:47 -0400 Received: from mail-vk1-xa43.google.com (mail-vk1-xa43.google.com [IPv6:2607:f8b0:4864:20::a43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFD59C08C5C1 for ; Thu, 25 Jun 2020 13:51:47 -0700 (PDT) Received: by mail-vk1-xa43.google.com with SMTP id m21so452806vkp.1 for ; Thu, 25 Jun 2020 13:51:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QPPK3kBNKaygr37eIBL2NH14o8ojaSRKAXG3ZctXctU=; b=DQbv/4QS3JFQnnim4jVc7bYne+sHKObOWgW8nD4EHwy+k4GMvGoWohiuqp+LqFW62O wOznO3U9/OM34V2dW3i4FiVZQOzvD6nWJRGDHFtdwWigQ25rndz92UpUBC8g0+AVLoPZ vLgKZi5q0c96GF0m0VGVSSRnCIjXWCfhHS4eg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QPPK3kBNKaygr37eIBL2NH14o8ojaSRKAXG3ZctXctU=; b=sESS4IWgoyG8SP9C5RJ+MImPsLGRu09f/9hfHJJjwhWOI/jQ93LsunuqpG9gQdt9Zr kpExpRemnVvtEylr5PHQ7rkTm25F/bBatFXyox/IduJ+xpj2iHROqmgBzVbJSpL2OVYu DfVXZvAONT9PlkIErfniBw4BcPFSFqQkSVdxhqTlCE/a5qWPa8R3jYGBdfaODGWjJc++ CZkYT2yjajozbOJjXy06Z9Xvn86aiY2alCZqytk0H4hLAGH2K1dpsMh7m2KvyGdZKmDK lQEkBAW2nt2ey6AbDiMNzdU+WsHlDdLzDe1zEK01REKtc3hsj5IuwGC53wX98mVUACW0 sOtA== X-Gm-Message-State: AOAM530zwdnEtL+P8fXEEzKssvyQcqQsldB+8sblYTolHPIAxMuj+qzM FfDwpsZ9quDkFEIa66Q47fA2NRzvVD1E0izK/ZfEFjPq X-Received: by 2002:a1f:b44d:: with SMTP id d74mr8530827vkf.59.1593118306307; Thu, 25 Jun 2020 13:51:46 -0700 (PDT) MIME-Version: 1.0 References: <20200407082923.2001556-1-patrick.rudolph@9elements.com> <20200407082923.2001556-2-patrick.rudolph@9elements.com> <159306873839.62212.9311861115757727633@swboyd.mtv.corp.google.com> In-Reply-To: <159306873839.62212.9311861115757727633@swboyd.mtv.corp.google.com> From: Julius Werner Date: Thu, 25 Jun 2020 13:51:34 -0700 Message-ID: Subject: Re: [PATCH v4 1/2] firmware: google: Expose CBMEM over sysfs To: Stephen Boyd Cc: LKML , Patrick Rudolph , Coreboot , Thomas Gleixner , Greg Kroah-Hartman , Alexios Zavras , Allison Randal , Julius Werner , Samuel Holland Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > +What: /sys/bus/coreboot/devices/.../cbmem_attributes/address > > +Date: Apr 2020 > > +KernelVersion: 5.6 > > +Contact: Patrick Rudolph > > +Description: > > + coreboot device directory can contain a file named > > + cbmem_attributes/address if the device corresponds to a CBMEM > > + buffer. > > + The file holds an ASCII representation of the physical address > > + of the CBMEM buffer in hex (e.g. 0x000000008000d000) and should > > + be used for debugging only. > > If this is for debugging purposes only perhaps it should go into > debugfs. We try to not leak information about physical addresses to > userspace and this would let an attacker understand where memory may be. > That's not ideal and should be avoided. This is memory allocated by firmware and not subject to (k)ASLR, so nothing valuable can be leaked here. The same addresses could already be parsed out of /sys/firmware/log. Before this interface we usually accessed this stuff via /dev/mem (and tools that want to remain backwards-compatible will probably want to keep doing that), so having a quick shorthand to grab physical addresses can be convenient.