RE: [PATCH] libselinux: clean up process file

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

 




> -----Original Message-----
> From: Roberts, William C
> Sent: Friday, September 2, 2016 10:34 AM
> To: 'Stephen Smalley' <sds@xxxxxxxxxxxxx>; 'selinux@xxxxxxxxxxxxx'
> <selinux@xxxxxxxxxxxxx>; 'jwcart2@xxxxxxxxxxxxx' <jwcart2@xxxxxxxxxxxxx>;
> 'seandroid-list@xxxxxxxxxxxxx' <seandroid-list@xxxxxxxxxxxxx>
> Subject: RE: [PATCH] libselinux: clean up process file
> 
> <snip>
> > since M, I think it makes sense to have this in the following order:
> > 1. patch to only open the file once
> > 2. patch to switch to stdio fmemopen
> 
> Actually looking at this, it would be write it once for item 1, then discard that as
> Most of it would change for item two. So I see no value in splitting this up.
> I think we just implement item 2 and as a sideffect it won't open the file up
> multiple times.

Looking at this in the context of fmemopen() or even some of the others like open_memstream()
They both seem to copy data into an internal buffer, so I did not see a way, for instance to just
set pointers into the mapping. The hand rolled getline like routine that worked on the area
struct should really not be allocating and using the pointers into the map, that was a poor
decision.

> 
> <snip>

_______________________________________________
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