kernel/swap-modules.git
7 years agoPrintf debug for message from LSan. sandbox/mro/lsan sandbox/mro/lsan-swap
Maxim Ostapenko [Fri, 26 Aug 2016 17:25:32 +0000 (20:25 +0300)]
Printf debug for message from LSan.

7 years ago[FIX] remove vma librares wrong check 44/72844/2 for_tizen_2.4 for_tizen_2.4_arm64
Vitaliy Cherepanov [Thu, 2 Jun 2016 15:34:53 +0000 (18:34 +0300)]
[FIX] remove vma librares wrong check

console appication cannot be preloaded.

Change-Id: I91b0365b26f0ef82c970f232847571c1cc2b05cf
Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
8 years ago[FIX] disbalance get/put pf_group 84/58884/3
Vyacheslav Cherkashin [Thu, 4 Feb 2016 10:19:28 +0000 (13:19 +0300)]
[FIX] disbalance get/put pf_group

Change-Id: Id24c480a5ecd55842f0bac0f21787b4c3396c52c
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] checking emulator screen on/off 28/56028/2
Anatolii Nikulin [Thu, 31 Dec 2015 13:08:41 +0000 (16:08 +0300)]
[FIX] checking emulator screen on/off

Change-Id: I5e8e80024e147d1df615801d7ee88f7164ce359d
Signed-off-by: Anatolii Nikulin <nikulin.a@samsung.com>
8 years ago[IMPROVE] add LCD consumption for FB_SCX30G 72/55972/1
Vyacheslav Cherkashin [Wed, 30 Dec 2015 13:58:13 +0000 (16:58 +0300)]
[IMPROVE] add LCD consumption for FB_SCX30G

Change-Id: I89718b79794b587dfddcde1191007d5f87ba9b37
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] Prevent issue 90/55790/2
Hyeongsik Min [Tue, 29 Dec 2015 09:14:35 +0000 (18:14 +0900)]
[FIX] Prevent issue

489497 - Uninitialized scalar variable

Change-Id: I0e5ae671a4cbbed3138bbe5e4efe8bb66dd01405
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
8 years ago[FIX] application bluetooth consumption estimation 87/55887/1
Anatolii Nikulin [Tue, 29 Dec 2015 15:32:27 +0000 (18:32 +0300)]
[FIX] application bluetooth consumption estimation

Change-Id: I3ed5b6e933a8ea792eb72ea7c82640ff31b6c946
Signed-off-by: Anatolii Nikulin <nikulin.a@samsung.com>
8 years ago[FIX] application wifi consumption estimation 86/55886/1
Vyacheslav Cherkashin [Tue, 29 Dec 2015 07:46:06 +0000 (10:46 +0300)]
[FIX] application wifi consumption estimation

 Obtain socket information within wifi send/recv functions
and search for application which has this socket.

Change-Id: I4a96f9bbe50d2800ac9800c77f266bf1f173dbb9
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] use different coefficients for cpu0 and cpuN 85/55885/1
Vyacheslav Cherkashin [Tue, 24 Nov 2015 15:34:11 +0000 (18:34 +0300)]
[FIX] use different coefficients for cpu0 and cpuN

Change-Id: Ie13d9e1a1890337cdf89c2d30dde35ece7ef2512
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[IMPROVE] added bluetooth consumption 84/55884/1
Yurchenko Darya [Wed, 25 Nov 2015 09:47:34 +0000 (12:47 +0300)]
[IMPROVE] added bluetooth consumption

Change-Id: I759f90891d4635fe366ae68a1fbae1e3c5a622c3
Signed-off-by: Yurchenko Darya <d.urchenko@partner.samsung.com>
8 years ago[IMPROVE] added wifi consumption 83/55883/1
Yurchenko Darya [Mon, 23 Nov 2015 17:10:02 +0000 (20:10 +0300)]
[IMPROVE] added wifi consumption

Change-Id: I8e465c6ca1c5c9743ec71c9e10eb1dca2d6b5ed2
Signed-off-by: Yurchenko Darya <d.urchenko@partner.samsung.com>
8 years ago[FIX] remove mutex and dput() functions from atomic context 81/55681/1
Anatolii Nikulin [Fri, 13 Nov 2015 07:49:54 +0000 (10:49 +0300)]
[FIX] remove mutex and dput() functions from atomic context

Using mutex in __check_if_instrumented() called from probe handler
leads to BUG "sleeping function called from invalid context",
because probe handler calls from atomic context.

Also we cannot use dput() in atomic context.

Change-Id: I69052c0749f3734e7d4eabf07656a40e4a8f963e
Signed-off-by: Anatolii Nikulin <nikulin.a@samsung.com>
8 years agoRevert "[FIX] sending unmap message" 64/55264/1
Alexander Aksenov [Tue, 22 Dec 2015 15:06:39 +0000 (18:06 +0300)]
Revert "[FIX] sending unmap message"

This reverts commit 008d1e6444ca222ea8378640a68010f74730a616.

Change-Id: I879828b4525be9b2e106bb596e01371524baf319
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
8 years ago[FEATURE] start ui viewer implementation 58/55258/1
Anastasia Lyupa [Mon, 27 Jul 2015 12:52:51 +0000 (15:52 +0300)]
[FEATURE] start ui viewer implementation

preload ui viewer lib during main func execution

Change-Id: Icb4d7432c41518a6f3c35d54aa30d9b9d450a44d
Signed-off-by: Anastasia Lyupa <a.lyupa@samsung.com>
8 years ago[FIX] sending unmap message 33/51233/1
Vyacheslav Cherkashin [Thu, 5 Nov 2015 11:46:58 +0000 (14:46 +0300)]
[FIX] sending unmap message

move sending messages from the incorrect condition

Change-Id: If12c5157b3cac4d071d92267688aa4a4ab1d057d
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[IMPROVE] use list for saving target binary 90/50490/5
Anatolii Nikulin [Thu, 29 Oct 2015 08:59:22 +0000 (11:59 +0300)]
[IMPROVE] use list for saving target binary

Dynamically changed array is more difficult to implement
and may cause memory errors.
Using the list instead of an array is preferable.

Change-Id: I20b5ce6be161db9b83a89080ff8dc75e99970651
Signed-off-by: Anatolii Nikulin <nikulin.a@samsung.com>
8 years ago[FIX] Preload: fix slup corruption issue 82/50482/1
Hyeongsik Min [Thu, 29 Oct 2015 04:48:05 +0000 (13:48 +0900)]
[FIX] Preload: fix slup corruption issue

target_binaries_slots is already updated in
__alloc_target_binaries_no_lock()

Change-Id: Icb8cf149359425ee93bd45c525e036d247b2b752
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
8 years ago[FIX] Replace swap-modules.spec 90/50390/1 root_dep_remove
Alexander Aksenov [Wed, 28 Oct 2015 08:56:56 +0000 (11:56 +0300)]
[FIX] Replace swap-modules.spec

Change-Id: I64d4fba864c3c674af7b70618016b4690b58ba5d
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
8 years ago[FIX] Change .spec file 66/50266/1
Alexander Aksenov [Tue, 27 Oct 2015 09:49:14 +0000 (12:49 +0300)]
[FIX] Change .spec file

Change-Id: I220c9385891562161932304c8eec28a2eb3be4aa
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
8 years ago[FIX] probe_info struct size value setting during creation 41/49241/2 accepted/tizen/2.4/mobile/20151029.024950 submit/tizen_2.4/20151028.065647 tizen_2.4_mobile_release
Vyacheslav Cherkashin [Fri, 9 Oct 2015 11:57:46 +0000 (14:57 +0300)]
[FIX] probe_info struct size value setting during creation

Change-Id: If26e8fffa85b0b90386e5a5246b6c3e31a851966
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] Us_manager: memory access on unregister 23/49223/1
Alexander Aksenov [Thu, 8 Oct 2015 19:13:08 +0000 (22:13 +0300)]
[FIX] Us_manager: memory access on unregister

Previously put_user() lead to a deadlock in kernel

Change-Id: I8f1497225ea76e771003f9f16a18a1efa41235e4
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
8 years ago[FIX] disarm uretprobe from child process 19/48919/2
Vyacheslav Cherkashin [Thu, 1 Oct 2015 13:04:12 +0000 (16:04 +0300)]
[FIX] disarm uretprobe from child process

get_user can be used only if task->mm == current->mm
So for other case let call *_proc_vm_atomic()

Change-Id: I227da7e2ccfcb70fb3dd27b54f5ec4ad1056296e
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] remove unnessary spin_lock_irqsave/spin_unlock_irqrestore 22/48822/1
Anatolii Nikulin [Wed, 30 Sep 2015 07:50:42 +0000 (10:50 +0300)]
[FIX] remove unnessary spin_lock_irqsave/spin_unlock_irqrestore

Change-Id: If99a0ee36b5033d1e552441ff731da2870ff1ca8
Signed-off-by: Anatolii Nikulin <nikulin.a@samsung.com>
8 years ago[FIX] fix spin lockup 85/48785/2
Anatolii Nikulin [Tue, 29 Sep 2015 13:31:10 +0000 (16:31 +0300)]
[FIX] fix spin lockup

Do not use lock while disarming current proccess

Change-Id: I7d234c5f0d2f5ea28edf8dd17aba315d3271ed58
Signed-off-by: Anatolii Nikulin <nikulin.a@samsung.com>
8 years ago[FIX] error handling for copy from user 84/48784/2
Anatolii Nikulin [Tue, 29 Sep 2015 13:23:05 +0000 (16:23 +0300)]
[FIX] error handling for copy from user

swap_msg_flush() should not call if strncpy_from_user() return error

Change-Id: I778abaca7078b4594a3bc1364ed3ef181c174648
Signed-off-by: Anatolii Nikulin <nikulin.a@samsung.com>
8 years ago[FIX] WSP: change path of web aux process 52/48752/1
Vyacheslav Cherkashin [Sat, 26 Sep 2015 16:55:32 +0000 (19:55 +0300)]
[FIX] WSP: change path of web aux process

Change-Id: Ief160a9bc4ee5410e29a202e081cc86d24714ca1
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] use d_path between path_get()/path_put() 90/48690/1
Vyacheslav Cherkashin [Thu, 24 Sep 2015 18:47:57 +0000 (21:47 +0300)]
[FIX] use d_path between path_get()/path_put()

Change-Id: I608bca68742aacdba4456f772cb2e006fc65b72c
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] add proc_probes_list usage synchronization 89/48689/1
Vyacheslav Cherkashin [Thu, 24 Sep 2015 18:45:25 +0000 (21:45 +0300)]
[FIX] add proc_probes_list usage synchronization

Change-Id: I0422bbc212db8f63d7ee61ec703b5fc104af0b24
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[IMPROVE] call uprobe handler from specific context (for ARM) 88/48688/1
Vyacheslav Cherkashin [Thu, 24 Sep 2015 18:35:09 +0000 (21:35 +0300)]
[IMPROVE] call uprobe handler from specific context (for ARM)

Uprobe handler will be called from context specified by atomic_ctx.

Change-Id: I325e6f1c96c8e009c39bfe9ba926683db7cb0ffa
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] check return of set_kjump_cb() for error 87/48687/1
Vyacheslav Cherkashin [Thu, 24 Sep 2015 18:17:04 +0000 (21:17 +0300)]
[FIX] check return of set_kjump_cb() for error

Correctly process set_kjump_cb() errors.

Change-Id: I8d486e2e62f61cdd94d4aebe0eadaa9a20eabc78
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[REFACTOR] remove unnecessary warning 86/48686/1
Vyacheslav Cherkashin [Thu, 24 Sep 2015 18:10:47 +0000 (21:10 +0300)]
[REFACTOR] remove unnecessary warning

this waning is redundand

Change-Id: Ia86d62c4ffa9dc7e4e97cc8f8f680fdc28364bf2
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] kprobe and kretprobe disarming synchronization 85/48685/1
Vyacheslav Cherkashin [Thu, 24 Sep 2015 18:01:00 +0000 (21:01 +0300)]
[FIX] kprobe and kretprobe disarming synchronization

Guarantee that other CPUs not handle breakpoints right now.

Change-Id: Ida84022387285ab71938f5f679d47a8a45a62d01
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] uprobe: memory access to US for x86 81/48681/2
Vyacheslav Cherkashin [Thu, 24 Sep 2015 15:33:49 +0000 (18:33 +0300)]
[FIX] uprobe: memory access to US for x86

Change-Id: Ib24db9b392855a82ace15dfe282119c1047e4470
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] task_data: sync register/unregister probes 70/48670/2
Vyacheslav Cherkashin [Thu, 24 Sep 2015 09:59:39 +0000 (12:59 +0300)]
[FIX] task_data: sync register/unregister probes

Change-Id: I2056a4895f21c3a319e6ce3b4710f5ae5bd47845
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] do not call dlopen in libpthread and libsmack 05/48305/3
Anatolii Nikulin [Thu, 17 Sep 2015 20:43:22 +0000 (23:43 +0300)]
[FIX] do not call dlopen in libpthread and libsmack

Change-Id: I4e739c2c9224e7e65dd2d7af4d4429868e941efb
Signed-off-by: Anatolii Nikulin <nikulin.a@samsung.com>
8 years agoRevert "[STYLE] Fix mr_pre_handler" 07/48607/1
Vyacheslav Cherkashin [Wed, 23 Sep 2015 14:09:15 +0000 (17:09 +0300)]
Revert "[STYLE] Fix mr_pre_handler"

This reverts commit f9b31b54d415a5c6eb930fce04695dbdefbfce9b.

Change-Id: I8a4ffeaa7fa0e06cfbaf68b29c3e91d3f880c9b9
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[STYLE] Fix __do_usm_stop 21/48121/2
Dmitry Kovalenko [Mon, 14 Sep 2015 14:27:45 +0000 (17:27 +0300)]
[STYLE] Fix __do_usm_stop

Change-Id: I4f080d3b239b2107dba1cf9bf426cdb1767a808c

8 years ago[STYLE] Fix mr_pre_handler 20/48120/2
Dmitry Kovalenko [Mon, 14 Sep 2015 14:27:09 +0000 (17:27 +0300)]
[STYLE] Fix mr_pre_handler

Change-Id: I13ea53ea42082d1cfc9e4201b6731b6672bb2b32

8 years ago[STYLE] Fix preload_threads_get_drop 14/48114/3
Dmitry Kovalenko [Mon, 14 Sep 2015 12:31:40 +0000 (15:31 +0300)]
[STYLE] Fix preload_threads_get_drop

Change-Id: If63f4874ff48ebe1f57221667a194d70c1a6bf15

8 years ago[FIX] kernel panic on second DA start 66/48466/1
Vitaliy Cherepanov [Mon, 21 Sep 2015 17:59:01 +0000 (20:59 +0300)]
[FIX] kernel panic on second DA start

Change-Id: Iee25a61f60450256c1908446e1a9ca3318639b4e
Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
8 years ago[FIX] Task_data: helper probe reg/unreg 70/48070/1 submit/tizen_2.4/20150912.103527
Alexander Aksenov [Wed, 9 Sep 2015 09:09:21 +0000 (12:09 +0300)]
[FIX] Task_data: helper probe reg/unreg

Remove probe's register/unregister away from stop_machine()

Change-Id: Ieb76276bed0546f9e1bd6067aa5bc3171d7d9241
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
8 years ago[FIX] Preload: sync in atomic 69/48069/1
Alexander Aksenov [Tue, 8 Sep 2015 16:10:02 +0000 (19:10 +0300)]
[FIX] Preload: sync in atomic

Mutex replaced with spinlock, cause they are used in
handlers (executed in atomic context)

Change-Id: I736f0ae284cc75f8197b8dabc2f837313c8b5553
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
8 years ago[FIX] Preload: memory allocation in atomic 68/48068/1
Alexander Aksenov [Tue, 8 Sep 2015 11:29:16 +0000 (14:29 +0300)]
[FIX] Preload: memory allocation in atomic

kmalloc(..., GFP_KERNEL) -> kmalloc(..., GFP_ATOMIC)
cause executed in handlers

Change-Id: If89c5807d96fee9137fb8b0919b7ed4428772ab6
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
8 years ago[FIX] Preload: context fix 67/48067/1
Alexander Aksenov [Tue, 8 Sep 2015 11:28:16 +0000 (14:28 +0300)]
[FIX] Preload: context fix

Removed redundant access_ok(), copy_from_user() replaced
with read_proc_vm_atomic().
It is done to prevent sleeping in atomic context.

Change-Id: Ib260e0f89b5a0a034c8e591361d4ab1d2ffa4b95
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
8 years ago[FIX] US Manager: kmalloc GFP flag 66/48066/1
Alexander Aksenov [Tue, 8 Sep 2015 10:28:58 +0000 (13:28 +0300)]
[FIX] US Manager: kmalloc GFP flag

In pfg_create()
   create_img_proc()
   create_img_file()
   create_img_ip()

kmalloc(..., GFP_KERNEL) -> kmalloc(..., GFP_ATOMIC)

cause called only spinlocks.

Change-Id: I0a8b4a5c132b9c76e54515ec75f80c807b2128ad
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
8 years ago[FIX] Define breakpoint instruction size for ARM/Thumb modes 21/47321/5
Anatolii Nikulin [Wed, 2 Sep 2015 08:48:27 +0000 (11:48 +0300)]
[FIX] Define breakpoint instruction size for ARM/Thumb modes

Change-Id: If3fe4f15c4b6c60efe4dd12767498785c2637cf9
Signed-off-by: Anatolii Nikulin <nikulin.a@samsung.com>
8 years ago[FIX] Acquire/release reference to the task in sspt_proc 12/47312/3
Vyacheslav Cherkashin [Wed, 2 Sep 2015 07:19:14 +0000 (10:19 +0300)]
[FIX] Acquire/release reference to the task in sspt_proc

It prevents invalid pointer dereference if the task has already
been terminated.

Change-Id: I8525d16d81a177d13c5a88f507e070214db81fc7
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] Synchronize completion of US profiling 11/47311/3
Vyacheslav Cherkashin [Wed, 2 Sep 2015 07:01:00 +0000 (10:01 +0300)]
[FIX] Synchronize completion of US profiling

Wait until all the instrumented tasks are cleaned-up

Change-Id: I39a287ab028e6ff99acdb7937d552f69e8e10a88
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] Take mmap_sem on urp disarming in mm_release 10/47310/3
Vyacheslav Cherkashin [Tue, 1 Sep 2015 15:52:45 +0000 (18:52 +0300)]
[FIX] Take mmap_sem on urp disarming in mm_release

Change-Id: I565d7f3d611f4173fd751014bd7519ccf7fc6218
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] Move urp disarming from atomic context on mm_release 09/47309/3
Vyacheslav Cherkashin [Sun, 30 Aug 2015 13:21:52 +0000 (16:21 +0300)]
[FIX] Move urp disarming from atomic context on mm_release

Change-Id: Ia8ff37235b5dfe4d43f8d1578459bb4df444468b
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[IMPROVE] Do not call cb_clean_child on non instrumented process 08/47308/3
Vyacheslav Cherkashin [Sun, 30 Aug 2015 13:14:14 +0000 (16:14 +0300)]
[IMPROVE] Do not call cb_clean_child on non instrumented process

Change-Id: I86767ac7dbb62e537e82ffa0062d1472c792887d
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] Remove masking oops_in_progress 52/47052/2
Vyacheslav Cherkashin [Fri, 28 Aug 2015 13:30:47 +0000 (16:30 +0300)]
[FIX] Remove masking oops_in_progress

Change-Id: Ida57330dde3e3601a7992cff63e7b8cd55735855
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] preload library 46/47046/1
Vyacheslav Cherkashin [Fri, 28 Aug 2015 11:14:15 +0000 (14:14 +0300)]
[FIX] preload library

when libdl will be mapped

Change-Id: I2156e3ba5b64e0ad4761aca95616f093d9815ef2
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] mmap allocation atribute 45/47045/1
Vyacheslav Cherkashin [Fri, 28 Aug 2015 11:10:13 +0000 (14:10 +0300)]
[FIX] mmap allocation atribute

PROT_WRITE atribute is needed for writing into allocated memory

Change-Id: I6beb96bae7c331024b99fb2675bcde4430e1f9f0
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] Preload: dentry balance counter 90/44790/3
Vyacheslav Cherkashin [Mon, 27 Jul 2015 16:26:40 +0000 (19:26 +0300)]
[FIX] Preload: dentry balance counter

Use atomic_t instead of int to avoid race conditions

Change-Id: Ie32d46a8c822ef8ef6110832c0fcc14ea1594e9c
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] Add chunk_init result checking 76/46876/4
Vyacheslav Cherkashin [Wed, 26 Aug 2015 17:36:17 +0000 (20:36 +0300)]
[FIX] Add chunk_init result checking

Change-Id: Id5534256ac7d492151e51c41d623338032d4fbfb
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] Add default case in swap_put_uarg switch(...) {} 75/46875/4
Vyacheslav Cherkashin [Wed, 26 Aug 2015 17:18:25 +0000 (20:18 +0300)]
[FIX] Add default case in swap_put_uarg switch(...) {}

Change-Id: I4f2b1e8467b5681654642fba5bc1b0b89cf1c748
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] Use GFP_ATOMIC flag for pl_struct allocation 61/46861/4
Vyacheslav Cherkashin [Wed, 26 Aug 2015 12:36:01 +0000 (15:36 +0300)]
[FIX] Use GFP_ATOMIC flag for pl_struct allocation

GFP_KERNEL causes problems since the structure is allocated
in atomic context.

Change-Id: Ie98b644587385f7d7898fbf6ae68cdbc2256d2e4
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] sspt_filter handling 60/46860/6
Vyacheslav Cherkashin [Wed, 26 Aug 2015 12:31:38 +0000 (15:31 +0300)]
[FIX] sspt_filter handling

- Add rwlock to avoid race conditions (i.e. img copied to sspt
  multiple times)
- Use GFP_ATOMIC for sspt_filter allocation (done in atomic context)

Change-Id: I0809a8eb16555e2882d900cab8c544a32bdc16b1
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] stop message handling in us_manager 59/46859/5
Vasiliy Ulyanov [Wed, 26 Aug 2015 12:11:50 +0000 (15:11 +0300)]
[FIX] stop message handling in us_manager

stop_machine is now used only to acquire references to all the
instrumented tasks. In such way we assure that they are not going
to be dropped during SWAP cleanup code execution.

Also a special callback STOP_CB_TD was added for task_data since it
may need to cleanup in stop_machine.

Change-Id: I4ea67092e1f0a006c908392e41ae511b9fff5b6d
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] Use stop_machine to disarm kretprobe_instance 58/46858/4
Vasiliy Ulyanov [Wed, 26 Aug 2015 11:32:29 +0000 (14:32 +0300)]
[FIX] Use stop_machine to disarm kretprobe_instance

Change-Id: Id1fb5f1ad1a13dc76b465bb08d42f55a4886b713
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] Move call_mm_release invocation out of atomic context 57/46857/4
Vyacheslav Cherkashin [Wed, 26 Aug 2015 11:19:55 +0000 (14:19 +0300)]
[FIX] Move call_mm_release invocation out of atomic context

Change-Id: I2f3016c08a6e8c027681beb9c629e27b4f688b4f
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] Allocate uretprobe_instance with correct gfp flag 56/46856/4
Vyacheslav Cherkashin [Wed, 26 Aug 2015 10:55:30 +0000 (13:55 +0300)]
[FIX] Allocate uretprobe_instance with correct gfp flag

Need to be GFP_ATOMIC

Change-Id: I0b98334c699ac0e509eea479cab6c8c28c9a1b96
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] Workaround to skip page faults from Preload 55/46855/4
Vasiliy Ulyanov [Wed, 26 Aug 2015 09:15:21 +0000 (12:15 +0300)]
[FIX] Workaround to skip page faults from Preload

Attempts to read userspace stuff from probe handlers (e.g. like we
do in Preload) may lead to crashes.

Change-Id: I00009bb9dc19ba003740d078b9a36dee2f75c3f5
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[IMPROVE] Implement kretprobe skipping 54/46854/4
Vasiliy Ulyanov [Wed, 26 Aug 2015 08:48:46 +0000 (11:48 +0300)]
[IMPROVE] Implement kretprobe skipping

If entry_handler returns a non-zero value we will not install
probe on the return address.

Change-Id: Iee2ef0ffadb85d7661b4d46ae30d88cef2d7bc0f
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] Check for atomic context in swap_handle_mm_fault 53/46853/4
Vyacheslav Cherkashin [Wed, 26 Aug 2015 08:07:44 +0000 (11:07 +0300)]
[FIX] Check for atomic context in swap_handle_mm_fault

Now we return an error instead of generating page fault in
atomic context.

Change-Id: I1d4654142c4f22da500c2d3981509f631cb95fd5
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] Flush kretprobe instances after last put_task 52/46852/4
Vyacheslav Cherkashin [Mon, 24 Aug 2015 16:00:20 +0000 (19:00 +0300)]
[FIX] Flush kretprobe instances after last put_task

Remove rp_inst from kretprobe_inst_table when task has died

Change-Id: I97e8b7209e22f70c5c8ff3afc55704aa3ddfa87e
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] Add reference counting to sspt_proc 51/46851/4
Vyacheslav Cherkashin [Sat, 22 Aug 2015 18:51:10 +0000 (21:51 +0300)]
[FIX] Add reference counting to sspt_proc

To avoid usage after deletion bugs.

Change-Id: Ie2fae9eac15d3d6cd94613c10fa2b5a878045325
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] Skip fixup do_page_fault for ARM 50/46850/4
Vyacheslav Cherkashin [Sat, 22 Aug 2015 16:39:37 +0000 (19:39 +0300)]
[FIX] Skip fixup do_page_fault for ARM

Change-Id: Iaf68e2554881e3cbd952a6267fb4e2f130211d2c
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] Preload: use get_user to obtain current linker state 49/46849/4
Vyacheslav Cherkashin [Sat, 22 Aug 2015 11:44:19 +0000 (14:44 +0300)]
[FIX] Preload: use get_user to obtain current linker state

Change-Id: I90bd7d09c6106a3324fa810d5cdc344a122a49c7
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] Call call_mm_release using kjump 48/46848/4
Vyacheslav Cherkashin [Thu, 20 Aug 2015 21:37:24 +0000 (00:37 +0300)]
[FIX] Call call_mm_release using kjump

Needed to move the call out of atomic context.

Change-Id: I3688814f09fa5be082fc3e5a203241b1c1eb77e0
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] Avoid non-boot CPUs disabling on stop 47/46847/4
Vyacheslav Cherkashin [Thu, 20 Aug 2015 21:29:35 +0000 (00:29 +0300)]
[FIX] Avoid non-boot CPUs disabling on stop

On some targets disabling non-boot CPUs may lead to errors in
kernel (i.e. crashes).

Change-Id: I09de281b9f47e40e136a9e30b77db36d95278d52
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] Add spinlock for proc_list in pf_group 46/46846/4
Vyacheslav Cherkashin [Thu, 20 Aug 2015 16:44:27 +0000 (19:44 +0300)]
[FIX] Add spinlock for proc_list in pf_group

Change-Id: Iaaafc4dd4665dbc1e06c280cdc6e7036122f8678
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] Use GFP_ATOMIC flag in retprobe_copy 45/46845/4
Vyacheslav Cherkashin [Wed, 19 Aug 2015 09:09:34 +0000 (12:09 +0300)]
[FIX] Use GFP_ATOMIC flag in retprobe_copy

Change-Id: I6e728b57b4e185b9312d2833e84a1abe5e86bffc
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] probes disarming in fork'ed process 44/46844/4
Vyacheslav Cherkashin [Tue, 18 Aug 2015 09:32:24 +0000 (12:32 +0300)]
[FIX] probes disarming in fork'ed process

Disarming is now moved out of atomic context.

Change-Id: I723b11e25dc377a7caea5efb54ed42b34db68868
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] uprobe trampoline copying (ARM only) 43/46843/4
Vyacheslav Cherkashin [Mon, 10 Aug 2015 17:10:02 +0000 (20:10 +0300)]
[FIX] uprobe trampoline copying (ARM only)

Copying to userspace needs to be done in non atomic context.

Change-Id: Id2baca9a667bd3c7d53f0b3fb8f391522aca5315
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] preload: move swap_do_mmap out of atomic context 86/44786/5
Vyacheslav Cherkashin [Mon, 27 Jul 2015 14:44:20 +0000 (17:44 +0300)]
[FIX] preload: move swap_do_mmap out of atomic context

For page mapping we should acquire memory lock. It is not possible atomic context.
move swap_do_mmap to safe place when mm->mmap_sem is locked.

Change-Id: I02847628d800a162f3395a6d73c9cd07240344e0
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] prevent issues 08/46908/2
Anatolii Nikulin [Thu, 27 Aug 2015 06:55:50 +0000 (09:55 +0300)]
[FIX] prevent issues

fix 4 issues from prevent:
NULL_RETURNS
CONSTANT_EXPRESSION_RESULT
NO_EFFECT

Change-Id: I1385346d039a354a862e516e3b48c841502bf630
Signed-off-by: Anatolii Nikulin <nikulin.a@samsung.com>
8 years ago[FIX] prevent issues 38/46738/2
Anatolii Nikulin [Tue, 25 Aug 2015 12:52:36 +0000 (15:52 +0300)]
[FIX] prevent issues

fix 42 issues from prevent:
NULL_RETURNS
UNINIT
REVERSE_INULL
RESOURCE_LEAK
MISSING_BREAK
DEADCODE
DC.SECURE_CODING_SPRINTF
FORWARD_NULL
DC.SECURE_CODING_STRCPY
OVERFLOW_BEFORE_WIDEN
BAD_SIZEOF

Change-Id: I1e7bc4b6e73e8262ee6fa23238d86a62510cb4e5
Signed-off-by: Anatolii Nikulin <nikulin.a@samsung.com>
8 years ago[FIX] Preload: probes in newly created threads 87/45487/1
Alexander Aksenov [Thu, 6 Aug 2015 13:31:57 +0000 (16:31 +0300)]
[FIX] Preload: probes in newly created threads

Previously the second exit from pthread_create (exit in new thread)
was not handled correctly and this lead to messages missing.
Fixed "process data not found" case - now it doesn't lead to drop.

Change-Id: I9c6470758b759ae430b23e0aedb93fc525cea395
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
8 years ago[FIX] build for ARM 67/45267/1
Vyacheslav Cherkashin [Tue, 4 Aug 2015 08:21:50 +0000 (11:21 +0300)]
[FIX] build for ARM

Change-Id: I550b3492b4f3ab404a2a64b35bdbb6751bbaaba1
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[LICENSE] change to GPL-2.0+ 86/45086/2
Vitaliy Cherepanov [Fri, 31 Jul 2015 09:22:52 +0000 (12:22 +0300)]
[LICENSE] change to GPL-2.0+

Change-Id: Ie7acc73cb741192e1a5d6decaa2a66f44bd91062
Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
8 years ago[FIX] memory leak in wsp 76/44776/2
Vyacheslav Cherkashin [Fri, 24 Jul 2015 14:03:25 +0000 (17:03 +0300)]
[FIX] memory leak in wsp

Change-Id: Ia5d3a3e4b1831b4aa12d9a665f2adcf70a489d48
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] memory leak in nsp 75/44775/2
Vyacheslav Cherkashin [Mon, 27 Jul 2015 10:46:20 +0000 (13:46 +0300)]
[FIX] memory leak in nsp

Change-Id: I34d5b3f7f92739bb92acd6706991cbe28549d4f7
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] Erroneous files struct put 93/44693/1
Vasiliy Ulyanov [Fri, 24 Jul 2015 17:45:54 +0000 (20:45 +0300)]
[FIX] Erroneous files struct put

There is no need to make a put_files_struct in case when
get_files_struct returns NULL.

Change-Id: Ia87af58150e96f07f3a5f7e2bd2ee3a9a185d210
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
8 years ago[FIX] remove modules striping from build.sh 97/44597/2
Vyacheslav Cherkashin [Thu, 23 Jul 2015 12:17:43 +0000 (15:17 +0300)]
[FIX] remove modules striping from build.sh

Change-Id: I4565984dbc4d3cba11cc312ea32a92a8028f7907
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] wrong unregister 72/44572/2
Vyacheslav Cherkashin [Thu, 23 Jul 2015 10:11:43 +0000 (13:11 +0300)]
[FIX] wrong unregister

pin_register() was used in nsp_data_uninst() for p_do_app.
change it to pin_unregister()

Change-Id: I56cd3819a7388907b2743e51320d8637bcb23f85
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] usage of kfree'd memory 04/44504/3
Vyacheslav Cherkashin [Wed, 22 Jul 2015 15:29:59 +0000 (18:29 +0300)]
[FIX] usage of kfree'd memory

pfg_item_free(item) tries to access item->pfg so
put_pf_group(item->pfg) should be executed after pfg_item_free.

Change-Id: I28c0059a6c99c284a4e6ef6b0f2fc4a76860166a
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] Use proper structure in FILE_PROBE_INITIALIZER 03/44503/4
Vyacheslav Cherkashin [Wed, 22 Jul 2015 15:28:33 +0000 (18:28 +0300)]
[FIX] Use proper structure in FILE_PROBE_INITIALIZER

Wrong structure used during initialization leads to allocation
of less memory than will actually be used.
Change file_private by flock_private.

Change-Id: I2d9951ff11066c13f838c8d7c04b176bbed6d7b5
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] types of wsi function addresses 27/44427/2
Vyacheslav Cherkashin [Tue, 21 Jul 2015 18:31:31 +0000 (21:31 +0300)]
[FIX] types of wsi function addresses

inspserver_addr, willexecute_addr, didexecute_addr should have
u64 type intead of unsigned long

Change-Id: I0e5692056835b41f59650a77e9ab76796f80a2b4
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] Preload: use caller address from userspace 21/44421/5
Vitaliy Cherepanov [Tue, 21 Jul 2015 14:45:09 +0000 (17:45 +0300)]
[FIX] Preload: use caller address from userspace

This is a workaround for Tizen OpenGL probes. We cannot obtain the
expected caller address (i.e. the address in the target binary) from
kernel handlers because GL functions are actually called through
third-party libraries. To handle this situation we now pass the proper
address from userspace handlers.

Change-Id: Ibaa2190aed0c1587fa121feb13536b8ff267e680
Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
8 years ago[FIX] Preload: use task data for storing slots 23/44423/5
Vasiliy Ulyanov [Tue, 21 Jul 2015 11:54:46 +0000 (14:54 +0300)]
[FIX] Preload: use task data for storing slots

Probe slots need to be organized like a per-thread stack in order
to perform function entry/exit checks properly. The former single-list
implementation does not work as expected.

Change-Id: I16152ffb91ab0c5670c750e7cea6b566f59f9724
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
8 years ago[FIX] Init/uninit task_data at start/stop 81/44281/2
Vasiliy Ulyanov [Mon, 20 Jul 2015 10:12:30 +0000 (13:12 +0300)]
[FIX] Init/uninit task_data at start/stop

task_data uses kernel probes to track all tasks, hence
it is not correct to initialize it at module load time.

Change-Id: Ibb23d055cc9d0ae2703db8b09fb4d27e6d91e2c8
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
8 years ago[FIX] call vmalloc with zero argument 78/44278/1
Vyacheslav Cherkashin [Mon, 20 Jul 2015 11:49:43 +0000 (14:49 +0300)]
[FIX] call vmalloc with zero argument

Change-Id: I02e8cbd9b5ccebeced90d8067a1b3f7cd8cd3083
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] slot_table items insertion/deletion 04/44204/2
Vyacheslav Cherkashin [Sat, 18 Jul 2015 21:07:20 +0000 (00:07 +0300)]
[FIX] slot_table items insertion/deletion

- Probe instances are added to the table only once (x86).
- Fixed an issue when a freed probe instance was not removed
  from the table.
- Added rw locking to avoid possible race conditions.

Change-Id: I72eae168b991e041a6a2f751dd7e45c379690052
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
8 years ago[FIX] replace kmalloc/kfree with vmalloc/vfree 03/44203/2
Vyacheslav Cherkashin [Sat, 18 Jul 2015 20:42:41 +0000 (23:42 +0300)]
[FIX] replace kmalloc/kfree with vmalloc/vfree

Large memory chunks are better alloccated with vmalloc.

Change-Id: I51828e04269012f06c4198612a8299093af655bd
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
8 years ago[FIX] Save current uprobe state in stack (x86) 02/44202/1
Vyacheslav Cherkashin [Sun, 12 Jul 2015 13:54:24 +0000 (16:54 +0300)]
[FIX] Save current uprobe state in stack (x86)

We cannot use per cpu vars here because when we make a singlestep
in userspace there is a chance our task is preempted and resumed
on another cpu. In that case we will not be able to restore its
normal execution.

Change-Id: I591ef52b52db8db0e741d81461903806ed00ef8e
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
8 years ago[FIX] simultaneously work nsp and function profiling 46/44146/1
Vyacheslav Cherkashin [Thu, 16 Jul 2015 16:43:19 +0000 (19:43 +0300)]
[FIX] simultaneously work nsp and function profiling

Currently it is impossible to probe one function more then once.
Because of it we cann't use nsp and main() function profiling
simultaneously.

Add main() function profiling message in nsp handler.

Change-Id: Ibb9708c511f4f8497a4eac04b417dd4abd207559
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[FIX] uprobe build for x86 92/44092/1
Vyacheslav Cherkashin [Thu, 16 Jul 2015 15:48:29 +0000 (18:48 +0300)]
[FIX] uprobe build for x86

Change-Id: I9f2da3ebc36849135c8af003261e89515a8fe1e4
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
8 years ago[REFACTOR] Fixed printk messages 46/44046/1
Dmitry Kovalenko [Thu, 16 Jul 2015 10:16:47 +0000 (13:16 +0300)]
[REFACTOR] Fixed printk messages

Change-Id: I42652f739f16de717d5805d17d78812c009aa764
Signed-off-by: Dmitry Kovalenko <d.kovalenko@samsung.com>