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: <20140603162100.7fad1506@jlaw-desktop.mno.stratus.com>
Date:	Tue, 3 Jun 2014 16:21:00 -0400
From:	Joe Lawrence <joe.lawrence@...atus.com>
To:	Jeff Moyer <jmoyer@...hat.com>
CC:	<linux-kernel@...r.kernel.org>, Jens Axboe <axboe@...nel.dk>
Subject: Re: [PATCH 2/2] block,scsi: convert and handle ERR_PTR from
 blk_get_request

On Tue, 3 Jun 2014 15:45:36 -0400
Jeff Moyer <jmoyer@...hat.com> wrote:

> Joe Lawrence <joe.lawrence@...atus.com> writes:
> 
> > The blk_get_request function may fail in low-memory conditions or during
> > device removal (even if __GFP_WAIT is set). To distinguish between these
> > errors, modify the blk_get_request call stack to return the appropriate
> > ERR_PTR. Verify that all callers check the return status and consider
> > IS_ERR instead of a simple NULL pointer check.
> 
> I'm curious to know what testing you did, and what code paths do
> anything different for ENOMEM vs EIO.  I guess ENOMEM may make it all
> the way back to userspace?

Hi Jeff,

Good question.  In the case of the short repro program provided by
Paolo in [1], the ioctl call returned error and set -ENODEV.

As for each individual caller of blk_get_request, I did not audit all
code paths back out to user space.  I can take a look, but I'm guessing
that 24-ish callers might make for quite a *few* scenarios to verify.

Conversion to ERR_PTR was suggested by Jens as a complete fix, but
without sufficient Ack's, I can understand holding off on this part of
the set.

-- Joe

[1] http://thread.gmane.org/gmane.linux.scsi/85824
--
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