On 2018/02/18 16:25, Stuart Henderson wrote:
> On 2018/02/18 21:19, Neeraj Pal wrote:
> > yeah, but I am asking about pledge_xbit (pledge value of any process
> > in hex). See output:
> >
> > process name: pltestnopledge(no pledge) ps_flags:
> > 101007 kern_exec: 100000 pid: 66364 pledge_xbit: 8009588f
> >
> > process name: pltest(with pledge("stdio",NULL)) ps_flags: 101007
> > kern_exec: 100000 pid: 74005 pledge_xbit: 8
> >
> > Now, 2nd line is correct, because of pledge "stdio" and PLEDGE_STDIO
> > is 0x0000000000000008, but I am confused with 1st line. How it becomes
> > even this, 0x8009588f value without pledge.
> >
> > Sorry, but I think either I am not getting you or you didn't get my
> > question.
> >
> > I don't know why you are telling me about PS_PLEDGE because I know
> > that when PS_PLEDGE is set, then it means the process has called
> > pledge.
>
> I am telling you this, because if the PS_PLEDGE bit in ps_pledge is
> not set, the other bits in ps_pledge are NOT VALID.
Ah sorry, Otto is right, PS_PLEDGE bit in ps_flags.