public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Namhyung Kim <namhyung@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	Roland McGrath <roland@redhat.com>,
	Oleg Nesterov <oleg@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3 RESEND] ptrace: cleanup address space conversion on ptrace_request()
Date: Tue, 24 Aug 2010 13:45:06 +0200	[thread overview]
Message-ID: <201008241345.06507.arnd@arndb.de> (raw)
In-Reply-To: <1282581489.1659.13.camel@leonhard>

On Monday 23 August 2010, Namhyung Kim wrote:
> But removing __force results in following sparse warning:
> 
>  ptrace.c:567:40: warning: cast adds address space to expression
> (<asn:1>)

The problem is that ptrace takes a 'long' argument, not 'unsigned long'.
Sparse complains about adding address spaces in all casts except those
from/to unsigned long, which we often use as an opaque token that can
fit anything.

I don't think we ever rely on 'data' being signed, and user space
sees it as 'void *' anyway, so it should be possible to just turn
it into 'unsigned long'.

	Arnd

  reply	other threads:[~2010-08-24 11:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-22 10:22 [PATCH 2/3] ptrace: add __force markup Namhyung Kim
2010-08-22 20:06 ` Arnd Bergmann
2010-08-23 16:06   ` [PATCH 2/3 RESEND] ptrace: cleanup address space conversion on ptrace_request() Namhyung Kim
2010-08-23 16:21     ` Christoph Hellwig
2010-08-23 16:38       ` Namhyung Kim
2010-08-24 11:45         ` Arnd Bergmann [this message]
2010-08-25  7:48           ` Namhyung Kim
2010-08-25 11:42             ` Arnd Bergmann

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=201008241345.06507.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@gmail.com \
    --cc=oleg@redhat.com \
    --cc=roland@redhat.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