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: <94D0CD8314A33A4D9D801C0FE68B40295BF96AF7@G4W3202.americas.hpqcorp.net>
Date:	Wed, 17 Feb 2016 03:08:16 +0000
From:	"Elliott, Robert (Persistent Memory)" <elliott@....com>
To:	Ming Lei <ming.lei@...onical.com>,
	Sagi Grimberg <sagig@....mellanox.co.il>
CC:	Jens Axboe <axboe@...nel.dk>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
	Christoph Hellwig <hch@...radead.org>,
	"stable@...r.kernel.org" <stable@...r.kernel.org>,
	"tom.leiming@...il.com" <tom.leiming@...il.com>,
	Keith Busch <keith.busch@...el.com>,
	Kent Overstreet <kent.overstreet@...il.com>
Subject: RE: [PATCH 1/4] block: bio: introduce helpers to get the 1st and
 last bvec

> -----Original Message-----
> From: linux-block-owner@...r.kernel.org [mailto:linux-block-
> owner@...r.kernel.org] On Behalf Of Ming Lei
> Sent: Monday, February 15, 2016 3:42 AM
> Subject: Re: [PATCH 1/4] block: bio: introduce helpers to get the 1st and
> last bvec
...
> diff --git a/include/linux/bio.h b/include/linux/bio.h
...
>  static inline void bio_get_last_bvec(struct bio *bio, struct bio_vec *bv)
>  {
> -	struct bvec_iter iter;
> +	struct bvec_iter iter = bio->bi_iter;
> +	int idx;
> +
> +	bio_advance_iter(bio, &iter, iter.bi_size);
> +
> +	WARN_ON(!iter.bi_idx && !iter.bi_bvec_done);

If this ever did trigger, I don't think you'd want it for every bio
with a problem.  WARN_ONCE would be safer.

---
Robert Elliott, HPE Persistent Memory

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ