From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3)
Description of problem:
I am running a filesystem module on 2.4.21-20.ELhugemem. The issue is
i am not able to run executables in the filesystem and get a EFAULT
from map_user_kiobuf. kernel_read passes in a buffer address which the
__get_user_pages is not able to map and returns EFAULT. The filesystem
just works fine on a non 'hugemem' kernel. Is there any workaround so
that the kernel address passed by exec can be mapped for map_user_kiobuf?
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. run some command with in the driver space
fails with 'bad address'
Expected Results: should work
It looks like the complication is because we are not able to determine if a
address is user or kernel. We were using find_vma to determine that and that
doesnot work for hugemem. Is there any interface that can be used to determine
if a addr is user or kernel..
Hello, Satish. One cannot determine whether a particular address implies
user-space or kernel-space. The whole point of the hugemem kernel is that
the full 4-GB address space can be used for user-space, implying that some
addresses can be used to reference both spaces. Software must keep track
of whether any particular address should result in a user-space access.
Fair Enough, I used the get_fs() to determine we are called from kernel_read()
and that sort of works. Thanks for looking in to this