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] [day] [month] [year] [list]
Message-ID: <20150831152125.2143.qmail@ns.horizon.com>
Date:	31 Aug 2015 11:21:25 -0400
From:	"George Spelvin" <linux@...izon.com>
To:	linux@...izon.com, oleg@...hat.com
Cc:	eric.dumazet@...il.com, linux-kernel@...r.kernel.org,
	mingo@...nel.org
Subject: Re: [PATCH] task_work: remove fifo ordering guarantee

Oleg Nesterov wrote:
> Actually you need a single tail pointer, See 158e1645e07f3e9f7e49.
> But this doesn't matter.

(This uses a circularly linked list, keeping a pointer to the
tail, and tail->next pointing to the head.)

Yes, if you're not trying to be lockless, that works quite well.

> And this also means that the next writer which does task_work_add() +
> task_work_cancel() will be suprised. Worse, this means that work->func()
> doesn't own its callback_head/container_of. The previous tail is visible
> to task_work_run().

I forgot about task_work_cancel()!  Yes, supporting that as well would
be a problem, and make a messy algorithm even messier.

> Perhaps I missed something. But to me this all looks too clever ;)
> Personally I'd prefer to just add another spinlock_t.
>
> But so far I hope we can keep this stupid but simple "reverse the list"
> loop.

It *is* too complicated.  That's why I described it: to discourage people
from implementing it.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ