Re: unlocked stdio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sep 21, 2016 13:06, "Stephen Smalley" <sds@xxxxxxxxxxxxx> wrote:
>
> On 09/21/2016 03:57 PM, Roberts, William C wrote:
> > Correction, it’s just fgets_unlocked, it appears to support the others.
>
> Seems like a bug in bionic, but we can work around it by:
> #ifdef ANDROID
> #define fgets_unlocked(x) fgets(x)
> #endif
>
> in selinux_internal.h or some similar internal header.
>
> It avoids unnecessary locking overheads when dealing with FILE
> descriptors that are only used locally and guaranteed to not be shared
> by multiple threads.

I know what it does and why, but was it really that necessary?

>
> >
> >
> >
> > *From:* Roberts, William C
> > *Sent:* Wednesday, September 21, 2016 12:53 PM
> > *To:* 'seandroid-list@xxxxxxxxxxxxx' <seandroid-list@xxxxxxxxxxxxx>;
> > 'selinux@xxxxxxxxxxxxx' <selinux@xxxxxxxxxxxxx>; 'sds@xxxxxxxxxxxxx'
> > <sds@xxxxxxxxxxxxx>
> > *Subject:* unlocked stdio
> >
> >
> >
> > What was the purpose of using unlocked stdio in libselinux? Bionic
> > doesn’t support it, is it really necessary?
> >
> >
> >
> > Bill
> >
> >
> >
>
> _______________________________________________
> Selinux mailing list
> Selinux@xxxxxxxxxxxxx
> To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx.
> To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.

_______________________________________________
Selinux mailing list
Selinux@xxxxxxxxxxxxx
To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx.
To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.

[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux