linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* copy_from_user problem
@ 2008-02-26  1:47 Maynard Johnson
  2008-02-26  2:56 ` Benjamin Herrenschmidt
  2008-02-26  5:29 ` Paul Mackerras
  0 siblings, 2 replies; 14+ messages in thread
From: Maynard Johnson @ 2008-02-26  1:47 UTC (permalink / raw)
  To: linuxppc-dev

Hi,
I'm developing a kernel module that needs to parse the in-memory ELF 
objects for a shared library (libc, to be specific).  When running my 
test on a 32-bit library, it works fine, but for a 64-bit library, the 
very first copy_from_user() fails:
    Elf64_Ehdr ehdr;
    copy_from_user(&ehdr, location_of_lib, sizeof(Elf64_Ehdr);

I talked this over a bit with Will Schmidt.  He determined that 
access_ok (being done as a result of copy_from_user) was failing, but we 
don't know why.  I have 32-bit and 64-bit testcases that start up and 
then pause, waiting for input.  We look at the entry for libc in 
/proc/<pid>/maps, and the permissions are the same for both 32-bit and 
64-bit.

I've run this test on both a stock SLES 10 SP1 kernel and on 2.6.24. 
I'm sure this is a user error, but for the life of me, I don't know what 
I'm doing wrong.

Can anyone out there help?

Thanks.
Maynard Johnson
LTC POWER Toolchain

^ permalink raw reply	[flat|nested] 14+ messages in thread
* copy_from_user problem
@ 2005-08-11  2:52 V MURAHARI
  2005-08-11 11:02 ` Clemens Koller
  2005-08-11 14:29 ` T Michael Turney
  0 siblings, 2 replies; 14+ messages in thread
From: V MURAHARI @ 2005-08-11  2:52 UTC (permalink / raw)
  To: linuxppc-dev@ozlabs.org

[-- Attachment #1: Type: text/html, Size: 3645 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-02-27 20:25 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-26  1:47 copy_from_user problem Maynard Johnson
2008-02-26  2:56 ` Benjamin Herrenschmidt
2008-02-26 14:49   ` Maynard Johnson
2008-02-26 15:01     ` Nathan Lynch
2008-02-26 15:30       ` Nathan Lynch
2008-02-26 15:36       ` Maynard Johnson
2008-02-26 23:22     ` Benjamin Herrenschmidt
2008-02-27 12:27       ` Maynard Johnson
2008-02-27 12:40         ` Arnd Bergmann
2008-02-27 20:24         ` Benjamin Herrenschmidt
2008-02-26  5:29 ` Paul Mackerras
  -- strict thread matches above, loose matches on Subject: below --
2005-08-11  2:52 V MURAHARI
2005-08-11 11:02 ` Clemens Koller
2005-08-11 14:29 ` T Michael Turney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).