lkml.org 
[lkml]   [2009]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectdo_execve() needs const qualifiers (was Re: [patch 3/3] uml: fix warnings in kernel_execve)
On Mon, Mar 30, 2009 at 08:45:12PM +0200, Miklos Szeredi wrote:
>From: Miklos Szeredi <mszeredi@suse.cz>
>
>Fix the following warnings:
>
>arch/um/kernel/syscall.c: In function 'kernel_execve':
>arch/um/kernel/syscall.c:130: warning: passing argument 1 of 'um_execve' discards qualifiers from pointer target type
>arch/um/kernel/syscall.c:130: warning: passing argument 2 of 'um_execve' discards qualifiers from pointer target type
>arch/um/kernel/syscall.c:130: warning: passing argument 3 of 'um_execve' discards qualifiers from pointer target type
>
>Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
>---
> arch/um/kernel/syscall.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>Index: linux-2.6/arch/um/kernel/syscall.c
>===================================================================
>--- linux-2.6.orig/arch/um/kernel/syscall.c 2009-03-30 20:25:17.000000000 +0200
>+++ linux-2.6/arch/um/kernel/syscall.c 2009-03-30 20:36:20.000000000 +0200
>@@ -127,7 +127,8 @@ int kernel_execve(const char *filename,
>
> fs = get_fs();
> set_fs(KERNEL_DS);
>- ret = um_execve(filename, argv, envp);
>+ ret = um_execve((char *)filename, (char __user *__user *)argv,
>+ (char __user *__user *) envp);

Well... I found this many days ago and I did a similar fix.

However, I think this doesn't fix the real problem. The real problem
is do_execve() doesn't have the correct const qualifiers, I am queueing
a huge patch to fix all the 'const' issues from do_execve() and more,
but I don't if Al would like it or not.

So let's Cc Al to see his advice.

Thanks.


--
Do what you love, f**k the rest! F**k the regulations!



\
 
 \ /
  Last update: 2009-04-01 18:13    [W:0.067 / U:6.676 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site