<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/security/selinux/netnode.c, branch v5.4.222</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.4.222</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.4.222'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2019-09-23T18:21:04+00:00</updated>
<entry>
<title>Merge tag 'selinux-pr-20190917' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux</title>
<updated>2019-09-23T18:21:04+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-09-23T18:21:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5825a95fe92566ada2292a65de030850b5cff1da'/>
<id>urn:sha1:5825a95fe92566ada2292a65de030850b5cff1da</id>
<content type='text'>
Pull selinux updates from Paul Moore:

 - Add LSM hooks, and SELinux access control hooks, for dnotify,
   fanotify, and inotify watches. This has been discussed with both the
   LSM and fs/notify folks and everybody is good with these new hooks.

 - The LSM stacking changes missed a few calls to current_security() in
   the SELinux code; we fix those and remove current_security() for
   good.

 - Improve our network object labeling cache so that we always return
   the object's label, even when under memory pressure. Previously we
   would return an error if we couldn't allocate a new cache entry, now
   we always return the label even if we can't create a new cache entry
   for it.

 - Convert the sidtab atomic_t counter to a normal u32 with
   READ/WRITE_ONCE() and memory barrier protection.

 - A few patches to policydb.c to clean things up (remove forward
   declarations, long lines, bad variable names, etc)

* tag 'selinux-pr-20190917' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux:
  lsm: remove current_security()
  selinux: fix residual uses of current_security() for the SELinux blob
  selinux: avoid atomic_t usage in sidtab
  fanotify, inotify, dnotify, security: add security hook for fs notifications
  selinux: always return a secid from the network caches if we find one
  selinux: policydb - rename type_val_to_struct_array
  selinux: policydb - fix some checkpatch.pl warnings
  selinux: shuffle around policydb.c to get rid of forward declarations
</content>
</entry>
<entry>
<title>selinux: always return a secid from the network caches if we find one</title>
<updated>2019-08-05T20:49:55+00:00</updated>
<author>
<name>Paul Moore</name>
<email>paul@paul-moore.com</email>
</author>
<published>2019-08-01T21:55:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9b80c36353ed4cce324af21244a65984db21991b'/>
<id>urn:sha1:9b80c36353ed4cce324af21244a65984db21991b</id>
<content type='text'>
Previously if we couldn't find an entry in the cache and we failed to
allocate memory for a new cache entry we would fail the network object
label lookup; this is obviously not ideal.  This patch fixes this so
that we return the object label even if we can't cache the object at
this point in time due to memory pressure.

The GitHub issue tracker is below:
 * https://github.com/SELinuxProject/selinux-kernel/issues/3

Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 295</title>
<updated>2019-06-05T15:36:38+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-29T14:18:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5b497af42fab12cadc0e29bcb7052cf9963603f5'/>
<id>urn:sha1:5b497af42fab12cadc0e29bcb7052cf9963603f5</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of version 2 of the gnu general public license as
  published by the free software foundation this program is
  distributed in the hope that it will be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  for more details

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 64 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Alexios Zavras &lt;alexios.zavras@intel.com&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190529141901.894819585@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selinux: Cleanup printk logging in netnode</title>
<updated>2018-06-19T17:49:10+00:00</updated>
<author>
<name>peter enderborg</name>
<email>peter.enderborg@sony.com</email>
</author>
<published>2018-06-12T08:09:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=67b0b4e4988f296ecc69fc8d09a2ce2741653ee0'/>
<id>urn:sha1:67b0b4e4988f296ecc69fc8d09a2ce2741653ee0</id>
<content type='text'>
Replace printk with pr_* to avoid checkpatch warnings.

Signed-off-by: Peter Enderborg &lt;peter.enderborg@sony.com&gt;
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
<entry>
<title>selinux: wrap global selinux state</title>
<updated>2018-03-01T23:48:02+00:00</updated>
<author>
<name>Stephen Smalley</name>
<email>sds@tycho.nsa.gov</email>
</author>
<published>2018-03-01T23:48:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=aa8e712cee93d520e96a2ca8e3a20f807c937e3f'/>
<id>urn:sha1:aa8e712cee93d520e96a2ca8e3a20f807c937e3f</id>
<content type='text'>
Define a selinux state structure (struct selinux_state) for
global SELinux state and pass it explicitly to all security server
functions.  The public portion of the structure contains state
that is used throughout the SELinux code, such as the enforcing mode.
The structure also contains a pointer to a selinux_ss structure whose
definition is private to the security server and contains security
server specific state such as the policy database and SID table.

This change should have no effect on SELinux behavior or APIs
(userspace or LSM).  It merely wraps SELinux state and passes it
explicitly as needed.

Signed-off-by: Stephen Smalley &lt;sds@tycho.nsa.gov&gt;
[PM: minor fixups needed due to collisions with the SCTP patches]
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;</content>
</entry>
<entry>
<title>selinux: remove unused variabled in the netport, netnode, and netif caches</title>
<updated>2014-08-08T00:55:30+00:00</updated>
<author>
<name>Paul Moore</name>
<email>pmoore@redhat.com</email>
</author>
<published>2014-08-08T00:55:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=942ba3646543aeb3e5729c35d10ac43424bf0b68'/>
<id>urn:sha1:942ba3646543aeb3e5729c35d10ac43424bf0b68</id>
<content type='text'>
This patch removes the unused return code variable in the netport,
netnode, and netif initialization functions.

Reported-by: fengguang.wu@intel.com
Signed-off-by: Paul Moore &lt;pmoore@redhat.com&gt;
</content>
</entry>
<entry>
<title>selinux: reduce the number of calls to synchronize_net() when flushing caches</title>
<updated>2014-06-26T18:33:56+00:00</updated>
<author>
<name>Paul Moore</name>
<email>pmoore@redhat.com</email>
</author>
<published>2014-06-26T18:33:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=615e51fdda6f274e94b1e905fcaf6111e0d9aa20'/>
<id>urn:sha1:615e51fdda6f274e94b1e905fcaf6111e0d9aa20</id>
<content type='text'>
When flushing the AVC, such as during a policy load, the various
network caches are also flushed, with each making a call to
synchronize_net() which has shown to be expensive in some cases.
This patch consolidates the network cache flushes into a single AVC
callback which only calls synchronize_net() once for each AVC cache
flush.

Reported-by: Jaejyn Shin &lt;flagon22bass@gmail.com&gt;
Signed-off-by: Paul Moore &lt;pmoore@redhat.com&gt;
</content>
</entry>
<entry>
<title>selinux: fix problems in netnode when BUG() is compiled out</title>
<updated>2013-07-25T17:03:27+00:00</updated>
<author>
<name>Paul Moore</name>
<email>pmoore@redhat.com</email>
</author>
<published>2013-07-23T21:38:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b04eea886409de7460b5727b5931fb0bd417275f'/>
<id>urn:sha1:b04eea886409de7460b5727b5931fb0bd417275f</id>
<content type='text'>
When the BUG() macro is disabled at compile time it can cause some
problems in the SELinux netnode code: invalid return codes and
uninitialized variables.  This patch fixes this by making sure we take
some corrective action after the BUG() macro.

Reported-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Paul Moore &lt;pmoore@redhat.com&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
<entry>
<title>selinux: fix sel_netnode_insert() suspicious rcu dereference</title>
<updated>2012-11-21T10:55:32+00:00</updated>
<author>
<name>Dave Jones</name>
<email>davej@redhat.com</email>
</author>
<published>2012-11-09T00:09:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=88a693b5c1287be4da937699cb82068ce9db0135'/>
<id>urn:sha1:88a693b5c1287be4da937699cb82068ce9db0135</id>
<content type='text'>
===============================
[ INFO: suspicious RCU usage. ]
3.5.0-rc1+ #63 Not tainted
-------------------------------
security/selinux/netnode.c:178 suspicious rcu_dereference_check() usage!

other info that might help us debug this:

rcu_scheduler_active = 1, debug_locks = 0
1 lock held by trinity-child1/8750:
 #0:  (sel_netnode_lock){+.....}, at: [&lt;ffffffff812d8f8a&gt;] sel_netnode_sid+0x16a/0x3e0

stack backtrace:
Pid: 8750, comm: trinity-child1 Not tainted 3.5.0-rc1+ #63
Call Trace:
 [&lt;ffffffff810cec2d&gt;] lockdep_rcu_suspicious+0xfd/0x130
 [&lt;ffffffff812d91d1&gt;] sel_netnode_sid+0x3b1/0x3e0
 [&lt;ffffffff812d8e20&gt;] ? sel_netnode_find+0x1a0/0x1a0
 [&lt;ffffffff812d24a6&gt;] selinux_socket_bind+0xf6/0x2c0
 [&lt;ffffffff810cd1dd&gt;] ? trace_hardirqs_off+0xd/0x10
 [&lt;ffffffff810cdb55&gt;] ? lock_release_holdtime.part.9+0x15/0x1a0
 [&lt;ffffffff81093841&gt;] ? lock_hrtimer_base+0x31/0x60
 [&lt;ffffffff812c9536&gt;] security_socket_bind+0x16/0x20
 [&lt;ffffffff815550ca&gt;] sys_bind+0x7a/0x100
 [&lt;ffffffff816c03d5&gt;] ? sysret_check+0x22/0x5d
 [&lt;ffffffff810d392d&gt;] ? trace_hardirqs_on_caller+0x10d/0x1a0
 [&lt;ffffffff8133b09e&gt;] ? trace_hardirqs_on_thunk+0x3a/0x3f
 [&lt;ffffffff816c03a9&gt;] system_call_fastpath+0x16/0x1b

This patch below does what Paul McKenney suggested in the previous thread.

Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
Reviewed-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Acked-by: Paul Moore &lt;paul@paul-moore.com&gt;
Cc: Eric Paris &lt;eparis@parisplace.org&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: James Morris &lt;james.l.morris@oracle.com&gt;
</content>
</entry>
<entry>
<title>SELinux: avc: remove the useless fields in avc_add_callback</title>
<updated>2012-04-09T16:23:44+00:00</updated>
<author>
<name>Wanlong Gao</name>
<email>gaowanlong@cn.fujitsu.com</email>
</author>
<published>2012-03-07T14:17:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=562c99f20d989f222138dddfd71e275bfb3665de'/>
<id>urn:sha1:562c99f20d989f222138dddfd71e275bfb3665de</id>
<content type='text'>
avc_add_callback now just used for registering reset functions
in initcalls, and the callback functions just did reset operations.
So, reducing the arguments to only one event is enough now.

Signed-off-by: Wanlong Gao &lt;gaowanlong@cn.fujitsu.com&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
</feed>
