<< | Thread Index | >> ]    [ << | Date Index | >> ]

Subject: Re: 64bit bug [fix included...]
From: Olaf Titz <olaf,AT,bigred,DOT,inka,DOT,de>
Date: Tue, 10 Apr 2001 22:42:30 +0200
In-reply-to: <Pine.LNX.4.30.0103290926450.14922-100000@janus.txd.hvrlab.org>

> ...following diff fixes operation on linux/axp...
> (sizeof (unsigned long) != sizeof (uint32) on axp!!!!)

Thanks, this is a real bug and is being fixed. (The timestamping code
in sock.c already has it right.)

> ciped.c:typedef unsigned long crc;
> crc32.c:static unsigned long crc32_tab[] = {
> crc32.c:unsigned long crc32(const unsigned char *s, unsigned int len)
> crc32.c:  unsigned long crc32val = 0;

This is user-mode code, should use u_int32_t (uint32_t?) (but I should
verify that this type is actually available in _all_ major versions of
the C library; it's in my work queue now).

> and especially cipe.h !!!

Most of these are only used internally; it is harmless for them to get
bigger, e.g. flag sets. "sockshost" is an exception since it's an IP
address, _but_ the places where it's declared unsigned long are the
ioctl structures which get included by both kernel and user mode
stuff, and we can't use __u32 in user mode. The really correct
declaration here would be struct sockaddr_in (ouch).

Any "timeout" stuff counting jiffies has to be long AFAICT, see
<linux/sched.h>.

> cipe.h:#define LOCK_PRINTK unsigned long flags;
> spin_lock_irqsave(&cipe_printk_lock, flags)

This must actually be unsigned long on any architecture, see
<asm-alpha/spinlock.h> and <asm-alpha/system.h>.

Olaf





<< | Thread Index | >> ]    [ << | Date Index | >> ]