Skip to contentSkip to conversation

irq/urgent for v5.6

GIT PULL Merged Thomas Gleixner 3 participants 9 messages Mar 29, 2020

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

Linus,

please pull the latest irq/urgent branch from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq-urgent-2020-03-29

up to: df81dfcfd699: genirq: Fix reference leaks on irq affinity notifiers

A single bugfix to prevent reference leaks in irq affinity notifiers.

Thanks,

tglx

------------------>
Edward Cree (1):
genirq: Fix reference leaks on irq affinity notifiers

 kernel/irq/manage.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
kernel/irq/manage.c +9 -2
index 7eee98c38f25..fe40c658f86f 100644
@@ -323,7 +323,11 @@ int irq_set_affinity_locked(struct irq_data *data, const struct cpumask *mask,
 
 	if (desc->affinity_notify) {
 		kref_get(&desc->affinity_notify->kref);
-		schedule_work(&desc->affinity_notify->work);
+		if (!schedule_work(&desc->affinity_notify->work)) {
+			/* Work was already scheduled, drop our extra ref */
+			kref_put(&desc->affinity_notify->kref,
+				 desc->affinity_notify->release);
+		}
 	}
 	irqd_set(data, IRQD_AFFINITY_SET);
 
@@ -423,7 +427,10 @@ irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify)
 	raw_spin_unlock_irqrestore(&desc->lock, flags);
 
 	if (old_notify) {
-		cancel_work_sync(&old_notify->work);
+		if (cancel_work_sync(&old_notify->work)) {
+			/* Pending work had a ref, put that one too */
+			kref_put(&old_notify->kref, old_notify->release);
+		}
 		kref_put(&old_notify->kref, old_notify->release);
 	}
 
#1 lore raw

[GIT pull] x86/urgent for v5.6

Linus,

please pull the latest x86/urgent branch from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2020-03-29

up to: 870b4333a62e: x86/ioremap: Fix CONFIG_EFI=n build

A single fix to unbreak the build for CONFIG_EFI=n by adding a missing IS_ENABLED() check.

Thanks,

tglx

------------------>
Borislav Petkov (1):
x86/ioremap: Fix CONFIG_EFI=n build

 arch/x86/mm/ioremap.c | 3 +++
 1 file changed, 3 insertions(+)
arch/x86/mm/ioremap.c +3 -0
index 935a91e1fd77..18c637c0dc6f 100644
@@ -115,6 +115,9 @@ static void __ioremap_check_other(resource_size_t addr, struct ioremap_desc *des
 	if (!sev_active())
 		return;
 
+	if (!IS_ENABLED(CONFIG_EFI))
+		return;
+
 	if (efi_mem_type(addr) == EFI_RUNTIME_SERVICES_DATA)
 		desc->flags |= IORES_MAP_ENCRYPTED;
 }
#2 lore raw

Re: [GIT pull] x86/urgent for v5.6

Quoted 4 lines · Thomas Gleixner

please pull the latest x86/urgent branch from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2020-03-29

Heh. I already got this from Ingo, where it was "x86-urgent-for-linus" and merged on Tuesday: commit 3f3ee43a4623 ("Merge branch 'x86-urgent-for-linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip")

Linus

#3 lore raw

Re: [GIT pull] x86/urgent for v5.6

Quoted 10 lines · Linus Torvalds
Quoted 4 lines · Thomas Gleixner

please pull the latest x86/urgent branch from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2020-03-29

Heh. I already got this from Ingo, where it was "x86-urgent-for-linus" and merged on Tuesday: commit 3f3ee43a4623 ("Merge branch 'x86-urgent-for-linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip")

Stupid me forgot to update the linus branch...

#4 lore raw

[GIT pull] perf/urgent for v5.6

In reply to Thomas Gleixner

Linus,

please pull the latest perf/urgent branch from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf-urgent-2020-03-29

up to: 564200ed8e71: tools headers uapi: Update linux/in.h copy

A set of perf tooling fixes:

- perf probe:
- Fix deletion of multiple probe events.
- Fix userspace libraries handling by not depending on dwfl_module_addrsym().

- event parsing:
- Fix reading of invalid memory in event parsing.

- python bindings:
- Fix clang detection when using CC=clang-version.

- build system:
- Fix O= use with relative paths.

- Android:
- Fix off by one in strncpy() size argument when handling Android libraries.

- Sync the tools headers

Thanks,

tglx

------------------>
Arnaldo Carvalho de Melo (1):
tools headers uapi: Update linux/in.h copy

Ian Rogers (1):
perf parse-events: Fix reading of invalid memory in event parsing

Ilie Halip (1):
perf python: Fix clang detection when using CC=clang-version

Masami Hiramatsu (3):
tools: Let O= makes handle a relative path with -C option perf probe: Fix to delete multiple probe event perf probe: Do not depend on dwfl_module_addrsym()

disconnect3d (1):
perf map: Fix off by one in strncpy() size argument

 tools/include/uapi/linux/in.h  |  2 ++
 tools/perf/Makefile            |  2 +-
 tools/perf/util/map.c          |  2 +-
 tools/perf/util/parse-events.c | 46 +++++++++++++++++++++---------------------
 tools/perf/util/probe-file.c   |  3 +++
 tools/perf/util/probe-finder.c | 11 +++++++---
 tools/perf/util/setup.py       | 10 +++++----
 tools/scripts/Makefile.include |  4 ++--
 8 files changed, 46 insertions(+), 34 deletions(-)
tools/include/uapi/linux/in.h +2 -0
index 1521073b6348..8533bf07450f 100644
@@ -74,6 +74,8 @@ enum {
 #define IPPROTO_UDPLITE		IPPROTO_UDPLITE
   IPPROTO_MPLS = 137,		/* MPLS in IP (RFC 4023)		*/
 #define IPPROTO_MPLS		IPPROTO_MPLS
+  IPPROTO_ETHERNET = 143,	/* Ethernet-within-IPv6 Encapsulation	*/
+#define IPPROTO_ETHERNET	IPPROTO_ETHERNET
   IPPROTO_RAW = 255,		/* Raw IP packets			*/
 #define IPPROTO_RAW		IPPROTO_RAW
   IPPROTO_MPTCP = 262,		/* Multipath TCP connection		*/
tools/perf/Makefile +1 -1
index 7902a5681fc8..b8fc7d972be9 100644
@@ -35,7 +35,7 @@ endif
 # Only pass canonical directory names as the output directory:
 #
 ifneq ($(O),)
-  FULL_O := $(shell readlink -f $(O) || echo $(O))
+  FULL_O := $(shell cd $(PWD); readlink -f $(O) || echo $(O))
 endif
 
 #
tools/perf/util/map.c +1 -1
index 95428511300d..b342f744b1fc 100644
@@ -89,7 +89,7 @@ static inline bool replace_android_lib(const char *filename, char *newfilename)
 		return true;
 	}
 
-	if (!strncmp(filename, "/system/lib/", 11)) {
+	if (!strncmp(filename, "/system/lib/", 12)) {
 		char *ndk, *app;
 		const char *arch;
 		size_t ndk_length;
tools/perf/util/parse-events.c +23 -23

117 lines not on this page · raw message

tools/perf/util/probe-file.c +3 -0
index 0f5fda11675f..8c852948513e 100644
@@ -206,6 +206,9 @@ static struct strlist *__probe_file__get_namelist(int fd, bool include_group)
 		} else
 			ret = strlist__add(sl, tev.event);
 		clear_probe_trace_event(&tev);
+		/* Skip if there is same name multi-probe event in the list */
+		if (ret == -EEXIST)
+			ret = 0;
 		if (ret < 0)
 			break;
 	}
tools/perf/util/probe-finder.c +8 -3
index 1c817add6ca4..e4cff49384f4 100644
@@ -637,14 +637,19 @@ static int convert_to_trace_point(Dwarf_Die *sp_die, Dwfl_Module *mod,
 		return -EINVAL;
 	}
 
-	/* Try to get actual symbol name from symtab */
-	symbol = dwfl_module_addrsym(mod, paddr, &sym, NULL);
+	if (dwarf_entrypc(sp_die, &eaddr) == 0) {
+		/* If the DIE has entrypc, use it. */
+		symbol = dwarf_diename(sp_die);
+	} else {
+		/* Try to get actual symbol name and address from symtab */
+		symbol = dwfl_module_addrsym(mod, paddr, &sym, NULL);
+		eaddr = sym.st_value;
+	}
 	if (!symbol) {
 		pr_warning("Failed to find symbol at 0x%lx\n",
 			   (unsigned long)paddr);
 		return -ENOENT;
 	}
-	eaddr = sym.st_value;
 
 	tp->offset = (unsigned long)(paddr - eaddr);
 	tp->address = (unsigned long)paddr;
tools/perf/util/setup.py +6 -4
index aa344a163eaf..8a065a6f9713 100644
@@ -2,11 +2,13 @@ from os import getenv
 from subprocess import Popen, PIPE
 from re import sub
 
+cc = getenv("CC")
+cc_is_clang = b"clang version" in Popen([cc, "-v"], stderr=PIPE).stderr.readline()
+
 def clang_has_option(option):
-    return [o for o in Popen(['clang', option], stderr=PIPE).stderr.readlines() if b"unknown argument" in o] == [ ]
+    return [o for o in Popen([cc, option], stderr=PIPE).stderr.readlines() if b"unknown argument" in o] == [ ]
 
-cc = getenv("CC")
-if cc == "clang":
+if cc_is_clang:
     from distutils.sysconfig import get_config_vars
     vars = get_config_vars()
     for var in ('CFLAGS', 'OPT'):
@@ -40,7 +42,7 @@ class install_lib(_install_lib):
 cflags = getenv('CFLAGS', '').split()
 # switch off several checks (need to be at the end of cflags list)
 cflags += ['-fno-strict-aliasing', '-Wno-write-strings', '-Wno-unused-parameter', '-Wno-redundant-decls' ]
-if cc != "clang":
+if not cc_is_clang:
     cflags += ['-Wno-cast-function-type' ]
 
 src_perf  = getenv('srctree') + '/tools/perf'
tools/scripts/Makefile.include +2 -2
index ded7a950dc40..6d2f3a1b2249 100644
@@ -1,8 +1,8 @@
 # SPDX-License-Identifier: GPL-2.0
 ifneq ($(O),)
 ifeq ($(origin O), command line)
-	dummy := $(if $(shell test -d $(O) || echo $(O)),$(error O=$(O) does not exist),)
-	ABSOLUTE_O := $(shell cd $(O) ; pwd)
+	dummy := $(if $(shell cd $(PWD); test -d $(O) || echo $(O)),$(error O=$(O) does not exist),)
+	ABSOLUTE_O := $(shell cd $(PWD); cd $(O) ; pwd)
 	OUTPUT := $(ABSOLUTE_O)/$(if $(subdir),$(subdir)/)
 	COMMAND_O := O=$(ABSOLUTE_O)
 ifeq ($(objtree),)
#5 lore raw

Re: [GIT pull] perf/urgent for v5.6

Quoted 2 lines · Thomas Gleixner

please pull the latest perf/urgent branch from:

Also already sent and merged on Tuesday (commit 76ccd234269b).

Linus

#6 lore raw

[GIT pull] timers/urgent for v5.6

In reply to Thomas Gleixner

Linus,

please pull the latest timers/urgent branch from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers-urgent-2020-03-29

up to: 749da8ca978f: clocksource/drivers/hyper-v: Make sched clock return nanoseconds correctly

A single fix for the Hyper-V clocksource driver to make sched clock actually return nanoseconds and not the virtual clock value which increments at 10e7 HZ (100ns).

Thanks,

tglx

------------------>
Yubo Xie (1):
clocksource/drivers/hyper-v: Make sched clock return nanoseconds correctly

 drivers/clocksource/hyperv_timer.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/clocksource/hyperv_timer.c +4 -2
index 9d808d595ca8..eb0ba7818eb0 100644
@@ -343,7 +343,8 @@ static u64 notrace read_hv_clock_tsc_cs(struct clocksource *arg)
 
 static u64 read_hv_sched_clock_tsc(void)
 {
-	return read_hv_clock_tsc() - hv_sched_clock_offset;
+	return (read_hv_clock_tsc() - hv_sched_clock_offset) *
+		(NSEC_PER_SEC / HV_CLOCK_HZ);
 }
 
 static void suspend_hv_clock_tsc(struct clocksource *arg)
@@ -398,7 +399,8 @@ static u64 notrace read_hv_clock_msr_cs(struct clocksource *arg)
 
 static u64 read_hv_sched_clock_msr(void)
 {
-	return read_hv_clock_msr() - hv_sched_clock_offset;
+	return (read_hv_clock_msr() - hv_sched_clock_offset) *
+		(NSEC_PER_SEC / HV_CLOCK_HZ);
 }
 
 static struct clocksource hyperv_cs_msr = {
merge bot Merged
#7 lore raw

Re: [GIT pull] timers/urgent for v5.6

The pull request you sent on Sun, 29 Mar 2020 16:03:25 -0000:

The pull request you sent on Sun, 29 Mar 2020 16:03:25 -0000:

Quoted 1 line

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers-urgent-2020-03-29

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/ab93e984dbb41578b41208cee52ce4e709951eb2

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker
merge bot Merged
#8 lore raw
In reply to Thomas Gleixner
The pull request you sent on Sun, 29 Mar 2020 16:03:25 -0000:

The pull request you sent on Sun, 29 Mar 2020 16:03:25 -0000:

Quoted 1 line

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq-urgent-2020-03-29

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/01af08bd24edf50b2d9e06f18df13cb8d0d645b7

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker