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-next>] [day] [month] [year] [list]
Message-ID: <60F6FAE47D1BCE4380CC06D18F49789B952F7ED3@NTXBOIMBX02.micron.com>
Date:	Thu, 22 Jan 2015 21:33:08 +0000
From:	"Andy Falanga (afalanga)" <afalanga@...ron.com>
To:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: block layer copying user io vectors

Please CC me directly.

I am working in kernel 2.6.32 (CentOS 6).  To increase the upper limit
of sg from 4mb to at least 128mb in a single SCSI command.  At first I
thought this issue was in sg, but have tracked the issue to the block
layer.

Thinking I could solve this issue by using scatter/gather lists, I
increased the size from 32k to 4mb of each vector.  This did work
until I tried to send 8mb.  When I do so, I get errno EINVAL.  After
some tracing, I tracked the problem into bio_copy_user_iov().

This function does something that seems rather strange.  On line 859,
a for loop determines the number of pages needed for the copying of the
user data to kernel space.  Then the memory is allocated (line
886 bio_kmalloc()).  Then, strangely, on line 895, there is this
conditional:

if (map_data) {
    nr_pages = 1 << map_data->page_order;
    i = map_data->offset / PAGE_SIZE;
}

This effectively ignores the number of pages counted earlier (in this
case which applies to me), and then apparently disregards whatever
memory may have been allocated earlier.  Thinking that this was the
root I tried to correct this by commenting that simple branch from
bio_copy_user_iov, but still had the same result.  Can someone
help me understand what is happening in the block layer?

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