All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: David Howells <dhowells@redhat.com>
Cc: ralf@linux-mips.org, linux-arch@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Make do_execve() take a const filename pointer
Date: Tue, 17 Aug 2010 16:25:27 +0100	[thread overview]
Message-ID: <20100817152526.GC6681@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20100817140737.29854.22899.stgit@warthog.procyon.org.uk>

On Tue, Aug 17, 2010 at 03:07:37PM +0100, David Howells wrote:
> Make do_execve() take a const filename pointer so that kernel_execve() compiles
> correctly on ARM:
> 
> arch/arm/kernel/sys_arm.c:88: warning: passing argument 1 of 'do_execve' discards qualifiers from pointer target type
> 
> This also requires the argv and envp arguments to be consted twice, once for
> the pointer array and once for the strings the array points to.  This is
> because do_execve() passes a pointer to the filename (now const) to
> copy_strings_kernel().  A simpler alternative would be to cast the filename
> pointer in do_execve() when it's passed to copy_strings_kernel().
> 
> do_execve() may not change any of the strings it is passed as part of the argv
> or envp lists as they are some of them in .rodata, so marking these strings as
> const should be fine.
> 
> Further kernel_execve() and sys_execve() need to be changed to match.
> 
> This has been test built on x86_64, frv, arm and mips.
> 
> Signed-off-by: David Howells <dhowells@redhat.com>
> Tested-by: Ralf Baechle <ralf@linux-mips.org>

David,

Thanks for sorting this.

Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

  reply	other threads:[~2010-08-17 15:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-17 14:07 [PATCH] Make do_execve() take a const filename pointer David Howells
2010-08-17 15:25 ` Russell King [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-08-17 22:52 David Howells
2010-08-18  5:50 ` Américo Wang
2010-08-18 16:41   ` Tony Luck
2010-08-18 17:23     ` David Howells

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=20100817152526.GC6681@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=dhowells@redhat.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ralf@linux-mips.org \
    /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.