Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1307748
| Path | csiph.com!weretis.net!feeder4.news.weretis.net!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Dan Williams <dan.j.williams@intel.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v5 0/6] nvdimm: Add an IOCTL pass thru for DSM calls |
| Date | Tue, 12 Jan 2016 20:00:01 +0100 |
| Message-ID | <qQckF-4Yo-5@gated-at.bofh.it> (permalink) |
| References | <qO5nk-7Ld-9@gated-at.bofh.it> <qO69I-88W-9@gated-at.bofh.it> <qPydA-2YB-11@gated-at.bofh.it> <qPW6e-2l7-25@gated-at.bofh.it> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=c3HgFxCNBEV9be3+vy286ui9Chb/iJ4G116Y9Tj9YFQ=; b=BUJ7XVaXoOOyVPYf1ZnrBeScrOnqztgJognJwBLiqhZObPyh1KRfEsEw7b7UPAbUqB hAXY/v29UYYv352+xLoBOtEZkxIpvSP9vwsK/NX9Ixn4ICjNGD1Ep4Oz+O2Liwvb9SV9 kZOnBDvuJ1K4i+ETydQQfKUjh+COetlUWca2bZ9RT71W+fu/Cxc9S5rj9/aVv3zNn08P L5Uyt9GQvw8ngeKkmAdUOlaH5W9j817hFrYpEG5QGLZ4Qsm1w9/TAXRrF4GV7C1t4RPW Td9bs2d2isdeBqUBuGwaW9TRAcPGQgoQGh4yd37gDik4SssYPXfBvW6UEOQJ2xd3CnKg O/rA== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=c3HgFxCNBEV9be3+vy286ui9Chb/iJ4G116Y9Tj9YFQ=; b=ZbRyHMXzYulMwZ1TbLP5G5GViBdffD2U92BeSsY58pNvjHXafkNwop0LqI6EacVtfl AbsfoQOw4RQc9A0kr1WoMHPxVvylXqhR/ADsEr3aBY/JZaYB1RIHUfAMsCGt1RNgxCe6 R9xTw4UpnMGd/5dABMCrNPCs1TEBtWkBERFpvo+FsuCDtH32hbC1gakAOvGsxEo2vT7b mYU+XoavG7sRbR3Hw4BoOxKqdXb/6MRY/NumAciLMluOByo+JdU8n5RlxKCQafOekLdn 4q2Fct4gEwj3WQ+6WIwDfRor0/0ogEvhi7UyA9UhW/u46nmy5MZevErWmGYHXb84TFpt lCNQ== |
| X-Gm-Message-State | ALoCoQmLfrZmcsf173RmlizTWLRMMK6rGazWwNI0HKt0TQWD4sm4o5Sj5DM9nxPQ4cTjRV4heqE7+LMwVyRSe73wC0DetZz5V1jwM/RJ9qvwKkIZE5aHeX4= |
| MIME-Version | 1.0 |
| X-Received | by 10.129.132.22 with SMTP id u22mr86639906ywf.198.1452624916632; Tue, 12 Jan 2016 10:55:16 -0800 (PST) |
| Content-Type | text/plain; charset=UTF-8 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 49 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Ross Zwisler <ross.zwisler@linux.intel.com>, "Rafael J. Wysocki" <rjw@rjwysocki.net>, Len Brown <lenb@kernel.org>, "Elliott, Robert (Persistent Memory)" <elliott@hpe.com>, jmoyer <jmoyer@redhat.com>, Dmitry Krivenok <krivenok.dmitry@gmail.com>, Linda Knippers <linda.knippers@hpe.com>, Robert Moore <robert.moore@intel.com>, Lv Zheng <lv.zheng@intel.com>, Rafael J Wysocki <rafael.j.wysocki@intel.com>, "linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>, Linux ACPI <linux-acpi@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> |
| X-Original-Date | Tue, 12 Jan 2016 10:55:16 -0800 |
| X-Original-Message-ID | <CAPcyv4ikzVM0uvDBpN=+A3+2v_SSvsD0GqP6PZ1S+8OUUhbK7A@mail.gmail.com> |
| X-Original-References | <cover.1452121277.git.jerry.hoemann@hpe.com> <CAPcyv4h_Oc3VVwtjp=+onSVq-Kuidd1r+9fbR-uo+DF_=e+jhg@mail.gmail.com> <CAPcyv4h+R4Aa7Zu3qWfmWwk6SWt22wuOowJvtpFhVUCdamTWDA@mail.gmail.com> <20160112013259.GC79247@tevye.fc.hp.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1307748 |
Show key headers only | View raw
On Mon, Jan 11, 2016 at 5:32 PM, Jerry Hoemann <jerry.hoemann@hpe.com> wrote:
> On Sun, Jan 10, 2016 at 04:03:18PM -0800, Dan Williams wrote:
>> On Wed, Jan 6, 2016 at 3:58 PM, Dan Williams <dan.j.williams@intel.com>wrote:
[..]
>> 2/ Disallow potentially invalid calls to reach firmware. At a minimum
>> the kernel needs to know the uuid in advance for any dsm it wants to
>> send. I.e. check the 'dsm_fun_idx' against the dsm_mask. This is
>> also important for making sure the kernel can manage exclusive access
>> to the configuration data area if present
>> (ND_CMD_{GET|SET}_CONFIG_DATA).
>
> Technically, the kernel doesn't need to know the uuid in advance
> as that is part of the bundle passed into the passthru.
True, but the set of uuids the kernel ever needs to know about is
likely small, and this policy mandates publication/notification of new
command sets to the kernel community. Later on it gives the kernel a
touch point to implement dsm function number blacklisting which I
think is a useful security feature.
I'll leave the UUID parameter in the command in case a device ever
implements multiple command sets and we need to select between two
function number spaces.
>
>
> Are you concerned about firmware mis-behaving when presented
> with a (UUID, Function_Index) that is not supported?
> (and really we should add Revision ID to that tuple.)
>
> In a prior version of the patch not sent upstream, I did "discover" the
> uuid and set up the dsm_mask. However, this created a need to modify
> kernel each time uuid changes. Also, i don't think this is necessary
> as FW should be gracefully validating its input arguments. By
> not setting up/using dsm_mask in pass thru case, this can be tested.
ACPICA will throw parse errors on mis-formatted DSMs. We can't
prevent all malformed calls, but this is basic input validation that
the kernel can perform.
> I don't understand the exclusive access concern w/ config data.
> Could you please elaborate?
See nd_cmd_clear_to_send()... when a dimm is active the kernel
mandates that updates to the namespace labels go through sysfs. This
is a safety measure to prevent userspace from inadvertently clobbering
in use labels. Once the dimm goes idle (all 'region' devices related
to the dimm are disabled) userspace can manually update the
configuration data area.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v5 0/6] nvdimm: Add an IOCTL pass thru for DSM calls Jerry Hoemann <jerry.hoemann@hpe.com> - 2016-01-07 00:10 +0100
Re: [PATCH v5 0/6] nvdimm: Add an IOCTL pass thru for DSM calls Dan Williams <dan.j.williams@intel.com> - 2016-01-07 01:00 +0100
Re: [PATCH v5 0/6] nvdimm: Add an IOCTL pass thru for DSM calls Dan Williams <dan.j.williams@intel.com> - 2016-01-11 01:10 +0100
Re: [PATCH v5 0/6] nvdimm: Add an IOCTL pass thru for DSM calls Jerry Hoemann <jerry.hoemann@hpe.com> - 2016-01-12 02:40 +0100
Re: [PATCH v5 0/6] nvdimm: Add an IOCTL pass thru for DSM calls Dan Williams <dan.j.williams@intel.com> - 2016-01-12 20:00 +0100
csiph-web