All of lore.kernel.org
 help / color / mirror / Atom feed
From: hqjiang <hqjiang1988@gmail.com>
To: selinux@tycho.nsa.gov
Cc: sds@tycho.nsa.gov, bill.c.roberts@gmail.com,
	hqjiang <hqjiang1988@gmail.com>
Subject: [PATCH] Correct denies of rpmsg device when accessing to remote processors.
Date: Wed, 11 Jul 2012 11:21:05 -0700	[thread overview]
Message-ID: <1342030865-5825-2-git-send-email-hqjiang1988@gmail.com> (raw)
In-Reply-To: <1342030865-5825-1-git-send-email-hqjiang1988@gmail.com>

---
 device.te      |    4 ++++
 file_contexts  |    2 ++
 mediaserver.te |    3 +++
 3 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/device.te b/device.te
index 9fc4d18..c9098e9 100644
--- a/device.te
+++ b/device.te
@@ -46,3 +46,7 @@ type gps_device, dev_type;
 # varies per device. This type
 # is used in per device policy
 type hci_attach_dev, dev_type;
+
+# All devices have a rpmsg device for 
+# achieving remoteproc and rpmsg modules
+type rpmsg_device, dev_type;
diff --git a/file_contexts b/file_contexts
index 72c95a5..f88865d 100644
--- a/file_contexts
+++ b/file_contexts
@@ -47,6 +47,8 @@
 /dev/nvmap		u:object_r:nv_device:s0
 /dev/nvhost-.*		u:object_r:nv_device:s0
 /dev/random		u:object_r:random_device:s0
+/dev/rpmsg-omx[0-9]	u:object_r:rpmsg_device:s0
+/dev/rproc_user	u:object_r:rpmsg_device:s0
 /dev/s3c-jpg		u:object_r:camera_device:s0
 /dev/s3c-mem		u:object_r:camera_device:s0
 /dev/s3c-mfc		u:object_r:graphics_device:s0
diff --git a/mediaserver.te b/mediaserver.te
index 8236c79..97f8e5d 100644
--- a/mediaserver.te
+++ b/mediaserver.te
@@ -25,3 +25,6 @@ allow mediaserver sysfs:file rw_file_perms;
 # XXX Why?
 allow mediaserver apk_data_file:file { read getattr };
 allow mediaserver ion_device:chr_file rw_file_perms;
+
+# To use remote processor
+allow mediaserver rpmsg_device:chr_file rw_file_perms;
-- 
1.7.0.4


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

  reply	other threads:[~2012-07-11 18:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-11 18:21 [PATCH] correct denies of inter system processes communication over named pipe hqjiang
2012-07-11 18:21 ` hqjiang [this message]
2012-07-12 13:34   ` [PATCH] Correct denies of rpmsg device when accessing to remote processors Stephen Smalley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1342030865-5825-2-git-send-email-hqjiang1988@gmail.com \
    --to=hqjiang1988@gmail.com \
    --cc=bill.c.roberts@gmail.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.