From: cinap_lenrek@felloff.net
To: 9front@9front.org
Subject: Re: [9front] [PATH] error()/waserror() for userspace
Date: Sun, 12 May 2024 16:47:52 +0200 [thread overview]
Message-ID: <A6303360CF4EEE3838C037E9C85F1A4A@felloff.net> (raw)
In-Reply-To: <dc77bc7f-ff64-4afb-bb24-82621f7f30ec@posixcafe.org>
Some notes and questions:
1)
privmalloc() should probably round the size up to 8 bytes,
so we maintain struct alignment.
2)
We need a manpage for privmalloc() describing the zeroing
semantics on fork().
3)
Should privmalloc() nil instead of abort()? arguments pro/con?
4)
maybe should introduce privmalloc() as a separate commit.
this has alot of impact as you'd want to implement nsec()
and atexit() using this new mechanism. doing that first
is a way to ensure that the design is sound. also, we
have to think about backwards compaty. if you run a old
kernel that has no "private" segment trype. should atexit()
fall back on global pid tagged array? ect.
5)
theres no range check in pusherrlab(). It just silentely
corrupts memory.
6)
Maybe call Errlab to "Errlabs" because it represents multiple
error labels. In the kernel, we have Label struct representing
a single "jumpbuf" and it is put in the Proc struct as Label
errlab[NERR].
7)
Is 32 labels good enougth? For libthread, we could even
just allocate the labels dynamically as we control the
whole thread. a jmp_buf costs you like 16 bytes, which
means the thread gets bloated by 512 bytes, even if
we never use error().
8)
For porting programs using privmalloc(), how'd we be able
to emulate these semantics? Is it possible?
9)
Should we provide a noteerror(ureg) function,
so you can raise an error from a note handler?
--
cinap
prev parent reply other threads:[~2024-05-12 14:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-11 21:26 Jacob Moody
2024-05-12 14:47 ` cinap_lenrek [this message]
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=A6303360CF4EEE3838C037E9C85F1A4A@felloff.net \
--to=cinap_lenrek@felloff.net \
--cc=9front@9front.org \
/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.
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).