All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Am??rico Wang <xiyou.wangcong@gmail.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	user-mode-linux-devel@lists.sourceforge.net, jdike@addtoit.com,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: do_execve() needs const qualifiers (was Re: [patch 3/3] uml: fix warnings in kernel_execve)
Date: Wed, 1 Apr 2009 17:21:22 +0100	[thread overview]
Message-ID: <20090401162122.GE28946@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20090401161114.GF3848@hack>

On Thu, Apr 02, 2009 at 12:11:14AM +0800, Am??rico Wang wrote:
> 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.

I don't know...  The thing is, it'll trail down into bprm->filename /
bprm->interp and the things get very ugly very fast from that point.

  reply	other threads:[~2009-04-01 16:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-30 18:41 [uml-devel] [patch 1/3] uml: fix compile error from net_device_ops conversion Miklos Szeredi
2009-03-30 18:41 ` Miklos Szeredi
2009-03-30 18:42 ` [uml-devel] (no subject) Miklos Szeredi
2009-03-30 18:42   ` Miklos Szeredi
2009-03-30 18:45 ` [uml-devel] [patch 3/3] uml: fix warnings in kernel_execve Miklos Szeredi
2009-03-30 18:45   ` Miklos Szeredi
2009-04-01 16:11   ` do_execve() needs const qualifiers (was Re: [patch 3/3] uml: fix warnings in kernel_execve) Américo Wang
2009-04-01 16:21     ` Al Viro [this message]
2009-04-04 16:51       ` Américo Wang
2009-03-30 18:47 ` [uml-devel] [patch 2/3] uml: fix link error from prefixing of i386 syscalls with ptregs_ Miklos Szeredi
2009-03-30 18:47   ` Miklos Szeredi
2009-04-01 16:03   ` Américo Wang
2009-04-01 15:49 ` [patch 1/3] uml: fix compile error from net_device_ops conversion Américo Wang

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=20090401162122.GE28946@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=jdike@addtoit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    --cc=xiyou.wangcong@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.