public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Inaky Perez-Gonzalez" <inaky@linux.intel.com>
To: "Reinette Chatre" <reinette.chatre@linux.intel.com>
Cc: "Andrew Morton" <akpm@osdl.org>,
	"Inaky Perez-Gonzalez" <inaky@linux.intel.com>,
	"Joe Korty" <joe.korty@ccur.com>, "Paul Jackson" <pj@sgi.com>,
	linux-kernel@vger.kernel.org, reinette.chatre@linux.intel.com
Subject: Re: [PATCH] bitmap: parse input from kernel and user buffers
Date: Thu, 5 Oct 2006 15:32:43 -0700 (PDT)	[thread overview]
Message-ID: <1577.10.24.192.66.1160087563.squirrel@linux.intel.com> (raw)
In-Reply-To: <200610051448.34866.reinette.chatre@linux.intel.com>


Reinette Chatre wrote:
> lib/bitmap.c:bitmap_parse() is a library function that received as
> input a user buffer. This seemed to have originated from the way
> the write_proc function of the /proc filesystem operates.
>
> This has been reworked to not use kmalloc and eliminates a lot
> of get_user() overhead by performing one access_ok before using
> __get_user().
> We need to test if we are in kernel or user space (is_user) and access
> the buffer differently. We cannot use __get_user() to access kernel
> addresses in all cases, for example in architectures with separate
> address space for kernel and user.
>
> This function will be useful for other uses as well; for example,
> taking input  for /sysfs instead of /proc, so it was changed to accept
> kernel buffers. We have this use for the Linux UWB project, as part
> as the upcoming bandwidth allocator code.
>
> Only a few routines used this function and they were changed too.
>
> Signed-off-by: Reinette Chatre <reinette.chatre@linux.intel.com>
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>

  reply	other threads:[~2006-10-05 22:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-05  0:56 [PATCH] bitmap: separate bitmap parsing for user buffer and kernel buffer Reinette Chatre
2006-10-05  1:10 ` Andrew Morton
2006-10-05  1:33   ` Inaky Perez-Gonzalez
2006-10-05  1:57     ` Andrew Morton
2006-10-05 19:49       ` [PATCH] bitmap: parse kernel and user buffers Reinette Chatre
2006-10-05 21:48         ` [PATCH] bitmap: parse input from " Reinette Chatre
2006-10-05 22:32           ` Inaky Perez-Gonzalez [this message]
2006-10-05  1:40   ` [PATCH] bitmap: separate bitmap parsing for user buffer and kernel buffer H. Peter Anvin
2006-10-05 19:57   ` Andi Kleen
2006-10-05 20:38     ` Andrew Morton

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=1577.10.24.192.66.1160087563.squirrel@linux.intel.com \
    --to=inaky@linux.intel.com \
    --cc=akpm@osdl.org \
    --cc=joe.korty@ccur.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pj@sgi.com \
    --cc=reinette.chatre@linux.intel.com \
    /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