All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arun Sharma <arun.sharma@intel.com>
To: Valdis.Kletnieks@vt.edu
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Kill a sparse warning in binfmt_elf.c
Date: Thu, 07 Oct 2004 15:07:04 -0700	[thread overview]
Message-ID: <4165BE08.8060600@intel.com> (raw)
In-Reply-To: <200410071916.i97JGmft018659@turing-police.cc.vt.edu>

On 10/7/2004 12:16 PM, Valdis.Kletnieks@vt.edu wrote:

> Hmm.. there it's a 'const char *name', but we feed it to a 'const void *'
> and then you cast it to a __user. 

I'm not very concerned about const char * being cast to const void *. That's not the focus of the patch[1]. The focus of the patch is really __user.

> Either that *name should be __user
> as well, or you tagged something as a __user that might not be.
>

Certain interfaces such as get_user() will fail if you pass a kernel pointer and unconditionally cast it to __user (without doing a set_fs(KERNEL_DS)). But file_operations->write() is not one of them and hence the patch.

	-Arun

[1] If you insist on this, you should change all the calls to memcpy() as well.

  reply	other threads:[~2004-10-08  1:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-06 22:45 [PATCH] Kill a sparse warning in binfmt_elf.c Arun Sharma
2004-10-07 18:11 ` Valdis.Kletnieks
2004-10-07 18:49   ` Arun Sharma
2004-10-07 18:54     ` Valdis.Kletnieks
2004-10-07 19:01       ` Arun Sharma
2004-10-07 19:16         ` Valdis.Kletnieks
2004-10-07 22:07           ` Arun Sharma [this message]
2004-10-07 19:16       ` David S. Miller
2004-10-07 19:27         ` Valdis.Kletnieks

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=4165BE08.8060600@intel.com \
    --to=arun.sharma@intel.com \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=linux-kernel@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.