lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b4216081-fece-9252-f38c-f4eec5129fb9@redhat.com>
Date:   Mon, 29 Jan 2018 15:09:49 +0800
From:   Jason Wang <jasowang@...hat.com>
To:     "Michael S. Tsirkin" <mst@...hat.com>
Cc:     linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
        John Fastabend <john.fastabend@...il.com>,
        David Miller <davem@...emloft.net>
Subject: Re: [PATCH net-next 05/12] ptr_ring: disallow lockless
 __ptr_ring_full



On 2018年01月29日 12:41, Michael S. Tsirkin wrote:
> On Mon, Jan 29, 2018 at 11:36:09AM +0800, Jason Wang wrote:
>>
>> On 2018年01月26日 10:46, Michael S. Tsirkin wrote:
>>>> On 2018年01月26日 07:36, Michael S. Tsirkin wrote:
>>>>> Similar to bcecb4bbf88a ("net: ptr_ring: otherwise safe empty checks can
>>>>> overrun array bounds") a lockless use of __ptr_ring_full might
>>>>> cause an out of bounds access.
>>>>>
>>>>> We can fix this, but it's easier to just disallow lockless
>>>>> __ptr_ring_full for now.
>>>> It looks to me that just fix this is better than disallow through doc (which
>>>> is easily to be ignored ...).
>>>>
>>>> Thanks
>>> lockless is tricky, and I'd rather not sprinkle READ/WRITE_ONCE where
>>> they aren't necessary.
>>>
>> The problem is then API looks a little bit strange. Lockless were only
>> allowed to be done at __ptr_ring_empty() but not __ptr_ring_full().
>>
>> Thanks
> So __ptr_ring_empty doesn't really work lockless. It merely does not crash.
> I don't believe we can do anything to remove the need to read the
> docs unless people use the safe non __ variants.
>

Ok, then I will ack the series.

Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ