A few updates and fixes:
. Move the suppressing of the __builtin_return_address >0 warning to the tracing directory only. . metag recordmcount fix for newer glibc's . Two tracing histogram fixes that were reported by KASAN -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJXofc2AAoJEKKk/i67LK/8f7YIAI7YkUnzA7VZ/FmbgD+fu3MI XmLLb98dzEOEHKEUrmv/9TSj/W6cTVfgVH2z/U89J6nbPj56GgMf03qL1wn9l/6s kwxEt5GopmKwCdtnjGkLYZcg13OWottzmFoyn/koKCXFq7PwfGQdLzhwIQUpsXgG MxOk1Iv9TbACzz4k5aG866yhJu6cWDRSdC3cfv7F4xn+Z3GWggzCpW7fknXy66cJ iVsdUGZVz5O5jVJAFqzERZHBJQpraozjkKr3lprCdHuXa/EEAYQuuYG5WBxggYaQ eJ1my2p5MKkxORz1Nk9cGuFa6DW35spn9+iOOyTt6sRU/8tijGxTPLNWtKfJcVQ= =fbRU -----END PGP SIGNATURE----- Merge tag 'trace-v4.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "A few updates and fixes: - move the suppressing of the __builtin_return_address >0 warning to the tracing directory only. - metag recordmcount fix for newer glibc's - two tracing histogram fixes that were reported by KASAN" * tag 'trace-v4.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Fix use-after-free in hist_register_trigger() tracing: Fix use-after-free in hist_unreg_all/hist_enable_unreg_all Makefile: Mute warning for __builtin_return_address(>0) for tracing only ftrace/recordmcount: Work around for addition of metag magic but not relocations
This commit is contained in:
Коммит
bf0f500bd0
1
Makefile
1
Makefile
|
@ -621,7 +621,6 @@ include arch/$(SRCARCH)/Makefile
|
|||
|
||||
KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning,maybe-uninitialized,)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,)
|
||||
|
||||
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
|
||||
KBUILD_CFLAGS += -Os
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
|
||||
# We are fully aware of the dangers of __builtin_return_address()
|
||||
FRAME_CFLAGS := $(call cc-disable-warning,frame-address)
|
||||
KBUILD_CFLAGS += $(FRAME_CFLAGS)
|
||||
|
||||
# Do not instrument the tracer itself:
|
||||
|
||||
ifdef CONFIG_FUNCTION_TRACER
|
||||
|
|
|
@ -1441,6 +1441,9 @@ static int hist_register_trigger(char *glob, struct event_trigger_ops *ops,
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (hist_data->attrs->pause)
|
||||
data->paused = true;
|
||||
|
||||
if (named_data) {
|
||||
destroy_hist_data(data->private_data);
|
||||
data->private_data = named_data->private_data;
|
||||
|
@ -1448,9 +1451,6 @@ static int hist_register_trigger(char *glob, struct event_trigger_ops *ops,
|
|||
data->ops = &event_hist_trigger_named_ops;
|
||||
}
|
||||
|
||||
if (hist_data->attrs->pause)
|
||||
data->paused = true;
|
||||
|
||||
if (data->ops->init) {
|
||||
ret = data->ops->init(data->ops, data);
|
||||
if (ret < 0)
|
||||
|
@ -1500,9 +1500,9 @@ static void hist_unregister_trigger(char *glob, struct event_trigger_ops *ops,
|
|||
|
||||
static void hist_unreg_all(struct trace_event_file *file)
|
||||
{
|
||||
struct event_trigger_data *test;
|
||||
struct event_trigger_data *test, *n;
|
||||
|
||||
list_for_each_entry_rcu(test, &file->triggers, list) {
|
||||
list_for_each_entry_safe(test, n, &file->triggers, list) {
|
||||
if (test->cmd_ops->trigger_type == ETT_EVENT_HIST) {
|
||||
list_del_rcu(&test->list);
|
||||
trace_event_trigger_enable_disable(file, 0);
|
||||
|
@ -1699,9 +1699,9 @@ hist_enable_get_trigger_ops(char *cmd, char *param)
|
|||
|
||||
static void hist_enable_unreg_all(struct trace_event_file *file)
|
||||
{
|
||||
struct event_trigger_data *test;
|
||||
struct event_trigger_data *test, *n;
|
||||
|
||||
list_for_each_entry_rcu(test, &file->triggers, list) {
|
||||
list_for_each_entry_safe(test, n, &file->triggers, list) {
|
||||
if (test->cmd_ops->trigger_type == ETT_HIST_ENABLE) {
|
||||
list_del_rcu(&test->list);
|
||||
update_cond_flag(file);
|
||||
|
|
|
@ -33,10 +33,17 @@
|
|||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/*
|
||||
* glibc synced up and added the metag number but didn't add the relocations.
|
||||
* Work around this in a crude manner for now.
|
||||
*/
|
||||
#ifndef EM_METAG
|
||||
/* Remove this when these make it to the standard system elf.h. */
|
||||
#define EM_METAG 174
|
||||
#endif
|
||||
#ifndef R_METAG_ADDR32
|
||||
#define R_METAG_ADDR32 2
|
||||
#endif
|
||||
#ifndef R_METAG_NONE
|
||||
#define R_METAG_NONE 3
|
||||
#endif
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче