When using a large directory with large names, I noticed a 50% increase in the time it took to readdir the entire directory. With small names, the increase did not seem noticeable enough. Tested on a VM with bionic, no SMAP involved. Compared before memchr and after memchr. Need to compare before and after uaccess changes, both without SMAP and with SMAP.
Cascardo. -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1881339 Title: readdir performance when copying to userspace Status in linux package in Ubuntu: Fix Released Status in linux source package in Xenial: Triaged Status in linux source package in Bionic: In Progress Bug description: The following fixes were backported to bionic and xenial to prevent a potential security issue: - Make filldir[64]() verify the directory entry filename is valid - filldir[64]: remove WARN_ON_ONCE() for bad directory entries In that process, they introduced a potential performace impact on readdir. How much is yet to be measured. 9f79b78ef74436c7507bac6bfb7b8b989263bccb Convert filldir[64]() from __put_user() to unsafe_put_user() c512c69187197fe08026cb5bbe7b9709f4f89b73 uaccess: implement a proper unsafe_copy_to_user() and switch filldir over to it The two commits above try to mitigate that performance impact. At least on x86 with SMAP, that should have some effect. At any other platforms, at least on bionic and xenial, any improvements should be measured. Though that is true for x86 with SMAP too. This bug is opened in order to keep track of that possible performance improvement we might add in the future as followup for those two commits. Cascardo. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1881339/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp