Re: 2.2.17.8

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 16, 2000 at 03:02:35PM +0200, Gisle S{lensminde wrote:
> 
> When compiling the tests in the linux/crypto/testing directory, I
> got a compile error for the tests. The symbol 'schedule' was missing
> for several of the ciphers (maybe all), so I got a linker error.
> The kernel itself on the other hand, linked fine.
> 


Argh.. it is the 

if (current->need_resched)
    schedule();

in gen-cbc.h and gen-ecb.h.  Added in 2.2.17.8.  We need this to avoid
the loopback filesystem to end up on top of the latency-tests. As a
start we need a stub for schedule().  

The bad news is "current".  It is a magic variable that lies at the
start of the stack-pointer, so on i386 it is derived from %esp.  So
current->need_resched is peeking at places it shouldn't :-(.

The good news is that accessing "current" won't cause a segfault when
the stack starts on a page boundary.  And since our stub for
schedule() is a nop, it will run correctly no matter what
current->need_resched turns out to be :-)

So the following patch should fix the problem:

--- i17xx/crypto/testing/stubs.c        Mon Oct 16 15:20:25 2000
+++ i17x.nomodule/crypto/testing/stubs.c        Mon Oct 16 15:17:04 2000
@@ -36,3 +36,9 @@
        return (int) name;
 }
 
+asmlinkage void schedule(void)
+{
+}
+
+
+


astor

-- 
Alexander Kjeldaas                Mail:  astor@xxxxxxx
finger astor@xxxxxxxxxxxxxxxxx for OpenPGP key.

Linux-crypto:  cryptography in and on the Linux system
Archive:       http://mail.nl.linux.org/linux-crypto/


[Index of Archives]     [Kernel]     [Linux Crypto]     [Gnu Crypto]     [Gnu Classpath]     [Netfilter]     [Bugtraq]
  Powered by Linux