RE: [RFC] mmap file_contexts and property_contexts:

2016-09-20 Thread Roberts, William C
> > -Original Message- > > From: Roberts, William C > > Sent: Monday, September 19, 2016 2:45 PM > > To: selinux@tycho.nsa.gov; seandroid-l...@tycho.nsa.gov; > > s...@tycho.nsa.gov; jda...@google.com > > Cc: Roberts, William C > > Subject: [RFC] mmap file_contexts and property_contexts:

RE: [RFC] mmap file_contexts and property_contexts:

2016-09-20 Thread Roberts, William C
> > On 09/19/2016 05:51 PM, Roberts, William C wrote: > > > FYI I only tested this with checkfc... > > > > Evidently. matchpathcon and sefcontext_compile both report calls to > > free() on invalid pointers and abort. > > That doesn’t surprise me, I only tested the checkfc usages. Hence #4 in todo

RE: [RFC] mmap file_contexts and property_contexts:

2016-09-20 Thread Roberts, William C
> -Original Message- > From: Stephen Smalley [mailto:s...@tycho.nsa.gov] > Sent: Tuesday, September 20, 2016 5:56 AM > To: Roberts, William C ; selinux@tycho.nsa.gov; > seandroid-l...@tycho.nsa.gov; jda...@google.com > Subject: Re: [RFC] mmap file_contexts and property

RE: [RFC] mmap file_contexts and property_contexts:

2016-09-20 Thread Roberts, William C
> -Original Message- > From: Stephen Smalley [mailto:s...@tycho.nsa.gov] > Sent: Tuesday, September 20, 2016 6:18 AM > To: Roberts, William C ; selinux@tycho.nsa.gov; > seandroid-l...@tycho.nsa.gov; jda...@google.com > Subject: Re: [RFC] mmap file_contexts and property

Re: [RFC] mmap file_contexts and property_contexts:

2016-09-20 Thread Stephen Smalley
On 09/19/2016 05:51 PM, Roberts, William C wrote: > FYI I only tested this with checkfc... Evidently. matchpathcon and sefcontext_compile both report calls to free() on invalid pointers and abort. > >> -Original Message- >> From: Roberts, William C >> Sent: Monday, September 19, 2016 2:

Re: [RFC] mmap file_contexts and property_contexts:

2016-09-20 Thread Stephen Smalley
On 09/19/2016 05:45 PM, william.c.robe...@intel.com wrote: > From: William Roberts > > THIS IS WIP... > > Rather than using stdio and making copies, just mmap the files > and use the pointers in place. The affect of this change, is that > text file load time is now faster than binary load time b

Re: [RFC] mmap file_contexts and property_contexts:

2016-09-20 Thread Stephen Smalley
On 09/20/2016 02:27 AM, William Roberts wrote: > On Sep 19, 2016 22:25, "Jason Zaman" wrote: >> >> On 20 Sep 2016 12:50 pm, "William Roberts" > wrote: >>> >>> On Sep 19, 2016 21:16, "Jason Zaman" wrote: On 20 Sep 2016 5:47 am, wrote: > > From: William Roberts > > THIS

Re: [RFC] mmap file_contexts and property_contexts:

2016-09-19 Thread William Roberts
On Sep 19, 2016 22:25, "Jason Zaman" wrote: > > On 20 Sep 2016 12:50 pm, "William Roberts" wrote: > > > > On Sep 19, 2016 21:16, "Jason Zaman" wrote: > > > > > > On 20 Sep 2016 5:47 am, wrote: > > > > > > > > From: William Roberts > > > > > > > > THIS IS WIP... > > > > > > > > Rather than usin

Re: [RFC] mmap file_contexts and property_contexts:

2016-09-19 Thread Jason Zaman
On 20 Sep 2016 12:50 pm, "William Roberts" wrote: > > On Sep 19, 2016 21:16, "Jason Zaman" wrote: > > > > On 20 Sep 2016 5:47 am, wrote: > > > > > > From: William Roberts > > > > > > THIS IS WIP... > > > > > > Rather than using stdio and making copies, just mmap the files > > > and use the poin

Re: [RFC] mmap file_contexts and property_contexts:

2016-09-19 Thread William Roberts
On Sep 19, 2016 21:16, "Jason Zaman" wrote: > > On 20 Sep 2016 5:47 am, wrote: > > > > From: William Roberts > > > > THIS IS WIP... > > > > Rather than using stdio and making copies, just mmap the files > > and use the pointers in place. The affect of this change, is that > > text file load time

Re: [RFC] mmap file_contexts and property_contexts:

2016-09-19 Thread Jason Zaman
On 20 Sep 2016 5:47 am, wrote: > > From: William Roberts > > THIS IS WIP... > > Rather than using stdio and making copies, just mmap the files > and use the pointers in place. The affect of this change, is that > text file load time is now faster than binary load time by 4.7% > when testing with

RE: [RFC] mmap file_contexts and property_contexts:

2016-09-19 Thread Roberts, William C
FYI I only tested this with checkfc... > -Original Message- > From: Roberts, William C > Sent: Monday, September 19, 2016 2:45 PM > To: selinux@tycho.nsa.gov; seandroid-l...@tycho.nsa.gov; s...@tycho.nsa.gov; > jda...@google.com > Cc: Roberts, William C > Subject: [RFC] mmap file_contexts