Bug 147939 - Running executables fails with efault for a driver using map_user_kiobuf
Summary: Running executables fails with efault for a driver using map_user_kiobuf
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel (Show other bugs)
(Show other bugs)
Version: 3.0
Hardware: i686 Linux
medium
medium
Target Milestone: ---
Assignee: Ernie Petrides
QA Contact: Brian Brock
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-02-13 15:36 UTC by satish
Modified: 2007-11-30 22:07 UTC (History)
2 users (show)

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


Attachments (Terms of Use)

Description satish 2005-02-13 15:36:40 UTC
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 21:45:14 UTC
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-26 01:04:52 UTC
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 15:00:02 UTC
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.