Re: [PATCH] Smack: prevent revoke-subject from failing when unseen label is written to it

2012-11-27 Thread Casey Schaufler
On 11/27/2012 7:28 AM, Rafal Krypa wrote: > 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

Re: [PATCH] Smack: add missing support for transmute bit in smack_str_from_perm()

2012-11-27 Thread Casey Schaufler
On 11/27/2012 7:29 AM, Rafal Krypa wrote: > This fixes audit logs for granting or denial of permissions to show > information about transmute bit. > > Targeted for git://git.gitorious.org/smack-next/kernel.git I will queue this for 3.9 as I've just submitted the 3.8 Smack changes. > > Signed-off-

Re: [PATCH 0/3] Smack: add support for modification of existing rules, restructure rules list showing in smackfs

2012-11-27 Thread Casey Schaufler
On 11/27/2012 9:40 AM, Rafal Krypa wrote: > The following three patches are intended to introduce in-place > modification of Smack rules. Until now Smack supported only > overwriting of existing rules. To change permitted access for a given > subject and object, user had to read list of rules to ge

Re: linux-next: unusual update of the security tree

2012-11-27 Thread Casey Schaufler
On 11/27/2012 3:16 PM, Stephen Rothwell wrote: > Hi James, > > The security tree > (git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git#next) > looks a bit strange today ... It appears to have been created by Casey > Schaufler (cc'd) and contains som

Re: [PATCH 3/4] capability: Create a new capability CAP_SIGNED

2013-03-18 Thread Casey Schaufler
On 3/18/2013 10:05 AM, Vivek Goyal wrote: > On Fri, Mar 15, 2013 at 02:12:59PM -0700, Casey Schaufler wrote: >> On 3/15/2013 1:35 PM, Vivek Goyal wrote: >>> Create a new capability CAP_SIGNED which can be given to signed executables. >> This would drive anyone who is tryin

Re: [PATCH 3/4] capability: Create a new capability CAP_SIGNED

2013-03-18 Thread Casey Schaufler
On 3/18/2013 11:30 AM, Vivek Goyal wrote: > On Mon, Mar 18, 2013 at 10:50:21AM -0700, Casey Schaufler wrote: >> On 3/18/2013 10:05 AM, Vivek Goyal wrote: >>> On Fri, Mar 15, 2013 at 02:12:59PM -0700, Casey Schaufler wrote: >>>> On 3/15/2013 1:35 PM, Vivek Goyal wrote:

Re: [PATCH] Fix common_audit_data type for smack_inode_unlink() and smack_inode_rmdir()

2013-03-20 Thread Casey Schaufler
On 3/11/2013 4:50 AM, Igor Zhbanov wrote: > This patch fixes kernel Oops because of wrong common_audit_data type > in smack_inode_unlink() and smack_inode_rmdir(). > > When SMACK security module is enabled and SMACK logging is on (/smack/logging > is not zero) and you try to delete the file which >

Re: [PATCH 0/3] Patches to enable chroot for all users

2013-03-20 Thread Casey Schaufler
On 3/20/2013 6:09 AM, tal.tchwe...@gmail.com wrote: > From: Tal Tchwella > > I want to suggest adding chroot capability to all users. It is much too easy to create an environment for tricking privileged programs using chroot to allow unprivileged processes to use chroot. /etc/shadow is your trivi

Re: [RFC] setxattr bugs

2013-02-05 Thread Casey Schaufler
On 2/4/2013 6:14 PM, Jeff Mahoney wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 2/2/13 11:30 PM, Al Viro wrote: >> * JFS, since 2005: setxattr(name, "system.posix_acl_access", NULL, >> 0, 0) succeeds, creating an empty EA with "system.posix_acl_access" >> as name. Validity checks

[PATCH] Smack: include magic.h in smackfs.c

2013-04-02 Thread Casey Schaufler
As reported for linux-next: Tree for Apr 2 (smack) Add the required include for smackfs.c Signed-off-by: Casey Schaufler --- security/smack/smackfs.c |1 + 1 file changed, 1 insertion(+) diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c index 2479a41..53a08b8 100644 --- a

Re: [PATCH 3/4] capability: Create a new capability CAP_SIGNED

2013-03-15 Thread Casey Schaufler
On 3/15/2013 1:35 PM, Vivek Goyal wrote: > Create a new capability CAP_SIGNED which can be given to signed executables. This would drive anyone who is trying to use capabilities as the privilege mechanism it is intended to be absolutely crazy. Capabilities aren't just random attribute bits. They

Re: [PATCH - BUGFIX] Smack: Check for 'struct socket' with NULL sk

2008-02-11 Thread Casey Schaufler
turn -EOPNOTSUPP; > > ssp = sock->sk->sk_security; > @@ -1362,7 +1364,7 @@ static int smack_inode_setsecurity(struct inode *inode, > const char *name, > static int smack_socket_post_create(struct socket *sock, int family, > int type,

[PATCH] [RFC] Smack: unlabeled outgoing ambient packets - v2

2008-02-11 Thread Casey Schaufler
From: Casey Schaufler <[EMAIL PROTECTED]> Smack uses CIPSO labeling, but allows for unlabeled packets by specifying an "ambient" label that is applied to incoming unlabeled packets. Because the other end of the connection may dislike IP options, and ssh is one know application t

Re: [PATCH - BUGFIX] Smack: Check for 'struct socket' with NULL sk

2008-02-12 Thread Casey Schaufler
similar report was also > sent here: http://lkml.org/lkml/2007/10/27/85 > > Could you please check below patch ? I think it should fix your problem. > > I've also added similar checks in inode_{get/set}security(). Cheating > from SELinux post_create_socket(), it does the sam

Re: + smack-check-for-struct-socket-with-null-sk.patch added to -mm tree

2008-02-13 Thread Casey Schaufler
#x27;ve also added similar checks in inode_{get/set}security(). Cheating from > SELinux post_create_socket(), it does the same. > > Signed-off-by: Ahmed S. Darwish <[EMAIL PROTECTED]> > Acked-by: Casey Schaufler <[EMAIL PROTECTED]> Acked-by: Casey Schaufler <[EMAIL P

Re: [2.6 patch] make smackfs.c:smk_cipso_doi() static

2008-02-13 Thread Casey Schaufler
body of a message to [EMAIL PROTECTED] > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > > > Casey Schaufler [EMAIL PROTECTED] -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

Re: [PATCH] SMACK: add maintainers entry

2008-02-13 Thread Casey Schaufler
/ > T: git kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6.git > S: Maintained > > +SMACK (Simplified Mandatory Access Control Kernel) > +P: Casey Schaufler > +M: [EMAIL PROTECTED] > +L: linux-kernel@vger.kernel.org > +W: http://schaufler-ca.com/ > +S:

Re: [PATCH] (02/14/08 Linus git) Smack unlabeled outgoing ambient packets - v3

2008-02-15 Thread Casey Schaufler
--- Paul Moore <[EMAIL PROTECTED]> wrote: > On Friday 15 February 2008 12:38:49 am Casey Schaufler wrote: > > From: Casey Schaufler <[EMAIL PROTECTED]> > > > > Smack uses CIPSO labeling, but allows for unlabeled packets > > by specifying an &quo

[PATCH] (02/14/08 Linus git) Smack unlabeled outgoing ambient packets - v3

2008-02-15 Thread Casey Schaufler
From: Casey Schaufler <[EMAIL PROTECTED]> Smack uses CIPSO labeling, but allows for unlabeled packets by specifying an "ambient" label that is applied to incoming unlabeled packets. Because the other end of the connection may dislike IP options, and ssh is one know application t

Re: [PATCH] (02/14/08 Linus git) Smack unlabeled outgoing ambient packets - v3

2008-02-15 Thread Casey Schaufler
t; get that in? > > FYI, it looks like Linus just tagged -rc2 and it does have the fix you > need. Thank you. Verification in progress. Casey Schaufler [EMAIL PROTECTED] -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAI

[PATCH] (02/15/08 Linus git) Smack unlabeled outgoing ambient packets - v4

2008-02-15 Thread Casey Schaufler
From: Casey Schaufler <[EMAIL PROTECTED]> Smack uses CIPSO labeling, but allows for unlabeled packets by specifying an "ambient" label that is applied to incoming unlabeled packets. Because the other end of the connection may dislike IP options, and ssh is one know application t

Re: [PATCH] (02/15/08 Linus git) Smack unlabeled outgoing ambient packets - v4

2008-02-15 Thread Casey Schaufler
--- Paul Moore <[EMAIL PROTECTED]> wrote: > On Friday 15 February 2008 6:24:25 pm Casey Schaufler wrote: > > From: Casey Schaufler <[EMAIL PROTECTED]> > > > > Smack uses CIPSO labeling, but allows for unlabeled packets > > by specifying an &quo

Re: [PATCH v14 0/6] LSM: Multiple concurrent LSMs

2013-08-26 Thread Casey Schaufler
On 8/6/2013 3:36 PM, Kees Cook wrote: > On Tue, Aug 6, 2013 at 3:25 PM, Casey Schaufler > wrote: >> On 8/5/2013 11:30 PM, Kees Cook wrote: >>> On Thu, Jul 25, 2013 at 11:52 PM, Casey Schaufler >>> wrote: >>>> The /proc/*/attr interfaces are given to

Re: [PATCH v14 0/6] LSM: Multiple concurrent LSMs

2013-09-05 Thread Casey Schaufler
On 9/5/2013 11:48 AM, Kees Cook wrote: > On Mon, Aug 26, 2013 at 7:29 PM, Casey Schaufler > wrote: >> On 8/6/2013 3:36 PM, Kees Cook wrote: >>> On Tue, Aug 6, 2013 at 3:25 PM, Casey Schaufler >>> wrote: >>>> On 8/5/2013 11:30 PM, Kees Cook wrote: >

[PATCH] Smack: Add missing depends on INET in Kconfig

2012-11-30 Thread Casey Schaufler
Because NETLABEL depends on INET SECURITY_SMACK has to explicitly call out the dependency. Signed-off-by: Casey Schaufler --- security/smack/Kconfig |1 + 1 file changed, 1 insertion(+) diff --git a/security/smack/Kconfig b/security/smack/Kconfig index 9fb14ef..1be1088 100644 --- a

Re: linux-next: Tree for Nov 29 (netlabel)

2012-11-30 Thread Casey Schaufler
On 11/30/2012 8:55 AM, Randy Dunlap wrote: > On 11/30/2012 07:31 AM, Paul Moore wrote: > >> On Friday, November 30, 2012 10:19:16 AM Paul Moore wrote: >>> On Thursday, November 29, 2012 04:05:26 PM Randy Dunlap wrote: On 11/28/2012 10:40 PM, Stephen Rothwell wrote: > Hi all, > Changes

Re: [PATCH] Smack: Add missing depends on INET in Kconfig

2012-11-30 Thread Casey Schaufler
On 11/30/2012 10:43 AM, David Miller wrote: > From: Randy Dunlap > Date: Fri, 30 Nov 2012 09:40:09 -0800 > >> On 11/30/2012 09:28 AM, Casey Schaufler wrote: >> >>> Because NETLABEL depends on INET SECURITY_SMACK >>> has to explicitly call out the dependency.

Re: [PATCH] Smack: Add missing depends on INET in Kconfig

2012-11-30 Thread Casey Schaufler
On 11/30/2012 2:01 PM, Eric Paris wrote: > Do other LSMs need this too Casey? I remember we mentioned how select > was dangerous :-( I don't see any missing dependencies, but then, I missed INET. Yes, you mentioned that it was dangerous. > > On Fri, Nov 30, 2012 at 12:28 PM

Re: linux-next: unusual update of the security tree

2012-12-06 Thread Casey Schaufler
On 12/6/2012 3:21 PM, James Morris wrote: > On Thu, 6 Dec 2012, Linus Torvalds wrote: > >> Have people pulled that thing into anything else? Because quite >> frankly, I think it's unsalvageable except with a rebase. > AFAIK, only developers such as Casey will have pulled it for development > purpo

Re: [RFC] Capabilities still can't be inherited by normal programs

2012-12-06 Thread Casey Schaufler
On 12/5/2012 2:20 PM, Serge Hallyn wrote: > Quoting Andy Lutomirski (l...@amacapital.net): >> On Wed, Dec 5, 2012 at 1:05 PM, Serge Hallyn >> wrote: >>> Quoting Andy Lutomirski (l...@amacapital.net): On Tue, Dec 4, 2012 at 5:54 AM, Serge E. Hallyn wrote: > Quoting Andy Lutomirski (l...@

Re: [RFC] Capabilities still can't be inherited by normal programs

2012-12-07 Thread Casey Schaufler
On 12/7/2012 6:42 AM, Serge E. Hallyn wrote: > Quoting Casey Schaufler (ca...@schaufler-ca.com): >> On 12/5/2012 2:20 PM, Serge Hallyn wrote: >>> Quoting Andy Lutomirski (l...@amacapital.net): >>>> On Wed, Dec 5, 2012 at 1:05 PM, Serge Hallyn >>>&g

Re: [RFC] Capabilities still can't be inherited by normal programs

2012-12-10 Thread Casey Schaufler
On 12/10/2012 6:59 AM, Serge Hallyn wrote: > Quoting Andy Lutomirski (l...@amacapital.net): >> It's especially bad because granting CAP_DAC_READ_SEARCH to user "foo" >> doesn't mean anything. Is he authorized to back things up to >> encrypted storage? > We're talking about privileges at the kernel

Re: [RFC] Capabilities still can't be inherited by normal programs

2012-12-10 Thread Casey Schaufler
On 12/10/2012 10:12 AM, Andy Lutomirski wrote: > On Mon, Dec 10, 2012 at 7:47 AM, Casey Schaufler > wrote: >> Put an ACL on the program file. >> If you want different users to run with different privilege >> make two copies of the program and give them different >>

Re: [RFC] Capabilities still can't be inherited by normal programs

2012-12-10 Thread Casey Schaufler
On 12/10/2012 11:31 AM, Andy Lutomirski wrote: > On Mon, Dec 10, 2012 at 11:13 AM, Casey Schaufler > wrote: >> On 12/10/2012 10:12 AM, Andy Lutomirski wrote: >>> I think that the Windows approach is worth looking at. See here: >>> >>> http://msdn.micr

Re: [PATCH] smack: SMACK_MAGIC to include/uapi/linux/magic.h

2012-11-06 Thread Casey Schaufler
On 11/6/2012 12:17 AM, Jarkko Sakkinen wrote: > SMACK_MAGIC moved to a proper place for easy user space access > (i.e. libsmack). > > Signed-off-by: Jarkko Sakkinen > --- > include/uapi/linux/magic.h |1 + > security/smack/smack.h |5 - > 2 files changed, 1 insertion(+), 5 deletio

Re: [PATCH] smack: SMACK_MAGIC to include/uapi/linux/magic.h

2012-11-08 Thread Casey Schaufler
2012 at 5:43 AM, Jarkko Sakkinen > wrote: >> On Tue, Nov 6, 2012 at 11:59 PM, Casey Schaufler >> wrote: >>> On 11/6/2012 12:17 AM, Jarkko Sakkinen wrote: >>>> SMACK_MAGIC moved to a proper place for easy user space access >>>> (i.e. libsmack). >

Re: [PATCH] smack: SMACK_MAGIC to include/uapi/linux/magic.h

2012-11-08 Thread Casey Schaufler
On 11/8/2012 10:08 AM, Jarkko Sakkinen wrote: > SMACK_MAGIC moved to a proper place for easy user space access > (i.e. libsmack). > > Signed-off-by: Jarkko Sakkinen I will apply once James updates the next branch of his security tree. > --- > include/uapi/linux/magic.h |1 + > security/smac

Re: order 4 alloc failures in security_context_to_sid_core

2013-01-02 Thread Casey Schaufler
On 1/2/2013 7:35 AM, Dave Jones wrote: > Along the same lines as 779302e67835fe9a6b74327e54969ba59cb3478a, xattrs > can cause big allocations, which are likely to fail under memory pressure.. Adding LSM and SELinux lists. > [20539.081122] trinity-child3: page allocation failure: order:4, mode:0x1

[PATCH v13 0/9] LSM: Multiple concurrent LSMs

2013-04-23 Thread Casey Schaufler
ation it contains by LSM: smack='Pop'selinux='system_u:object_r:etc_r:s0' A security context without the LSM identifying lsm='' gets passed through to all of the LSMs that use a security context. This maintains compatability in the case where there is only one L

[PATCH v13 4/9] LSM: Multiple security context maintenance

2013-04-23 Thread Casey Schaufler
. Because the blob release mechanism can't tell how the blob was allocated it's necessary to tell it. This is accomplished by providing the security operations pointer of the LSM that created the context or NULL if it was created by the lsm infrastructure. Signed-off-by: Casey Schaufler ---

[PATCH v13 5/9] LSM: Networking component isolation

2013-04-23 Thread Casey Schaufler
components will identify the security ops vector of the LSM that will use it. There are various wrapper functions provided to make this obvious and painless. Signed-off-by: Casey Schaufler --- include/linux/security.h | 45 ++ include/net/netlabel.h

[PATCH v13 7/9] LSM: remove Yama special case stacking

2013-04-23 Thread Casey Schaufler
Subject: [PATCH v13 7/9] LSM: remove Yama special case stacking Remove the special case stacking for Yama. Signed-off-by: Casey Schaufler --- security/security.c | 21 - security/yama/Kconfig|8 security/yama/yama_lsm.c | 19 --- 3

[PATCH v13 9/9] LSM: Documentation and cleanup

2013-04-23 Thread Casey Schaufler
Subject: [PATCH v13 9/9] LSM: Documentation and cleanup Add a description of the ways secuirty modules work now. Remove security/capability.c as it is no longer used. Signed-off-by: Casey Schaufler --- Documentation/security/LSM.txt | 39 +- security/Makefile |3

[PATCH v13 3/9] LSM: Multiple concurrent secids

2013-04-23 Thread Casey Schaufler
provide that information to do so. The networking interfaces that require a single secid have been changed to hook into the mechanism. Signed-off-by: Casey Schaufler --- include/linux/audit.h |9 ++- include/linux/cred.h |3

[PATCH v13 2/9] LSM: Complete conversion to kill_pid_info_as_cred

2013-04-23 Thread Casey Schaufler
rather than the secid, eliminating the need to get or pass the secid in cases where it is unused. The two LSMs that use this hook, SELinux and Smack, are updated. Signed-off-by: Casey Schaufler --- drivers/usb/core/devio.c | 10 ++ include/linux/sched.h |2 +- include/linux

[PATCH v13 6/9] LSM: Additional interfaces in /proc/pid/attr

2013-04-23 Thread Casey Schaufler
is. New interfaces specific to the LSMs have been added. There is also a new entry "context", which is the combined security context. Signed-off-by: Casey Schaufler --- fs/proc/base.c | 29 +++-- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git

Re: [RFCv2] security: smack: add a hash table to quicken smk_find_entry()

2013-06-12 Thread Casey Schaufler
On 6/12/2013 6:40 AM, Tomasz Stanislawski wrote: > Hi Casey, > Thank you for your review. > Please refer to comments below. > > On 06/12/2013 07:11 AM, Casey Schaufler wrote: >> On 6/11/2013 5:55 AM, Tomasz Stanislawski wrote: >>> This patch adds a hash table to quic

Re: [RFC 1/5] security: smack: avoid kmalloc allocations while loading a rule string

2013-06-15 Thread Casey Schaufler
loc. > > Signed-off-by: Tomasz Stanislawski Please see the explanation below. Nacked-by: Casey Schaufler > --- > security/smack/smackfs.c | 15 ++- > 1 file changed, 6 insertions(+), 9 deletions(-) > > diff --git a/security/smack/smackfs.c b/security/smack/smackfs

Re: [RFC 2/5] security: smack: avoid kmalloc() in smk_parse_long_rule()

2013-06-15 Thread Casey Schaufler
On 6/13/2013 8:29 AM, Tomasz Stanislawski wrote: > Function smk_parse_long_rule() allocates a number of temporary strings on heap > (kmalloc cache). Moreover, the sizes of those allocations might be large if > user calls write() for a long chunk. A big kmalloc triggers a heavy reclaim > havoc and i

Re: [RFC 3/5] security: smack: fix memleak in smk_write_rules_list()

2013-06-15 Thread Casey Schaufler
On 6/13/2013 8:29 AM, Tomasz Stanislawski wrote: > 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 oft

Re: [RFC 4/5] security: smack: add kmem_cache for smack_rule allocations

2013-06-15 Thread Casey Schaufler
On 6/13/2013 8:29 AM, Tomasz Stanislawski wrote: > On ARM, sizeof(struct smack_rule)==20. Allocation by kmalloc() uses a > 32-byte-long chunk to allocate 20 bytes. Just ask ksize(). It means that 40% > of memory is simply wasted for padding bytes. > > The problem is fixed in this patch by using km

Re: [RFC 5/5] security: smack: add kmem_cache for smack_master_list allocations

2013-06-15 Thread Casey Schaufler
On 6/13/2013 8:29 AM, Tomasz Stanislawski wrote: > On ARM, sizeof(struct smack_master_list) == 12. Allocation by kmalloc() uses a > 32-byte-long chunk to allocate 12 bytes. Just ask ksize(). It means that 63% > of memory is simply wasted for padding bytes. > > The problem is fixed in this patch by

Re: [RFC 1/5] security: smack: avoid kmalloc allocations while loading a rule string

2013-06-17 Thread Casey Schaufler
On 6/17/2013 4:24 AM, Tomasz Stanislawski wrote: > Hi Casey, > Thank you for the review. > Please refer to the comments below. > > On 06/15/2013 09:32 PM, Casey Schaufler wrote: >> On 6/13/2013 8:29 AM, Tomasz Stanislawski wrote: >>> The maximal length for a rule line

Re: [RFC PATCH 2/2] SELinux: cache inode checks inside struct inode

2013-06-03 Thread Casey Schaufler
On 6/3/2013 11:59 AM, Eric Paris wrote: > This patch adds a cache of selinux security checks into struct inode. This violates the security blob architecture of the LSM. Security module specific optimizations in the VFS layer are probably going to be pointless if (when) we go to stackable security

Re: [RFC PATCH 2/2] SELinux: cache inode checks inside struct inode

2013-06-03 Thread Casey Schaufler
On 6/3/2013 1:26 PM, Casey Schaufler wrote: > On 6/3/2013 11:59 AM, Eric Paris wrote: >> This patch adds a cache of selinux security checks into struct inode. > This violates the security blob architecture of the LSM. > > Security module specific optimizations in the VFS layer ar

Re: [RFC PATCH 2/2] SELinux: cache inode checks inside struct inode

2013-06-03 Thread Casey Schaufler
On 6/3/2013 4:18 PM, Eric Paris wrote: > On Tue, 2013-06-04 at 06:31 +0900, Linus Torvalds wrote: >> >> On Mon, 3 Jun 2013, Eric Paris wrote: >>> >>> #ifdef CONFIG_SECURITY >>> + seqcount_t i_security_seqcount; >>> + u32 i_last_task_sid; >>> + u32

Re: [PATCH 2/2] f2fs: support xattr security labels

2013-06-07 Thread Casey Schaufler
On 6/6/2013 10:55 PM, Jaegeuk Kim wrote: > This patch adds the support of security labels for f2fs, which will be used > by SElinux. Please be inclusive. Security xattrs are used by LSMs other than SELinux. > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/Kconfig | 9 + > fs/f2fs/dir.c |

Re: [RFC] security: smack: add hash table for smack for quick label searching

2013-06-08 Thread Casey Schaufler
On 4/11/2013 1:46 AM, Tomasz Stanislawski wrote: > This patch adds a hash table to quicken searching of a smack label by its > name. > > For a typical idle for TIZEN the CPU wastes circa 5-10% of its cycles for > processing the smk_find_entry function. This patch adds a hash map that should > spee

Re: [RFCv2] security: smack: add a hash table to quicken smk_find_entry()

2013-06-11 Thread Casey Schaufler
On 6/11/2013 5:55 AM, Tomasz Stanislawski wrote: > This patch adds a hash table to quicken searching of a smack label by its > name. > > Basically, the patch improves performance of SMACK initialization. Parsing of > rules involves translation from a string to a smack_known (aka label) entity > w

Re: [RFCv2] security: smack: add a hash table to quicken smk_find_entry()

2013-06-27 Thread Casey Schaufler
gly, a single hlist is slightly faster than a double-linked list. > The speed-up saturates near 64 slots. Therefore I chose value 128 to provide > some margin if more labels were used. > It looks that IO becomes a new bottleneck. > > Signed-off-by: Tomasz Stanislawski I will ta

Re: [PATCH] security: smack: fix memleak in smk_write_rules_list()

2013-06-28 Thread Casey Schaufler
Signed-off-by: Tomasz Stanislawski I will add this patch to the smack-next tree. Acked-by: Casey Schaufler > --- > security/smack/smackfs.c | 30 ++ > 1 file changed, 10 insertions(+), 20 deletions(-) > > diff --git a/security/smack/smackfs.c b/se

Re: [Patch net-next v3 9/9] selinux: use generic union inet_addr

2013-08-19 Thread Casey Schaufler
On 8/19/2013 3:14 AM, Cong Wang wrote: > From: Cong Wang > > selinux has some similar definition like union inet_addr, > it can re-use the generic union inet_addr too. I'm trying to understand what value this change adds. All it appears to do is swap one set of inconvenient structure members for

Re: [Patch net-next v3 9/9] selinux: use generic union inet_addr

2013-08-19 Thread Casey Schaufler
On 8/19/2013 12:50 PM, David Miller wrote: > It's so that you can pass a generic ipv4/ipv6 address blob into > things like printf formatting, and since there is an address family > member present, it knows what's in there and therefore one printf > format specifier can handle both ipv4 and ipv6 add

Re: [ATTEND] How to act on LKML

2013-07-16 Thread Casey Schaufler
On 7/16/2013 3:39 PM, Sarah Sharp wrote: > On Wed, Jul 17, 2013 at 12:18:21AM +0200, Willy Tarreau wrote: >> On Tue, Jul 16, 2013 at 02:12:35PM -0700, Sarah Sharp wrote: >>> I *hate* both direct personal insults and indirect personal insults. >>> Neither should be acceptable in our community. >>> >

Re: [PATCH v14 6/6] LSM: Multiple LSM Documentation and cleanup

2013-07-28 Thread Casey Schaufler
On 7/26/2013 4:17 PM, Randy Dunlap wrote: > On 07/25/13 11:32, Casey Schaufler wrote: >> Subject: [PATCH v14 6/6] LSM: Multiple LSM Documentation and cleanup >> >> Add documentation and remove the obsolete capability LSM. >> Clean up some comments in security.h >>

Re: [PATCH v14 3/6] LSM: Explicit individual LSM associations

2013-07-29 Thread Casey Schaufler
On 7/29/2013 1:51 PM, Kees Cook wrote: > On Thu, Jul 25, 2013 at 11:32 AM, Casey Schaufler > wrote: >> Subject: [PATCH v14 3/6] LSM: Explicit individual LSM associations >> [...] >> Introduce feature specific security operation vectors >> for NetLabel, XFRM, s

Re: [PATCH v14 1/6] LSM: Security blob abstraction

2013-07-29 Thread Casey Schaufler
On 7/29/2013 2:15 PM, Kees Cook wrote: > On Thu, Jul 25, 2013 at 11:32 AM, Casey Schaufler > wrote: >> Subject: [PATCH v14 1/6] LSM: Security blob abstraction >> >> Create an abstracted interface for security blobs. >> Instead of directly accessing security bl

Re: [PATCH v14 5/6] LSM: SO_PEERSEC configuration options

2013-07-31 Thread Casey Schaufler
On 7/30/2013 2:47 PM, Paul Moore wrote: > On Thursday, July 25, 2013 11:32:23 AM Casey Schaufler wrote: >> Subject: [PATCH v14 5/6] LSM: SO_PEERSEC configuration options >> >> Refine the handling of SO_PEERSEC to enable legacy >> user space runtimes, Fedora in parti

Re: [PATCH v14 3/6] LSM: Explicit individual LSM associations

2013-07-31 Thread Casey Schaufler
On 7/30/2013 3:08 PM, Paul Moore wrote: > On Thursday, July 25, 2013 11:32:11 AM Casey Schaufler wrote: >> Subject: [PATCH v14 3/6] LSM: Explicit individual LSM associations >> >> Expand the /proc/.../attr interface set to help include >> LSM specific entries as wel

Re: [PATCH v14 3/6] LSM: Explicit individual LSM associations

2013-07-31 Thread Casey Schaufler
On 7/31/2013 12:39 PM, Paul Moore wrote: > On Wednesday, July 31, 2013 09:22:23 AM Casey Schaufler wrote: >> On 7/30/2013 3:08 PM, Paul Moore wrote: >>> On Thursday, July 25, 2013 11:32:11 AM Casey Schaufler wrote: >>>> Subject: [PATCH v14 3/6] LSM: Explic

Re: [PATCH v14 0/6] LSM: Multiple concurrent LSMs

2013-08-01 Thread Casey Schaufler
On 7/31/2013 7:48 PM, Balbir Singh wrote: > On Thu, Jul 25, 2013 at 11:52 PM, Casey Schaufler > wrote: >> Subject: [PATCH v14 0/6] LSM: Multiple concurrent LSMs >> >> Version 14 of this patchset is based on v3.10. >> It required significant change from version 13

Re: [PATCH v14 3/6] LSM: Explicit individual LSM associations

2013-08-01 Thread Casey Schaufler
On 8/1/2013 11:35 AM, Paul Moore wrote: > On Wednesday, July 31, 2013 02:21:54 PM Casey Schaufler wrote: >> On 7/31/2013 12:39 PM, Paul Moore wrote: >>> On Wednesday, July 31, 2013 09:22:23 AM Casey Schaufler wrote: >>>> On 7/30/2013 3:08 PM, Paul Moore wrote: >&

Re: [PATCH] security: smack: fix memleak in smk_write_rules_list()

2013-08-01 Thread Casey Schaufler
> Signed-off-by: Tomasz Stanislawski Acked-by: Casey Schaufler Applied to git://git.gitorious.org/smack-next/kernel.git#smack-for-3.12 Rebasing was required. The change has been tested. > --- > security/smack/smackfs.c | 30 ++ > 1 file changed, 10

Re: [PATCH v14 3/6] LSM: Explicit individual LSM associations

2013-08-01 Thread Casey Schaufler
On 8/1/2013 2:30 PM, Paul Moore wrote: > On Thursday, August 01, 2013 11:52:14 AM Casey Schaufler wrote: >> On 8/1/2013 11:35 AM, Paul Moore wrote: >>> Okay, so if I understand everything correctly, there are no new entries in >>> /proc relating specifically to NetLabel,

Re: [RFCv2] security: smack: add a hash table to quicken smk_find_entry()

2013-08-01 Thread Casey Schaufler
On 6/27/2013 2:11 PM, Casey Schaufler wrote: > On 6/11/2013 5:55 AM, Tomasz Stanislawski wrote: >> This patch adds a hash table to quicken searching of a smack label by its >> name. >> >> Basically, the patch improves performance of SMACK initialization. Parsi

Re: [Patch net-next v3 9/9] selinux: use generic union inet_addr

2013-08-20 Thread Casey Schaufler
On 8/20/2013 6:01 AM, Cong Wang wrote: > On Mon, 2013-08-19 at 14:42 -0700, Casey Schaufler wrote: >> Well, they certainly don't appear to add any value on their own. >> I also generally oppose doing clever things with data structures. > If you want to implement same thing

[PATCH] Smack: IPv6 casting error fix for 3.11

2013-08-05 Thread Casey Schaufler
sockaddr isn't as large as a struct sockaddr_in6. There would need to be casting one way or the other. This patch gets it the right way. This problem required some effort to make occur in development with 3.10, but hits every time in 3.11. This patch should go into 3.11. Signed-off-by: Casey Scha

Re: [PATCH v14 0/6] LSM: Multiple concurrent LSMs

2013-08-06 Thread Casey Schaufler
On 8/5/2013 11:30 PM, Kees Cook wrote: > On Thu, Jul 25, 2013 at 11:52 PM, Casey Schaufler > wrote: >> The /proc/*/attr interfaces are given to one LSM. This can be >> done by setting CONFIG_SECURITY_PRESENT. Additional interfaces >> have been created in /proc/*/attr so t

Re: [PATCH] smack: fix magic value

2013-07-20 Thread Casey Schaufler
On 7/10/2013 4:51 AM, Phil Carmody wrote: > 5d is ']', 'M' is 4d. And spelling was never my strong suit. I don't know of anyone who depends on this value, but in case someone does the correct fix is to change the comment, not the constant. > > Signed-off-by: Phil Carmody > --- > include/uapi/li

[PATCH] Smack: IPv6 casting error fix

2013-07-24 Thread Casey Schaufler
x27;t as large as a struct sockaddr_in6. There would need to be casting one way or the other. This patch gets it the right way. This problem required some effort to make occur in development with 3.10, but hits every time in 3.11. This patch should go into 3.11. Signed-off-by: Casey Scha

[PATCH v14 0/6] LSM: Multiple concurrent LSMs

2013-07-25 Thread Casey Schaufler
all of the LSMs that use a security context. This maintains compatability in the case where there is only one LSM using the security context. Signed-off-by: Casey Schaufler --- Documentation/security/LSM.txt | 56 +- drivers/usb/core/devio.c

[PATCH v14 6/6] LSM: Multiple LSM Documentation and cleanup

2013-07-25 Thread Casey Schaufler
Subject: [PATCH v14 6/6] LSM: Multiple LSM Documentation and cleanup Add documentation and remove the obsolete capability LSM. Clean up some comments in security.h Signed-off-by: Casey Schaufler --- Documentation/security/LSM.txt | 56 +- include/linux/security.h | 48 +- security

[PATCH v14 3/6] LSM: Explicit individual LSM associations

2013-07-25 Thread Casey Schaufler
t it has that ownership. These interfaces are intended to allow a future in which NetLabel can support multiple LSMs at the same time, although they do not do so now. Signed-off-by: Casey Schaufler --- drivers/usb/core/devio.c |2 +- fs/proc/b

[PATCH v14 5/6] LSM: SO_PEERSEC configuration options

2013-07-25 Thread Casey Schaufler
option, and requires that the default be the legacy behavior. Signed-off-by: Casey Schaufler --- include/linux/lsm.h| 15 + include/linux/lsm_audit.h |9 +-- include/linux/security.h |7 +- include/net

[PATCH v14 2/6] LSM: Move the capability LSM into the hook handlers

2013-07-25 Thread Casey Schaufler
x27;s free code needs to be called. The context generation has to note which LSM created a context, or if it was done for a set. Signed-off-by: Casey Schaufler --- fs/sysfs/dir.c |3 +- fs/sysfs/inode.c | 12 ++- fs/sys

Re: [PATCH] Smack: parse multiple rules per write to load2, up to PAGE_SIZE-1 bytes

2013-08-12 Thread Casey Schaufler
ndary. > > Signed-off-by: Rafal Krypa Acked-by: Casey Schaufler Applied to git://git.gitorious.org/smack-next/kernel.git smack-for-3.12 > --- > security/smack/smackfs.c | 167 > +++--- > 1 file changed, 82 insertions(+), 85 de

Re: security_inode_init_security() inode field requirements

2013-03-03 Thread Casey Schaufler
On 3/1/2013 2:12 AM, Steven Whitehouse wrote: > Hi, > > I'm wondering whether there is a list somewhere of fields which > security_inode_init_security() requires are set in an inode when it is > called? In particular, does it matter if the inode number itself is > unset when security_inode_init_sec

Re: [PATCH 1/3] evm: calculate HMAC after initializing posix acl

2013-04-24 Thread Casey Schaufler
On 4/24/2013 5:10 AM, Mimi Zohar wrote: > (Reposting with expanded 'cc' list.) > > Included in the EVM hmac calculation is the i_mode. Any changes to > the i_mode need to be reflected in the hmac. shmem_mknod() currently > calls posix_acl_init(), which modifies the i_mode, after calling > securit

Re: [PATCH v13 5/9] LSM: Networking component isolation

2013-04-24 Thread Casey Schaufler
On 4/24/2013 11:51 AM, Paul Moore wrote: > On Tuesday, April 23, 2013 09:04:31 AM Casey Schaufler wrote: >> Subject: [PATCH v13 5/9] LSM: Networking component isolation >> >> The NetLabel, XFRM and secmark networking mechanisms are >> limited to providing security inform

Re: [PATCH v13 0/9] LSM: Multiple concurrent LSMs

2013-04-24 Thread Casey Schaufler
On 4/24/2013 11:57 AM, Paul Moore wrote: > On Tuesday, April 23, 2013 09:04:06 AM Casey Schaufler wrote: >> Subject: [PATCH v13 0/9] LSM: Multiple concurrent LSMs >> >> Change the infrastructure for Linux Security Modules (LSM)s from a >> single vector of hook handlers

Re: [PATCH v13 0/9] LSM: Multiple concurrent LSMs

2013-04-24 Thread Casey Schaufler
On 4/24/2013 4:00 PM, John Johansen wrote: > On 04/24/2013 02:15 PM, Paul Moore wrote: >> On Wednesday, April 24, 2013 01:22:20 PM Casey Schaufler wrote: >>> On 4/24/2013 11:57 AM, Paul Moore wrote: >>>> I know we had a good discussion about this a while back and I

Re: [PATCH v13 0/9] LSM: Multiple concurrent LSMs

2013-04-25 Thread Casey Schaufler
On 4/25/2013 8:01 AM, Paul Moore wrote: > On Wednesday, April 24, 2013 05:43:08 PM Casey Schaufler wrote: >> On 4/24/2013 4:00 PM, John Johansen wrote: >>> On 04/24/2013 02:15 PM, Paul Moore wrote: >>>> On Wednesday, April 24, 2013 01:22:20 PM Casey Schaufler wrote

Re: [PATCH v13 0/9] LSM: Multiple concurrent LSMs

2013-04-25 Thread Casey Schaufler
On 4/25/2013 12:14 PM, Paul Moore wrote: > On Thursday, April 25, 2013 11:09:23 AM Casey Schaufler wrote: >> On 4/25/2013 8:01 AM, Paul Moore wrote: >>> On Wednesday, April 24, 2013 05:43:08 PM Casey Schaufler wrote: >>>> On 4/24/2013 4:00 PM, John Johansen wrote

Re: [RFC] security: smack: add hash table for smack for quick label searching

2013-04-11 Thread Casey Schaufler
On 4/11/2013 1:46 AM, Tomasz Stanislawski wrote: > Hi everyone, > I am a developer working on optimization of the TIZEN system. > Recently, I've discovered a performance issue in SMACK subsystem. > I used the PERF tool to find performance bottlenecks. > > The test scenario was simple. Run multiple

Re: [RFC] security: smack: add hash table for smack for quick label searching

2013-04-12 Thread Casey Schaufler
On 4/12/2013 8:12 AM, Ɓukasz Stelmach wrote: > It was <2013-04-11 czw 19:59>, when Casey Schaufler wrote: >> On 4/11/2013 1:46 AM, Tomasz Stanislawski wrote: >>> Hi everyone, >>> I am a developer working on optimization of the TIZEN system. >>> Recent

Re: Stupid VFS name lookup interface..

2013-05-25 Thread Casey Schaufler
On 5/25/2013 9:57 AM, Al Viro wrote: > On Fri, May 24, 2013 at 08:21:08PM -0700, Linus Torvalds wrote: >> On Tue, May 21, 2013 at 3:22 PM, Linus Torvalds >> wrote: >>> Untested patch attached. It compiles cleanly, looks sane, and most of >>> it is just making the function prototypes look much nice

Re: Stupid VFS name lookup interface..

2013-05-26 Thread Casey Schaufler
On 5/25/2013 10:19 PM, Linus Torvalds wrote: > On Sat, May 25, 2013 at 10:04 PM, James Morris wrote: >> On Sat, 25 May 2013, Linus Torvalds wrote: >> >>> But I haven't even looked at what non-selinux setups do to >>> performance. Last time I tried Ubuntu (they still use apparmor, no?), >>> "make m

Re: Stupid VFS name lookup interface..

2013-05-26 Thread Casey Schaufler
On 5/26/2013 5:02 AM, Theodore Ts'o wrote: > On Sat, May 25, 2013 at 11:33:46AM -0700, Casey Schaufler wrote: >> Now I'll put on my Smack maintainer hat. Performance improvement is >> always welcome, but I would rather see attention to performance of >> the LSM arc

Re: Stupid VFS name lookup interface..

2013-05-26 Thread Casey Schaufler
On 5/26/2013 11:17 AM, Linus Torvalds wrote: > On Sun, May 26, 2013 at 10:59 AM, Casey Schaufler > wrote: >> The whole secid philosophy comes out of the need to keep security out >> of other people's way. It has performance impact. Sure, SELinux >> hashes lookups

Re: Stupid VFS name lookup interface..

2013-05-28 Thread Casey Schaufler
On 5/26/2013 12:32 PM, Linus Torvalds wrote: > On Sun, May 26, 2013 at 12:11 PM, Theodore Ts'o wrote: >> And if we can't rip out that fundamental assumption, it's not obvious >> to me it will be possible to simplify the core LSM architecture. > One thing that may be sufficient is to maintain a com

  1   2   3   4   5   6   7   8   9   10   >