Re: [PATCH] Change long to unsigned long in ptrace functions to fix sparse warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu,  1 May 2008 16:19:41 -0700 (PDT)
Roland McGrath <roland@xxxxxxxxxx> wrote:

> I don't know of any problems off hand, but I would testify that there
> aren't any niggling bits there.  Paranoia would suggest comparing object
> code before/after on each arch, since it should not change.
> 

oh gee, it's a ton of code to review, isn't it?  And it's _hard_ review :(

(reviews a bit)

h8300's arch_ptrace() does

	if ((addr & 3) || addr < 0 || addr >= sizeof(struct user)) {

ok, the third comparison saved us.  Lucky...

In fact most architectures seem to have copy-n-pasted that test.  I guess
that going from signed to unsigned is safer than vice-versa.



Now what about frv?

	case PTRACE_PEEKUSR: {
		tmp = 0;
		ret = -EIO;
		if ((addr & 3) || addr < 0)
			break;

we broke that.  Maybe it doesn't matter, don't know.



So yeah, it's _probably_ OK, but I'm not sure that it would be smart to
merge it and hope.  Nor would it be a good use of time to check all that
code just to fix a sparse warning.

--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux