lkml.org 
[lkml]   [2005]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Bug#322309: Debian woody dpkg no longer works with recent linux kernel.
On 10/11/05, Junichi Uekawa <dancer@netfort.gr.jp> wrote:

> > > dpkg in Debian woody (3.0) is broken by recent linux kernels;
> > > due to the following command changing behavior (mmap of
> > > zero-byte length):
> > >
> > > addr=mmap(NULL, 0, PROT_READ, MAP_SHARED, fd, 0);
> > >
> > > These bugs are caused by mmap changing behavior;
> > > it used to return NULL when given a length of 0.
> > > However, it now returns -1, and gives back an errno=EINVAL.

> I'm seeing several potential solutions.

> Backport dpkg change to woody and update woody
> (maybe impossible due to Debian oldstable
> update infrastructure)

That's probably the best fix.

> write a kernel patch to return 0 when mmap is
> called with length=0

Bad idea. I'm not the greatest authority on what the standards say
mmap should be doing, but this change seems logical and there's no
point in changing the kernel to revert the behaviour just for Debian
systems. It'd be another pointless Debian kernel patch :-)

> Create a LD_PRELOAD or ptrace hack to return
> 0 when mmap is called with length=0

Yummy. Better than the previous hack.

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

\
 
 \ /
  Last update: 2005-10-11 17:21    [W:0.200 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site