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]
Date:	Tue, 1 May 2012 20:37:37 +0200
From:	Jens Axboe <jaxboe@...ionio.com>
To:	Jeff Moyer <jmoyer@...hat.com>
CC:	Tejun Heo <tj@...nel.org>, Dave Jones <davej@...hat.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Sasha Levin <levinsasha928@...il.com>
Subject: Re: [PATCH v3.4-rc5] block: iocontext->nr_tasks should be initialized
 to one

On 2012-05-01 20:31, Jeff Moyer wrote:
> Jens Axboe <jaxboe@...ionio.com> writes:
> 
>> On 2012-05-01 20:09, Tejun Heo wrote:
>>> On Tue, May 01, 2012 at 08:02:39PM +0200, Jens Axboe wrote:
>>>> On 2012-05-01 18:17, Tejun Heo wrote:
>>>>> create_task_io_context() left ioc->nr_tasks at zero; however, a newly
>>>>> created ioc should have its nr_tasks initialized to one as it begins
>>>>> attached to the task creating it.
>>>>>
>>>>> This affects only CLONE_IO which currently doesn't seem to have any
>>>>> actual user.  Sasha triggered WARN_ON_ONCE() in ioc_task_link() using
>>>>> syscall fuzzer.  Even when it happens, the failure mode isn't critical
>>>>> (blk-cgroup may allow attaching a CLONE_IO'd task to a cgroup when it
>>>>> shouldn't and blkcg limits may behave weirdly).
>>>>
>>>> CLONE_IO is an exported interface, it can be set from clone(2).
>>>> Otherwise Sasha would not have hit this :-)
>>>
>>> Yeah, but with pthread not exposing it, I'm very skeptical how much,
>>> if any, use it's getting.  With its incompatibility with blk-cgroup
>>> and cfq being able to merge coop request streams, I'm not sure how
>>> much we need it.  Maybe we can just make it noop?
>>
>> It's a lot more robust and specific than hoping to get coop merging. For
>> cfq, it also implies that multiple threads sharing an io context should
>> be accounted as one.
>>
>> But as to actual users, I really don't know. I agree it's probably not
>> that widely used. If google still had that code search, we could get a
>> better idea :-)
> 
> I know of one project: the venerable dump/restore utility uses CLONE_IO.

Thanks Jeff, now I remember the specifics of what we tested. IIRC, we
also did numbers back then comparing the coop merging vs specifically
using CLONE_IO.

-- 
Jens Axboe

--
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