Re: copy to user space

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

 





Luís Henriques wrote:

> On Wednesday 21 November 2001 11:20 am, Martin Maletinsky wrote:
> > If 'correct number of bytes' means the number of bytes you requested to
> > copy, the return value indicates a failure of copy_to_user(). As mentioned,
> > the return value of copy_to_user() indicates the number of bytes that have
> > *not* been transfered, i.e. success is indicated by a return value 0.
>
> Ok, so copy_to_user didn't succeded... this means that it cannot be used to
> write to a CS? Or it's more likely that I'm using it uncorrectly?

It seems likely to me, that it didn't succeed because the CS is write protected (i.e. the attempt to write to the CS causes a page fault, which can not be handled correctly
due to the write protection).

>
>
> I'm starting to look at the kernel memory management... probably I'll have to
> change some permissions first...

I think so. However, I don't know what the side effects of such a change will be.

regards
Martin


--
Supercomputing System AG          email: maletinsky@scs.ch
Martin Maletinsky                 phone: +41 (0)1 445 16 05
Technoparkstrasse 1               fax:   +41 (0)1 445 16 10
CH-8005 Zurich


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/



[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