[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJWu+op446kmt4erBT2CQ_XR-SCQ2=29e+JYzcdNBFD5SX11hw@mail.gmail.com>
Date: Tue, 11 Oct 2016 07:41:38 -0700
From: Joel Fernandes <joelaf@...gle.com>
To: Kees Cook <keescook@...omium.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Steven Rostedt <rostedt@...dmis.org>,
Anton Vorontsov <anton@...msg.org>,
Colin Cross <ccross@...roid.com>,
Tony Luck <tony.luck@...el.com>
Subject: Re: [PATCH 2/7] pstore: locking: dont lock unless caller asks to
On Mon, Oct 10, 2016 at 4:48 PM, Kees Cook <keescook@...omium.org> wrote:
> On Fri, Oct 7, 2016 at 10:28 PM, Joel Fernandes <joelaf@...gle.com> wrote:
>> In preparation of not locking at all for certain buffers depending on if
>> there's contention, make locking optional depending if caller requested it.
>
> This should be a bool argument (or enum), with named values so it's
> more readable. For example, these don't immediately tell me what the
> argument does:
>
> persistent_ram_write(cxt->cprz, buf, size, 1);
> persistent_ram_write(cxt->cprz, buf, size, true);
>
> But this does:
>
> persistent_ram_write(cxt->cprz, buf, size, PSTORE_REQUIRE_LOCKING);
>
> As part of this, can you document in the pstore structure which types
> of front-ends require locking and if they don't, why?
Sure, I will make it more descriptive as you suggested.
Thanks,
Joel
Powered by blists - more mailing lists