Date: Sat, 25 Oct 2014 23:31:03 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Jilles Tjoelker <jilles@stack.nl> Cc: arch@freebsd.org Subject: Re: RfC: fueword(9) and casueword(9) Message-ID: <20141025203103.GM1877@kib.kiev.ua> In-Reply-To: <20141025194344.GA11568@stack.nl> References: <20141021094539.GA1877@kib.kiev.ua> <20141022002825.H2080@besplex.bde.org> <20141021162306.GE1877@kib.kiev.ua> <20141025194344.GA11568@stack.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Oct 25, 2014 at 09:43:44PM +0200, Jilles Tjoelker wrote:
> On Tue, Oct 21, 2014 at 07:23:06PM +0300, Konstantin Belousov wrote:
> > I prefer to not complicate the fetch(9) KPI due to the mistakes in the
> > umtx structures definitions. I think that it is bug to mark the lock
> > words with volatile. I want the fueword(9) interface to be as much
> > similar to fuword(9), in particular, volatile seems to be not needed.
>
> > Below is the updated patch, together with the bug fix noted by Eric.
>
> Hmm, consider returning an error number (that is, EFAULT) instead of -1
> on failure. This is somewhat like priv_check() which returns EPERM on
> failure, and probably reduces confusion if the return value is assigned
> to a variable named "error".
I did considered EFAULT. The KPI becomes too inconsistent if comparing
fueword with fuword or suword.
If you reference rv in kern_umtx.c, returning EFAULT for fueword or
casueword would not allow to use error directly. The reason is the
complicated logic of handling the suspend requests. Basically, non-errors
from userspace access must not obliterate the errors from previous
calls to check_suspend(). See r270345 for example of the bug from
earlier pass over userspace access in kern_umtx.c. There are still
more such bugs left in the patch, Peter and I chasing them.
>
> In share/man/man9/Makefile, MLINKS are still created for fuebyte.9 and
> fueword16.9.
Fixed, thank you.
>
> "successful" is consistently misspelled "successfull".
I corrected all occurences of successfull in the patch, but it is systematic
in the tree.
pooma% git grep -e successfull -- | grep -v successfully | wc -l
30
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141025203103.GM1877>
