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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 19 Mar 2023 00:20:08 +0000 From: Lorenzo Stoakes <lstoakes@...il.com> To: linux-mm@...ck.org, linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org, Andrew Morton <akpm@...ux-foundation.org> Cc: Baoquan He <bhe@...hat.com>, Uladzislau Rezki <urezki@...il.com>, Matthew Wilcox <willy@...radead.org>, David Hildenbrand <david@...hat.com>, Liu Shixin <liushixin2@...wei.com>, Jiri Olsa <jolsa@...nel.org>, Lorenzo Stoakes <lstoakes@...il.com> Subject: [PATCH 0/4] convert read_kcore(), vread() to use iterators While reviewing Baoquan's recent changes to permit vread() access to vm_map_ram regions of vmalloc allocations, Willy pointed out [1] that it would be nice to refactor vread() as a whole, since its only user is read_kcore() and the existing form of vread() necessitates the use of a bounce buffer. This patch series does exactly that, as well as adjusting how we read the kernel text section to avoid the use of a bounce buffer in this case as well. This patch series necessarily changes the locking used in vmalloc, however tests indicate that this has very little impact on allocation performance (test results are shown in the relevant patch). This has been tested against the test case which motivated Baoquan's changes in the first place [2] which continues to function correctly, as do the vmalloc self tests. [1] https://lore.kernel.org/all/Y8WfDSRkc%2FOHP3oD@casper.infradead.org/ [2] https://lore.kernel.org/all/87ilk6gos2.fsf@oracle.com/T/#u Lorenzo Stoakes (4): fs/proc/kcore: Avoid bounce buffer for ktext data mm: vmalloc: use rwsem, mutex for vmap_area_lock and vmap_block->lock fs/proc/kcore: convert read_kcore() to read_kcore_iter() mm: vmalloc: convert vread() to vread_iter() fs/proc/kcore.c | 84 +++++++------------ include/linux/vmalloc.h | 3 +- mm/vmalloc.c | 178 +++++++++++++++++++++------------------- 3 files changed, 125 insertions(+), 140 deletions(-) -- 2.39.2
Powered by blists - more mailing lists