This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 147939 - Running executables fails with efault for a driver using map_user_kiobuf
Running executables fails with efault for a driver using map_user_kiobuf
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel (Show other bugs)
3.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Ernie Petrides
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-02-13 10:36 EST by satish
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-02-25 20:04:52 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description satish 2005-02-13 10:36:40 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3)
Gecko/20041001 Firefox/0.10.1

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):
2.4.21-20.ELhugemem

How reproducible:
Always

Steps to Reproduce:
1. run some command with in the driver space
2.
3.
    

Actual Results:  
fails with 'bad address'

Expected Results:  should work

Additional info:
Comment 1 satish 2005-02-14 16:45:14 EST
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..
Comment 2 Ernie Petrides 2005-02-25 20:04:52 EST
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.
Comment 3 satish 2005-02-26 10:00:02 EST
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

Note You need to log in before you can comment on or make changes to this bug.