Re: __predict_false for pledge

2015-10-29 Thread Michael McConville
Ted Unangst wrote: > Michael McConville wrote: > > Ted Unangst wrote: > > > Michael McConville wrote: > > > > We have a pretty strong guarantee that it can only happen once > > > > per process... > > > > > > I don't think this really matters. What does it do to the > > > assmembly, and how does

Re: __predict_false for pledge

2015-10-26 Thread Philip Guenther
On Mon, Oct 26, 2015 at 8:46 AM, Michael McConville wrote: > We have a pretty strong guarantee that it can only happen once per > process... ... > --- sys/sys/syscall_mi.h9 Oct 2015 01:17:18 - 1.11 > +++ sys/sys/syscall_mi.h26 Oct 2015 15:13:44 - >

Re: __predict_false for pledge

2015-10-26 Thread Michael McConville
Ted Unangst wrote: > Michael McConville wrote: > > We have a pretty strong guarantee that it can only happen once per > > process... > > I don't think this really matters. What does it do to the assmembly, > and how does that make things faster? It lets the compiler know that the body is very

Re: __predict_false for pledge

2015-10-26 Thread Theo de Raadt
> On Mon, Oct 26, 2015 at 8:46 AM, Michael McConville wrote: > > We have a pretty strong guarantee that it can only happen once per > > process... > ... > > --- sys/sys/syscall_mi.h9 Oct 2015 01:17:18 - 1.11 > > +++ sys/sys/syscall_mi.h26 Oct 2015

Re: __predict_false for pledge

2015-10-26 Thread Michael McConville
Philip Guenther wrote: > On Mon, Oct 26, 2015 at 8:46 AM, Michael McConville wrote: > > We have a pretty strong guarantee that it can only happen once per > > process... > ... > > --- sys/sys/syscall_mi.h9 Oct 2015 01:17:18 - 1.11 > > +++ sys/sys/syscall_mi.h

Re: __predict_false for pledge

2015-10-26 Thread Theo de Raadt
> Not sure how people feel about these annotations. This is a pretty > classic use case, though. No, the classic case is when the condition is a single variable, rather than a condition "always true && rarely true".

Re: __predict_false for pledge

2015-10-26 Thread Ted Unangst
Michael McConville wrote: > Ted Unangst wrote: > > Michael McConville wrote: > > > We have a pretty strong guarantee that it can only happen once per > > > process... > > > > I don't think this really matters. What does it do to the assmembly, > > and how does that make things faster? > > It