<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/security/smack/smackfs.c, branch linux-3.12.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.12.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.12.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2013-08-12T18:51:40Z</updated>
<entry>
<title>Smack: parse multiple rules per write to load2, up to PAGE_SIZE-1 bytes</title>
<updated>2013-08-12T18:51:40Z</updated>
<author>
<name>Rafal Krypa</name>
</author>
<published>2013-08-09T09:47:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=10289b0f738e8b301969f2288c4942455f1b1e59'/>
<id>urn:sha1:10289b0f738e8b301969f2288c4942455f1b1e59</id>
<content type='text'>
Smack interface for loading rules has always parsed only single rule from
data written to it. This requires user program to call one write() per
each rule it wants to load.
This change makes it possible to write multiple rules, separated by new
line character. Smack will load at most PAGE_SIZE-1 characters and properly
return number of processed bytes. In case when user buffer is larger, it
will be additionally truncated. All characters after last \n will not get
parsed to avoid partial rule near input buffer boundary.

Signed-off-by: Rafal Krypa &lt;r.krypa@samsung.com&gt;
</content>
</entry>
<entry>
<title>Smack: network label match fix</title>
<updated>2013-08-02T03:04:02Z</updated>
<author>
<name>Casey Schaufler</name>
</author>
<published>2013-06-28T20:47:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=677264e8fb73ea35a508700e19ce76c527576d1c'/>
<id>urn:sha1:677264e8fb73ea35a508700e19ce76c527576d1c</id>
<content type='text'>
The Smack code that matches incoming CIPSO tags with Smack labels
reaches through the NetLabel interfaces and compares the network
data with the CIPSO header associated with a Smack label. This was
done in a ill advised attempt to optimize performance. It works
so long as the categories fit in a single capset, but this isn't
always the case.

This patch changes the Smack code to use the appropriate NetLabel
interfaces to compare the incoming CIPSO header with the CIPSO
header associated with a label. It will always match the CIPSO
headers correctly.

Targeted for git://git.gitorious.org/smack-next/kernel.git

Signed-off-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
</content>
</entry>
<entry>
<title>security: smack: fix memleak in smk_write_rules_list()</title>
<updated>2013-08-01T19:57:24Z</updated>
<author>
<name>Tomasz Stanislawski</name>
</author>
<published>2013-06-06T07:30:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=470043ba995a79a274a5db306856975002a06f19'/>
<id>urn:sha1:470043ba995a79a274a5db306856975002a06f19</id>
<content type='text'>
The smack_parsed_rule structure is allocated.  If a rule is successfully
installed then the last reference to the object is lost.  This patch fixes this
leak. Moreover smack_parsed_rule is allocated on stack because it no longer
needed ofter smk_write_rules_list() is finished.

Signed-off-by: Tomasz Stanislawski &lt;t.stanislaws@samsung.com&gt;
</content>
</entry>
<entry>
<title>Smack: Fix the bug smackcipso can't set CIPSO correctly</title>
<updated>2013-06-03T17:56:02Z</updated>
<author>
<name>Passion,Zhao</name>
</author>
<published>2013-06-03T03:42:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0fcfee61d63b82c1eefb5b1a914240480f17d63f'/>
<id>urn:sha1:0fcfee61d63b82c1eefb5b1a914240480f17d63f</id>
<content type='text'>
Bug report: https://tizendev.org/bugs/browse/TDIS-3891

The reason is userspace libsmack only use "smackfs/cipso2" long-label interface,
but the code's logical is still for orginal fixed length label. Now update
smack_cipso_apply() to support flexible label (&lt;=256 including tailing '\0')

There is also a bug in kernel/security/smack/smackfs.c:
When smk_set_cipso() parsing the CIPSO setting from userspace, the offset of
CIPSO level should be "strlen(label)+1" instead of "strlen(label)"

Signed-off-by: Passion,Zhao &lt;passion.zhao@intel.com&gt;
</content>
</entry>
<entry>
<title>Smack: Improve access check performance</title>
<updated>2013-05-28T17:08:32Z</updated>
<author>
<name>Casey Schaufler</name>
</author>
<published>2013-05-23T01:43:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2f823ff8bec03a1e6f9e11fd0c4d54e4c7d09532'/>
<id>urn:sha1:2f823ff8bec03a1e6f9e11fd0c4d54e4c7d09532</id>
<content type='text'>
Each Smack label that the kernel has seen is added to a
list of labels. The list of access rules for a given subject
label hangs off of the label list entry for the label.
This patch changes the structures that contain subject
labels to point at the label list entry rather that the
label itself. Doing so removes a label list lookup in
smk_access() that was accounting for the largest single
chunk of Smack overhead.

Targeted for git://git.gitorious.org/smack-next/kernel.git

Signed-off-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
</content>
</entry>
<entry>
<title>Smack: include magic.h in smackfs.c</title>
<updated>2013-04-03T02:13:51Z</updated>
<author>
<name>Casey Schaufler</name>
</author>
<published>2013-04-02T18:41:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=958d2c2f4ad905e3ffa1711d19184d21d9b00cc1'/>
<id>urn:sha1:958d2c2f4ad905e3ffa1711d19184d21d9b00cc1</id>
<content type='text'>
As reported for linux-next: Tree for Apr 2 (smack)
Add the required include for smackfs.c

Signed-off-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
Reported-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: James Morris &lt;james.l.morris@oracle.com&gt;
</content>
</entry>
<entry>
<title>Smack: add support for modification of existing rules</title>
<updated>2013-03-19T21:16:42Z</updated>
<author>
<name>Rafal Krypa</name>
</author>
<published>2013-01-10T18:42:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e05b6f982a049113a88a1750e13fdb15298cbed4'/>
<id>urn:sha1:e05b6f982a049113a88a1750e13fdb15298cbed4</id>
<content type='text'>
Rule modifications are enabled via /smack/change-rule. Format is as follows:
"Subject Object rwaxt rwaxt"

First two strings are subject and object labels up to 255 characters.
Third string contains permissions to enable.
Fourth string contains permissions to disable.

All unmentioned permissions will be left unchanged.
If no rule previously existed, it will be created.

Targeted for git://git.gitorious.org/smack-next/kernel.git

Signed-off-by: Rafal Krypa &lt;r.krypa@samsung.com&gt;
</content>
</entry>
<entry>
<title>Smack: prevent revoke-subject from failing when unseen label is written to it</title>
<updated>2013-03-19T21:15:21Z</updated>
<author>
<name>Rafal Krypa</name>
</author>
<published>2012-11-27T15:28:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d15d9fad16f6aa459cf4926a1d3aba36b004e9a2'/>
<id>urn:sha1:d15d9fad16f6aa459cf4926a1d3aba36b004e9a2</id>
<content type='text'>
Special file /smack/revoke-subject will silently accept labels that are not
present on the subject label list. Nothing has to be done for such labels,
as there are no rules for them to revoke.

Targeted for git://git.gitorious.org/smack-next/kernel.git

Signed-off-by: Rafal Krypa &lt;r.krypa@samsung.com&gt;
</content>
</entry>
<entry>
<title>Smack: create a sysfs mount point for smackfs</title>
<updated>2012-12-14T18:57:23Z</updated>
<author>
<name>Casey Schaufler</name>
</author>
<published>2012-11-02T01:14:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e93072374112db9dc86635934ee761249be28370'/>
<id>urn:sha1:e93072374112db9dc86635934ee761249be28370</id>
<content type='text'>
There are a number of "conventions" for where to put LSM filesystems.
Smack adheres to none of them. Create a mount point at /sys/fs/smackfs
for mounting smackfs so that Smack can be conventional.

Targeted for git://git.gitorious.org/smack-next/kernel.git

Signed-off-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
</content>
</entry>
<entry>
<title>Smack: implement revoking all rules for a subject label</title>
<updated>2012-09-18T16:50:52Z</updated>
<author>
<name>Rafal Krypa</name>
</author>
<published>2012-07-11T15:49:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=449543b0436a9146b855aad39eab76ae4853e88d'/>
<id>urn:sha1:449543b0436a9146b855aad39eab76ae4853e88d</id>
<content type='text'>
Add /smack/revoke-subject special file. Writing a SMACK label to this file will
set the access to '-' for all access rules with that subject label.

Targeted for git://git.gitorious.org/smack-next/kernel.git

Signed-off-by: Rafal Krypa &lt;r.krypa@samsung.com&gt;
</content>
</entry>
</feed>
