All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] post-2.6.3 build error
@ 2004-02-23 17:20 Gerd Knorr
  2004-02-25 19:47 ` BlaisorBlade
  0 siblings, 1 reply; 5+ messages in thread
From: Gerd Knorr @ 2004-02-23 17:20 UTC (permalink / raw)
  To: Jeff Dike, uml devel

  Hi,

You might have noticed already that in latest linus tree um doesn't
build any more.  The reason is that sys_sched_setscheduler() is declared
now in linux/sched.h, which conflicts with the declaration in
arch/um/kernel/sys_call_table.c.  As quick+dirty fix I've just commented
the declaration.  It builds now, but gives a warning (which is harmless I
think as the exact type of the function shouldn't matter for the syscall
table).  Anyone has a better/cleaner fix for that?

  Gerd

--- linux-2004-02-22/arch/um/kernel/sys_call_table.c~	2004-02-23 15:39:51.000000000 +0100
+++ linux-2004-02-22/arch/um/kernel/sys_call_table.c	2004-02-23 17:30:16.995802718 +0100
@@ -151,7 +151,7 @@
 extern syscall_handler_t sys_munlockall;
 extern syscall_handler_t sys_sched_setparam;
 extern syscall_handler_t sys_sched_getparam;
-extern syscall_handler_t sys_sched_setscheduler;
+//extern syscall_handler_t sys_sched_setscheduler;
 extern syscall_handler_t sys_sched_getscheduler;
 extern syscall_handler_t sys_sched_get_priority_max;
 extern syscall_handler_t sys_sched_get_priority_min;


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
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] 5+ messages in thread

* Re: [uml-devel] post-2.6.3 build error
  2004-02-23 17:20 [uml-devel] post-2.6.3 build error Gerd Knorr
@ 2004-02-25 19:47 ` BlaisorBlade
  2004-02-25 21:12   ` [uml-devel] " Gerd Knorr
  0 siblings, 1 reply; 5+ messages in thread
From: BlaisorBlade @ 2004-02-25 19:47 UTC (permalink / raw)
  To: user-mode-linux-devel

Alle 18:20, lunedì 23 febbraio 2004, Gerd Knorr ha scritto:
>   Hi,
>
> You might have noticed already that in latest linus tree um doesn't
> build any more.  The reason is that sys_sched_setscheduler() is declared
> now in linux/sched.h, which conflicts with the declaration in
> arch/um/kernel/sys_call_table.c.  As quick+dirty fix I've just commented
> the declaration.  It builds now, but gives a warning (which is harmless I
> think as the exact type of the function shouldn't matter for the syscall
> table).  Anyone has a better/cleaner fix for that?

I agree that it's harmless (you can add a typecast as it is done for other 
functions there). By the way (unrelated) you could maybe remove include 
"linux/sys.h" since it claims to be unused.

Nothing cleaner since avoiding the inclusion of sched.h is impossible. And 
this is the fix used for similar cases in that file.

Also, please fix this line:

__NR_sched_yield ] = (syscall_handler_t *) yield

It should refer to sys_sched_yield. yield() is not even asmlinkage, so this 
could case serious problems, and it is commented as "for kernel usage". Also 
I checked i386 syscall table, and it uses sys_sched_yield.

Bye
-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&opÌk
_______________________________________________
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] 5+ messages in thread

* [uml-devel] Re: post-2.6.3 build error
  2004-02-25 19:47 ` BlaisorBlade
@ 2004-02-25 21:12   ` Gerd Knorr
  2004-02-26 19:30     ` BlaisorBlade
  0 siblings, 1 reply; 5+ messages in thread
From: Gerd Knorr @ 2004-02-25 21:12 UTC (permalink / raw)
  To: user-mode-linux-devel

BlaisorBlade <blaisorblade_spam@yahoo.it> writes:

> __NR_sched_yield ] = (syscall_handler_t *) yield
> 
> It should refer to sys_sched_yield. yield() is not even asmlinkage, so this 
> could case serious problems, and it is commented as "for kernel usage". Also 
> I checked i386 syscall table, and it uses sys_sched_yield.

There is another related one (asmlinkage where it shouldn't be) in
mprotect.c.  With the new CONFIG_REGPARM config option it becomes
really important to get that right ...

  Gerd

Index: linux-2.6.3/mm/mprotect.c
===================================================================
--- linux-2.6.3.orig/mm/mprotect.c
+++ linux-2.6.3/mm/mprotect.c
@@ -221,7 +221,7 @@ fail:
 	return error;
 }
 
-asmlinkage long
+long
 do_mprotect(struct mm_struct *mm, unsigned long start, size_t len, 
 	     unsigned long prot)
 {


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
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] 5+ messages in thread

* Re: [uml-devel] Re: post-2.6.3 build error
  2004-02-25 21:12   ` [uml-devel] " Gerd Knorr
@ 2004-02-26 19:30     ` BlaisorBlade
  2004-02-26 21:10       ` Gerd Knorr
  0 siblings, 1 reply; 5+ messages in thread
From: BlaisorBlade @ 2004-02-26 19:30 UTC (permalink / raw)
  To: user-mode-linux-devel

Alle 22:12, mercoledì 25 febbraio 2004, Gerd Knorr ha scritto:
> BlaisorBlade <blaisorblade_spam@yahoo.it> writes:
> > __NR_sched_yield ] = (syscall_handler_t *) yield
> >
> > It should refer to sys_sched_yield. yield() is not even asmlinkage, so
> > this could case serious problems, and it is commented as "for kernel
> > usage". Also I checked i386 syscall table, and it uses sys_sched_yield.
>
> There is another related one (asmlinkage where it shouldn't be) in
> mprotect.c.

Good catch.

> With the new CONFIG_REGPARM config option it becomes
> really important to get that right ...

Yes, however I think that one asmlinkage more is not very bad (old convention 
used where the call can be optimized), but that a missing asmlinkage could be 
crashy. At least until the prototype is correct; I just noticed that 
do_mprotect is protoized without asmlinkage - and this can be actually 
crashy. Luckily CONFIG_REGPARM is not in the stock kernel.

If it were, that could have explained some Skas-2.6 crashes which can be seen 
here (there is already one BUG hit which explains it in part, see here: "Host 
2.6.2/3 + CFQ + BlaisorBlade patches"... but on one kernel it Oopsed and on 
another it crashed, so there could be something else).

-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&opÌk
_______________________________________________
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] 5+ messages in thread

* [uml-devel] Re: post-2.6.3 build error
  2004-02-26 19:30     ` BlaisorBlade
@ 2004-02-26 21:10       ` Gerd Knorr
  0 siblings, 0 replies; 5+ messages in thread
From: Gerd Knorr @ 2004-02-26 21:10 UTC (permalink / raw)
  To: user-mode-linux-devel

BlaisorBlade <blaisorblade_spam@yahoo.it> writes:

> crashy. Luckily CONFIG_REGPARM is not in the stock kernel.

It is in Linus' bk tree, so 2.6.4 will have that ...

  Gerd



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
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] 5+ messages in thread

end of thread, other threads:[~2004-02-26 21:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-23 17:20 [uml-devel] post-2.6.3 build error Gerd Knorr
2004-02-25 19:47 ` BlaisorBlade
2004-02-25 21:12   ` [uml-devel] " Gerd Knorr
2004-02-26 19:30     ` BlaisorBlade
2004-02-26 21:10       ` Gerd Knorr

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.