Naveen N. Rao
9c58e6d866
powerpc: Enable execve syscall exit tracepoint
...
commit ec6d0dde71d760aa60316f8d1c9a1b0d99213529 upstream.
On execve[at], we are zero'ing out most of the thread register state
including gpr[0], which contains the syscall number. Due to this, we
fail to trigger the syscall exit tracepoint properly. Fix this by
retaining gpr[0] in the thread register state.
Before this patch:
# tail /sys/kernel/debug/tracing/trace
cat-123 [000] ..... 61.449351: sys_execve(filename:
7fffa6b23448, argv: 7fffa6b233e0, envp: 7fffa6b233f8)
cat-124 [000] ..... 62.428481: sys_execve(filename:
7fffa6b23448, argv: 7fffa6b233e0, envp: 7fffa6b233f8)
echo-125 [000] ..... 65.813702: sys_execve(filename:
7fffa6b23378, argv: 7fffa6b233a0, envp: 7fffa6b233b0)
echo-125 [000] ..... 65.822214: sys_execveat(fd: 0,
filename: 1009ac48, argv: 7ffff65d0c98, envp: 7ffff65d0ca8, flags: 0)
After this patch:
# tail /sys/kernel/debug/tracing/trace
cat-127 [000] ..... 100.416262: sys_execve(filename:
7fffa41b3448, argv: 7fffa41b33e0, envp: 7fffa41b33f8)
cat-127 [000] ..... 100.418203: sys_execve -> 0x0
echo-128 [000] ..... 103.873968: sys_execve(filename:
7fffa41b3378, argv: 7fffa41b33a0, envp: 7fffa41b33b0)
echo-128 [000] ..... 103.875102: sys_execve -> 0x0
echo-128 [000] ..... 103.882097: sys_execveat(fd: 0,
filename: 1009ac48, argv: 7fffd10d2148, envp: 7fffd10d2158, flags: 0)
echo-128 [000] ..... 103.883225: sys_execveat -> 0x0
Cc: stable@vger.kernel.org
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Tested-by: Sumit Dubey2 <Sumit.Dubey2@ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220609103328.41306-1-naveen.n.rao@linux.vnet.ibm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-02 16:17:15 +02:00
..
2019-12-21 10:42:17 +01:00
2019-12-21 10:42:17 +01:00
2017-09-27 14:39:21 +02:00
2019-12-21 10:42:17 +01:00
2022-01-27 08:47:39 +01:00
2020-01-29 10:24:26 +01:00
2020-01-29 10:24:26 +01:00
2016-06-14 13:58:26 +10:00
2016-03-04 23:44:51 -06:00
2018-06-06 16:44:32 +02:00
2020-03-11 07:53:14 +01:00
2014-11-10 09:59:26 +11:00
2016-07-14 20:26:22 +10:00
2015-03-20 14:51:53 +11:00
2020-09-23 08:46:16 +02:00
2015-07-13 10:10:55 +10:00
2016-08-04 08:50:07 -04:00
2016-07-08 22:09:50 +10:00
2016-06-21 15:30:56 +10:00
2020-02-28 15:42:18 +01:00
2016-04-12 21:05:18 +10:00
2019-11-28 18:28:18 +01:00
2014-11-27 09:32:58 +11:00
2021-05-22 10:40:19 +02:00
2019-04-17 08:36:41 +02:00
2019-11-28 18:29:06 +01:00
2016-08-07 23:50:09 -04:00
2019-04-17 08:36:43 +02:00
2020-11-22 09:58:14 +01:00
2018-10-13 09:18:57 +02:00
2016-10-14 14:26:58 -07:00
2015-08-07 23:00:01 -05:00
2016-08-24 12:15:14 +02:00
2020-11-22 09:58:14 +01:00
2016-10-14 14:26:58 -07:00
2016-08-07 23:50:09 -04:00
2016-08-07 23:50:09 -04:00
2017-01-09 08:32:25 +01:00
2019-04-17 08:36:43 +02:00
2019-04-17 08:36:43 +02:00
2018-07-03 11:23:08 +02:00
2017-01-19 20:18:08 +01:00
2018-02-25 11:05:50 +01:00
2015-06-02 21:37:19 -05:00
2022-06-14 16:52:33 +02:00
2015-10-12 15:30:09 +11:00
2016-05-31 16:41:52 +08:00
2021-05-22 10:40:30 +02:00
2020-01-04 13:40:24 +01:00
2016-05-01 18:32:32 +10:00
2015-08-03 11:34:12 +02:00
2016-02-18 00:03:26 +11:00
2017-06-29 13:00:29 +02:00
2015-08-06 15:10:20 +10:00
2016-09-20 20:57:12 +10:00
2016-09-23 07:54:18 +10:00
2020-06-30 15:38:22 -04:00
2022-02-08 18:15:27 +01:00
2016-05-11 21:53:59 +10:00
2017-05-25 15:44:43 +02:00
2017-01-15 13:42:56 +01:00
2017-04-12 12:41:13 +02:00
2016-08-07 23:50:09 -04:00
2016-03-07 14:53:53 +11:00
2021-09-22 11:42:57 +02:00
2019-04-17 08:36:41 +02:00
2018-12-21 14:11:32 +01:00
2017-05-20 14:28:42 +02:00
2015-03-24 13:15:52 +11:00
2016-08-01 11:15:01 +10:00
2018-08-03 07:55:18 +02:00
2016-07-15 14:57:47 +10:00
2020-02-28 15:42:37 +01:00
2020-05-10 10:28:00 +02:00
2016-10-14 14:26:58 -07:00
2016-05-11 21:54:26 +10:00
2022-07-02 16:17:15 +02:00
2014-09-25 23:14:46 +10:00
2022-01-27 08:47:35 +01:00
2021-05-22 10:40:26 +02:00
2017-01-06 10:40:13 +01:00
2022-06-14 16:52:41 +02:00
2015-04-11 20:49:09 +10:00
2016-06-14 13:58:26 +10:00
2019-11-25 09:52:30 +01:00
2016-07-08 19:22:15 +10:00
2020-01-04 13:40:53 +01:00
2016-10-14 14:26:58 -07:00
2020-11-22 09:58:14 +01:00
2019-04-17 08:36:43 +02:00
2016-07-21 19:17:46 +10:00
2019-08-04 09:33:43 +02:00
2020-04-24 07:59:00 +02:00
2017-11-30 08:39:08 +00:00
2016-10-04 20:33:16 +11:00
2022-01-27 08:47:39 +01:00
2016-01-11 14:27:28 +11:00
2014-10-09 22:26:04 -04:00
2019-08-04 09:33:31 +02:00
2019-04-17 08:36:39 +02:00
2016-05-01 18:33:04 +10:00
2016-09-13 17:36:58 +10:00
2020-11-10 10:23:58 +01:00
2015-11-26 22:11:17 +11:00
2015-11-26 22:11:17 +11:00
2015-03-28 22:03:40 +11:00
2020-10-29 09:05:38 +01:00
2020-01-04 13:40:42 +01:00
2018-10-20 09:51:31 +02:00
2015-08-06 16:36:23 +10:00
2017-05-25 15:44:43 +02:00
2014-11-12 13:47:20 +11:00
2015-04-07 17:15:13 +10:00
2020-08-21 11:02:02 +02:00
2016-10-14 14:26:58 -07:00
2016-08-04 08:50:07 -04:00
2020-11-22 09:58:14 +01:00