summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Agnieszka Baumann [Fri, 14 Feb 2020 16:56:33 +0000 (17:56 +0100)]
Fix -Wextra and -pedantic errors
Change-Id: I310c578efcb4dcddd1e3e0ecf6a5c7c81826bcfc
(cherry picked from commit
7bcccb7b32f562f61e08fafe9675804c1811ede4)
Ł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
(cherry picked from commit
846aad4ffee19b2e72a50d90ea9a03a52f2d0072)
Hyotaek Shim [Mon, 17 May 2021 02:30:49 +0000 (02:30 +0000)]
Merge "Fix coverity bugs" into tizen_4.0
Hyotaek Shim [Mon, 17 May 2021 02:30:41 +0000 (02:30 +0000)]
Merge "avoid truncate string warning when copying" into tizen_4.0
Agnieszka Baumann [Thu, 13 Feb 2020 14:55:39 +0000 (15:55 +0100)]
Fix coverity bugs
Change-Id: I0bc275fe4d314eda7cdf88d39559dde56e8cc154
(cherry picked from commit
0b6247def93304a72ffba54efc28883078f7b7b1)
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>
(cherry picked from commit
efc76d963073c094d7f5ab0f6a86f5a40b6a14da)
Łukasz Stelmach [Mon, 7 Jan 2019 13:44:51 +0000 (14:44 +0100)]
watchdog: Adapt watchdog code for resourced-headless
Change-Id: I9ff7ee5428376a4f657b8047c99e1f5d8fd59540
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>
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>
(cherry picked from commit
e36002b66edaf3e100b2cdaa0016218bedac1a5f)
(cherry picked from commit
6b5701f340e4530a20e7f7c825154d5b17276a83)
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>
(cherry picked from commit
05186018152f8d269b9ccec21f9ad90f44894b9d)
(cherry picked from commit
6132dfe4af99742e23a978955852cc16494043fd)
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>
Michal Bloch [Tue, 14 May 2019 14:47:17 +0000 (16:47 +0200)]
Backport (merge) some fixes from 5.x into 4.0
Change-Id: Ib6f78bb62e65eb0ef6345c5c758a13d172bac6fe
Łukasz Stelmach [Wed, 9 Jan 2019 15:06:56 +0000 (16:06 +0100)]
Add terminating null characters after calling strncpy()
Change-Id: Icf736b174615ee2ac1be2338773d2ae168a08e73
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>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Łukasz Stelmach [Tue, 8 Jan 2019 10:35:43 +0000 (11:35 +0100)]
spec: enable incremental builds with gbs(1)
Change-Id: I1c7c70bcc64b1d7f3e8f7830db9364820cb0df48
Łukasz Stelmach [Mon, 17 Dec 2018 11:01:51 +0000 (12:01 +0100)]
Use architecture dependent printf format for gsize type
Change-Id: I3e91b5fedc7c53b40cc110d9b9c7cbf5f7d92f0f
Ł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>
Lukasz Stelmach [Fri, 16 Nov 2018 10:19:24 +0000 (10:19 +0000)]
Merge "policy: Do not deny delivery of signals" into tizen
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>
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>
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>
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>
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>
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
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
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>
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>
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>
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>
Ł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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Tizen Infrastructure [Wed, 14 Jun 2017 03:37:03 +0000 (03:37 +0000)]
Initial empty repository