Re: mprotect(2) misbehaves when len == 0?

2010-02-11 Thread Vadim Zhukov
On 12 February 2010 P3. 03:31:22 Jordi Beltran Creix wrote: > Wouldn't that return EINVAL unless the address is aligned to the page > boundary? >From the man page: "The OpenBSD implementation of mprotect() does not require addr to be page-aligned". And code is agree, too. But the problem is not w

Re: mprotect(2) misbehaves when len == 0?

2010-02-11 Thread Jason McIntyre
On Thu, Feb 11, 2010 at 08:24:52PM -0500, Ted Unangst wrote: > The man page is likely missing the word "no", as that makes a lot more > sense than the current wording meaning positive action. > well, can you fix that then, please? jmc > 2010/2/11 Vadim Zhukov : > > Hello all. > > > > mprotect(2)

Bug in ftp(1)

2010-02-11 Thread Daniel Dickman
ftp(1) will reliably stall for me when doing uploads. I tracked the problem down to the keep-alive option. Not sure how widespread this issue is as I'd imagine it depends on what server is on the receiving end. But here's a sample transcript which gets stuck every time and requires me to kill t

Re: mprotect(2) misbehaves when len == 0?

2010-02-11 Thread Ted Unangst
The man page is likely missing the word "no", as that makes a lot more sense than the current wording meaning positive action. 2010/2/11 Vadim Zhukov : > Hello all. > > mprotect(2) says: "If len is 0, then action will be taken on the page > that contains addr". The reality says it's not so: > > $

Re: mprotect(2) misbehaves when len == 0?

2010-02-11 Thread Jordi Beltran Creix
Wouldn't that return EINVAL unless the address is aligned to the page boundary?

mprotect(2) misbehaves when len == 0?

2010-02-11 Thread Vadim Zhukov
Hello all. mprotect(2) says: "If len is 0, then action will be taken on the page that contains addr". The reality says it's not so: $ cat ~/cvs/mprotect_test.c #include #include #include #include #include void mymemset(char *p, int c, size_t len) { size_t i; charcc;