Re: pstore/core: drop cmpxchg based updates

From: Kees Cook
Date: Thu Sep 08 2016 - 18:01:59 EST


On Thu, Sep 8, 2016 at 2:32 PM, Guenter Roeck <linux@xxxxxxxxxxxx> wrote:
> On Wed, Aug 24, 2016 at 03:09:35PM +0200, Sebastian Andrzej Siewior wrote:
>> I have here a FPGA behind PCIe which exports SRAM which I use for
>> pstore. Now it seems that the FPGA no longer supports cmpxchg based
>> updates and writes back 0xffâff and returns the same. This leads to
>> crash during crash rendering pstore useless.
>> Since I doubt that there is much benefit from using cmpxchg() here, I am
>> dropping this atomic access and use the spinlock based version.
>>
>> Cc: Anton Vorontsov <anton@xxxxxxxxxx>
>> Cc: Colin Cross <ccross@xxxxxxxxxxx>
>> Cc: Kees Cook <keescook@xxxxxxxxxxxx>
>> Cc: Tony Luck <tony.luck@xxxxxxxxx>
>> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
>> Tested-by: Rabin Vincent <rabinv@xxxxxxxx>
>
> Great, one item taken off my task list.
>
> As Rabin suggested, this patch is needed for at least some ARM chips,
> and should be applied to stable releases.

Okay, I've annotated it now.

> Reviewed-by: Guenter Roeck <linux@xxxxxxxxxxxx>

Thanks!

-Kees

--
Kees Cook
Nexus Security