mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Solar Designer <solar@openwall.com>
To: musl@lists.openwall.com
Subject: Re: New daily reports - nothing
Date: Wed, 10 Aug 2011 06:02:18 +0400	[thread overview]
Message-ID: <20110810020218.GA27745@openwall.com> (raw)
In-Reply-To: <4E41E020.7020109@gmail.com>

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:".


  parent reply	other threads:[~2011-08-10  2:02 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-03 22:14 New daily reports Luka Marčetić
2011-08-03 22:46 ` Solar Designer
2011-08-04 10:51   ` Luka Marčetić
2011-08-04 11:54     ` Solar Designer
2011-08-04 12:01       ` Luka Marčetić
2011-08-04 12:12         ` Solar Designer
2011-08-05  0:02     ` New daily reports - started pthread_eintr.c Luka Marčetić
2011-08-05  0:10       ` Solar Designer
2011-08-06  4:40       ` New daily reports - debugging alloc.c et al Luka Marčetić
2011-08-06 11:15         ` Szabolcs Nagy
2011-08-06 11:50           ` Szabolcs Nagy
2011-08-06 14:34             ` Szabolcs Nagy
2011-08-06 15:38               ` Szabolcs Nagy
2011-08-07  2:41         ` New daily reports - debugging alloc.c still Luka Marčetić
2011-08-07  2:50           ` Solar Designer
2011-08-07  7:32           ` Rich Felker
2011-08-07 22:25             ` Luka Marčetić
2011-08-09  3:02               ` New daily reports - buf.c Luka Marčetić
2011-08-10  1:34                 ` New daily reports - nothing Luka Marčetić
2011-08-10  1:38                   ` Rich Felker
2011-08-10 11:47                     ` Luka Marčetić
2011-08-10  2:02                   ` Solar Designer [this message]
2011-08-10 11:23                     ` Luka Marčetić
2011-08-10 11:56                       ` Solar Designer
2011-08-10 12:13                         ` Luka Marčetić
2011-08-10  2:07                   ` Solar Designer
2011-08-10  2:12                     ` Rich Felker
2011-08-10  4:59                   ` Rich Felker
2011-08-10 12:09                     ` Luka Marčetić
2011-08-10 12:44                     ` Luka Marčetić
2011-08-10 14:25                       ` Rich Felker
2011-08-10 17:21                         ` Luka Marčetić
2011-08-10 17:33                           ` Rich Felker
2011-08-10 18:23                             ` Luka Marčetić
2011-08-10 18:21                               ` Rich Felker
2011-08-10 18:34                                 ` Luka Marčetić
2011-08-10 18:33                                   ` Rich Felker
2011-08-14 20:00                     ` Rich Felker
2011-08-15 14:14                       ` Luka Marčetić

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110810020218.GA27745@openwall.com \
    --to=solar@openwall.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).