Re: [PATCH 2/3 RESEND] ptrace: cleanup address space conversion on ptrace_request()

From: Arnd Bergmann
Date: Tue Aug 24 2010 - 08:48:08 EST


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/