Re: Validating Pointers

Date: Thu Jul 26 2001 - 22:19:09 EST

On Thu 26 Jul at 18:12:57 +0100 done said:
> You can't pass kernel address as if they were userspace. It might happen to
> sometimes work on some architectures. Take a look at the set_fs() stuff

Am I? I though I was doing a pretty plain user<->kernel copy:

        copy_to_user(user_addr, kernel_addr, size);
        copy_from_user(kernel_addr, user_addr, size);

Are you saying that static and dynamically allocated kernel variables end up
in different segments (kernel_ds and user_ds) and the copy is only expected to
succeed if the to and from addresses are in the same segment?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Tue Jul 31 2001 - 21:00:30 EST