Re: why "probe_kernel_address()", not "probe_user_address()"?

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

 



On Sat, 28 Oct 2006, Luca Tettamanti wrote:

> I agree that it may be confusing. The whole point in using
> __get_user() is that it ensures that the source address is valid.
>
> When handle_BUG() is called the kernel is no more in a "sane" state,
> blindly using the content of the registers may lead to a page fault
> in kernel mode. So the code extract filename and line of the BUG
> checking that the line number is indeed readable, the address of the
> string (file name) is readable and it points to a readable memory
> location.
>
> probe_kernel_address wrapper is used to "hide" the fact that we are
> re-using the infrastructure provided by a function with a confusing
> name ;) The cast to __user is needed to keep sparse quiet.

... more response snipped ...

ok, i'm going to defer to people who are clearly much smarter about
this than me, and i'll go back and read that entire response more
carefully until i understand it.  thanks for explaining it.

rday
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux