All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <swboyd@chromium.org>
To: Julius Werner <jwerner@chromium.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Patrick Rudolph <patrick.rudolph@9elements.com>,
	Coreboot <coreboot@coreboot.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Alexios Zavras <alexios.zavras@intel.com>,
	Allison Randal <allison@lohutok.net>,
	Julius Werner <jwerner@chromium.org>,
	Samuel Holland <samuel@sholland.org>
Subject: Re: [PATCH v4 1/2] firmware: google: Expose CBMEM over sysfs
Date: Fri, 26 Jun 2020 00:27:07 -0700	[thread overview]
Message-ID: <159315642733.62212.13203844825360378214@swboyd.mtv.corp.google.com> (raw)
In-Reply-To: <CAODwPW9Gp+sjt7hdTrDmU-KnfpbXNkuQL52+v_FxwSzSSTH_yg@mail.gmail.com>

Quoting Julius Werner (2020-06-25 13:51:34)
> > > +What:          /sys/bus/coreboot/devices/.../cbmem_attributes/address
> > > +Date:          Apr 2020
> > > +KernelVersion: 5.6
> > > +Contact:       Patrick Rudolph <patrick.rudolph@9elements.com>
> > > +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.

Ok. Regardless of the concern of the physical address is there any usage
of this attribute by userspace? The description makes it sound like it's
a pure debug feature, which implies that it should be in debugfs and not
in sysfs.

  reply	other threads:[~2020-06-26  7:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-07  8:29 [PATCH v4 0/2] firmware: google: Expose coreboot tables and CBMEM patrick.rudolph
2020-04-07  8:29 ` [PATCH v4 1/2] firmware: google: Expose CBMEM over sysfs patrick.rudolph
2020-04-20  0:07   ` Samuel Holland
2020-06-25  7:05   ` Stephen Boyd
2020-06-25 20:51     ` Julius Werner
2020-06-26  7:27       ` Stephen Boyd [this message]
2020-07-01  0:22         ` Julius Werner
2020-04-07  8:29 ` [PATCH v4 2/2] firmware: google: Expose coreboot tables " patrick.rudolph
2020-04-20  0:07   ` Samuel Holland
2020-06-25  7:10   ` Stephen Boyd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=159315642733.62212.13203844825360378214@swboyd.mtv.corp.google.com \
    --to=swboyd@chromium.org \
    --cc=alexios.zavras@intel.com \
    --cc=allison@lohutok.net \
    --cc=coreboot@coreboot.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jwerner@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patrick.rudolph@9elements.com \
    --cc=samuel@sholland.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.