Re: [PATCH] sparse: user annotations for ipc compat code

From: Arnd Bergmann
Date: Fri Jun 11 2004 - 14:11:17 EST



viro@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx schrieb am 11.06.2004, 20:31:20:
> On Fri, Jun 11, 2004 at 05:27:30PM +0200, Arnd Bergmann wrote:

> > old_fs = get_fs();
> > set_fs(KERNEL_DS);
> > - err = sys_msgsnd(first, p, second, third);
> > + err = sys_msgsnd(first, (struct msgbuf __user *)p, second, third);
> > set_fs(old_fs);
>
> Again, makes no sense whatsoever (we _still_ get a warning and clear fix
> would be to get rid of set_fs() here and switch to compat_alloc_user_space()).
>
> Same goes for the rest of patch.
>
> Folks, warnings are not personal performance metrics, they are tools for
> finding bogus code. Sigh...

Ok, makes sense. I thought it was ok after I saw the same thing
done for kernel/compat.c in

http://linux.bkbits.net:8080/linux-2.5/gnupatch@40c10d10xahL03pX3RX14VzG8Qh1mw

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/