Hacksaw wrote:
>What I would expect the kernel to do is this:
>
>system_call_data_prep (userdata, size){ [...]
> for each page from userdata to userdata+size
> {
> if the page is swapped out, swap it in
> if the page is not owned by the user process, return
On Sat, 16 Apr 2005, Hacksaw wrote:
> >if you want actual concrete examples, let me know.
> I'd love a few, but maybe privately?
>
>
> I can certainly see where always copying is simpler; I certainly consider this
> to be an optimization, which must be looked at carefully, lest you end up with
>
>if you want actual concrete examples, let me know.
I'd love a few, but maybe privately?
I can certainly see where always copying is simpler; I certainly consider this
to be an optimization, which must be looked at carefully, lest you end up with
that which speed things up a little, but adds a
if you want actual concrete examples, let me know.
I'd love a few, but maybe privately?
I can certainly see where always copying is simpler; I certainly consider this
to be an optimization, which must be looked at carefully, lest you end up with
that which speed things up a little, but adds a
On Sat, 16 Apr 2005, Hacksaw wrote:
if you want actual concrete examples, let me know.
I'd love a few, but maybe privately?
I can certainly see where always copying is simpler; I certainly consider this
to be an optimization, which must be looked at carefully, lest you end up with
that
Hacksaw wrote:
What I would expect the kernel to do is this:
system_call_data_prep (userdata, size){ [...]
for each page from userdata to userdata+size
{
if the page is swapped out, swap it in
if the page is not owned by the user process, return -ENOWAYMAN
On Sat, 16 Apr 2005, Hacksaw wrote:
> Sorry if this bugs anyone, but I'm learning things here.
>
> What I would expect the kernel to do is this:
>
> system_call_data_prep (userdata, size){
>
>if !4G/4G {
> for each page from userdata to userdata+size
> {
> if the page is
Sorry if this bugs anyone, but I'm learning things here.
What I would expect the kernel to do is this:
system_call_data_prep (userdata, size){
if !4G/4G {
for each page from userdata to userdata+size
{
if the page is swapped out, swap it in
if the page is not
Sorry if this bugs anyone, but I'm learning things here.
What I would expect the kernel to do is this:
system_call_data_prep (userdata, size){
if !4G/4G {
for each page from userdata to userdata+size
{
if the page is swapped out, swap it in
if the page is not
On Sat, 16 Apr 2005, Hacksaw wrote:
Sorry if this bugs anyone, but I'm learning things here.
What I would expect the kernel to do is this:
system_call_data_prep (userdata, size){
if !4G/4G {
for each page from userdata to userdata+size
{
if the page is swapped out,
Tomko wrote:
Catalin Marinas wrote:
No, it is because this function checks whether the access to the user
space address is OK. There are situations when it can also sleep (page
not present).
what u means "OK"? kernel space should have right to access any
memory address , can u expained in
Tomko wrote:
Catalin Marinas wrote:
No, it is because this function checks whether the access to the user
space address is OK. There are situations when it can also sleep (page
not present).
what u means OK? kernel space should have right to access any
memory address , can u expained in
> Catalin Marinas wrote:
> >Tomko <[EMAIL PROTECTED]> wrote:
> >>Inside the system call , the kernel often copy the data by calling
> >>copy_from_user() rather than just using strcpy(), is it because the
> >>memory mapping in kenel space is different from user space?
> >No, it is because this
Catalin Marinas wrote:
Tomko <[EMAIL PROTECTED]> wrote:
Inside the system call , the kernel often copy the data by calling
copy_from_user() rather than just using strcpy(), is it because the
memory mapping in kenel space is different from user space?
No, it is because this function checks
On Wed, 13 Apr 2005, Theodore Ts'o wrote:
On Wed, Apr 13, 2005 at 08:40:05AM -0400, Richard B. Johnson wrote:
The kernel does NOT have to copy data from user-space before
using it.
Incorrect. It must, or the kernel code in question is by definition
buggy.
What? Explain why a memory-mapped buffer
On Wed, Apr 13, 2005 at 08:40:05AM -0400, Richard B. Johnson wrote:
> The kernel does NOT have to copy data from user-space before
> using it.
Incorrect. It must, or the kernel code in question is by definition
buggy.
> In fact, user-mode pointers are valid in kernel-space
> when the kernel is
On Wed, 13 Apr 2005, Hacksaw wrote:
Why not use it directly
Some of these reasons are:
It seems like you gave reason why userland pointers shouldn't be trusted,
not
why userland data should be copied into kernel land. All the problems you
mentioned would have to be solved by the kernel regardless
>>Why not use it directly
>Some of these reasons are:
It seems like you gave reason why userland pointers shouldn't be trusted, not
why userland data should be copied into kernel land. All the problems you
mentioned would have to be solved by the kernel regardless of copying the data
around.
On Wed, 2005-04-13 at 12:21 +0800, Tomko wrote:
> Hi all,
>
> I am new to linux , hope someone can help me.
> While i am reading the source code of the linux system call , i find
> that the system call need to call copy_from_user() to copy the data from
> user space to kernel space before using
Tomko <[EMAIL PROTECTED]> wrote:
> Inside the system call , the kernel often copy the data by calling
> copy_from_user() rather than just using strcpy(), is it because the
> memory mapping in kenel space is different from user space?
No, it is because this function checks whether the access to
hi ,
Thank you for your reply, can i ask some more question?
Inside the system call , the kernel often copy the data by calling
copy_from_user() rather than just using strcpy(), is it because the
memory mapping in kenel space is different from user space? for example
, now user program want to
On Wed, 2005-04-13 12:21:41 +0800, Tomko <[EMAIL PROTECTED]>
wrote in message <[EMAIL PROTECTED]>:
> While i am reading the source code of the linux system call , i find
> that the system call need to call copy_from_user() to copy the data from
> user space to kernel space before using it . Why
On Wed, 13 Apr 2005, Eshwar wrote:
>
> >The quick and simple answer to this question is: data integrity.
>
> >The main thing to understand is that, from the perspective of the
> >kernel, any user input provided in the form of system calls must have
> >immutable data. Only if the data is immutable
On Wed, 13 Apr 2005, Eshwar wrote:
The quick and simple answer to this question is: data integrity.
The main thing to understand is that, from the perspective of the
kernel, any user input provided in the form of system calls must have
immutable data. Only if the data is immutable can the
On Wed, 2005-04-13 12:21:41 +0800, Tomko [EMAIL PROTECTED]
wrote in message [EMAIL PROTECTED]:
While i am reading the source code of the linux system call , i find
that the system call need to call copy_from_user() to copy the data from
user space to kernel space before using it . Why not use
hi ,
Thank you for your reply, can i ask some more question?
Inside the system call , the kernel often copy the data by calling
copy_from_user() rather than just using strcpy(), is it because the
memory mapping in kenel space is different from user space? for example
, now user program want to
Tomko [EMAIL PROTECTED] wrote:
Inside the system call , the kernel often copy the data by calling
copy_from_user() rather than just using strcpy(), is it because the
memory mapping in kenel space is different from user space?
No, it is because this function checks whether the access to the
On Wed, 2005-04-13 at 12:21 +0800, Tomko wrote:
Hi all,
I am new to linux , hope someone can help me.
While i am reading the source code of the linux system call , i find
that the system call need to call copy_from_user() to copy the data from
user space to kernel space before using it .
Why not use it directly
Some of these reasons are:
It seems like you gave reason why userland pointers shouldn't be trusted, not
why userland data should be copied into kernel land. All the problems you
mentioned would have to be solved by the kernel regardless of copying the data
around.
On Wed, 13 Apr 2005, Hacksaw wrote:
Why not use it directly
Some of these reasons are:
It seems like you gave reason why userland pointers shouldn't be trusted,
not
why userland data should be copied into kernel land. All the problems you
mentioned would have to be solved by the kernel regardless
On Wed, Apr 13, 2005 at 08:40:05AM -0400, Richard B. Johnson wrote:
The kernel does NOT have to copy data from user-space before
using it.
Incorrect. It must, or the kernel code in question is by definition
buggy.
In fact, user-mode pointers are valid in kernel-space
when the kernel is
On Wed, 13 Apr 2005, Theodore Ts'o wrote:
On Wed, Apr 13, 2005 at 08:40:05AM -0400, Richard B. Johnson wrote:
The kernel does NOT have to copy data from user-space before
using it.
Incorrect. It must, or the kernel code in question is by definition
buggy.
What? Explain why a memory-mapped buffer
Catalin Marinas wrote:
Tomko [EMAIL PROTECTED] wrote:
Inside the system call , the kernel often copy the data by calling
copy_from_user() rather than just using strcpy(), is it because the
memory mapping in kenel space is different from user space?
No, it is because this function checks
Catalin Marinas wrote:
Tomko [EMAIL PROTECTED] wrote:
Inside the system call , the kernel often copy the data by calling
copy_from_user() rather than just using strcpy(), is it because the
memory mapping in kenel space is different from user space?
No, it is because this function checks
On Wed, 13 Apr 2005, Tomko wrote:
> Hi all,
>
> I am new to linux , hope someone can help me.
> While i am reading the source code of the linux system call , i find
> that the system call need to call copy_from_user() to copy the data from
> user space to kernel space before using it . Why not
On Wed, 13 Apr 2005, Tomko wrote:
Hi all,
I am new to linux , hope someone can help me.
While i am reading the source code of the linux system call , i find
that the system call need to call copy_from_user() to copy the data from
user space to kernel space before using it . Why not use it
36 matches
Mail list logo