Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp344061ybt; Fri, 26 Jun 2020 00:28:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYRmHWV5PFCNiTxgyza4xZhpBknTjzuXjjb/+jcQREhjmdmf4ApOjpKSHQze2wxLvdWWT/ X-Received: by 2002:a17:906:5250:: with SMTP id y16mr1382996ejm.3.1593156505493; Fri, 26 Jun 2020 00:28:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593156505; cv=none; d=google.com; s=arc-20160816; b=XVfmxSwIVql5IqgqZeqsrtQ3qUN5/dO+bdmMh1UK+zoIychdNuiBMXxgg11XPJOHUC yc44gPxztyDrLbml2rfIjSGOKvkID4uenLfuKzGOvAKkZplCAvnc8qV6Sxw2XimjUhXc yCT40lDPIGsOupopPbVPdYS61bNXRZC8ga7QAS+4gRR8f/VDeYEa0rFquPNp02Mw3Tgm MPS/o2XMpUvjM+rPy4oJu2PU7aHE/MFis5eCO2mOf0Nbsg9zpkIQ4y1hCrgoXBDBmkLV rG2lwsYcTAycx5/5s/7kTkIWyoclPypKdIbWH0OAFERtMAnA5RhFaN8w7tJJ+8IIRJA1 Wx/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:date:to:cc:from :subject:references:in-reply-to:content-transfer-encoding :mime-version:dkim-signature; bh=rVE2gGMcdBTrZylPbNiSgsk7HUdCF2EQnvGkDTn3LJ4=; b=bTZl7XBsQK2zmcGo/rg6qD0v629s6nSDrnF8KlpTYQbSrjJ4/zJ13FC+2jBGRDmkIx eo1yd+49chun6Xkb8cjUBviI1UlUfUcPLkP5W2r7ggu34dj/I3spLzNq8UQGz6FAItlE 5hcHaG9zoNg1pTRGqA2PPb51k8wo+47c9vQEq03naFz2UriQp+sCsFJmbCLUA/8w27bG Pqvew3EmyRCEYaohcN00PckvahiTdukwcyZgBiBzPncRtizhqduSiD+enxrRwFXCwITQ ENa/6bi0yycn8gTZ20bUhGyVvKEsHprGnLz3eIvz2JmJxrS7wgmpv4cXnDpbr+U63rxp i0+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=StgvoN4F; 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 f6si16886387eds.91.2020.06.26.00.28.02; Fri, 26 Jun 2020 00:28:25 -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=StgvoN4F; 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 S1728751AbgFZH1J (ORCPT + 99 others); Fri, 26 Jun 2020 03:27:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728720AbgFZH1J (ORCPT ); Fri, 26 Jun 2020 03:27:09 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A03FC08C5C1 for ; Fri, 26 Jun 2020 00:27:09 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id d6so4582895pjs.3 for ; Fri, 26 Jun 2020 00:27:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:content-transfer-encoding:in-reply-to:references :subject:from:cc:to:date:message-id:user-agent; bh=rVE2gGMcdBTrZylPbNiSgsk7HUdCF2EQnvGkDTn3LJ4=; b=StgvoN4F8FU5QTAnNsQGhYge/1G6HeXMbO3EDr/y8YcUT/7iIRgkYkr2LS8QBA0+TE aJwJQv38n1h859JcK+L/dM1GkWzwdB4cWujivrbEAJohF3f6qy9RifDqB6igGuyw/80j nrjyxLykAs8ADjUkxPYD3Ye+qol0g0rNMpV7c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding :in-reply-to:references:subject:from:cc:to:date:message-id :user-agent; bh=rVE2gGMcdBTrZylPbNiSgsk7HUdCF2EQnvGkDTn3LJ4=; b=HqRJhRWYEr+O0ADAlgvtUBRus4BTA1M/eiGIxxQMSXS0gwbrYnbk6v8LI8gBSRb1ve 2KasfNDGdYmJxf8shdjtjDRjyuOYgdR3xlVU4LXrupYb3UfRjx6A4ZNp6iGXJt0rQM7U dc65dSlMJxfnatuix04f3gWAJc0M96l3oWPh6B8ygaHrvhCqX1yzTYx/va2kDeg5JykJ Pct7/FucWWFT4DCm452sV55Zt9GMAzb/qmIApB1L8mkd/UkJUJPpvKt0IPBovbIjh4zh 4HQJ0YAjVeYW7juxKztITXsm1l1uON0OIeudOOpB/+Mb5nmqFKHkEYR7pkmZ8jyoUBnf zDCw== X-Gm-Message-State: AOAM5331Y3cHQAgtGyS74XjgkKLC9GA+3Qca6Mgc//I3GlUGol3+59S8 UIoOFzVxlP20KYEeZokYYAiogE00yig= X-Received: by 2002:a17:902:8b82:: with SMTP id ay2mr1438095plb.185.1593156428885; Fri, 26 Jun 2020 00:27:08 -0700 (PDT) Received: from chromium.org ([2620:15c:202:1:fa53:7765:582b:82b9]) by smtp.gmail.com with ESMTPSA id n12sm21216319pgr.88.2020.06.26.00.27.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 00:27:08 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <20200407082923.2001556-1-patrick.rudolph@9elements.com> <20200407082923.2001556-2-patrick.rudolph@9elements.com> <159306873839.62212.9311861115757727633@swboyd.mtv.corp.google.com> Subject: Re: [PATCH v4 1/2] firmware: google: Expose CBMEM over sysfs From: Stephen Boyd Cc: LKML , Patrick Rudolph , Coreboot , Thomas Gleixner , Greg Kroah-Hartman , Alexios Zavras , Allison Randal , Julius Werner , Samuel Holland To: Julius Werner Date: Fri, 26 Jun 2020 00:27:07 -0700 Message-ID: <159315642733.62212.13203844825360378214@swboyd.mtv.corp.google.com> User-Agent: alot/0.9 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > > +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 physica= l 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. >=20 > 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.