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: <20210220033637.GA2858050@casper.infradead.org>
Date:   Sat, 20 Feb 2021 03:36:37 +0000
From:   Matthew Wilcox <willy@...radead.org>
To:     SelvaKumar S <selvakuma.s1@...sung.com>
Cc:     linux-nvme@...ts.infradead.org, kbusch@...nel.org, axboe@...nel.dk,
        damien.lemoal@....com, hch@....de, sagi@...mberg.me,
        linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
        dm-devel@...hat.com, snitzer@...hat.com, selvajove@...il.com,
        joshiiitr@...il.com, nj.shetty@...sung.com, joshi.k@...sung.com,
        javier.gonz@...sung.com, kch@...nel.org,
        linux-fsdevel@...r.kernel.org
Subject: Re: [RFC PATCH v5 3/4] nvme: add simple copy support

On Fri, Feb 19, 2021 at 06:15:16PM +0530, SelvaKumar S wrote:
> +	struct nvme_copy_range *range = NULL;
[...]
> +	range = kmalloc_array(nr_range, sizeof(*range),
> +			GFP_ATOMIC | __GFP_NOWARN);
[...]
> +	req->special_vec.bv_page = virt_to_page(range);
> +	req->special_vec.bv_offset = offset_in_page(range);
> +	req->special_vec.bv_len = sizeof(*range) * nr_range;
[...]
> +struct nvme_copy_range {
> +	__le64			rsvd0;
> +	__le64			slba;
> +	__le16			nlb;
> +	__le16			rsvd18;
> +	__le32			rsvd20;
> +	__le32			eilbrt;
> +	__le16			elbat;
> +	__le16			elbatm;
> +};

so ... at 32 bytes, you can get 128 per 4kB page.  What happens if you
try to send down a command that attempts to copy 129 ranges?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ