public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gianni Tedesco <gianni@ecsc.co.uk>
To: Margit Schubert-While <margitsw@t-online.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.4.20 copy_from/to_user
Date: 17 Dec 2002 12:52:57 +0000	[thread overview]
Message-ID: <1040129576.1768.14.camel@lemsip> (raw)
In-Reply-To: <4.3.2.7.2.20021217112614.00b55eb0@pop.t-online.de>

[-- Attachment #1: Type: text/plain, Size: 863 bytes --]

On Tue, 2002-12-17 at 10:42, Margit Schubert-While wrote:
> Maybe talking through the top of my hat , however -
> copy_from_user and copy_to_user are used all over the place and the
> return tested to see if an EFAULT should be generated.
> Looking at include/asm-i386/uaccess.h and arch/i386/lib/usercopy.c
> I don't see how these return anything but the 3rd (length) param.

Kernel glibly copies data until a exception occurs, when that happens it
looks at the address of the faulting instruction and jumps to some fixup
code, which somehow makes the function returns the truncated value.

grep for ".section .fixup" and ".section .__ex_table." in those files.

-- 
// Gianni Tedesco (gianni at ecsc dot co dot uk)
lynx --source www.scaramanga.co.uk/gianni-at-ecsc.asc | gpg --import
8646BE7D: 6D9F 2287 870E A2C9 8F60 3A3C 91B5 7669 8646 BE7D

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 232 bytes --]

  reply	other threads:[~2002-12-17 12:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-17 10:42 2.4.20 copy_from/to_user Margit Schubert-While
2002-12-17 12:52 ` Gianni Tedesco [this message]
2002-12-17 13:20   ` Richard B. Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1040129576.1768.14.camel@lemsip \
    --to=gianni@ecsc.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=margitsw@t-online.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox