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>] [day] [month] [year] [list]
Message-ID: <CAFEQzNtv-iUAELME1Z9Ef6oqaq7WOjoGA_MWUSzGmt=KrRST=w@mail.gmail.com>
Date:	Fri, 18 Apr 2014 10:05:24 +0200
From:	Norbert Ciosek <norbertciosek@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: broken UIO functionality for mmap in linux stable

Hello kernel developers,

I have some problems with UIO driver.
To be exact the problem is with uio_mmap_physical function from
drivers/uio/uio.c.

Problems were introduced by commits:
b65502879556d041b45104c6a35abbbba28c8f2d
7314e613d5ff9f0934f7a0f74ed7973b903315d1

These commits added checks if address and size are page aligned.
Of course this is correct for the "mmap" call, but currently there is
no way to store offset in the UIO driver.
Function "map_offset_show" will always return/store 0 with the page
aligned addresses.

Is it possible to add additional field called "offset" to struct uio_mem?
The "addr" could be renamed to "base" and store address with page granularity.
Then this field should be checked in the "uio_mmap_physical" function
instead of "addr".

Beside of this size of the map in the device is not always page aligned.
For example in my device this value is often set to 4.
Should I change this value to be page aligned (i.e. 0x1000 in DTS) and
"remember" the correct size in the user space program which is
managing the device? Maybe there is some other way?

Pozdrawiam / Best regards,

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