From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/374 Path: news.gmane.org!not-for-mail From: Solar Designer Newsgroups: gmane.linux.lib.musl.general Subject: Re: New daily reports - nothing Date: Wed, 10 Aug 2011 06:02:18 +0400 Message-ID: <20110810020218.GA27745@openwall.com> References: <4E39C84F.8060705@gmail.com> <20110803224651.GB11437@openwall.com> <4E3A79B2.8090204@gmail.com> <4E3B331E.7050502@gmail.com> <4E3CC5AC.3070404@gmail.com> <4E3DFB5D.8040008@gmail.com> <20110807073224.GG132@brightrain.aerifal.cx> <4E3F10C7.4060601@gmail.com> <4E40A33F.7090804@gmail.com> <4E41E020.7020109@gmail.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1312941747 25592 80.91.229.12 (10 Aug 2011 02:02:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 10 Aug 2011 02:02:27 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-375-gllmg-musl=m.gmane.org@lists.openwall.com Wed Aug 10 04:02:23 2011 Return-path: Envelope-to: gllmg-musl@lo.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Qqy7h-0007k8-Dc for gllmg-musl@lo.gmane.org; Wed, 10 Aug 2011 04:02:21 +0200 Original-Received: (qmail 1392 invoked by uid 550); 10 Aug 2011 02:02:21 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 1384 invoked from network); 10 Aug 2011 02:02:21 -0000 Content-Disposition: inline In-Reply-To: <4E41E020.7020109@gmail.com> User-Agent: Mutt/1.4.2.3i Xref: news.gmane.org gmane.linux.lib.musl.general:374 Archived-At: Luka, Rich - On Wed, Aug 10, 2011 at 03:34:24AM +0200, Luka Mar??eti?? wrote: > Nothing to report for today, I'm afraid. Thank you for posting a report anyway. It helps. > Not much time left either. I hoped you'd suggest what to do, Rich - please suggest which of the remaining tasks Luka should focus on. Maybe you already did on IRC or elsewhere, but I haven't seen that on the list. > but I had > to spend time fixing stuff anyway. And since I still do, my priorities are: > > - Fix and commit buf.c * > - Fix other tests that are still broken (setuid, alloc) > - Complete the started ones (pthread_eintr) > > * I don't know what's up with this: http://codepad.org/Ysn2roYC. I took a look. You're trying to mmap() and mprotect() other than a multiple of page size. This can't possibly work as your code expects it to. You need to round up your allocation size to the page size, and map two entire unreadable pages (not size_t quantities) before and after it. This might not satisfy your needs, though - I don't know what the purpose of this malloc_bounded() was exactly. The segfault occurs because your first mprotect() call makes the entire page starting at stp inaccessible. Not just a size_t quantity, because it can't possibly do that. The second mprotect() call is invoked on a base address that is not page-aligned, so it fails with EINVAL (at least on my system). This is easily seen with strace (you could see it too), and it'd be a good idea to check the return values in your code. I hope this helps. Thanks, Alexander P.S. Your use of "Re:" on ever-changing Subjects remains completely ridiculous. As explained before, this has nothing to do with threading, but it breaks the convention of "Re:" being followed by the previous message's Subject (that you're replying to). For your use, it's best not to include "Re:".