All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Anton Vorontsov <anton@enomsg.org>,
	Colin Cross <ccross@android.com>,
	"Luck, Tony" <tony.luck@intel.com>,
	Joel Fernandes <joel@joelfernandes.org>
Subject: Re: [PATCH] pstore/ram: Clarify resource reservation labels
Date: Thu, 18 Oct 2018 00:14:49 -0700	[thread overview]
Message-ID: <CAGXu5jK5GrgoHSC_peChp9Uzx-_EbPqZgtpDC=F+V1cP92cKxA@mail.gmail.com> (raw)
In-Reply-To: <CAPcyv4g_W5KJq8vrVdi8-Hij4zQLLjZdZMkmP7oWABSrmGfLRw@mail.gmail.com>

On Wed, Oct 17, 2018 at 5:49 PM, Dan Williams <dan.j.williams@intel.com> wrote:
> On Wed, Oct 17, 2018 at 5:29 PM Kees Cook <keescook@chromium.org> wrote:
>>
>> When ramoops reserved a memory region in the kernel, it had an unhelpful
>> label of "persistent_memory". When reading /proc/iomem, it would be
>> repeated many times, did not hint that it was ramoops in particular,
>> and didn't clarify very much about what each was used for:
>>
>> 400000000-407ffffff : Persistent Memory (legacy)
>>   400000000-400000fff : persistent_memory
>>   400001000-400001fff : persistent_memory
>> ...
>>   4000ff000-4000fffff : persistent_memory
>>
>> Instead, this adds meaningful labels for how the various regions are
>> being used:
>>
>> 400000000-407ffffff : Persistent Memory (legacy)
>>   400000000-400000fff : ramoops:dump(0/252)
>>   400001000-400001fff : ramoops:dump(1/252)
>> ...
>>   4000fc000-4000fcfff : ramoops:dump(252/252)
>>   4000fd000-4000fdfff : ramoops:console
>>   4000fe000-4000fe3ff : ramoops:ftrace(0/3)
>>   4000fe400-4000fe7ff : ramoops:ftrace(1/3)
>>   4000fe800-4000febff : ramoops:ftrace(2/3)
>>   4000fec00-4000fefff : ramoops:ftrace(3/3)
>>   4000ff000-4000fffff : ramoops:pmsg
>
> Hopefully ramoops is doing request_region() before trying to do
> anything with its ranges, because it's going to collide with the pmem
> driver doing a request_region(). If we want to have pstore use pmem as
> a backing store that's a new drivers/nvdimm/ namespace personality
> driver to turn around and register a persistent memory range with
> pstore rather than the pmem block-device driver.

Yup: it's using request_mem_region() (that's where the labels above
are assigned).

As for nvdimm specifically, yes, I'd love to get pstore hooked up
correctly to nvdimm. How do the namespaces work? Right now pstore
depends one of platform driver data, device tree specification, or
manual module parameters.

-Kees

-- 
Kees Cook
Pixel Security

  reply	other threads:[~2018-10-18  7:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-18  0:29 [PATCH] pstore/ram: Clarify resource reservation labels Kees Cook
2018-10-18  0:49 ` Dan Williams
2018-10-18  7:14   ` Kees Cook [this message]
2018-10-18 15:33     ` Dan Williams
2018-10-18 20:31       ` Kees Cook
2018-10-18 20:58         ` Ross Zwisler
2018-10-18 21:20           ` Kees Cook
2018-10-18 21:35         ` Dan Williams
2018-10-18 22:18           ` Kees Cook
2018-10-18 22:23             ` Dan Williams
2018-10-18 22:26               ` Kees Cook
2018-10-18 22:33                 ` Dan Williams
2018-10-18 22:58                   ` Kees Cook
2018-10-18 22:43                 ` Luck, Tony
2018-10-18 22:49                   ` Dan Williams

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='CAGXu5jK5GrgoHSC_peChp9Uzx-_EbPqZgtpDC=F+V1cP92cKxA@mail.gmail.com' \
    --to=keescook@chromium.org \
    --cc=anton@enomsg.org \
    --cc=ccross@android.com \
    --cc=dan.j.williams@intel.com \
    --cc=joel@joelfernandes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.com \
    /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.