Re: [patch] Re: Linux 2.4.5-ac6

2001-06-09 Thread Ivan Kokshaysky

On Fri, Jun 08, 2001 at 06:08:46PM +0200, Maciej W. Rozycki wrote:
>  Still it has two loops...

Ok, here is a single loop version.

Ivan.

--- 2.4.5-ac11/mm/mmap.cFri Jun  8 15:59:35 2001
+++ linux/mm/mmap.c Sat Jun  9 12:50:05 2001
@@ -398,27 +398,37 @@ free_vma:
 static inline unsigned long arch_get_unmapped_area(struct file *filp, unsigned long 
addr, unsigned long len, unsigned long pgoff, unsigned long flags)
 {
struct vm_area_struct *vma;
+   unsigned long addr_limit = TASK_SIZE - len;
+   unsigned long addr1 = 0;
 
if (len > TASK_SIZE)
return -ENOMEM;
 
if (addr) {
addr = PAGE_ALIGN(addr);
-   vma = find_vma(current->mm, addr);
-   if (TASK_SIZE - len >= addr &&
-   (!vma || addr + len <= vma->vm_start))
-   return addr;
+   if (addr > TASK_UNMAPPED_BASE)
+   addr1 = addr;
+   goto find_free_area;
}
+
+default_area:
addr = PAGE_ALIGN(TASK_UNMAPPED_BASE);
 
+find_free_area:
for (vma = find_vma(current->mm, addr); ; vma = vma->vm_next) {
/* At this point:  (!vma || addr < vma->vm_end). */
-   if (TASK_SIZE - len < addr)
-   return -ENOMEM;
+   if (addr_limit < addr)
+   break;
if (!vma || addr + len <= vma->vm_start)
return addr;
addr = vma->vm_end;
}
+   if (addr1) {
+   /* No unmapped areas above addr; try below it */
+   addr_limit = addr1;
+   goto default_area;
+   }
+   return -ENOMEM;
 }
 #else
 extern unsigned long arch_get_unmapped_area(struct file *, unsigned long, unsigned 
long, unsigned long, unsigned long);
--- 2.4.5-ac11/include/linux/binfmts.h  Mon Jun  4 14:19:00 2001
+++ linux/include/linux/binfmts.h   Mon Jun  4 20:24:50 2001
@@ -32,6 +32,9 @@ struct linux_binprm{
unsigned long loader, exec;
 };
 
+/* Forward declaration */
+struct mm_struct;
+
 /*
  * This structure defines the functions that are used to load the binary formats that
  * linux accepts.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [patch] Re: Linux 2.4.5-ac6

2001-06-09 Thread Ivan Kokshaysky

On Fri, Jun 08, 2001 at 06:08:46PM +0200, Maciej W. Rozycki wrote:
  Still it has two loops...

Ok, here is a single loop version.

Ivan.

--- 2.4.5-ac11/mm/mmap.cFri Jun  8 15:59:35 2001
+++ linux/mm/mmap.c Sat Jun  9 12:50:05 2001
@@ -398,27 +398,37 @@ free_vma:
 static inline unsigned long arch_get_unmapped_area(struct file *filp, unsigned long 
addr, unsigned long len, unsigned long pgoff, unsigned long flags)
 {
struct vm_area_struct *vma;
+   unsigned long addr_limit = TASK_SIZE - len;
+   unsigned long addr1 = 0;
 
if (len  TASK_SIZE)
return -ENOMEM;
 
if (addr) {
addr = PAGE_ALIGN(addr);
-   vma = find_vma(current-mm, addr);
-   if (TASK_SIZE - len = addr 
-   (!vma || addr + len = vma-vm_start))
-   return addr;
+   if (addr  TASK_UNMAPPED_BASE)
+   addr1 = addr;
+   goto find_free_area;
}
+
+default_area:
addr = PAGE_ALIGN(TASK_UNMAPPED_BASE);
 
+find_free_area:
for (vma = find_vma(current-mm, addr); ; vma = vma-vm_next) {
/* At this point:  (!vma || addr  vma-vm_end). */
-   if (TASK_SIZE - len  addr)
-   return -ENOMEM;
+   if (addr_limit  addr)
+   break;
if (!vma || addr + len = vma-vm_start)
return addr;
addr = vma-vm_end;
}
+   if (addr1) {
+   /* No unmapped areas above addr; try below it */
+   addr_limit = addr1;
+   goto default_area;
+   }
+   return -ENOMEM;
 }
 #else
 extern unsigned long arch_get_unmapped_area(struct file *, unsigned long, unsigned 
long, unsigned long, unsigned long);
--- 2.4.5-ac11/include/linux/binfmts.h  Mon Jun  4 14:19:00 2001
+++ linux/include/linux/binfmts.h   Mon Jun  4 20:24:50 2001
@@ -32,6 +32,9 @@ struct linux_binprm{
unsigned long loader, exec;
 };
 
+/* Forward declaration */
+struct mm_struct;
+
 /*
  * This structure defines the functions that are used to load the binary formats that
  * linux accepts.
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [patch] Re: Linux 2.4.5-ac6

2001-06-08 Thread Gerhard Mack

On Fri, 8 Jun 2001 [EMAIL PROTECTED] wrote:

> On Thu, Jun 07, 2001 at 08:31:46PM +0200, Maciej W. Rozycki wrote:
> > On Thu, 7 Jun 2001, Ivan Kokshaysky wrote:
> 
> > > Exactly. However, there are situations when you have only two options:
> > > rewrite from scratch or use -taso. Netscape vs. mozilla is a good example. :-)
> > 
> >  Why can't mozilla be fixed?  With the -taso option there is actually less
> > encouragement to do so.
> 
> Mozilla is fine.  Its netscape 4.X that probably needs -taso.

And only the old netscape 4.x releases at that afik the newer releases are
all compiled ELF.

Gerhard


--
Gerhard Mack

[EMAIL PROTECTED]

<>< As a computer I find your faith in technology amusing.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [patch] Re: Linux 2.4.5-ac6

2001-06-08 Thread Ivan Kokshaysky

On Thu, Jun 07, 2001 at 08:28:04PM +0200, Maciej W. Rozycki wrote:
>  DU seems to map as low as possible, it would seem.

Yes, I've just checked, starting at 64K...

>  Maybe we could just
> do the same for OSF/1 binaries by setting TASK_UNMAPPED_BASE
> appropriately? 

No. I've changed in load_aout_binary() set_personality(PER_LINUX) to
set_personality(PER_LINUX_32BIT), and now I have another error.
You will laugh, but...

$ netscape
665:/usr/lib/netscape/netscape-communicator: : Fatal Error: mmap available address is 
not larger than requested

This happens after
mmap(0x7fdc8000, 40960, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 
0) = 0x40018000

And note, this is the message from loader, not from netscape itself.
So I think my second patch is an easiest solution for now.
Look, compared with the code in Linus' tree:
- it doesn't add any overhead in general case (addr == 0);
- if the specified address is too high and we can't find a free
  area above it, we just continue search from TASK_UNMAPPED_BASE
  as usual; 
- if address is too low, extra cost is only compare and taken branch.
I think it's clean enough.

Ivan.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [patch] Re: Linux 2.4.5-ac6

2001-06-08 Thread jlnance

On Thu, Jun 07, 2001 at 08:31:46PM +0200, Maciej W. Rozycki wrote:
> On Thu, 7 Jun 2001, Ivan Kokshaysky wrote:

> > Exactly. However, there are situations when you have only two options:
> > rewrite from scratch or use -taso. Netscape vs. mozilla is a good example. :-)
> 
>  Why can't mozilla be fixed?  With the -taso option there is actually less
> encouragement to do so.

Mozilla is fine.  Its netscape 4.X that probably needs -taso.

Jim
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [patch] Re: Linux 2.4.5-ac6

2001-06-08 Thread jlnance

On Thu, Jun 07, 2001 at 08:31:46PM +0200, Maciej W. Rozycki wrote:
 On Thu, 7 Jun 2001, Ivan Kokshaysky wrote:

  Exactly. However, there are situations when you have only two options:
  rewrite from scratch or use -taso. Netscape vs. mozilla is a good example. :-)
 
  Why can't mozilla be fixed?  With the -taso option there is actually less
 encouragement to do so.

Mozilla is fine.  Its netscape 4.X that probably needs -taso.

Jim
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [patch] Re: Linux 2.4.5-ac6

2001-06-08 Thread Gerhard Mack

On Fri, 8 Jun 2001 [EMAIL PROTECTED] wrote:

 On Thu, Jun 07, 2001 at 08:31:46PM +0200, Maciej W. Rozycki wrote:
  On Thu, 7 Jun 2001, Ivan Kokshaysky wrote:
 
   Exactly. However, there are situations when you have only two options:
   rewrite from scratch or use -taso. Netscape vs. mozilla is a good example. :-)
  
   Why can't mozilla be fixed?  With the -taso option there is actually less
  encouragement to do so.
 
 Mozilla is fine.  Its netscape 4.X that probably needs -taso.

And only the old netscape 4.x releases at that afik the newer releases are
all compiled ELF.

Gerhard


--
Gerhard Mack

[EMAIL PROTECTED]

 As a computer I find your faith in technology amusing.

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [patch] Re: Linux 2.4.5-ac6

2001-06-08 Thread Ivan Kokshaysky

On Thu, Jun 07, 2001 at 08:28:04PM +0200, Maciej W. Rozycki wrote:
  DU seems to map as low as possible, it would seem.

Yes, I've just checked, starting at 64K...

  Maybe we could just
 do the same for OSF/1 binaries by setting TASK_UNMAPPED_BASE
 appropriately? 

No. I've changed in load_aout_binary() set_personality(PER_LINUX) to
set_personality(PER_LINUX_32BIT), and now I have another error.
You will laugh, but...

$ netscape
665:/usr/lib/netscape/netscape-communicator: : Fatal Error: mmap available address is 
not larger than requested

This happens after
mmap(0x7fdc8000, 40960, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 
0) = 0x40018000

And note, this is the message from loader, not from netscape itself.
So I think my second patch is an easiest solution for now.
Look, compared with the code in Linus' tree:
- it doesn't add any overhead in general case (addr == 0);
- if the specified address is too high and we can't find a free
  area above it, we just continue search from TASK_UNMAPPED_BASE
  as usual; 
- if address is too low, extra cost is only compare and taken branch.
I think it's clean enough.

Ivan.
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [patch] Re: Linux 2.4.5-ac6

2001-06-06 Thread Maciej W. Rozycki

On Wed, 6 Jun 2001, Jeff Garzik wrote:

> There are two things you can do here, one is easy:  use linker tricks to
> make sure that an application built on alpha -- with 64-bit pointers --
> uses no more than the lower 32 bits of each pointer for addressing. 
> This should fix a ton of applications which cast pointer values to ints
> and similar garbage.

 Note we are only writing of executing an OSF/1 netscape binary.  The
binary is built with the -taso option on OSF/1 and is linked fine with
respect to 31-bit pointers.  It fails when mmap()ping shared libraries
after applying my patch that went to -ac series recently.  Since OSF/1
shared libraries are PIC, there should be no problem to mmap() them into
the low 2GB provided mmap() know we want it.  And mmap() has already all
needed bits in place -- it's the ECOFF support on Alpha/Linux that does
not set the personality as it should. 

> The other option, hacking gcc to output "32-bit alpha" binary code, is a
> tougher job.
> 
> I had mentioned this to Richard Henderson a while back, when I was
> wondering how easy it is to implement -taso under Linux, and IIRC he
> seemed to think that linker tricks were much easier.

 It might be unavoidable to prevent shared libraries from being mmap()ped
outside the 31-bit address space unless we hint the dynamic linker
somehow.  Implementing the -taso option is trivial -- all it actually does
on OSF/1 is mapping program's segments into low 2GB of memory (we may do
it by selecting a different linker script) and setting the "31-bit address
space flag" in the program's header so that the dynamic linker mmap()s
shared libraries appropriately as well.  We do have all the bits in place
already as well.

 Note that personally I'm strongly against the -taso approach -- it's a
hack to be meant as an excuse for fixing broken programs.  But fixing
programs is not that difficult (though it might be boring and
time-consuming).  I've already did a conversion of a moderately sized DOS
program to *nix.  The program was twisted by far and near pointers and
casts to ints and longs (depending on the pointer type) scattered over the
source.  It took me about two weeks worth of full-time work (assuming
eight hours per day; the actual time elapsed was longer, but I was only
doing it in my free time) to make the program working on i386/Linux,
another week to port it to Alpha/Linux (i.e. make it 64-bit clean) and yet
another day to make it work on SPARC/Solaris (i.e. make it
endianness-clean).  The program was checked to be running fine on
MIPS/Ultrix and Alpha/OSF/1 afterwards as well.  Therefore I see no point
in keeping programs broken.  If a vendor is not willing to fix a
non-open-sourced broken program, then maybe the program is just not worth
attention.

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--+
+e-mail: [EMAIL PROTECTED], PGP key available+

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [patch] Re: Linux 2.4.5-ac6

2001-06-06 Thread Maciej W. Rozycki

On Wed, 6 Jun 2001, Jeff Garzik wrote:

 There are two things you can do here, one is easy:  use linker tricks to
 make sure that an application built on alpha -- with 64-bit pointers --
 uses no more than the lower 32 bits of each pointer for addressing. 
 This should fix a ton of applications which cast pointer values to ints
 and similar garbage.

 Note we are only writing of executing an OSF/1 netscape binary.  The
binary is built with the -taso option on OSF/1 and is linked fine with
respect to 31-bit pointers.  It fails when mmap()ping shared libraries
after applying my patch that went to -ac series recently.  Since OSF/1
shared libraries are PIC, there should be no problem to mmap() them into
the low 2GB provided mmap() know we want it.  And mmap() has already all
needed bits in place -- it's the ECOFF support on Alpha/Linux that does
not set the personality as it should. 

 The other option, hacking gcc to output 32-bit alpha binary code, is a
 tougher job.
 
 I had mentioned this to Richard Henderson a while back, when I was
 wondering how easy it is to implement -taso under Linux, and IIRC he
 seemed to think that linker tricks were much easier.

 It might be unavoidable to prevent shared libraries from being mmap()ped
outside the 31-bit address space unless we hint the dynamic linker
somehow.  Implementing the -taso option is trivial -- all it actually does
on OSF/1 is mapping program's segments into low 2GB of memory (we may do
it by selecting a different linker script) and setting the 31-bit address
space flag in the program's header so that the dynamic linker mmap()s
shared libraries appropriately as well.  We do have all the bits in place
already as well.

 Note that personally I'm strongly against the -taso approach -- it's a
hack to be meant as an excuse for fixing broken programs.  But fixing
programs is not that difficult (though it might be boring and
time-consuming).  I've already did a conversion of a moderately sized DOS
program to *nix.  The program was twisted by far and near pointers and
casts to ints and longs (depending on the pointer type) scattered over the
source.  It took me about two weeks worth of full-time work (assuming
eight hours per day; the actual time elapsed was longer, but I was only
doing it in my free time) to make the program working on i386/Linux,
another week to port it to Alpha/Linux (i.e. make it 64-bit clean) and yet
another day to make it work on SPARC/Solaris (i.e. make it
endianness-clean).  The program was checked to be running fine on
MIPS/Ultrix and Alpha/OSF/1 afterwards as well.  Therefore I see no point
in keeping programs broken.  If a vendor is not willing to fix a
non-open-sourced broken program, then maybe the program is just not worth
attention.

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--+
+e-mail: [EMAIL PROTECTED], PGP key available+

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [patch] Re: Linux 2.4.5-ac6

2001-06-05 Thread Ivan Kokshaysky

On Tue, Jun 05, 2001 at 05:11:01PM +0200, Maciej W. Rozycki wrote:
>  Iterating over memory areas twice is ugly.

Hmm, yes. However, your patch isn't pretty, too. You may check
the same area twice, and won't satisfy requested address > TASK_UNMAPPED_BASE.
What do you think about following? Everything is scanned only once, and
returned address matches specified one as close as possible.

Ivan.

--- linux/mm/mmap.c.origMon Jun  4 14:19:02 2001
+++ linux/mm/mmap.c Tue Jun  5 21:05:23 2001
@@ -398,22 +398,30 @@ free_vma:
 static inline unsigned long arch_get_unmapped_area(struct file *filp, unsigned long 
addr, unsigned long len, unsigned long pgoff, unsigned long flags)
 {
struct vm_area_struct *vma;
+   unsigned long addr_limit = TASK_SIZE - len;
 
if (len > TASK_SIZE)
return -ENOMEM;
 
if (addr) {
addr = PAGE_ALIGN(addr);
-   vma = find_vma(current->mm, addr);
-   if (TASK_SIZE - len >= addr &&
-   (!vma || addr + len <= vma->vm_start))
-   return addr;
+   if (addr <= TASK_UNMAPPED_BASE)
+   goto scan_low;
+   addr_limit = addr;
+   for (vma = find_vma(current->mm, addr); ; vma = vma->vm_next) {
+   if (TASK_SIZE - len < addr)
+   break;
+   if (!vma || addr + len <= vma->vm_start)
+   return addr;
+   addr = vma->vm_end;
+   }
}
addr = PAGE_ALIGN(TASK_UNMAPPED_BASE);
 
+scan_low:
for (vma = find_vma(current->mm, addr); ; vma = vma->vm_next) {
/* At this point:  (!vma || addr < vma->vm_end). */
-   if (TASK_SIZE - len < addr)
+   if (addr_limit < addr)
return -ENOMEM;
if (!vma || addr + len <= vma->vm_start)
return addr;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [patch] Re: Linux 2.4.5-ac6

2001-06-05 Thread Ivan Kokshaysky

On Tue, Jun 05, 2001 at 05:11:01PM +0200, Maciej W. Rozycki wrote:
  Iterating over memory areas twice is ugly.

Hmm, yes. However, your patch isn't pretty, too. You may check
the same area twice, and won't satisfy requested address  TASK_UNMAPPED_BASE.
What do you think about following? Everything is scanned only once, and
returned address matches specified one as close as possible.

Ivan.

--- linux/mm/mmap.c.origMon Jun  4 14:19:02 2001
+++ linux/mm/mmap.c Tue Jun  5 21:05:23 2001
@@ -398,22 +398,30 @@ free_vma:
 static inline unsigned long arch_get_unmapped_area(struct file *filp, unsigned long 
addr, unsigned long len, unsigned long pgoff, unsigned long flags)
 {
struct vm_area_struct *vma;
+   unsigned long addr_limit = TASK_SIZE - len;
 
if (len  TASK_SIZE)
return -ENOMEM;
 
if (addr) {
addr = PAGE_ALIGN(addr);
-   vma = find_vma(current-mm, addr);
-   if (TASK_SIZE - len = addr 
-   (!vma || addr + len = vma-vm_start))
-   return addr;
+   if (addr = TASK_UNMAPPED_BASE)
+   goto scan_low;
+   addr_limit = addr;
+   for (vma = find_vma(current-mm, addr); ; vma = vma-vm_next) {
+   if (TASK_SIZE - len  addr)
+   break;
+   if (!vma || addr + len = vma-vm_start)
+   return addr;
+   addr = vma-vm_end;
+   }
}
addr = PAGE_ALIGN(TASK_UNMAPPED_BASE);
 
+scan_low:
for (vma = find_vma(current-mm, addr); ; vma = vma-vm_next) {
/* At this point:  (!vma || addr  vma-vm_end). */
-   if (TASK_SIZE - len  addr)
+   if (addr_limit  addr)
return -ENOMEM;
if (!vma || addr + len = vma-vm_start)
return addr;
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: Linux 2.4.5-ac6

2001-06-04 Thread Maciej W. Rozycki

On Fri, 1 Jun 2001, Tom Vier wrote:

> > o   Fix mmap cornercase (Maciej Rozycki)
> 
> when i try running osf/1 netscape on alpha, mmap of libXmu fails. works fine
> on -ac5.

 Can you get a strace of your failing netscape?

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--+
+e-mail: [EMAIL PROTECTED], PGP key available+

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: Linux 2.4.5-ac6

2001-06-04 Thread Maciej W. Rozycki

On Fri, 1 Jun 2001, Tom Vier wrote:

  o   Fix mmap cornercase (Maciej Rozycki)
 
 when i try running osf/1 netscape on alpha, mmap of libXmu fails. works fine
 on -ac5.

 Can you get a strace of your failing netscape?

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--+
+e-mail: [EMAIL PROTECTED], PGP key available+

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: Linux 2.4.5-ac6

2001-06-01 Thread Tom Vier

> o Fix mmap cornercase (Maciej Rozycki)

when i try running osf/1 netscape on alpha, mmap of libXmu fails. works fine
on -ac5.

-- 
Tom Vier <[EMAIL PROTECTED]>
DSA Key id 0x27371A2C
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: Linux 2.4.5-ac6

2001-06-01 Thread Wayne . Brown



The oops problem with the cs46xx in my ThinkPad 600X under -ac4 and -ac5 has
changed now.  It no longer gives an oops; instead the program trying to access
the sound card hangs (until I kill it).  Subsequent attempts to access the sound
card get a "Device or resource busy" error.  There are no messages on the screen
or sent to syslog (or messages or debug) when the hang occurs.  I don't know if
it will help or not, but here are the last few lines of an strace of the hanging
process:

stat("/usr/bin/sox", {st_mode=S_IFREG|0755, st_size=120744, ...}) = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8)   = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0
fork()  = 186
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGINT, {0x806c04c, [], 0x400}, {SIG_DFL}, 8) = 0
wait4(-1, 0xb744, 0, NULL)  = ? ERESTARTSYS (To be restarted)
--- SIGTERM (Terminated) ---
+++ killed by SIGTERM +++

At the point of the hang, the output stops at "wait4(-1, " and the rest of that
line (and the next two lines) appears after I kill the process.


Here are the last few lines of another strace of the same program under
2.4.5-ac3, which works fine:

stat("/usr/bin/sox", {st_mode=S_IFREG|0755, st_size=120744, ...}) = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8)   = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0
fork()  = 435
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGINT, {0x806c04c, [], 0x400}, {SIG_DFL}, 8) = 0
wait4(-1, [WIFEXITED(s) && WEXITSTATUS(s) == 0], 0, NULL) = 435
rt_sigprocmask(SIG_BLOCK, [CHLD TTOU], [CHLD], 8) = 0
rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [CHLD], 8) = 0
rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGCHLD (Child exited) ---
wait4(-1, 0xb438, WNOHANG, NULL)= -1 ECHILD (No child processes)
sigreturn() = ? (mask now [])
rt_sigaction(SIGINT, {SIG_DFL}, {0x806c04c, [], 0x400}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, [CHLD TTOU], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
read(255, "", 4472) = 0
_exit(0)= ?h


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: Linux 2.4.5-ac6

2001-06-01 Thread Keith Owens

ftp://oss.sgi.com/projects/kdb/download/ix86/kdb-v1.8-2.4.5-ac6.gz is
available.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: Linux 2.4.5-ac6

2001-06-01 Thread Alan Cox

> Tt's still broken on r/w. R/o should be OK now.
> 
> > o   Move UFS file system to use dcache for metadata (Al Viro)
> 
> What???

My error. I was pasting down the notes when you were talking about that bit
on #kernel and forgot to take it out

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: Linux 2.4.5-ac6

2001-06-01 Thread Alexander Viro



On Fri, 1 Jun 2001, Alan Cox wrote:

> o Fix the cs46xx right this time  (me)
> o Further FATfs cleanup   (OGAWA Hirofumi)
> o ISDN PPP code cleanup, cvs tag update   (Kai Germaschewski)
> o Large amount of UFS file system cleanup (Al Viro)

Tt's still broken on r/w. R/o should be OK now.

> o Move UFS file system to use dcache for metadata (Al Viro)

What???

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Linux 2.4.5-ac6

2001-06-01 Thread Alan Cox


ftp://ftp.kernel.org/pub/linux/kernel/people/alan/2.4/

 Intermediate diffs are available from
http://www.bzimage.org

In terms of going through the code audit almost all the sound drivers still 
need fixing to lock against format changes during a read/write. Poll creating 
and starting a buffer as write does and also mmap during write, write during
an mmap.

2.4.5-ac6
o   Fix the cs46xx right this time  (me)
o   Further FATfs cleanup   (OGAWA Hirofumi)
o   ISDN PPP code cleanup, cvs tag update   (Kai Germaschewski)
o   Large amount of UFS file system cleanup (Al Viro)
o   Move UFS file system to use dcache for metadata (Al Viro)
o   Fix endianness problems in FATfs(Petr Vandrovec)
o   Fix -ac quota crashes   (Jan Kara)
o   Fix bluetooth out of memory handling(Greg Kroah-Hartmann)
o   Fix freevxfs readdir(Christoph Hellwig)
o   Fix freevxfs sign/unsigned issues   (Christoph Hellwig)
o   Fix doctypos, other freevxfs cleanup(Christoph Hellwig)
o   Fix flush_dirty_buffers warning (J A Magallon)
o   Add Carlos Gorges to credits(Carlos Gorges)
o   Further atm cleanup fixes (kmalloc/signedness)  (Mitchell Blank)
o   Fix hotplug variable in matroxfb(Petr Vandrovec)
o   Fix ns558 crash (Vojtech Pavlik)
o   Revert to Pete Zaitcev's khub locking   (Pete Zaitcev)
| It works for me, Johannes changes don't seem to
o   Fix usb Config.in breakage for input devices(Vojtech Pavlik)
o   Add another 3c509 ISAPnP id (Marcus Meissner)
o   Fix oopses and null checks on iphase(Mitchell Blank)
o   CS46xx update   (Thomas Woller)
o   Fix mmap cornercase (Maciej Rozycki)
o   Tidy up aironet and saa9730 delay abuse(Andrzej Krzysztofowicz)
o   Force initial umask to be sane for broken   (Andrew Tridgell)
init programs
o   Teach CML1 to strip out  from the   (Eric Raymond)
Configure.help
o   Resync with Eric's master Configure.help(Eric Raymond)
o   Revert FIOQSIZE 
o   Fix missing copy_*_user in cosa driver  (me)
| From Stanford tools
o   Fix missing copy_*_user in eicon(me)
+ clean up ioctls a bit more
| From Stanford tools
o   Fix use after free in lpbether  (me)
| From Stanford tools
o   Fix missing return in rose_dev  (me)
| From Stanford tools
o   Fix use after free in bpqether  (me)
| From Stanford tools

2.4.5-ac5
o   Fix bug introduced in cs46xx/trident locking(me)
o   Fix reiserfs unload/exit locking race   (Paul Mundt)
o   Miscellaneous small UML updates (Jeff Dike)
o   Further FAT cleanups(OGAWA Hirofumi)
o   Fix ext2fs oops following disk error(Andreas Dilger)
o   Optimise segment reloads, syscall path  (Andi Kleen)
o   Clean up .byte abuse where asm is now known (Brian Gerst)
by required tools
o   Fix eepro100 on 64bit machine bitops bug(Andrea Arcangeli)
o   Move the pagecache and pagemap_lru_lock to  (Andrea Arcangeli)
different cache lines
o   Clean up .byte abuse where asm is now known (Brian Gerst)
by required tools
o   Fix user space dereference in bluetooth (me)
| From Stanford tools
o   Fix user space dereference in sbc60wdt  (me)
| From Stanford tools
o   Fix user space dereference in mdc800(me)
| From Stanford tools
o   Fix a rather wrong memset in nubus.c(Chris Peterson)
o   Remove fpu references from dmfe (Arjan van de Ven)
o   Fix spelling of Portuguese  (Nerijus Baliunas)

2.4.5-ac4
o   APIC parsing updates(Ingo Molnar)
o   Retry rather than losing I/O on an IDE DMA  (Jens Axboe)
timeout.
o   Add missing locking to cs46xx   (Frank Davis)
o   Clean up sym53c416 and add PnP support  (me)
o   Tidy up changelog in apm.c  (Stephen Rothwell)
o   Update jffs2, remove abuse of kdev_t(David Woodhouse)
o   Fix oops on unplugging bluetooth(Greg Kroah-Hartmann)
o   Move stuff into bss on aironet4500  (Rasmus Andersen)
o   Fix up alpha oops output(George France)
o   Update SysKonnect PCI id list   (Mirko Lindner)
o   Update SysKonnect GigE driver   

Linux 2.4.5-ac6

2001-06-01 Thread Alan Cox


ftp://ftp.kernel.org/pub/linux/kernel/people/alan/2.4/

 Intermediate diffs are available from
http://www.bzimage.org

In terms of going through the code audit almost all the sound drivers still 
need fixing to lock against format changes during a read/write. Poll creating 
and starting a buffer as write does and also mmap during write, write during
an mmap.

2.4.5-ac6
o   Fix the cs46xx right this time  (me)
o   Further FATfs cleanup   (OGAWA Hirofumi)
o   ISDN PPP code cleanup, cvs tag update   (Kai Germaschewski)
o   Large amount of UFS file system cleanup (Al Viro)
o   Move UFS file system to use dcache for metadata (Al Viro)
o   Fix endianness problems in FATfs(Petr Vandrovec)
o   Fix -ac quota crashes   (Jan Kara)
o   Fix bluetooth out of memory handling(Greg Kroah-Hartmann)
o   Fix freevxfs readdir(Christoph Hellwig)
o   Fix freevxfs sign/unsigned issues   (Christoph Hellwig)
o   Fix doctypos, other freevxfs cleanup(Christoph Hellwig)
o   Fix flush_dirty_buffers warning (J A Magallon)
o   Add Carlos Gorges to credits(Carlos Gorges)
o   Further atm cleanup fixes (kmalloc/signedness)  (Mitchell Blank)
o   Fix hotplug variable in matroxfb(Petr Vandrovec)
o   Fix ns558 crash (Vojtech Pavlik)
o   Revert to Pete Zaitcev's khub locking   (Pete Zaitcev)
| It works for me, Johannes changes don't seem to
o   Fix usb Config.in breakage for input devices(Vojtech Pavlik)
o   Add another 3c509 ISAPnP id (Marcus Meissner)
o   Fix oopses and null checks on iphase(Mitchell Blank)
o   CS46xx update   (Thomas Woller)
o   Fix mmap cornercase (Maciej Rozycki)
o   Tidy up aironet and saa9730 delay abuse(Andrzej Krzysztofowicz)
o   Force initial umask to be sane for broken   (Andrew Tridgell)
init programs
o   Teach CML1 to strip out file:  from the   (Eric Raymond)
Configure.help
o   Resync with Eric's master Configure.help(Eric Raymond)
o   Revert FIOQSIZE 
o   Fix missing copy_*_user in cosa driver  (me)
| From Stanford tools
o   Fix missing copy_*_user in eicon(me)
+ clean up ioctls a bit more
| From Stanford tools
o   Fix use after free in lpbether  (me)
| From Stanford tools
o   Fix missing return in rose_dev  (me)
| From Stanford tools
o   Fix use after free in bpqether  (me)
| From Stanford tools

2.4.5-ac5
o   Fix bug introduced in cs46xx/trident locking(me)
o   Fix reiserfs unload/exit locking race   (Paul Mundt)
o   Miscellaneous small UML updates (Jeff Dike)
o   Further FAT cleanups(OGAWA Hirofumi)
o   Fix ext2fs oops following disk error(Andreas Dilger)
o   Optimise segment reloads, syscall path  (Andi Kleen)
o   Clean up .byte abuse where asm is now known (Brian Gerst)
by required tools
o   Fix eepro100 on 64bit machine bitops bug(Andrea Arcangeli)
o   Move the pagecache and pagemap_lru_lock to  (Andrea Arcangeli)
different cache lines
o   Clean up .byte abuse where asm is now known (Brian Gerst)
by required tools
o   Fix user space dereference in bluetooth (me)
| From Stanford tools
o   Fix user space dereference in sbc60wdt  (me)
| From Stanford tools
o   Fix user space dereference in mdc800(me)
| From Stanford tools
o   Fix a rather wrong memset in nubus.c(Chris Peterson)
o   Remove fpu references from dmfe (Arjan van de Ven)
o   Fix spelling of Portuguese  (Nerijus Baliunas)

2.4.5-ac4
o   APIC parsing updates(Ingo Molnar)
o   Retry rather than losing I/O on an IDE DMA  (Jens Axboe)
timeout.
o   Add missing locking to cs46xx   (Frank Davis)
o   Clean up sym53c416 and add PnP support  (me)
o   Tidy up changelog in apm.c  (Stephen Rothwell)
o   Update jffs2, remove abuse of kdev_t(David Woodhouse)
o   Fix oops on unplugging bluetooth(Greg Kroah-Hartmann)
o   Move stuff into bss on aironet4500  (Rasmus Andersen)
o   Fix up alpha oops output(George France)
o   Update SysKonnect PCI id list   (Mirko Lindner)
o   Update SysKonnect GigE driver 

Re: Linux 2.4.5-ac6

2001-06-01 Thread Alexander Viro



On Fri, 1 Jun 2001, Alan Cox wrote:

 o Fix the cs46xx right this time  (me)
 o Further FATfs cleanup   (OGAWA Hirofumi)
 o ISDN PPP code cleanup, cvs tag update   (Kai Germaschewski)
 o Large amount of UFS file system cleanup (Al Viro)

Tt's still broken on r/w. R/o should be OK now.

 o Move UFS file system to use dcache for metadata (Al Viro)

What???

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: Linux 2.4.5-ac6

2001-06-01 Thread Wayne . Brown



The oops problem with the cs46xx in my ThinkPad 600X under -ac4 and -ac5 has
changed now.  It no longer gives an oops; instead the program trying to access
the sound card hangs (until I kill it).  Subsequent attempts to access the sound
card get a Device or resource busy error.  There are no messages on the screen
or sent to syslog (or messages or debug) when the hang occurs.  I don't know if
it will help or not, but here are the last few lines of an strace of the hanging
process:

stat(/usr/bin/sox, {st_mode=S_IFREG|0755, st_size=120744, ...}) = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8)   = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0
fork()  = 186
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGINT, {0x806c04c, [], 0x400}, {SIG_DFL}, 8) = 0
wait4(-1, 0xb744, 0, NULL)  = ? ERESTARTSYS (To be restarted)
--- SIGTERM (Terminated) ---
+++ killed by SIGTERM +++

At the point of the hang, the output stops at wait4(-1,  and the rest of that
line (and the next two lines) appears after I kill the process.


Here are the last few lines of another strace of the same program under
2.4.5-ac3, which works fine:

stat(/usr/bin/sox, {st_mode=S_IFREG|0755, st_size=120744, ...}) = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8)   = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0
fork()  = 435
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGINT, {0x806c04c, [], 0x400}, {SIG_DFL}, 8) = 0
wait4(-1, [WIFEXITED(s)  WEXITSTATUS(s) == 0], 0, NULL) = 435
rt_sigprocmask(SIG_BLOCK, [CHLD TTOU], [CHLD], 8) = 0
rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [CHLD], 8) = 0
rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGCHLD (Child exited) ---
wait4(-1, 0xb438, WNOHANG, NULL)= -1 ECHILD (No child processes)
sigreturn() = ? (mask now [])
rt_sigaction(SIGINT, {SIG_DFL}, {0x806c04c, [], 0x400}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, [CHLD TTOU], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
read(255, , 4472) = 0
_exit(0)= ?h


-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: Linux 2.4.5-ac6

2001-06-01 Thread Tom Vier

 o Fix mmap cornercase (Maciej Rozycki)

when i try running osf/1 netscape on alpha, mmap of libXmu fails. works fine
on -ac5.

-- 
Tom Vier [EMAIL PROTECTED]
DSA Key id 0x27371A2C
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: Linux 2.4.5-ac6

2001-06-01 Thread Keith Owens

ftp://oss.sgi.com/projects/kdb/download/ix86/kdb-v1.8-2.4.5-ac6.gz is
available.

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/