Stanislav Vorobiov [Fri, 19 Jul 2013 16:35:30 +0000 (20:35 +0400)]
VIGS: Don't call TTM's vm_close
TTM's vm_close sets vm_private_data to NULL even if VMA is
still referenced, we don't want this since this may cause
a NULL pointer dereference. And this indeed happens sometimes
on wayland
Stanislav Vorobiov [Thu, 18 Jul 2013 08:37:48 +0000 (12:37 +0400)]
Merge branch 'tizen-vigs-develop' into develop
Kitae Kim [Tue, 16 Jul 2013 06:41:27 +0000 (15:41 +0900)]
Merge branch 'tizen_qemu_1.5.1' into develop
Conflicts:
drivers/maru/Kconfig
drivers/maru/Makefile
drivers/maru/maru_virtio_touchscreen.c
include/linux/virtio_ids.h
package/changelog
Signed-off-by: Kitae Kim <kt920.kim@samsung.com>
Stanislav Vorobiov [Fri, 12 Jul 2013 12:15:38 +0000 (16:15 +0400)]
VIGS: Fixed vigs_fb_create return values
VIGS: Added dummy cursor handling
munkyu.im [Thu, 11 Jul 2013 15:34:01 +0000 (00:34 +0900)]
nfc: apply nfc driver
Signed-off-by: munkyu.im <munkyu.im@samsung.com>
Stanislav Vorobiov [Thu, 11 Jul 2013 09:23:18 +0000 (13:23 +0400)]
VIGS: Lock console before fb notifier chain walk
This is required to work properly with fbcon
Sangjin Kim [Thu, 11 Jul 2013 07:20:58 +0000 (16:20 +0900)]
Change the base id of tizen virtio devices to 30.
Change-Id: I48ebde8b407ee51c7ff62fd8678711c45667e400
Signed-off-by: Sangjin Kim <sangjin3.kim@samsung.com>
Stanislav Vorobiov [Thu, 11 Jul 2013 06:43:20 +0000 (10:43 +0400)]
VIGS: Make GEM access tracking optional
For dumb GEM API we need to have GEM access tracking
disabled and always assume that access is RW.
Thus, we make GEM access tracking optional, so that user-mode
can specify if it's wanted or not
Stanislav Vorobiov [Thu, 11 Jul 2013 06:39:15 +0000 (10:39 +0400)]
mm: export do_mmap_pgoff
For VIGS DRM we can't use 'do_mmap' (like in i915, exynos and others)
because 'do_mmap' takes only 32-bit offsets, but TTM uses 64-bit
offsets.
'do_mmap_pgoff' was exported prior to 3.4 and it's available
in 3.5, but for some reason it's static in 3.4
Jinhyung Choi [Mon, 8 Jul 2013 13:44:11 +0000 (22:44 +0900)]
sensor device driver for sensor device
Signed-off-by: Jinhyung Choi <jinhyung2.choi@samsung.com>
Stanislav Vorobiov [Tue, 2 Jul 2013 14:51:23 +0000 (18:51 +0400)]
VIGS: GEM access tracking implemented
In order to minimize GEM data transfers between
target and host we now track GEM memory accesses for each
VMA. Thus, we only update VRAM/GPU when there's at least one
VMA that requires it
Stanislav Vorobiov [Mon, 1 Jul 2013 11:52:59 +0000 (15:52 +0400)]
VIGS: Walk fb notifier call chain on DPMS
Since currently maru_bl is used to control LCD power
we need a way to trigger it. fbdev does this
automatically on FB_BLANK events by walking fb notifier call
chain. DRM doesn't do this on DPMS, so we need to do this
ourselves
Kitae Kim [Fri, 28 Jun 2013 01:49:38 +0000 (10:49 +0900)]
package: version up
Update package version.
Change-Id: Ia1fa08e7a39c28343a4b83ec5411e25eb2d7e857
Signed-off-by: Kitae Kim <kt920.kim@samsung.com>
Kitae Kim [Fri, 28 Jun 2013 01:42:43 +0000 (10:42 +0900)]
Smack: applied network-label-match patch.
This patch solved the problem that Smack recognizes incorrectly subject object pair
when checking IP packet access.
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Tested-by: Bumjin Im <bj.im@samsung.com>
Change-Id: I8b702adc78f52f03629a2b951af6040147366a5b
Kitae Kim [Fri, 28 Jun 2013 01:46:30 +0000 (10:46 +0900)]
package: version up
Update package version to apply Smack patch.
Change-Id: I7bbd0082f1dd8a211351f3b2d1e1b76391174175
Signed-off-by: Kitae Kim <kt920.kim@samsung.com>
Kitae Kim [Fri, 28 Jun 2013 01:42:43 +0000 (10:42 +0900)]
Smack: applied network-label-match patch.
This patch solved the problem that Smack recognizes incorrectly subject object pair
when checking IP packet access.
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Tested-by: Bumjin Im <bj.im@samsung.com>
Change-Id: I8b702adc78f52f03629a2b951af6040147366a5b
Stanislav Vorobiov [Thu, 27 Jun 2013 14:24:28 +0000 (18:24 +0400)]
VIGS: Automatically update VRAM when setting new root surface
When we set new root surface (for example, as part of pageflip) we
should check if that surface is GPU dirty and if it is - update VRAM.
If we don't do this we might flip stuff without QEMU display
being updated
Stanislav Vorobiov [Mon, 24 Jun 2013 12:56:12 +0000 (16:56 +0400)]
VIGS: DRM VBLANK handling implemented
VIGS: DRM pageflip handling implemented
VIGS DRM driver now supports both VBLANK events and
pageflip events
Stanislav Vorobiov [Tue, 18 Jun 2013 06:32:00 +0000 (10:32 +0400)]
VIGS: Remove "ttm shrink disable" hack
There's a right way to do this by specifying 0 in
accounted size for a BO. That way we can allocate as much BOs
as we want with used_mem always remaining 0
Stanislav Vorobiov [Mon, 17 Jun 2013 15:29:48 +0000 (19:29 +0400)]
VIGS: Support custom resolutions
Stanislav Vorobiov [Mon, 10 Jun 2013 15:37:15 +0000 (19:37 +0400)]
YaGL: Version bump
Stanislav Vorobiov [Fri, 7 Jun 2013 14:40:28 +0000 (18:40 +0400)]
VIGS: VRAM <-> GPU movements are now handled via page faults
VIGS: Fixed update_gpu command
VRAM <-> GPU movements are now handled via page faults, thus, user space
can mmap as many GEMs as it likes, they'll all be in GPU placement by
default and moved to VRAM as needed on page faults. Page fault handler will
also take care of eviction in case of there's no free space in VRAM
update_gpu command wasn't updated for last protocol change, fixed it
Stanislav Vorobiov [Thu, 6 Jun 2013 16:48:36 +0000 (20:48 +0400)]
VIGS: kernel now is surface dirty aware
kernel now knows about dirty state of each surface
SeokYeon Hwang [Tue, 4 Jun 2013 07:43:58 +0000 (16:43 +0900)]
Unset CROSS_COMPILE env because it might be set.
Change-Id: I8f11c621e5ca864002b57195e64dc84e19a10e28
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
SeokYeon Hwang [Tue, 4 Jun 2013 07:43:58 +0000 (16:43 +0900)]
Unset CROSS_COMPILE env because it might be set.
Change-Id: I8f11c621e5ca864002b57195e64dc84e19a10e28
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
Stanislav Vorobiov [Mon, 3 Jun 2013 13:29:28 +0000 (17:29 +0400)]
slp_global_lock added
Stanislav Vorobiov [Fri, 31 May 2013 09:27:03 +0000 (13:27 +0400)]
Merge remote-tracking branch 'score/develop' into tizen-vigs-develop
Kitae Kim [Wed, 29 May 2013 04:59:28 +0000 (13:59 +0900)]
package: version up
update package version to apply smack patches.
Change-Id: I531704d63b9f7bbea1068fd5c4de9884d09751d7
Signed-off-by: Kitae Kim <kt920.kim@samsung.com>
Kitae Kim [Wed, 29 May 2013 04:58:17 +0000 (13:58 +0900)]
package: modify dibs build script.
disable to build kernel for arm
Change-Id: I9d09b065e1cef20c4e62976fd264b201fbc3f445
Signed-off-by: Kitae Kim <kt920.kim@samsung.com>
Kitae Kim [Tue, 28 May 2013 01:20:11 +0000 (10:20 +0900)]
package: version up
Update package version.
Signed-off-by: Kitae Kim <kt920.kim@samsung.com>
Stanislav Vorobiov [Mon, 27 May 2013 15:38:40 +0000 (19:38 +0400)]
VIGS: Protocol updated
giwoong.kim [Thu, 23 May 2013 01:40:55 +0000 (10:40 +0900)]
touch: modified the maximum tracking count of fingers
Modified the maximum tracking count of fingers
in touch device driver.
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
Casey Schaufler [Tue, 2 Apr 2013 18:41:18 +0000 (11:41 -0700)]
Smack: include magic.h in smackfs.c
commit
958d2c2f4ad905e3ffa1711d19184d21d9b00cc1 upstream
As reported for linux-next: Tree for Apr 2 (smack)
Add the required include for smackfs.c
Change-Id: I0fcf02693b9f5a0627edb3dfd79eeb671982cc5d
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Reviewed-on: http://165.213.202.130:8080/53907
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Kyungmin Park <kyungmin.park@samsung.com>
Rafal Krypa [Thu, 10 Jan 2013 18:42:00 +0000 (19:42 +0100)]
Smack: add support for modification of existing rules
commit
e05b6f982a049113a88a1750e13fdb15298cbed4 upstream
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
Change-Id: If70a8b8a88ce2abc6b10bdd7bc7791996e70c8cd
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Reviewed-on: http://165.213.202.130:8080/53906
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Kyungmin Park <kyungmin.park@samsung.com>
Rafal Krypa [Thu, 13 Dec 2012 18:02:09 +0000 (19:02 +0100)]
Revert "Smack: add support for modification of existing rules"
This reverts commit
3cf5b164d32a648a627506a21d2fc6a6c24a2808.
Change-Id: Ia099ccd24faf7556771e0fd08184bc6065db92a8
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Reviewed-on: http://165.213.202.130:8080/53905
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Kyungmin Park <kyungmin.park@samsung.com>
Rafal Krypa [Mon, 17 Sep 2012 13:38:30 +0000 (15:38 +0200)]
Smack: prevent revoke-subject from failing when unseen label is written to it
commit
d15d9fad16f6aa459cf4926a1d3aba36b004e9a2 upstream
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.
Change-Id: I326e1fad79a99a48839de8c35abfe709391e0f30
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Reviewed-on: http://165.213.202.130:8080/53903
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Kyungmin Park <kyungmin.park@samsung.com>
Casey Schaufler [Fri, 2 Nov 2012 01:14:32 +0000 (18:14 -0700)]
Smack: create a sysfs mount point for smackfs
commit
e93072374112db9dc86635934ee761249be28370 upstream
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
Change-Id: Ibdb521f61147545376f3e62b80905c8751ea0fc8
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Reviewed-on: http://165.213.202.130:8080/53902
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Kyungmin Park <kyungmin.park@samsung.com>
Casey Schaufler [Fri, 2 Nov 2012 18:28:11 +0000 (11:28 -0700)]
Smack: use select not depends in Kconfig
commit
111fe8bd65e473d5fc6a0478cf1e2c8c6a77489a upstream
The components NETLABEL and SECURITY_NETWORK are required by
Smack. Using "depends" in Kconfig hides the Smack option
if the user hasn't figured out that they need to be enabled
while using make menuconfig. Using select is a better choice.
Because select is not recursive depends on NET and SECURITY
are added. The reflects similar usage in TOMOYO and AppArmor.
Targeted for git://git.gitorious.org/smack-next/kernel.git
Change-Id: I375867a1c1ec6958ae4b579823f651b6431e5cc6
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Reviewed-on: http://165.213.202.130:8080/53901
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Kyungmin Park <kyungmin.park@samsung.com>
sungmin ha [Tue, 21 May 2013 09:09:49 +0000 (18:09 +0900)]
Package version up.
Yeongkyoon Lee [Tue, 21 May 2013 08:58:19 +0000 (17:58 +0900)]
Merge "virtio-keyboard: added initializing vqidx when the host keyboard is turned on." into tizen_2.1
sungmin ha [Tue, 21 May 2013 09:02:05 +0000 (18:02 +0900)]
virtio-keyboard: added initializing vqidx when the host keyboard is turned on.
Signed-off-by: Sungmin Ha <sungmin82.ha@samsung.com>
Yeongkyoon Lee [Tue, 21 May 2013 08:57:40 +0000 (17:57 +0900)]
Merge "Smack: setprocattr memory leak fix" into tizen_2.1
Yeongkyoon Lee [Tue, 21 May 2013 08:57:32 +0000 (17:57 +0900)]
Merge "Smack: remove task_wait() hook." into tizen_2.1
Yeongkyoon Lee [Tue, 21 May 2013 08:57:21 +0000 (17:57 +0900)]
Merge "smack: off by one error" into tizen_2.1
Yeongkyoon Lee [Tue, 21 May 2013 08:57:12 +0000 (17:57 +0900)]
Merge "Fix common_audit_data type for smack_inode_unlink() and smack_inode_rmdir()" into tizen_2.1
Yeongkyoon Lee [Tue, 21 May 2013 08:45:58 +0000 (17:45 +0900)]
Merge "virtio-keyboard: added initializing vqidx when the host keyboard is turned on." into develop
sungmin ha [Tue, 21 May 2013 06:45:09 +0000 (15:45 +0900)]
virtio-keyboard: added initializing vqidx when the host keyboard is turned on.
Signed-off-by: Sungmin Ha <sungmin82.ha@samsung.com>
Casey Schaufler [Wed, 22 Aug 2012 18:44:03 +0000 (11:44 -0700)]
Smack: setprocattr memory leak fix
commit
46a2f3b9e99353cc63e15563e8abee71162330f7 upstream
The data structure allocations being done in prepare_creds
are duplicated in smack_setprocattr. This results in the
structure allocated in prepare_creds being orphaned and
never freed. The duplicate code is removed from
smack_setprocattr.
Targeted for git://git.gitorious.org/smack-next/kernel.git
Change-Id: I192cdad82cbdb3a57cb8f4df06d5df9a5ac36c82
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Reviewed-on: http://165.213.202.130:8080/53900
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Kyungmin Park <kyungmin.park@samsung.com>
Casey Schaufler [Fri, 10 Aug 2012 00:46:38 +0000 (17:46 -0700)]
Smack: remove task_wait() hook.
commit
c00bedb368ae02a066aed8a888afc286c1df2e60 upstream
On 12/20/2011 11:20 PM, Jarkko Sakkinen wrote:
> Allow SIGCHLD to be passed to child process without
> explicit policy. This will help to keep the access
> control policy simple and easily maintainable with
> complex applications that require use of multiple
> security contexts. It will also help to keep them
> as isolated as possible.
>
> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@intel.com>
I have a slightly different version that applies to the
current smack-next tree.
Allow SIGCHLD to be passed to child process without
explicit policy. This will help to keep the access
control policy simple and easily maintainable with
complex applications that require use of multiple
security contexts. It will also help to keep them
as isolated as possible.
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
security/smack/smack_lsm.c | 37 ++++++++-----------------------------
1 files changed, 8 insertions(+), 29 deletions(-)
Change-Id: If37564a178a336b0097d314f4915c65a19c29c91
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Reviewed-on: http://165.213.202.130:8080/53899
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Kyungmin Park <kyungmin.park@samsung.com>
Alan Cox [Thu, 26 Jul 2012 21:47:11 +0000 (14:47 -0700)]
smack: off by one error
commit
3b9fc37280c521b086943f9aedda767f5bf3b2d3 upstream
Consider the input case of a rule that consists entirely of non space
symbols followed by a \0. Say 64 + \0
In this case strlen(data) = 64
kzalloc of subject and object are 64 byte objects
sscanfdata, "%s %s %s", subject, ...)
will put 65 bytes into subject.
Change-Id: I23f9eddde5747bb1dde6e3fd5a4fbe08fd152ff2
Signed-off-by: Alan Cox <alan@linux.intel.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Cc: stable@vger.kernel.org
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Reviewed-on: http://165.213.202.130:8080/53898
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Kyungmin Park <kyungmin.park@samsung.com>
Dongsu Kim [Fri, 8 Mar 2013 05:20:39 +0000 (14:20 +0900)]
Fix common_audit_data type for smack_inode_unlink() and smack_inode_rmdir()
Change-Id: I39afcae6eeff869733b820f8f654fae5bf47f7e7
Signed-off-by: Dongsu Kim <dongsu17.kim@samsung.com>
Reviewed-on: http://165.213.202.130:8080/52126
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Kyungmin Park <kyungmin.park@samsung.com>
SeokYeon Hwang [Tue, 21 May 2013 06:36:07 +0000 (15:36 +0900)]
Package version up.
Change-Id: Idd5b6248badc73bcdb75ee2cbf4d83e2622ecfcd
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
Yeongkyoon Lee [Tue, 21 May 2013 06:25:04 +0000 (15:25 +0900)]
Merge "Package version up." into develop
SeokYeon Hwang [Tue, 21 May 2013 06:34:28 +0000 (15:34 +0900)]
Package version up.
Change-Id: I0bfa2666dd8d65da8eef1fda7450ccc1a5857f67
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
SeokYeon Hwang [Wed, 17 Apr 2013 08:38:20 +0000 (17:38 +0900)]
Add *.builtin files to .gitignore for convenience.
Change-Id: I42bd0704b46463e7627d7a6e68cd50b8169e002b
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
SeokYeon Hwang [Thu, 18 Apr 2013 06:10:02 +0000 (15:10 +0900)]
sdcard: Prepare mmcblk index more than 0
Change-Id: I7907abbe6906f569b4d981d85149e87fd15154e1
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
Alexander Graf [Wed, 2 Jan 2013 05:07:17 +0000 (05:07 +0000)]
virtio-blk: Don't free ida when disk is in use
When a file system is mounted on a virtio-blk disk, we then remove it
and then reattach it, the reattached disk gets the same disk name and
ids as the hot removed one.
This leads to very nasty effects - mostly rendering the newly attached
device completely unusable.
Trying what happens when I do the same thing with a USB device, I saw
that the sd node simply doesn't get free'd when a device gets forcefully
removed.
Imitate the same behavior for vd devices. This way broken vd devices
simply are never free'd and newly attached ones keep working just fine.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: stable@kernel.org
Asias He [Fri, 25 May 2012 02:34:48 +0000 (02:34 +0000)]
virtio-blk: Reset device after blk_cleanup_queue()
blk_cleanup_queue() will call blk_drian_queue() to drain all the
requests before queue DEAD marking. If we reset the device before
blk_cleanup_queue() the drain would fail.
1) if the queue is stopped in do_virtblk_request() because device is
full, the q->request_fn() will not be called.
blk_drain_queue() {
while(true) {
...
if (!list_empty(&q->queue_head))
__blk_run_queue(q) {
if (queue is not stoped)
q->request_fn()
}
...
}
}
Do no reset the device before blk_cleanup_queue() gives the chance to
start the queue in interrupt handler blk_done().
2) In commit
b79d866c8b7014a51f611a64c40546109beaf24a, We abort requests
dispatched to driver before blk_cleanup_queue(). There is a race if
requests are dispatched to driver after the abort and before the queue
DEAD mark. To fix this, instead of aborting the requests explicitly, we
can just reset the device after after blk_cleanup_queue so that the
device can complete all the requests before queue DEAD marking in the
drain process.
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: virtualization@lists.linux-foundation.org
Cc: kvm@vger.kernel.org
Cc: stable@kernel.org
Signed-off-by: Asias He <asias@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Asias He [Fri, 25 May 2012 02:34:47 +0000 (02:34 +0000)]
virtio-blk: Call del_gendisk() before disable guest kick
del_gendisk() might not return due to failing to remove the
/sys/block/vda/serial sysfs entry when another thread (udev) is
trying to read it.
virtblk_remove()
vdev->config->reset() : guest will not kick us through interrupt
del_gendisk()
device_del()
kobject_del(): got stuck, sysfs entry ref count non zero
sysfs_open_file(): user space process read /sys/block/vda/serial
sysfs_get_active() : got sysfs entry ref count
dev_attr_show()
virtblk_serial_show()
blk_execute_rq() : got stuck, interrupt is disabled
request cannot be finished
This patch fixes it by calling del_gendisk() before we disable guest's
interrupt so that the request sent in virtblk_serial_show() will be
finished and del_gendisk() will success.
This fixes another race in hot-unplug process.
It is save to call del_gendisk(vblk->disk) before
flush_work(&vblk->config_work) which might access vblk->disk, because
vblk->disk is not freed until put_disk(vblk->disk).
Cc: virtualization@lists.linux-foundation.org
Cc: kvm@vger.kernel.org
Cc: stable@kernel.org
Signed-off-by: Asias He <asias@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Asias He [Fri, 30 Mar 2012 03:24:10 +0000 (03:24 +0000)]
virtio_blk: Drop unused request tracking list
Benchmark shows small performance improvement on fusion io device.
Before:
seq-read : io=1,024MB, bw=19,982KB/s, iops=39,964, runt= 52475msec
seq-write: io=1,024MB, bw=20,321KB/s, iops=40,641, runt= 51601msec
rnd-read : io=1,024MB, bw=15,404KB/s, iops=30,808, runt= 68070msec
rnd-write: io=1,024MB, bw=14,776KB/s, iops=29,552, runt= 70963msec
After:
seq-read : io=1,024MB, bw=20,343KB/s, iops=40,685, runt= 51546msec
seq-write: io=1,024MB, bw=20,803KB/s, iops=41,606, runt= 50404msec
rnd-read : io=1,024MB, bw=16,221KB/s, iops=32,442, runt= 64642msec
rnd-write: io=1,024MB, bw=15,199KB/s, iops=30,397, runt= 68991msec
Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Asias He [Fri, 4 May 2012 12:22:04 +0000 (12:22 +0000)]
virtio-blk: Fix hot-unplug race in remove method
If we reset the virtio-blk device before the requests already dispatched
to the virtio-blk driver from the block layer are finised, we will stuck
in blk_cleanup_queue() and the remove will fail.
blk_cleanup_queue() calls blk_drain_queue() to drain all requests queued
before DEAD marking. However it will never success if the device is
already stopped. We'll have q->in_flight[] > 0, so the drain will not
finish.
How to reproduce the race:
1. hot-plug a virtio-blk device
2. keep reading/writing the device in guest
3. hot-unplug while the device is busy serving I/O
Test:
~1000 rounds of hot-plug/hot-unplug test passed with this patch.
Changes in v3:
- Drop blk_abort_queue and blk_abort_request
- Use __blk_end_request_all to complete request dispatched to driver
Changes in v2:
- Drop req_in_flight
- Use virtqueue_detach_unused_buf to get request dispatched to driver
Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
SeokYeon Hwang [Mon, 15 Apr 2013 13:58:58 +0000 (22:58 +0900)]
sdcard: Prepare virtio sdcard
For higher performance and mount support by Tizen system framework.
Change-Id: I05878ec01983c7dda65975f3135ebcf05442d788
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
Casey Schaufler [Tue, 2 Apr 2013 18:41:18 +0000 (11:41 -0700)]
Smack: include magic.h in smackfs.c
commit
958d2c2f4ad905e3ffa1711d19184d21d9b00cc1 upstream
As reported for linux-next: Tree for Apr 2 (smack)
Add the required include for smackfs.c
Change-Id: I0fcf02693b9f5a0627edb3dfd79eeb671982cc5d
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Reviewed-on: http://165.213.202.130:8080/53907
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Kyungmin Park <kyungmin.park@samsung.com>
Rafal Krypa [Thu, 10 Jan 2013 18:42:00 +0000 (19:42 +0100)]
Smack: add support for modification of existing rules
commit
e05b6f982a049113a88a1750e13fdb15298cbed4 upstream
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
Change-Id: If70a8b8a88ce2abc6b10bdd7bc7791996e70c8cd
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Reviewed-on: http://165.213.202.130:8080/53906
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Kyungmin Park <kyungmin.park@samsung.com>
Rafal Krypa [Thu, 13 Dec 2012 18:02:09 +0000 (19:02 +0100)]
Revert "Smack: add support for modification of existing rules"
This reverts commit
3cf5b164d32a648a627506a21d2fc6a6c24a2808.
Change-Id: Ia099ccd24faf7556771e0fd08184bc6065db92a8
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Reviewed-on: http://165.213.202.130:8080/53905
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Kyungmin Park <kyungmin.park@samsung.com>
Rafal Krypa [Mon, 17 Sep 2012 13:38:30 +0000 (15:38 +0200)]
Smack: prevent revoke-subject from failing when unseen label is written to it
commit
d15d9fad16f6aa459cf4926a1d3aba36b004e9a2 upstream
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.
Change-Id: I326e1fad79a99a48839de8c35abfe709391e0f30
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Reviewed-on: http://165.213.202.130:8080/53903
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Kyungmin Park <kyungmin.park@samsung.com>
Casey Schaufler [Fri, 2 Nov 2012 01:14:32 +0000 (18:14 -0700)]
Smack: create a sysfs mount point for smackfs
commit
e93072374112db9dc86635934ee761249be28370 upstream
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
Change-Id: Ibdb521f61147545376f3e62b80905c8751ea0fc8
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Reviewed-on: http://165.213.202.130:8080/53902
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Kyungmin Park <kyungmin.park@samsung.com>
Casey Schaufler [Fri, 2 Nov 2012 18:28:11 +0000 (11:28 -0700)]
Smack: use select not depends in Kconfig
commit
111fe8bd65e473d5fc6a0478cf1e2c8c6a77489a upstream
The components NETLABEL and SECURITY_NETWORK are required by
Smack. Using "depends" in Kconfig hides the Smack option
if the user hasn't figured out that they need to be enabled
while using make menuconfig. Using select is a better choice.
Because select is not recursive depends on NET and SECURITY
are added. The reflects similar usage in TOMOYO and AppArmor.
Targeted for git://git.gitorious.org/smack-next/kernel.git
Change-Id: I375867a1c1ec6958ae4b579823f651b6431e5cc6
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Reviewed-on: http://165.213.202.130:8080/53901
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Kyungmin Park <kyungmin.park@samsung.com>
Casey Schaufler [Wed, 22 Aug 2012 18:44:03 +0000 (11:44 -0700)]
Smack: setprocattr memory leak fix
commit
46a2f3b9e99353cc63e15563e8abee71162330f7 upstream
The data structure allocations being done in prepare_creds
are duplicated in smack_setprocattr. This results in the
structure allocated in prepare_creds being orphaned and
never freed. The duplicate code is removed from
smack_setprocattr.
Targeted for git://git.gitorious.org/smack-next/kernel.git
Change-Id: I192cdad82cbdb3a57cb8f4df06d5df9a5ac36c82
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Reviewed-on: http://165.213.202.130:8080/53900
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Kyungmin Park <kyungmin.park@samsung.com>
Casey Schaufler [Fri, 10 Aug 2012 00:46:38 +0000 (17:46 -0700)]
Smack: remove task_wait() hook.
commit
c00bedb368ae02a066aed8a888afc286c1df2e60 upstream
On 12/20/2011 11:20 PM, Jarkko Sakkinen wrote:
> Allow SIGCHLD to be passed to child process without
> explicit policy. This will help to keep the access
> control policy simple and easily maintainable with
> complex applications that require use of multiple
> security contexts. It will also help to keep them
> as isolated as possible.
>
> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@intel.com>
I have a slightly different version that applies to the
current smack-next tree.
Allow SIGCHLD to be passed to child process without
explicit policy. This will help to keep the access
control policy simple and easily maintainable with
complex applications that require use of multiple
security contexts. It will also help to keep them
as isolated as possible.
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
security/smack/smack_lsm.c | 37 ++++++++-----------------------------
1 files changed, 8 insertions(+), 29 deletions(-)
Change-Id: If37564a178a336b0097d314f4915c65a19c29c91
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Reviewed-on: http://165.213.202.130:8080/53899
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Kyungmin Park <kyungmin.park@samsung.com>
Alan Cox [Thu, 26 Jul 2012 21:47:11 +0000 (14:47 -0700)]
smack: off by one error
commit
3b9fc37280c521b086943f9aedda767f5bf3b2d3 upstream
Consider the input case of a rule that consists entirely of non space
symbols followed by a \0. Say 64 + \0
In this case strlen(data) = 64
kzalloc of subject and object are 64 byte objects
sscanfdata, "%s %s %s", subject, ...)
will put 65 bytes into subject.
Change-Id: I23f9eddde5747bb1dde6e3fd5a4fbe08fd152ff2
Signed-off-by: Alan Cox <alan@linux.intel.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Cc: stable@vger.kernel.org
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Reviewed-on: http://165.213.202.130:8080/53898
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Kyungmin Park <kyungmin.park@samsung.com>
Dongsu Kim [Fri, 8 Mar 2013 05:20:39 +0000 (14:20 +0900)]
Fix common_audit_data type for smack_inode_unlink() and smack_inode_rmdir()
Change-Id: I39afcae6eeff869733b820f8f654fae5bf47f7e7
Signed-off-by: Dongsu Kim <dongsu17.kim@samsung.com>
Reviewed-on: http://165.213.202.130:8080/52126
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Kyungmin Park <kyungmin.park@samsung.com>
Stanislav Vorobiov [Wed, 15 May 2013 09:02:34 +0000 (13:02 +0400)]
YaGL: Version bump
sungmin ha [Tue, 14 May 2013 07:37:51 +0000 (16:37 +0900)]
virtio-keyboard: modified process of using virtio keyboard queue
Signed-off-by: Sungmin Ha <sungmin82.ha@samsung.com>
sungmin ha [Tue, 14 May 2013 07:37:51 +0000 (16:37 +0900)]
virtio-keyboard: modified process of using virtio keyboard queue
Signed-off-by: Sungmin Ha <sungmin82.ha@samsung.com>
Stanislav Vorobiov [Mon, 6 May 2013 16:39:28 +0000 (20:39 +0400)]
VIGS: Fixed GEM reserve deadlock
Stanislav Vorobiov [Mon, 6 May 2013 14:48:07 +0000 (18:48 +0400)]
VIGS: Dirty flag support in vigs_surface
Dirty flag in vigs_surface is need in order to tell the kernel
that we want contents of VRAM to be uploaded into GPU when the surface
is evicted from VRAM. The flag is automatically cleared whenever
update_gpu command is found in execbuffer
Stanislav Vorobiov [Tue, 30 Apr 2013 13:10:46 +0000 (17:10 +0400)]
VIGS: Potential deadlock fixed
Stanislav Vorobiov [Mon, 29 Apr 2013 14:02:11 +0000 (18:02 +0400)]
VIGS: Command list patching implemented
It's necessary to patch commands such as update_vram and update_gpu
in kernel since only kernel knows about VRAM offset of a surface
Stanislav Vorobiov [Fri, 26 Apr 2013 13:46:03 +0000 (17:46 +0400)]
VIGS: Return some more info for GEMs
Stanislav Vorobiov [Fri, 26 Apr 2013 10:53:59 +0000 (14:53 +0400)]
VIGS: We now send commands to host again
Host side code is fixed to work via new protocol
Stanislav Vorobiov [Fri, 26 Apr 2013 06:08:48 +0000 (10:08 +0400)]
VIGS: Introduce an idr to generate surface ids
Using mmap offsets as surface ids is not good since they're 64-bit
Stanislav Vorobiov [Wed, 24 Apr 2013 06:48:55 +0000 (10:48 +0400)]
VIGS: Refactoring for DRI2
In order to support DRI2 we must move surfaces from X.Org
into kernel. This implies having additional TTM placement - GPU placement.
We must support eviction in vigs_mman in order to be able to create
surfaces that don't occupy VRAM (Now this is done in X.Org).
Also, command execution must be moved from userland to kernel as well
and we also want to add ability to batch several commands in order
to minimize user-kernel transitions and target-host transitions.
DaiYoung Kim [Wed, 24 Apr 2013 12:40:42 +0000 (21:40 +0900)]
evdi : remove unused log
Signed-off-by: DaiYoung, Kim <daiyoung777.kim@samsung.com>
SeokYeon Hwang [Thu, 18 Apr 2013 06:10:02 +0000 (15:10 +0900)]
sdcard: Prepare mmcblk index more than 0
Change-Id: I7907abbe6906f569b4d981d85149e87fd15154e1
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
Alexander Graf [Wed, 2 Jan 2013 05:07:17 +0000 (05:07 +0000)]
virtio-blk: Don't free ida when disk is in use
When a file system is mounted on a virtio-blk disk, we then remove it
and then reattach it, the reattached disk gets the same disk name and
ids as the hot removed one.
This leads to very nasty effects - mostly rendering the newly attached
device completely unusable.
Trying what happens when I do the same thing with a USB device, I saw
that the sd node simply doesn't get free'd when a device gets forcefully
removed.
Imitate the same behavior for vd devices. This way broken vd devices
simply are never free'd and newly attached ones keep working just fine.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: stable@kernel.org
Asias He [Fri, 25 May 2012 02:34:48 +0000 (02:34 +0000)]
virtio-blk: Reset device after blk_cleanup_queue()
blk_cleanup_queue() will call blk_drian_queue() to drain all the
requests before queue DEAD marking. If we reset the device before
blk_cleanup_queue() the drain would fail.
1) if the queue is stopped in do_virtblk_request() because device is
full, the q->request_fn() will not be called.
blk_drain_queue() {
while(true) {
...
if (!list_empty(&q->queue_head))
__blk_run_queue(q) {
if (queue is not stoped)
q->request_fn()
}
...
}
}
Do no reset the device before blk_cleanup_queue() gives the chance to
start the queue in interrupt handler blk_done().
2) In commit
b79d866c8b7014a51f611a64c40546109beaf24a, We abort requests
dispatched to driver before blk_cleanup_queue(). There is a race if
requests are dispatched to driver after the abort and before the queue
DEAD mark. To fix this, instead of aborting the requests explicitly, we
can just reset the device after after blk_cleanup_queue so that the
device can complete all the requests before queue DEAD marking in the
drain process.
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: virtualization@lists.linux-foundation.org
Cc: kvm@vger.kernel.org
Cc: stable@kernel.org
Signed-off-by: Asias He <asias@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Asias He [Fri, 25 May 2012 02:34:47 +0000 (02:34 +0000)]
virtio-blk: Call del_gendisk() before disable guest kick
del_gendisk() might not return due to failing to remove the
/sys/block/vda/serial sysfs entry when another thread (udev) is
trying to read it.
virtblk_remove()
vdev->config->reset() : guest will not kick us through interrupt
del_gendisk()
device_del()
kobject_del(): got stuck, sysfs entry ref count non zero
sysfs_open_file(): user space process read /sys/block/vda/serial
sysfs_get_active() : got sysfs entry ref count
dev_attr_show()
virtblk_serial_show()
blk_execute_rq() : got stuck, interrupt is disabled
request cannot be finished
This patch fixes it by calling del_gendisk() before we disable guest's
interrupt so that the request sent in virtblk_serial_show() will be
finished and del_gendisk() will success.
This fixes another race in hot-unplug process.
It is save to call del_gendisk(vblk->disk) before
flush_work(&vblk->config_work) which might access vblk->disk, because
vblk->disk is not freed until put_disk(vblk->disk).
Cc: virtualization@lists.linux-foundation.org
Cc: kvm@vger.kernel.org
Cc: stable@kernel.org
Signed-off-by: Asias He <asias@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Asias He [Fri, 30 Mar 2012 03:24:10 +0000 (03:24 +0000)]
virtio_blk: Drop unused request tracking list
Benchmark shows small performance improvement on fusion io device.
Before:
seq-read : io=1,024MB, bw=19,982KB/s, iops=39,964, runt= 52475msec
seq-write: io=1,024MB, bw=20,321KB/s, iops=40,641, runt= 51601msec
rnd-read : io=1,024MB, bw=15,404KB/s, iops=30,808, runt= 68070msec
rnd-write: io=1,024MB, bw=14,776KB/s, iops=29,552, runt= 70963msec
After:
seq-read : io=1,024MB, bw=20,343KB/s, iops=40,685, runt= 51546msec
seq-write: io=1,024MB, bw=20,803KB/s, iops=41,606, runt= 50404msec
rnd-read : io=1,024MB, bw=16,221KB/s, iops=32,442, runt= 64642msec
rnd-write: io=1,024MB, bw=15,199KB/s, iops=30,397, runt= 68991msec
Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Asias He [Fri, 4 May 2012 12:22:04 +0000 (12:22 +0000)]
virtio-blk: Fix hot-unplug race in remove method
If we reset the virtio-blk device before the requests already dispatched
to the virtio-blk driver from the block layer are finised, we will stuck
in blk_cleanup_queue() and the remove will fail.
blk_cleanup_queue() calls blk_drain_queue() to drain all requests queued
before DEAD marking. However it will never success if the device is
already stopped. We'll have q->in_flight[] > 0, so the drain will not
finish.
How to reproduce the race:
1. hot-plug a virtio-blk device
2. keep reading/writing the device in guest
3. hot-unplug while the device is busy serving I/O
Test:
~1000 rounds of hot-plug/hot-unplug test passed with this patch.
Changes in v3:
- Drop blk_abort_queue and blk_abort_request
- Use __blk_end_request_all to complete request dispatched to driver
Changes in v2:
- Drop req_in_flight
- Use virtqueue_detach_unused_buf to get request dispatched to driver
Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
SeokYeon Hwang [Wed, 17 Apr 2013 08:38:20 +0000 (17:38 +0900)]
Add *.builtin files to .gitignore for convenience.
Change-Id: I42bd0704b46463e7627d7a6e68cd50b8169e002b
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
Yeongkyoon Lee [Wed, 17 Apr 2013 07:36:01 +0000 (16:36 +0900)]
Merge "evdi : evdi protocol was changed" into develop
DaiYoung Kim [Tue, 16 Apr 2013 09:22:15 +0000 (18:22 +0900)]
evdi : evdi protocol was changed
Signed-off-by: DaiYoung, Kim <daiyoung777.kim@samsung.com>
SeokYeon Hwang [Mon, 15 Apr 2013 13:58:58 +0000 (22:58 +0900)]
sdcard: Prepare virtio sdcard
For higher performance and mount support by Tizen system framework.
Change-Id: I05878ec01983c7dda65975f3135ebcf05442d788
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
Stanislav Vorobiov [Fri, 12 Apr 2013 12:18:37 +0000 (16:18 +0400)]
YaGL: Set MLOCK limit to infinity. We used to do this via ulimit -SHl unlimited, but since nowadays tizen uses systemd it's not possible to set ulimit system wide, so we do it here. This is temporary anyway, YaGL doesn't need to use mlock technically, so this limitation will be removed soon
Igor Mitsyanko [Fri, 18 Jan 2013 17:20:28 +0000 (21:20 +0400)]
YaGL: bump version
Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com>
Stanislav Vorobiov [Fri, 11 Jan 2013 08:20:10 +0000 (12:20 +0400)]
VIGS: Protocol updated
Stanislav Vorobiov [Wed, 9 Jan 2013 17:09:57 +0000 (21:09 +0400)]
VIGS: Replace "Virtual" connector with "LVDS". e17 devicemgr seems to depend on it
Stanislav Vorobiov [Wed, 26 Dec 2012 18:29:25 +0000 (22:29 +0400)]
VIGS: Add by default
Stanislav Vorobiov [Thu, 11 Apr 2013 07:18:23 +0000 (11:18 +0400)]
YaGL/VIGS: Add by default