Re: Kernel mappings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, May 11, 2007 at 03:39:08PM -0400, Michael Cashwell wrote:
> I'm trying to make sense of an Oops in a driver I'm trying to port  
> from 2.4 to 2.6.21 on an embedded ARM platform. I've scoured every  
> archive and Google page I could find but because my issue is very  
> specific I can't find anything that helps.
> 
> In a nutshell, I have the module building and loading for 2.6 but  
> when a user land app attempts to use the driver it fails (unable to  
> handle kernel paging request).
> 
> The address in question is of the CPU's internal peripheral  
> registers. The key issue is that I can access that address from  
> kernel mode just fine. But the failure happens when the user land app  
> down-calls via an ioctl into the driver module. The oops message says  
> it was "Mode SVC_32 Segment user".
> 
> I thought I'd read that once the syscall happens and the driver is  
> called by do_ioctl (which is happening) that it should be in kernel  
> mode. I don't understand what else I need to do to allow me to access  
> kernel mappings that I know exist.

It *is* running in kernel mode, and that's also what the Oops says:
SVC_32 is ARM supervisor mode (aka kernel mode). It also says that the
problem is accessing user mode memory. Without having seen the source,
I guess you're probably directly dereferencing a userland address
without using copy_from_user().

> Is there a call I need to make to reach kernel mode? Or am I supposed  
> to map the physical range I need again during an init down-call?

I don't understand what you mean, sorry. Have a look at the mmap()
details in LDD3 (google for ldd3 and it will take you to the right
place).


Erik

- -- 
They're all fools. Don't worry. Darwin may be slow, but he'll
eventually get them. -- Matthew Lammers in alt.sysadmin.recovery
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD4DBQFGRX+F/PlVHJtIto0RAuppAJQILN5Q8LFSpU1uqFQWgSv2AFLcAJ9uHUzJ
j1AoQl2OS1017BnkSCofLw==
=B9AT
-----END PGP SIGNATURE-----

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux