* [uml-devel] [Patch] uml: drop const qualifier for kernel_execve() @ 2008-12-02 22:51 ` Américo Wang 0 siblings, 0 replies; 14+ messages in thread From: Américo Wang @ 2008-12-02 22:51 UTC (permalink / raw) To: LKML, Andrew Morton; +Cc: jdike, user-mode-linux-devel UML implementation of kernel_execve() should not have const qualifier, because it will finally call do_execve() which doesn't have. This also shuts up a gcc warning on this. Signed-off-by: WANG Cong <wangcong@zeuux.org> Cc: Jeff Dike <jdike@addtoit.com> --- diff --git a/arch/um/kernel/syscall.c b/arch/um/kernel/syscall.c index c4df705..4fa62ee 100644 --- a/arch/um/kernel/syscall.c +++ b/arch/um/kernel/syscall.c @@ -120,7 +120,7 @@ long sys_olduname(struct oldold_utsname __user * name) return error; } -int kernel_execve(const char *filename, char *const argv[], char *const envp[]) +int kernel_execve(char *filename, char * argv[], char * envp[]) { mm_segment_t fs; int ret; ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Patch] uml: drop const qualifier for kernel_execve() @ 2008-12-02 22:51 ` Américo Wang 0 siblings, 0 replies; 14+ messages in thread From: Américo Wang @ 2008-12-02 22:51 UTC (permalink / raw) To: LKML, Andrew Morton; +Cc: jdike, user-mode-linux-devel UML implementation of kernel_execve() should not have const qualifier, because it will finally call do_execve() which doesn't have. This also shuts up a gcc warning on this. Signed-off-by: WANG Cong <wangcong@zeuux.org> Cc: Jeff Dike <jdike@addtoit.com> --- diff --git a/arch/um/kernel/syscall.c b/arch/um/kernel/syscall.c index c4df705..4fa62ee 100644 --- a/arch/um/kernel/syscall.c +++ b/arch/um/kernel/syscall.c @@ -120,7 +120,7 @@ long sys_olduname(struct oldold_utsname __user * name) return error; } -int kernel_execve(const char *filename, char *const argv[], char *const envp[]) +int kernel_execve(char *filename, char * argv[], char * envp[]) { mm_segment_t fs; int ret; ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [uml-devel] [Patch] uml: drop const qualifier for kernel_execve() 2008-12-02 22:51 ` Américo Wang @ 2008-12-03 1:20 ` Johannes Weiner -1 siblings, 0 replies; 14+ messages in thread From: Johannes Weiner @ 2008-12-03 1:20 UTC (permalink / raw) To: Américo Wang; +Cc: Andrew Morton, jdike, LKML, user-mode-linux-devel On Tue, Dec 02, 2008 at 10:51:09PM +0000, Américo Wang wrote: > UML implementation of kernel_execve() should not have const qualifier, > because it will finally call do_execve() which doesn't have. And you made sure that do_execve() is correctly annotated? Hannes ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Patch] uml: drop const qualifier for kernel_execve() @ 2008-12-03 1:20 ` Johannes Weiner 0 siblings, 0 replies; 14+ messages in thread From: Johannes Weiner @ 2008-12-03 1:20 UTC (permalink / raw) To: Américo Wang; +Cc: LKML, Andrew Morton, jdike, user-mode-linux-devel On Tue, Dec 02, 2008 at 10:51:09PM +0000, Américo Wang wrote: > UML implementation of kernel_execve() should not have const qualifier, > because it will finally call do_execve() which doesn't have. And you made sure that do_execve() is correctly annotated? Hannes ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [uml-devel] [Patch] uml: drop const qualifier for kernel_execve() 2008-12-03 1:20 ` Johannes Weiner @ 2008-12-03 12:32 ` Américo Wang -1 siblings, 0 replies; 14+ messages in thread From: Américo Wang @ 2008-12-03 12:32 UTC (permalink / raw) To: Johannes Weiner; +Cc: Andrew Morton, jdike, LKML, user-mode-linux-devel On Wed, Dec 3, 2008 at 1:20 AM, Johannes Weiner <hannes@cmpxchg.org> wrote: > On Tue, Dec 02, 2008 at 10:51:09PM +0000, Américo Wang wrote: >> UML implementation of kernel_execve() should not have const qualifier, >> because it will finally call do_execve() which doesn't have. > > And you made sure that do_execve() is correctly annotated? > Yes, I checked that. Thanks. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Patch] uml: drop const qualifier for kernel_execve() @ 2008-12-03 12:32 ` Américo Wang 0 siblings, 0 replies; 14+ messages in thread From: Américo Wang @ 2008-12-03 12:32 UTC (permalink / raw) To: Johannes Weiner; +Cc: LKML, Andrew Morton, jdike, user-mode-linux-devel [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 526 bytes --] On Wed, Dec 3, 2008 at 1:20 AM, Johannes Weiner <hannes@cmpxchg.org> wrote:> On Tue, Dec 02, 2008 at 10:51:09PM +0000, Américo Wang wrote:>> UML implementation of kernel_execve() should not have const qualifier,>> because it will finally call do_execve() which doesn't have.>> And you made sure that do_execve() is correctly annotated?> Yes, I checked that. Thanks.ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥ ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [uml-devel] [Patch] uml: drop const qualifier for kernel_execve() 2008-12-03 12:32 ` Américo Wang @ 2008-12-03 13:40 ` Johannes Weiner -1 siblings, 0 replies; 14+ messages in thread From: Johannes Weiner @ 2008-12-03 13:40 UTC (permalink / raw) To: Américo Wang; +Cc: Andrew Morton, jdike, LKML, user-mode-linux-devel On Wed, Dec 03, 2008 at 12:32:02PM +0000, Américo Wang wrote: > On Wed, Dec 3, 2008 at 1:20 AM, Johannes Weiner <hannes@cmpxchg.org> wrote: > > On Tue, Dec 02, 2008 at 10:51:09PM +0000, Américo Wang wrote: > >> UML implementation of kernel_execve() should not have const qualifier, > >> because it will finally call do_execve() which doesn't have. > > > > And you made sure that do_execve() is correctly annotated? > > > > Yes, I checked that. Good. Then please fix up do_execve() or let the warning stand out as a reminder. Hannes ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Patch] uml: drop const qualifier for kernel_execve() @ 2008-12-03 13:40 ` Johannes Weiner 0 siblings, 0 replies; 14+ messages in thread From: Johannes Weiner @ 2008-12-03 13:40 UTC (permalink / raw) To: Américo Wang; +Cc: LKML, Andrew Morton, jdike, user-mode-linux-devel On Wed, Dec 03, 2008 at 12:32:02PM +0000, Américo Wang wrote: > On Wed, Dec 3, 2008 at 1:20 AM, Johannes Weiner <hannes@cmpxchg.org> wrote: > > On Tue, Dec 02, 2008 at 10:51:09PM +0000, Américo Wang wrote: > >> UML implementation of kernel_execve() should not have const qualifier, > >> because it will finally call do_execve() which doesn't have. > > > > And you made sure that do_execve() is correctly annotated? > > > > Yes, I checked that. Good. Then please fix up do_execve() or let the warning stand out as a reminder. Hannes ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [uml-devel] [Patch] uml: drop const qualifier for kernel_execve() 2008-12-03 13:40 ` Johannes Weiner @ 2008-12-06 1:02 ` Américo Wang -1 siblings, 0 replies; 14+ messages in thread From: Américo Wang @ 2008-12-06 1:02 UTC (permalink / raw) To: Johannes Weiner; +Cc: Andrew Morton, jdike, LKML, user-mode-linux-devel On Wed, Dec 3, 2008 at 1:40 PM, Johannes Weiner <hannes@cmpxchg.org> wrote: > On Wed, Dec 03, 2008 at 12:32:02PM +0000, Américo Wang wrote: >> On Wed, Dec 3, 2008 at 1:20 AM, Johannes Weiner <hannes@cmpxchg.org> wrote: >> > On Tue, Dec 02, 2008 at 10:51:09PM +0000, Américo Wang wrote: >> >> UML implementation of kernel_execve() should not have const qualifier, >> >> because it will finally call do_execve() which doesn't have. >> > >> > And you made sure that do_execve() is correctly annotated? >> > >> >> Yes, I checked that. > > Good. Then please fix up do_execve() or let the warning stand out as > a reminder. ?? Confused... do_execve() is OK, we don't need to fix it. Thanks. ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Patch] uml: drop const qualifier for kernel_execve() @ 2008-12-06 1:02 ` Américo Wang 0 siblings, 0 replies; 14+ messages in thread From: Américo Wang @ 2008-12-06 1:02 UTC (permalink / raw) To: Johannes Weiner; +Cc: LKML, Andrew Morton, jdike, user-mode-linux-devel [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 833 bytes --] On Wed, Dec 3, 2008 at 1:40 PM, Johannes Weiner <hannes@cmpxchg.org> wrote:> On Wed, Dec 03, 2008 at 12:32:02PM +0000, Américo Wang wrote:>> On Wed, Dec 3, 2008 at 1:20 AM, Johannes Weiner <hannes@cmpxchg.org> wrote:>> > On Tue, Dec 02, 2008 at 10:51:09PM +0000, Américo Wang wrote:>> >> UML implementation of kernel_execve() should not have const qualifier,>> >> because it will finally call do_execve() which doesn't have.>> >>> > And you made sure that do_execve() is correctly annotated?>> >>>>> Yes, I checked that.>> Good. Then please fix up do_execve() or let the warning stand out as> a reminder. ??Confused... do_execve() is OK, we don't need to fix it. Thanks.ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥ ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [uml-devel] [Patch] uml: drop const qualifier for kernel_execve() 2008-12-06 1:02 ` Américo Wang @ 2008-12-07 19:55 ` Johannes Weiner -1 siblings, 0 replies; 14+ messages in thread From: Johannes Weiner @ 2008-12-07 19:55 UTC (permalink / raw) To: Américo Wang; +Cc: Andrew Morton, jdike, LKML, user-mode-linux-devel On Sat, Dec 06, 2008 at 01:02:16AM +0000, Américo Wang wrote: > On Wed, Dec 3, 2008 at 1:40 PM, Johannes Weiner <hannes@cmpxchg.org> wrote: > > On Wed, Dec 03, 2008 at 12:32:02PM +0000, Américo Wang wrote: > >> On Wed, Dec 3, 2008 at 1:20 AM, Johannes Weiner <hannes@cmpxchg.org> wrote: > >> > On Tue, Dec 02, 2008 at 10:51:09PM +0000, Américo Wang wrote: > >> >> UML implementation of kernel_execve() should not have const qualifier, > >> >> because it will finally call do_execve() which doesn't have. > >> > > >> > And you made sure that do_execve() is correctly annotated? > >> > > >> > >> Yes, I checked that. > > > > Good. Then please fix up do_execve() or let the warning stand out as > > a reminder. > > ?? > Confused... > > do_execve() is OK, we don't need to fix it. I don't see where it writes through @filename. So it seems the right fix would be to make do_execve()s parameter const (and as it seems, a lot more adjustments down this call graph) and not remove a correct const from a callsite. Hannes ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Patch] uml: drop const qualifier for kernel_execve() @ 2008-12-07 19:55 ` Johannes Weiner 0 siblings, 0 replies; 14+ messages in thread From: Johannes Weiner @ 2008-12-07 19:55 UTC (permalink / raw) To: Américo Wang; +Cc: LKML, Andrew Morton, jdike, user-mode-linux-devel On Sat, Dec 06, 2008 at 01:02:16AM +0000, Américo Wang wrote: > On Wed, Dec 3, 2008 at 1:40 PM, Johannes Weiner <hannes@cmpxchg.org> wrote: > > On Wed, Dec 03, 2008 at 12:32:02PM +0000, Américo Wang wrote: > >> On Wed, Dec 3, 2008 at 1:20 AM, Johannes Weiner <hannes@cmpxchg.org> wrote: > >> > On Tue, Dec 02, 2008 at 10:51:09PM +0000, Américo Wang wrote: > >> >> UML implementation of kernel_execve() should not have const qualifier, > >> >> because it will finally call do_execve() which doesn't have. > >> > > >> > And you made sure that do_execve() is correctly annotated? > >> > > >> > >> Yes, I checked that. > > > > Good. Then please fix up do_execve() or let the warning stand out as > > a reminder. > > ?? > Confused... > > do_execve() is OK, we don't need to fix it. I don't see where it writes through @filename. So it seems the right fix would be to make do_execve()s parameter const (and as it seems, a lot more adjustments down this call graph) and not remove a correct const from a callsite. Hannes ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [uml-devel] [Patch] uml: drop const qualifier for kernel_execve() 2008-12-07 19:55 ` Johannes Weiner @ 2008-12-26 9:32 ` Américo Wang -1 siblings, 0 replies; 14+ messages in thread From: Américo Wang @ 2008-12-26 9:32 UTC (permalink / raw) To: Johannes Weiner; +Cc: Andrew Morton, jdike, LKML, user-mode-linux-devel On Sun, Dec 7, 2008 at 7:55 PM, Johannes Weiner <hannes@cmpxchg.org> wrote: > On Sat, Dec 06, 2008 at 01:02:16AM +0000, Américo Wang wrote: >> On Wed, Dec 3, 2008 at 1:40 PM, Johannes Weiner <hannes@cmpxchg.org> wrote: >> > On Wed, Dec 03, 2008 at 12:32:02PM +0000, Américo Wang wrote: >> >> On Wed, Dec 3, 2008 at 1:20 AM, Johannes Weiner <hannes@cmpxchg.org> wrote: >> >> > On Tue, Dec 02, 2008 at 10:51:09PM +0000, Américo Wang wrote: >> >> >> UML implementation of kernel_execve() should not have const qualifier, >> >> >> because it will finally call do_execve() which doesn't have. >> >> > >> >> > And you made sure that do_execve() is correctly annotated? >> >> > >> >> >> >> Yes, I checked that. >> > >> > Good. Then please fix up do_execve() or let the warning stand out as >> > a reminder. >> >> ?? >> Confused... >> >> do_execve() is OK, we don't need to fix it. > > I don't see where it writes through @filename. So it seems the right > fix would be to make do_execve()s parameter const (and as it seems, a > lot more adjustments down this call graph) and not remove a correct > const from a callsite. Hello, Johannes. I apologize for my late reply. Well, not only @filename, but also the next two parameters, but if you also make them const in do_execve(), you will get more warnings. :) So I think my patch is correct. Thanks for your review. ------------------------------------------------------------------------------ _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Patch] uml: drop const qualifier for kernel_execve() @ 2008-12-26 9:32 ` Américo Wang 0 siblings, 0 replies; 14+ messages in thread From: Américo Wang @ 2008-12-26 9:32 UTC (permalink / raw) To: Johannes Weiner; +Cc: LKML, Andrew Morton, jdike, user-mode-linux-devel [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 1494 bytes --] On Sun, Dec 7, 2008 at 7:55 PM, Johannes Weiner <hannes@cmpxchg.org> wrote:> On Sat, Dec 06, 2008 at 01:02:16AM +0000, Américo Wang wrote:>> On Wed, Dec 3, 2008 at 1:40 PM, Johannes Weiner <hannes@cmpxchg.org> wrote:>> > On Wed, Dec 03, 2008 at 12:32:02PM +0000, Américo Wang wrote:>> >> On Wed, Dec 3, 2008 at 1:20 AM, Johannes Weiner <hannes@cmpxchg.org> wrote:>> >> > On Tue, Dec 02, 2008 at 10:51:09PM +0000, Américo Wang wrote:>> >> >> UML implementation of kernel_execve() should not have const qualifier,>> >> >> because it will finally call do_execve() which doesn't have.>> >> >>> >> > And you made sure that do_execve() is correctly annotated?>> >> >>> >>>> >> Yes, I checked that.>> >>> > Good. Then please fix up do_execve() or let the warning stand out as>> > a reminder.>>>> ??>> Confused...>>>> do_execve() is OK, we don't need to fix it.>> I don't see where it writes through @filename. So it seems the right> fix would be to make do_execve()s parameter const (and as it seems, a> lot more adjustments down this call graph) and not remove a correct> const from a callsite. Hello, Johannes. I apologize for my late reply. Well, not only @filename, but also the next two parameters, but if you alsomake them const in do_execve(), you will get more warnings. :)So I think my patch is correct. Thanks for your review.ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥ ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2008-12-26 9:32 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-12-02 22:51 [uml-devel] [Patch] uml: drop const qualifier for kernel_execve() Américo Wang 2008-12-02 22:51 ` Américo Wang 2008-12-03 1:20 ` [uml-devel] " Johannes Weiner 2008-12-03 1:20 ` Johannes Weiner 2008-12-03 12:32 ` [uml-devel] " Américo Wang 2008-12-03 12:32 ` Américo Wang 2008-12-03 13:40 ` [uml-devel] " Johannes Weiner 2008-12-03 13:40 ` Johannes Weiner 2008-12-06 1:02 ` [uml-devel] " Américo Wang 2008-12-06 1:02 ` Américo Wang 2008-12-07 19:55 ` [uml-devel] " Johannes Weiner 2008-12-07 19:55 ` Johannes Weiner 2008-12-26 9:32 ` [uml-devel] " Américo Wang 2008-12-26 9:32 ` Américo Wang
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.