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>] [day] [month] [year] [list]
Date:   Fri, 22 Dec 2017 21:57:32 +0800
From:   "Huang\, Ying" <ying.huang@...el.com>
To:     Vitaly Wool <vitalywool@...il.com>
Cc:     LKML <linux-kernel@...r.kernel.org>, <Oleksiy.Avramchenko@...y.com>
Subject: Re: [PATCH/RFC] llist: add llist_[add|del_first]_exclusive

Vitaly Wool <vitalywool@...il.com> writes:

> 2017-12-20 1:57 GMT+01:00 Huang, Ying <ying.huang@...el.com>:
>
> <snip>
>
>>
>> > Could you please elaborate how this would be implemented "on top"?
>>
>> struct llist_node *my_del_first_exclusive(struct llist_head *head)
>> {
>>         struct llist_node *node = llist_del_first(head);
>>
>>         if (node)
>>                 node->next = LLIST_NODE_UNLISTED;
>> }
>>
>> bool my_add_exclusive(struct llist_node *node, struct llist_head *head)
>> {
>>         if (node->next != LLIST_NODE_UNLIST)
>>                 return false;
>>         if (cmpxchg(&node->next, LLIST_NODE_UNLIST, NULL) !=
>>             LLIST_NODE_UNLIST)
>>                 return false;
>>         llist_add(node, head);
>>         return true;
>> }
>>
>
> That would work, thanks. I'll update the patch.

Is there any other users except your code?  If no, I think it's better
to keep it with its only user instead part of llist library at least for
now.  Because I don't know whether the usage model is popular.

Best Regards,
Huang, Ying

> Thanks,
>    Vitaly

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ