platform/core/system/resourced-headless.git
4 years agoavoid truncate string warning when copying 19/234619/2 accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix accepted/tizen_6.5_unified accepted/tizen_unified tizen tizen_6.0 tizen_6.0_hotfix tizen_6.5 accepted/tizen/6.0/unified/20201030.113614 accepted/tizen/6.0/unified/hotfix/20201103.001611 accepted/tizen/6.5/unified/20211028.115523 accepted/tizen/unified/20200603.150029 submit/tizen/20200602.140231 submit/tizen_6.0/20201029.205105 submit/tizen_6.0_hotfix/20201102.192505 submit/tizen_6.0_hotfix/20201103.114805 submit/tizen_6.5/20211028.162501 tizen_6.0.m2_release tizen_6.5.m2_release
Maciej Słodczyk [Wed, 27 May 2020 11:00:25 +0000 (13:00 +0200)]
avoid truncate string warning when copying

Deliberately copying substring with strncpy() resulted
in 'output may be truncated' warning. Use memcpy()
to achieve the same without the warning.

Change-Id: I8759159e9dd823e78001d4812c52cf2e8588c4e0
Signed-off-by: Maciej Słodczyk <m.slodczyk2@partner.samsung.com>
4 years agoFix -Wextra and -pedantic errors 30/225130/1
Agnieszka Baumann [Fri, 14 Feb 2020 16:56:33 +0000 (17:56 +0100)]
Fix -Wextra and -pedantic errors

Change-Id: I310c578efcb4dcddd1e3e0ecf6a5c7c81826bcfc

4 years agoFix coverity bugs 74/224874/1 accepted/tizen/unified/20200214.120101 submit/tizen/20200213.180742
Agnieszka Baumann [Thu, 13 Feb 2020 14:55:39 +0000 (15:55 +0100)]
Fix coverity bugs

Change-Id: I0bc275fe4d314eda7cdf88d39559dde56e8cc154

4 years agoInclude 'stdlib.h' for malloc function 47/221247/1 accepted/tizen/unified/20200106.141611 submit/tizen/20200103.083647
Yunmi Ha [Mon, 30 Dec 2019 09:00:09 +0000 (18:00 +0900)]
Include 'stdlib.h' for malloc function

- Remove 'implicit-function-declaration' waring for GCC-9

Change-Id: Ifc4d9aa9b5dcd4107046c8d0b963eecd1f896fce
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
5 years agoFix memory leak 56/214556/2 accepted/tizen/unified/20191112.125208 submit/tizen/20191111.234019
INSUN PYO [Tue, 24 Sep 2019 04:35:59 +0000 (13:35 +0900)]
Fix memory leak

Change-Id: Ifbe1055fd4e606ead7df3a4d4d54fba8fcdf8e6f
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
5 years agoAttempt to fix OOM crashes. 09/214509/1 accepted/tizen_5.5_unified_mobile_hotfix tizen_5.5_mobile_hotfix accepted/tizen/5.5/unified/20191031.022257 accepted/tizen/5.5/unified/mobile/hotfix/20201027.090135 accepted/tizen/unified/20190923.225259 submit/tizen/20190923.122035 submit/tizen_5.5/20191031.000004 submit/tizen_5.5_mobile_hotfix/20201026.185104 tizen_5.5.m2_release
Michal Bloch [Mon, 23 Sep 2019 12:04:45 +0000 (14:04 +0200)]
Attempt to fix OOM crashes.

Change-Id: I8ffb1fc2b4d7bc5a95065e7cd0124516fe2a1797
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
5 years agoFix concurrency issues in the module handler 46/206046/2
Michal Bloch [Mon, 13 May 2019 10:58:20 +0000 (12:58 +0200)]
Fix concurrency issues in the module handler

Event handling is done in parallel threads so a bit of locking is
needed for safety. The major concurrency danger is the removal of
modules from the list at the end of a program's lifetime, this
isn't fully doable with simple locking (because the event handlers
make assumptions regarding what they receive from `module_find` etc.)
so there is also a bit of an ugly hax for that case where the lock
is not released at the end (look for the big comment for a longer
explanation).

Change-Id: Ie1a596289062d29dee1eb12ae2793e34045fdb8e
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
5 years agowatchdog: Adapt watchdog code for resourced-headless 08/197508/7
Łukasz Stelmach [Mon, 7 Jan 2019 13:44:51 +0000 (14:44 +0100)]
watchdog: Adapt watchdog code for resourced-headless

Change-Id: I9ff7ee5428376a4f657b8047c99e1f5d8fd59540

5 years agowatchdog: Import watchdog code from resourced project 79/200379/3
ByungSoo Kim [Fri, 22 Feb 2019 12:18:18 +0000 (13:18 +0100)]
watchdog: Import watchdog code from resourced project

Change-Id: Idc66e19d7236d1cd1d1bebceea91028ca4ec3769
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
5 years agoAllow registering callbacks for DBus signals from different modules 07/197507/4
Łukasz Stelmach [Thu, 10 Jan 2019 14:23:32 +0000 (15:23 +0100)]
Allow registering callbacks for DBus signals from different modules

Change-Id: I242c6bf246446c4f7c1b0266dfad144f055c31d3

5 years agoAdd terminating null characters after calling strncpy() 06/197506/3
Łukasz Stelmach [Wed, 9 Jan 2019 15:06:56 +0000 (16:06 +0100)]
Add terminating null characters after calling strncpy()

Change-Id: Icf736b174615ee2ac1be2338773d2ae168a08e73

5 years agospec: enable incremental builds with gbs(1) 87/196987/1
Łukasz Stelmach [Tue, 8 Jan 2019 10:35:43 +0000 (11:35 +0100)]
spec: enable incremental builds with gbs(1)

Change-Id: I1c7c70bcc64b1d7f3e8f7830db9364820cb0df48

5 years agoUse architecture dependent printf format for gsize type 20/195720/1 accepted/tizen/unified/20181218.152357 submit/tizen/20181217.135620
Łukasz Stelmach [Mon, 17 Dec 2018 11:01:51 +0000 (12:01 +0100)]
Use architecture dependent printf format for gsize type

Change-Id: I3e91b5fedc7c53b40cc110d9b9c7cbf5f7d92f0f

5 years agoFix log message formatting strings to strictly format printf(3) requirements 61/195061/1 accepted/tizen/unified/20181211.141129 submit/tizen/20181210.110314
Łukasz Stelmach [Mon, 10 Dec 2018 09:20:05 +0000 (10:20 +0100)]
Fix log message formatting strings to strictly format printf(3) requirements

Change-Id: I861c7cd57fda5c9c6aeb8e38718b4345d8c77de2
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
5 years agoMerge "policy: Do not deny delivery of signals" into tizen
Lukasz Stelmach [Fri, 16 Nov 2018 10:19:24 +0000 (10:19 +0000)]
Merge "policy: Do not deny delivery of signals" into tizen

6 years agorelease : 0.2.4 25/190425/1 accepted/tizen_5.0_unified accepted/tizen/5.0/unified/20181102.021118 accepted/tizen/unified/20181002.093358 submit/tizen/20181002.005204 submit/tizen_5.0/20181101.000004
Kichan Kwon [Tue, 2 Oct 2018 00:20:43 +0000 (09:20 +0900)]
release : 0.2.4

Change-Id: I218ae22ceea5565727a2ecd97d4d4186bb64424c
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoMerge branch 'tizen_4.0' into tizen 24/190424/1
Kichan Kwon [Tue, 2 Oct 2018 00:19:29 +0000 (09:19 +0900)]
Merge branch 'tizen_4.0' into tizen

Change-Id: I074f9fb8ee5e335f23ce146008aaa639a3df86d0
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoFix memory issues 70/190370/3
Kichan Kwon [Mon, 1 Oct 2018 08:38:41 +0000 (17:38 +0900)]
Fix memory issues

Change-Id: I49df0b310f6f1261fcf09cf85846cabfa2a12503
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agorelease : 0.1.4 16/190216/1 accepted/tizen/4.0/unified/20181001.035839 accepted/tizen/4.0/unified/20190114.234238 submit/tizen_4.0/20180928.080833 submit/tizen_4.0/20190114.150508
Kichan Kwon [Fri, 28 Sep 2018 07:55:36 +0000 (16:55 +0900)]
release : 0.1.4

Change-Id: I6c1d35bba646e08636432780f499c177a91e6df6
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agomemory : read memory cgroup event fd after event is notified 73/189873/4
Kichan Kwon [Fri, 21 Sep 2018 09:05:18 +0000 (18:05 +0900)]
memory : read memory cgroup event fd after event is notified

- Reading cgroup.event_control blocks until the memory controller is out of memory
- Disable GIO buffering to prevent reading not fd but buffer

Change-Id: I7fbabca341131875081f1003716b11f85dd31c86
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agopolicy: Do not deny delivery of signals 72/190072/1
Karol Lewandowski [Mon, 24 Sep 2018 11:53:16 +0000 (13:53 +0200)]
policy: Do not deny delivery of signals

Deny only D-Bus method calls as resourced need to receive various
system signals (eg. aul's AppStatusChange) and act on them.

Change-Id: Ic4bb7c0d38608c7e21ed7a3b4e2cf9d3262e171e

6 years agopolicy: Do not deny delivery of signals 44/189944/1
Karol Lewandowski [Mon, 24 Sep 2018 11:53:16 +0000 (13:53 +0200)]
policy: Do not deny delivery of signals

Deny only D-Bus method calls as resourced need to receive various
system signals (eg. aul's AppStatusChange) and act on them.

Change-Id: Ic4bb7c0d38608c7e21ed7a3b4e2cf9d3262e171e

6 years agoMerge branch 'tizen' into tizen_4.0 35/188235/1 accepted/tizen/4.0/unified/20180911.125403 submit/tizen_4.0/20180903.091017
Kichan Kwon [Mon, 3 Sep 2018 08:18:19 +0000 (17:18 +0900)]
Merge branch 'tizen' into tizen_4.0

Change-Id: I3ce5ccfcb0ba1863abe44062d660e30be83a3175
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agorelease : 0.2.3 21/188221/2 accepted/tizen/unified/20180903.151045 submit/tizen/20180903.080404
Kichan Kwon [Mon, 3 Sep 2018 06:32:51 +0000 (15:32 +0900)]
release : 0.2.3

Change-Id: Iee12c2cf9942187b253828262439844c067c4164
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoMake a D-Bus rule consistency 20/188220/3
Kichan Kwon [Mon, 3 Sep 2018 05:21:03 +0000 (14:21 +0900)]
Make a D-Bus rule consistency

- All policies have rules both own and send_destination

Change-Id: Ie251685bc55ed6527e3b383b2a0a71311ad4215b
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoproc-usage : return empty list if there is no launched app 10/188210/4
Kichan Kwon [Mon, 3 Sep 2018 04:47:12 +0000 (13:47 +0900)]
proc-usage : return empty list if there is no launched app

- Empty list is different with NULL
- Return NULL if error occurs

Change-Id: I5369187c68f46d1a02f3460fec7fe4514817561a
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoMerge remote-tracking branch 'tizen.org/tizen_4.0' into tizen 50/188050/1 accepted/tizen/unified/20180831.165146 submit/tizen/20180830.155552 submit/tizen/20180830.162301
Łukasz Stelmach [Thu, 30 Aug 2018 15:03:51 +0000 (17:03 +0200)]
Merge remote-tracking branch 'tizen.org/tizen_4.0' into tizen

Conflicts:
packaging/resourced-headless.spec

Change-Id: I69ba982062858a4a7c5ba83f0cb9114b0179c103

6 years agoRemove recursive definition 82/186882/1 accepted/tizen/4.0/unified/20180821.020822 submit/tizen_4.0/20180820.050147
Kichan Kwon [Thu, 16 Aug 2018 07:53:21 +0000 (16:53 +0900)]
Remove recursive definition

Change-Id: I4dbeb4cf0d2ba302b163d41ed7ed5f52d0336c9b
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agorelease : 0.1.2 72/186372/2 submit/tizen_4.0/20180809.083619
Kichan Kwon [Thu, 9 Aug 2018 07:34:30 +0000 (16:34 +0900)]
release : 0.1.2

Change-Id: I2bb1aa312a38b9d8946cf38642d4f3f86954f8d2
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoFix minor issues 71/186371/2
Kichan Kwon [Thu, 9 Aug 2018 07:32:19 +0000 (16:32 +0900)]
Fix minor issues

Change-Id: Ib188bb5fc761f3b7575572b9ed4b60a5ff0db3be
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoDeny an access to memory D-Bus interface without privilege 53/186253/2
Kichan Kwon [Wed, 8 Aug 2018 09:35:42 +0000 (18:35 +0900)]
Deny an access to memory D-Bus interface without privilege

Change-Id: I774d27179a68042a0de9f59420fab6bc55287e83
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agomemory : notify memory level via vconf and eventsystem 52/186252/2
Kichan Kwon [Wed, 8 Aug 2018 09:21:49 +0000 (18:21 +0900)]
memory : notify memory level via vconf and eventsystem

Change-Id: I465df7cd32b29f92139fa96072f6afd4a2054b7e
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agomemory : introduce low level memory pressure. 73/186173/2
Kichan Kwon [Wed, 8 Aug 2018 02:10:42 +0000 (11:10 +0900)]
memory : introduce low level memory pressure.

Change-Id: If4b19e5a2814355e1f8add470788441ce3667e4b
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoproc-manager : set the default oom_score_adj for launched app 71/186071/2
Kichan Kwon [Tue, 7 Aug 2018 05:24:54 +0000 (14:24 +0900)]
proc-manager : set the default oom_score_adj for launched app

- Having VIP attribute : OOM_SCORE_ADJ_VIP
- Default : OOM_SCORE_ADJ_DEFAULT

Change-Id: Ic7b55531c02a6c92646a09f79f1cb18d8a9e881a
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoproc-manager : add ProcPrelaunch signal handler 65/185965/4
Kichan Kwon [Mon, 6 Aug 2018 02:16:41 +0000 (11:16 +0900)]
proc-manager : add ProcPrelaunch signal handler

Change-Id: I0bb721f65d4f27f9acddf53dd4cdba6e5f35c77c
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agomemory : add D-Bus signal setting process' oom_score_adj 23/180623/5
Kichan Kwon [Thu, 31 May 2018 08:34:32 +0000 (17:34 +0900)]
memory : add D-Bus signal setting process' oom_score_adj

- Same path with resourced : for compatibility

Change-Id: Ib87b05b091481ff6057990f41783083348409de5
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoproc-manager : add proc-manager module 44/180344/10
Kichan Kwon [Mon, 28 May 2018 06:37:46 +0000 (15:37 +0900)]
proc-manager : add proc-manager module

- Detect changes in app's life cycle and take appropriate action
- In current,
  - Detect app launching
  - Set oom_score_adj if osa_predefined app(defined in config file)

Change-Id: I340764c4d94e82b98c1ffeb6c051be610b14ffb6
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agocommon : procfs : add a function setting oom_score_adj 40/180340/4
Kichan Kwon [Mon, 28 May 2018 11:47:20 +0000 (20:47 +0900)]
common : procfs : add a function setting oom_score_adj

Change-Id: If3299fa884680b96def112f6af5f1bf476c51f86
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agomemory : make a config file to configure memory-killer module 63/179663/14
Kichan Kwon [Mon, 21 May 2018 04:48:41 +0000 (13:48 +0900)]
memory : make a config file to configure memory-killer module

- The maximum number of victims
- Threshold : medium and leave
- Whitelist : exclude from being victim

Change-Id: Iafa92a31fd0fe43b269fd66ea383d01417c8ac26
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agocommon : config-parser : add functions reading config file 33/180333/3
Kichan Kwon [Mon, 28 May 2018 10:55:38 +0000 (19:55 +0900)]
common : config-parser : add functions reading config file

- Open/Close config file
- Read integer value(s)
- Foreach-key function in a group

Change-Id: I8f84af0d48ca2e3e1a4fcea0425ced418356cd4f
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agomemory : manage thresholds with structure. 45/179645/5
Kichan Kwon [Mon, 21 May 2018 01:32:47 +0000 (10:32 +0900)]
memory : manage thresholds with structure.

- It is pre-work for configurable threshold

Change-Id: I8f0d217d9129c4133610451a620e041e96e5f934
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoproc-usage : make runtime resourced directory after initialized 72/179872/1 accepted/tizen/unified/20180523.144430 submit/tizen/20180523.070310
Kichan Kwon [Thu, 14 Dec 2017 10:47:12 +0000 (19:47 +0900)]
proc-usage : make runtime resourced directory after initialized

- Refer the comment about RUNTIME_RESOURCED_DIR for details

Change-Id: I553dffac98579147feb3d885b2344fdef3a80294
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agorelease : 0.1.1 32/179832/1 accepted/tizen/4.0/unified/20180528.002826 submit/tizen_4.0/20180523.004934
Kichan Kwon [Wed, 23 May 2018 00:29:46 +0000 (09:29 +0900)]
release : 0.1.1

Change-Id: I9486671b16de1561ab8f8bdf5aecb0ed2eb636ca
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoNo more build a module if disabled 70/179470/1
Kichan Kwon [Fri, 18 May 2018 05:34:17 +0000 (14:34 +0900)]
No more build a module if disabled

Change-Id: I63ea2a295b3b0a683d4cee315d33ac4412e1fb8b
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoValidate values of parameter, check if not NULL 78/178678/3
Kichan Kwon [Fri, 11 May 2018 07:33:53 +0000 (16:33 +0900)]
Validate values of parameter, check if not NULL

Change-Id: If57c4125ac7d401731631a4d2fceadcd46446d5e
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoCheck the boundaries of PID before getting PGID 77/178677/3
Kichan Kwon [Fri, 11 May 2018 07:29:15 +0000 (16:29 +0900)]
Check the boundaries of PID before getting PGID

Change-Id: I6793ad4cc04c09e98d98287a9357d21738d50b4c
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agocommon : procfs : add a function reading the maximum value of PID. 73/178673/2
Kichan Kwon [Fri, 11 May 2018 07:22:50 +0000 (16:22 +0900)]
common : procfs : add a function reading the maximum value of PID.

Change-Id: Ifbb03ec9955ac32c8922af78beb9654d115eef02
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoproc-usage : make runtime resourced directory after initialized 80/163980/1 accepted/tizen/4.0/unified/20180112.071758 submit/tizen_4.0/20180111.111014 tizen_4.0.IoT.p2_release
Kichan Kwon [Thu, 14 Dec 2017 10:47:12 +0000 (19:47 +0900)]
proc-usage : make runtime resourced directory after initialized

- Refer the comment about RUNTIME_RESOURCED_DIR for details

Change-Id: I553dffac98579147feb3d885b2344fdef3a80294
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agorelease : 0.2 63/159863/1
Kichan Kwon [Mon, 13 Nov 2017 09:10:53 +0000 (18:10 +0900)]
release : 0.2

Change-Id: I990156a557feb9ef0a86eb8d0f323419c1bce92c
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoClose after using 71/156871/3 accepted/tizen/4.0/unified/20171021.045113 submit/tizen_4.0/20171020.094204 tizen_4.0.m2_release
Kichan Kwon [Fri, 20 Oct 2017 09:09:33 +0000 (18:09 +0900)]
Close after using

Change-Id: Ifa2e054cc8f2c69f0822d2320cfec0f42bb5152e
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoproc-usage : support all apps' resource usage 68/156868/4
Kichan Kwon [Fri, 20 Oct 2017 08:21:40 +0000 (17:21 +0900)]
proc-usage : support all apps' resource usage

- Memory(KB), CPU(%)
- For Runtime-info

Change-Id: I82d32eaa85c2cd5f7b5efbb256efdd323eb04e78
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agocommon : procfs : add functions reading uptime and PID/statm 67/156867/1
Kichan Kwon [Fri, 20 Oct 2017 08:18:57 +0000 (17:18 +0900)]
common : procfs : add functions reading uptime and PID/statm

Change-Id: I60f0cca9dfcdd9914866753c8bc45feab1b56cd5
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoModify SMACK label 02/156802/1 submit/tizen_4.0/20171020.051032
Kichan Kwon [Fri, 20 Oct 2017 05:01:03 +0000 (14:01 +0900)]
Modify SMACK label

- System::Privileged is used for changing other's SMACK label

Change-Id: Ic0c9952382c942fe56a3642b08fba269c95a20f4
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agomemory : add memory-killer 84/150584/9
Kichan Kwon [Mon, 18 Sep 2017 04:38:58 +0000 (13:38 +0900)]
memory : add memory-killer

- Low memory handler
- Register event handler with memory cgroup
- When the memory status is changed, check current memory level
  and kill victim if available memory is not enough

Change-Id: Ibea0854df11a80d424bcad02975b63311e228388
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agocommon : cgroup : add function opening eventfd 76/150576/6
Kichan Kwon [Mon, 18 Sep 2017 04:23:52 +0000 (13:23 +0900)]
common : cgroup : add function opening eventfd

Change-Id: I82cfb656ba482f5a3a74a36422cb336008b680a9
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agocommon : procfs : add functions reading /proc 93/149093/7
Kichan Kwon [Mon, 11 Sep 2017 11:12:09 +0000 (20:12 +0900)]
common : procfs : add functions reading /proc

- System-wide
  - meminfo
- Process-wide
  - basename (from cmdline)
  - SMACK label (from attr/current)
  - oom_score_adj
  - stat

Change-Id: I01d4928246da712b36237976db855edea0b01b54
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agodaemon : no more explicit main context 56/150856/2
Kichan Kwon [Tue, 19 Sep 2017 02:41:25 +0000 (11:41 +0900)]
daemon : no more explicit main context

- To attach g_source with daemon, we need the main context of daemon
- However, making daemon's header and refering it is not good
- If daemon doesn't set main context, other module can access
  by setting argument with NULL

Change-Id: Ia39d3496819aa502868ed2d52d9c9fadeb0a6e37
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agodaemon : print correct error message 50/150750/1
Kichan Kwon [Mon, 18 Sep 2017 11:08:57 +0000 (20:08 +0900)]
daemon : print correct error message

Change-Id: Ieecfb4a22032d38b68372250c8f5d42163500203
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoApply ASLR with binary 70/148070/2
Kichan Kwon [Wed, 6 Sep 2017 11:42:28 +0000 (20:42 +0900)]
Apply ASLR with binary

- Address Space Layout Randomization
- To remove the vulnerability from fixed address

Change-Id: I474db5e0fc2f22461cea4d57d72001bc4b0e0ed7
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agocommon : event : separate event to global and local 34/141934/2 accepted/tizen/4.0/unified/20170816.013428 accepted/tizen/4.0/unified/20170829.020114 accepted/tizen/unified/20170803.155436 submit/tizen/20170803.023017 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170828.100004 submit/tizen_4.0/20170828.110004 tizen_4.0.IoT.p1_release
Kichan Kwon [Wed, 2 Aug 2017 04:53:58 +0000 (13:53 +0900)]
common : event : separate event to global and local

- Global event is for all modules
  - Define at the common module
  - Have unique value
  - Can be broadcasted or sent

- Local event is for specific module
  - Define at the target module
  - Can have overlapped value between modules
  - Only can be sent

Change-Id: I54c6424ecaad7a3306ed2705e015b8e982da1281
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agotest : bring event tester from daemon 30/141630/3
Kichan Kwon [Tue, 1 Aug 2017 07:15:33 +0000 (16:15 +0900)]
test : bring event tester from daemon

- Test code is located in the daemon is not good
- To run event test, you can send D-Bus to the test module

Change-Id: I21ea44c924f187283935a2a7831bdcecd8fa049f
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agocommon : module : define module_foreach_func 95/141495/4
Kichan Kwon [Tue, 1 Aug 2017 01:10:07 +0000 (10:10 +0900)]
common : module : define module_foreach_func

- To use module_foreach, we had to convert gpointer to struct module
- It is because of using g_slist_foreach which needs GFunc
- For convenience, call func directly with using struct module

Change-Id: I9efced0e82860d6c7de068c1853d8dc3ae058b90
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoproc-usage : add proc-usage module 08/137208/11
Kichan Kwon [Wed, 5 Jul 2017 02:00:39 +0000 (11:00 +0900)]
proc-usage : add proc-usage module

- In current, it just supports process resource usage
  - Memory, CPU
  - For Runtime-info

Change-Id: If13498b3d09cbdf9b2bfbc23afa304a0b2b678ed
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agocommon : dbus : add D-Bus interface 32/136432/9
Kichan Kwon [Thu, 29 Jun 2017 11:03:13 +0000 (20:03 +0900)]
common : dbus : add D-Bus interface

- To receive D-Bus message
- Add functions for registering D-Bus signal and method
- In case of D-Bus method, generate introspection xml based on argument

Change-Id: Iadcc804f3213ec6dce27641e89f0c6b0bc9ac3c5
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agocommon : event : add event interface 97/135597/8
Kichan Kwon [Fri, 23 Jun 2017 08:34:32 +0000 (17:34 +0900)]
common : event : add event interface

- To pass information inter-module
- Add functions for send or broadcast event
- Add functions for (un)register event handler
- Event consists of (dest), type and data

Change-Id: I101790d1b47127c00709381757cab0a027e96bda
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agocommon : module : make a thread for each module to handle event 91/135191/12
Kichan Kwon [Wed, 21 Jun 2017 06:44:17 +0000 (15:44 +0900)]
common : module : make a thread for each module to handle event

- If a module has event handler, its thread will be created
- Each thread will have their own mainloop
- When an event is enqueued, event handler will be called

Change-Id: Iaa485a5a7c048cd372650b3d6920ed00e097e823
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agotest : add test module 68/135368/5
Kichan Kwon [Thu, 22 Jun 2017 05:41:36 +0000 (14:41 +0900)]
test : add test module

- In current, it just writes a log

Change-Id: I33d856af450fb87517dd610d5f8dda89dd79ec69
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoMinimal module structure 84/135184/10
Kichan Kwon [Fri, 16 Jun 2017 09:38:25 +0000 (18:38 +0900)]
Minimal module structure

- Load libresourced-*.so
  - If any library is existed, terminate daemon
- Call each module's init and exit functions

Change-Id: Idb057f074c17baa3863629cd3ea5ab7b308fd56e
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoInitial empty repository master
Tizen Infrastructure [Wed, 14 Jun 2017 03:37:03 +0000 (03:37 +0000)]
Initial empty repository