All of lore.kernel.org
 help / color / mirror / Atom feed
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [PATCH] enable to read region 5 from /dev/kmem
Date: Tue, 12 Jul 2005 00:14:29 +0000	[thread overview]
Message-ID: <42D30B65.2060806@jp.fujitsu.com> (raw)
In-Reply-To: <42C501CD.4010907@jp.fujitsu.com>

Luck, Tony wrote:
>>This patch allows users to read region 5 from /dev/kmem and 
>>enhances range check of it.
> 
> 
> I'm uneasy about this change to drivers/char/mem.c.  Won't it stop
> those architectures that have memory at physical 0x0 from accessing
> it?

Sorry,  I sent wrong patch.
This !ptr check should be done in read_kmem and kmem doesn't have address 0x0.

Another way is
=
#define KMEM_ERR_PTR (void *)-1

if (ptr = KMEM_ERR_PTR)
	return -EFAULT
=
or no check.

By the way, can ia64's copy_to_user(from, buf, size) catch bad "from" ?

Regards,
-- Kamezawa

> 
>  		ptr = xlate_dev_mem_ptr(p);
> -
> +		if (!ptr)
> +			return -EFAULT
> 
> -Tony
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 



  parent reply	other threads:[~2005-07-12  0:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-01  8:41 [PATCH] enable to read region 5 from /dev/kmem KAMEZAWA Hiroyuki
2005-07-11 23:02 ` Luck, Tony
2005-07-12  0:14 ` KAMEZAWA Hiroyuki [this message]
2005-07-12  0:22 ` Chen, Kenneth W
2005-07-12  1:16 ` KAMEZAWA Hiroyuki
2005-07-12  7:18 ` KAMEZAWA Hiroyuki
2005-07-12 17:14 ` Luck, Tony
2005-07-12 18:23 ` david mosberger
2005-07-12 19:05 ` Luck, Tony
2005-07-12 21:39 ` david mosberger
2005-07-12 22:08 ` Luck, Tony
2005-07-13  0:33 ` KAMEZAWA Hiroyuki

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=42D30B65.2060806@jp.fujitsu.com \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-ia64@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.