summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-07-28Merge changes I9d94aed9,Ia1b3e5de,Ic5af3e23 into tizen_4.0submit/tizen_4.0/20200728.132733submit/tizen_4.0/20200728.125504accepted/tizen/4.0/unified/20200730.072834tizen_4.0accepted/tizen_4.0_unifiedKarol Lewandowski6-33/+505
* changes: Release 4.0.5 Change the way ELF file are parsed Add an ELF file parser
2020-07-28Release 4.0.5Mateusz Moscicki1-1/+1
Change-Id: I9d94aed9070d00ebdb17948baa2fa03b8d985f15
2020-07-28Change the way ELF file are parsedMateusz Moscicki4-33/+42
Change-Id: Ia1b3e5dec48c1afb7ee0a8d05c2f99bc507d6798
2020-07-27Add an ELF file parserMateusz Moscicki2-0/+463
Change-Id: Ic5af3e23ddc20721eb8a7f184b0ff07e3de79b95
2019-02-21Release 4.0.5submit/tizen_4.0/20200728.003640submit/tizen_4.0/20190325.122227submit/tizen_4.0/20190225.110150accepted/tizen/4.0/unified/20190325.230456Karol Lewandowski1-1/+1
Change-Id: I034ae69be4126da6069faa2c72140cdad7e4eea9
2019-02-21crash-manager: Fix error checking for pkgmgrinfo*() invocationKarol Lewandowski1-5/+3
This commit fixes 'unchecked return value' as reported by coverity. Change-Id: I8c31504fd03826862f85df5ff24d7752a12262e9
2018-08-29Release 4.0.4submit/tizen_4.0/20180830.152847accepted/tizen/4.0/unified/20180904.002726Mateusz Moscicki1-1/+1
Changes from last version: - crash-stack use the same function to read /proc/<pid>/exe symlink as the crash-manager Change-Id: Ibfee81b222aa83400fcd3c169b9d7609da7dfc31
2018-08-29Move the function to read /proc/<pid>/exe symlink to util.cMateusz Moscicki5-58/+68
Change-Id: Ieb533fb66dd3d06eb5bbc827aa016a308cf892a3
2018-08-29Release 4.0.3Mateusz Moscicki1-1/+1
Changes from last version: - Fixed SVACE warnings Change-Id: Ia122899b6c83adc167ab1cbbb2cd26b587b4d87c
2018-08-28Fix SVACE warningsMateusz Moscicki1-7/+10
Warnings: 352484, 352485, 352486, 352488, 352489, 352490, 352491, 352492, 352493, 352494, 352495, 352496, 352497, 352498, 352501, 352502, 352487, 358117, 358162 Change-Id: I205ddaee97836c3146b25bbb380e11464713cb25
2018-08-23Release 4.0.2submit/tizen_4.0/20180823.142313accepted/tizen/4.0/unified/20180829.004737Mateusz Moscicki1-1/+1
Changes from last version: - For INFO report type D-Bus signal has a proper report path Change-Id: I896eaa75057d9685f730ab44f4e4b867f39eefe1
2018-08-23Fix report path for INFO report typeMateusz Moscicki1-4/+3
Change-Id: I973c452cd08a4ac18d4ad7460b21ceb28d9d6364
2018-08-22Release 4.0.1submit/tizen_4.0/20180822.122154Karol Lewandowski1-2/+2
Major version bump due to versioning scheme change. Major versions now follow major Tizen releases - this is crash worker 4 for Tizen 4.0. Changes from last version: - New-style D-Bus signal ProcessCrashed is now emitted to notify about the crash - .info-only report type now can be selected via configuration option ReportType - Crash dump location can be changed by CrashReportPath config option Change-Id: I33e2dc6e405e4f12ae0e4d267fbdb35210d3b74b
2018-08-20Move finding TID to crash-managerMateusz Moscicki4-79/+105
Additionally find_crash_tid() returns PID for single-threaded applications, instead of -1. Change-Id: Id6fcc652b95bddda954f25cd448f1e090918c231
2018-08-20Add report typesMateusz Moscicki2-11/+96
Depending on report type we save all zip archive with coredump, logs, and info file, or just only *.info file. Report type can be set in crash-manager.conf: [CrashManager] ... ReportType=INFO ... Available report types: * INFO - Save *.info file * FULL - Save coredump, *.log and *info file as ZIP archive (default) Change-Id: I486049ac8eb928ebdc6ac513bdeac3c98aa4adcc
2018-08-20Split execute_crash_modulesMateusz Moscicki1-9/+25
Change-Id: Iae6af748786c68dcb45a50dc37275fe12e40d85d
2018-08-20Add ability to set report path in crash-manager.confMateusz Moscicki4-29/+96
To change default report path (/opt/usr/crash/dump/) modify the value in crash-manager.conf: [CrashManager] ... CrashRootPath=/var/crash ... Change-Id: I39b9bc178e989a1aad5727f5becdee74b1e1b13b
2018-08-20Add DBus signal emitting after report saveMateusz Moscicki5-0/+373
Interface: "org.tizen.system.crash.Crash" Path: "/org/Tizen/System/Crash/Crash" Signal: "ProcessCrashed" Message (signature "sssssiia{sv}"), contains: * process name * exe path * appid * pkgid * report path * PID * TID * dictionary a{sv} contains registers values depends on the architecture: * for x86: * x86.eip * for x86_64: * x86_64.rip * for armv7l: * arm.pc * arm.lr * for aarch64: * aarch64.pc * aarch64.lr Change-Id: I081a3f4982e2f0d4b01fd665b4dffcd3bab847f4
2018-08-20Save full cmd_lineMateusz Moscicki1-14/+25
Change-Id: I98ac10c8931a0e1c0b586c6e116279faa6ef9d44
2018-08-20Provide PRSTATUS to crash-managerMateusz Moscicki3-4/+99
crash-stack saves registers for use in commit: "ADD DBus signal emitting after report save" Change-Id: I85e6519008f8c8a42087e8b46868c1d1cddccd0e
2018-06-29Fix reading /proc/<pid>/maps filesubmit/tizen_4.0/20180629.144756accepted/tizen/4.0/unified/20180702.105550Mateusz Moscicki1-13/+14
Macro is expanded by preprocessor, but sizeof() is evaluated at compile time. Change-Id: I4ca20ff703cf89fba2137ec3eb24550d1013fdff
2018-06-14Fix stack-buffer-overflow errorsubmit/tizen_4.0/20180614.141622accepted/tizen/4.0/unified/20180614.230614Mateusz Moscicki1-1/+6
Lenghts in sscanf format string refer to actually read bytes, without including space for null byte, E.g.: ... char buff[5+1]; sscanf(other_buff, "%5s", buff); ... Change-Id: I203e1bc04ba1e352029849e5bd29a7a6ca8a5763
2018-05-30crash-pipe: Fix write the coredump to the filesubmit/tizen_4.0/20180613.110444accepted/tizen/4.0/unified/20180613.235028Mateusz Moscicki1-1/+5
splice returns EINVAL if (loff_t)(len + out.pos) is negative number. This was the case on aarch64 and x86_64. Change-Id: I025cf3e18a60015c5ad8a7641a4cd28638109741
2017-10-17Update RW script for 4.0tizen_4.0.m2_releasetizen_4.0.IoT.p2_releasesubmit/tizen_4.0/20171017.111332accepted/tizen/4.0/unified/20171018.061103Sunmin Lee4-24/+14
Now RW update script works for 3.0 -> 4.0 upgrade. Change-Id: I3ae30511cc28204db2012857c58e3663983ae725 Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
2017-09-29Revert "log_dump: assign CAP_SYS_PTRACE capability"tizen_4.0.IoT.p1_releasesubmit/tizen_4.0/20170929.073008accepted/tizen/4.0/unified/20171010.064017Sunmin Lee1-3/+0
Capability for log_dump (especially for memps) will be not supported in Tizen 4.0. This reverts commit 51591b503f720083f89b4c529c263e02eac7a11d. Change-Id: If60f375ec59463a932e7da216a26b3082265e6af
2017-09-28Fix vulnerabilitiessubmit/tizen_4.0/20170928.103022accepted/tizen/4.0/unified/20170929.080312Sunmin Lee2-3/+4
Change-Id: I9c5c08eb424f5e9bdab248682b00e9cb895c7afa Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
2017-09-18Fix vulnerabilitiessubmit/tizen_4.0/20170918.052155accepted/tizen/4.0/unified/20170920.081345Sunmin Lee1-3/+3
Change-Id: Ia7d8565ef86cfef9d8b61e2e11020b6f1b49ed1d Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
2017-09-13Merge branch 'tizen' into tizen_4.0submit/tizen_4.0/20170913.061112accepted/tizen/4.0/unified/20170914.175723Sunmin Lee3-4/+2
- Fix bugs Change-Id: I7e9f0c628952973f1bba68acb0cd28d303760f8c
2017-09-13Fix bugsSunmin Lee3-4/+2
- Fix misspelling for m4 condition - Do not install unused services: tizen-debug-on/off Change-Id: I09296e1365407c93ebb6dd9897ccc5b9e346bddd Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
2017-09-12Merge branch 'tizen' into tizen_4.0submit/tizen_4.0/20170912.081006Sunmin Lee6-20/+41
- crash-worker: change permission to none root process - crash-worker: add supplementarygroups log systemd-journal - crash-worker: add dump_systemstate memps - log_dump: assign CAP_SYS_PTRACE capability Change-Id: I671a7076dbfbc948a1d406d2e0cdd3f8fa33a0a0
2017-09-12Remove unused fileSunmin Lee1-9/+0
Remove unused file Change-Id: Iabe9ee9e49cf9f4272c3a3691f48f3c75ff0a281 Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
2017-08-31log_dump: assign CAP_SYS_PTRACE capabilityByungSoo Kim1-0/+3
When log_dump has system_fw permission, memps which is forked from /usr/bin/dump_systemstate can't read /proc/self/maps and /proc/self/smaps. It requires CAP_SYS_PTRACE capability. So, it should have CAP_SYS_PTRACE capability and inheritance attribute. Change-Id: If2bd16964dba8e616e4a4fcc5cd489feb4c40b21 Signed-off-by: ByungSoo Kim <bs1770.kim@samsung.com>
2017-08-31crash-worker: add dump_systemstate mempsminsoo kim1-5/+5
Change-Id: I50fbdc296a0ab8dfab96cfde29b0c3afa94eb1e7 Signed-off-by: minsoo kim <ms203.kim@samsung.com>
2017-08-29crash-worker: add supplementarygroups log systemd-journalminsoo kim4-2/+29
To gather dlog, journal log, add supplementarygroups to service But dbus activation not applied suppplementarygroup, So rearrange service role org.tizen.system.crash.service : dbus activation log_dump.service : log_dump daemon Change-Id: I93e2bb5142a83f6dfa9ad56197916855988501ee Signed-off-by: minsoo kim <ms203.kim@samsung.com>
2017-08-28crash-worker: change permission to none root processminsoo kim1-4/+4
for reduce root permission, change to system_fw Change-Id: I04fafa89d2a4e0a1e3bc5a6e0019b2aebb428235 Signed-off-by: minsoo kim <ms203.kim@samsung.com>
2017-08-11Apply ASLR to executables: crash-pipe, crash-stacksubmit/tizen_4.0/20170828.110004submit/tizen_4.0/20170828.100004submit/tizen/20170815.230002accepted/tizen/unified/20170818.083111accepted/tizen/4.0/unified/20170829.020423Sunmin Lee2-0/+5
Change-Id: Ia4a0452832a705f6fbac8034d7da93297883e4bc Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
2017-07-24packaging: Disable sys-assertsubmit/tizen_4.0/20170811.094300submit/tizen/20170727.104559accepted/tizen/unified/20170728.195604accepted/tizen/4.0/unified/20170816.011029Karol Lewandowski1-1/+0
Ptrace-based mechanism (crash-stack) should be used as default and only mechanism for crash-report generation. Change-Id: I102fc02e5538dcf9f21d7b72ff8892e1b3500265
2017-06-27Preparation of debug & release packagesubmit/tizen/20170629.013438accepted/tizen/unified/20170629.090140Kunhoon Baik9-23/+43
Some vendor would like to have different crash management policy for debug and release image. Thus, Tizen will provide crash-manager debug and release package. This patch is the preparation for the package separation. In case of crash-manager debug, following CFLAGS will be enabled. export CFLAGS+=" -DTIZEN_ENGINEER_MODE" export CFLAGS+=" -DTIZEN_ENABLE_COREDUMP" In the future, export CFLAGS+=" -DTIZEN_DEBUG_ENABLE" may be added. Basically, default Tizen image will include crash management policy for debug mode. cf) .debugmode file will be used for just crash-popup control for 3.0 compatibility. Change-Id: I892d1f0d5de65da0abb3e002fa235989f43def56
2017-06-19log_dump: selective mode for dbus activationminsoo kim4-3/+29
log_dump running root in debug mode, and none_root with normal mode. Simplify org.tizen.system.crash.service conditional compile by using m4 Change-Id: I04b734f722266264434b27e9fe7b17cdc73263f1 Signed-off-by: minsoo kim <ms203.kim@samsung.com> Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
2017-06-14Adjust buffer size for addresssubmit/tizen/20170616.010939Sunmin Lee1-6/+6
The addr gets string of address consisting of begin/end address and '-', null character. So the length of addrees buffer should be set to: ADDR_LEN * 2 + 2 (at least) Change-Id: I6cdb8530be50c4c29fbb51a5dcb5fa8e094e5352 Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
2017-06-09Fix sscanf vulnerabilitySunmin Lee1-6/+23
Specify a limit on the input string length and keep the last byte for null character. Change-Id: I717ac2ae565f2627e5de26426ec24c6ccf772c5e Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
2017-05-16crash-stack: Fix Tizen Coding Style violationstizen_4.0.m1_releasesubmit/tizen/20170517.000458accepted/tizen/unified/20170517.014336Karol Lewandowski1-136/+146
Rules at: https://wiki.tizen.org/wiki/Native_Platform_Coding_Idiom_and_Style_Guide This commit brings no functional changes. Change-Id: Ic95fd2d1e5508d602fa24ea33933448c52ce625d
2017-05-11crash-stack: Change "ThreadID" heuristic to work on aarch64Karol Lewandowski1-1/+1
Commit 82e3caa86 ("crash-stack: Find crashed tid by wchan") introduced heuristic method of finding correct thread id, if it was not passed by the kernel as parameter to crash-manager. This commit modifies this heuristic to also consider "pipe_wait" function in kernel to signify crashed thread. This is what was observed to be true on aarch64. Change-Id: Iefa6d028f459ff9491f8e184433f913f39a096eb
2017-05-05crash-worker: Generate core only if /opt/etc/.debugmode file is presentKarol Lewandowski6-13/+14
Additionally, this patch moves actual path definition to one place. Change-Id: I984ac2c67d8a22ed749f2b1945a1cef237b88ace
2017-04-25Merge "Removing dependency of tizen-debug-on/off service from sys-assert" ↵Karol Lewandowski5-8/+8
into tizen
2017-04-24Removing dependency of tizen-debug-on/off service from sys-assertsubmit/tizen/20170425.080615accepted/tizen/unified/20170426.061702Karol Lewandowski5-8/+8
Tizen-debug-on/off service should control enabling/disabling coredump generation. When Tizen-debug-off service is executed, only callstack should be generated. Thus, although disabling sys-assert, the services should be remained. TODO : For disabling sys-assert, the services should be changed properly. Change-Id: I617356cd31b51dbe4f103cb3118fefe454e717db
2017-04-22Merge "spec: change group(system -> root) on ↵Karol Lewandowski1-2/+2
tizen-debug-off.[service|socket]" into tizen
2017-04-20spec: change group(system -> root) on tizen-debug-off.[service|socket]INSUN PYO1-2/+2
Signed-off-by: INSUN PYO <insun.pyo@samsung.com> Change-Id: I32605d431b3ff16cce61ae2dde7be262a1eac56f
2017-04-18crash-pipe: Drop all reporting functionalityKarol Lewandowski1-383/+1
Reporting is handled by crash-stack. Change-Id: I6066c5a414fd2e98efbcc0ddc57f2f967cbfb859
2017-04-18crash-pipe: Introduce option to copy core using splice(2)Karol Lewandowski1-18/+50
Linux splice(2) avoids user-space copy and is effectively faster than regular read(2) + write(2). According to (ftrace) test below splice is about 20% faster. sysctl -w kernel.core_pattern='|/usr/libexec/core-pipe --save-core /opt/usr/share/temp/core.%p' cd /sys/fs/kernel/tracing/ echo do_coredump > set_ftrace_filter echo function_graph > current_tracer cat trace_pipe /* splice */ 2) $ 2183078 us | } /* do_coredump */ 4) $ 2127946 us | } /* do_coredump */ 1) $ 2377004 us | } /* do_coredump */ 1) $ 2088114 us | } /* do_coredump */ /* read/write */ 1) $ 3088297 us | } /* do_coredump */ 1) $ 2953330 us | } /* do_coredump */ 1) $ 2647784 us | } /* do_coredump */ 3) $ 2271315 us | } Change-Id: Id2c681a364ce96d98c70329abdf4a64f6d0b405d