[Top] [All Lists]

Re: Register allocation in copy_to_user

To: Ralf Baechle <>
Subject: Re: Register allocation in copy_to_user
Date: Thu, 4 Oct 2001 17:11:45 +0200
References: <>
Sender: wrote:
> Anyway, the attached patch solves this by explicitly building the
> to __copy_user in the argument registers ;-) instead of moving them

This idea totally breaks, when the arguments (to copy_to_user) contain a
function call. We force the compiler to use a caller-saved register (like
across the function call. One place this happens is in net/ipv4/netfilter/

The patch below fixes this, while preserving the original fix (for the tty
corruption). Although this is getting a little messy, the patch is not as
bad as it might seem. gcc will discard the extra temporary variables
cu_from and cu_len) in far the most cases, and use them where necessary to
handle function calls.
Sorry, if this has caused any trouble.

(See attached file: uaccess.patch.gz)

Attachment: uaccess.patch.gz
Description: Binary data

<Prev in Thread] Current Thread [Next in Thread>
  • Re: Register allocation in copy_to_user, tommy . christensen <=