Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1686750 > unrolled thread

[PATCH 4.9 00/25] 4.9.38-stable review

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2017-07-13 18:10 +0200
Last post2017-07-14 12:00 +0200
Articles 5 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 4.9 00/25] 4.9.38-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-13 18:10 +0200
    [PATCH 4.9 14/25] perf probe: Fix to probe on gcc generated symbols for offline kernel Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-13 18:10 +0200
    Re: [PATCH 4.9 00/25] 4.9.38-stable review Sumit Semwal <sumit.semwal@linaro.org> - 2017-07-13 18:50 +0200
    Re: [PATCH 4.9 00/25] 4.9.38-stable review Guenter Roeck <linux@roeck-us.net> - 2017-07-14 03:40 +0200
    Re: [PATCH 4.9 00/25] 4.9.38-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-14 12:00 +0200

#1686750 — [PATCH 4.9 00/25] 4.9.38-stable review

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-07-13 18:10 +0200
Subject[PATCH 4.9 00/25] 4.9.38-stable review
Message-ID<u2Oxj-7s0-7@gated-at.bofh.it>
This is the start of the stable review cycle for the 4.9.38 release.
There are 25 patches in this series, all will be posted as a response
to this one.  If anyone has any issues with these being applied, please
let me know.

Responses should be made by Sat Jul 15 15:39:46 UTC 2017.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
	kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.38-rc1.gz
or in the git tree and branch at:
  git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.9.y
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Linux 4.9.38-rc1

Maciej S. Szmigiero <mail@maciej.szmigiero.name>
    saa7134: fix warm Medion 7134 EEPROM read

Mikulas Patocka <mpatocka@redhat.com>
    x86/mm/pat: Don't report PAT on CPUs that don't support it

Chao Yu <yuchao0@huawei.com>
    ext4: check return value of kstrtoull correctly in reserved_clusters_store

Jason A. Donenfeld <Jason@zx2c4.com>
    crypto: rsa-pkcs1pad - use constant time memory comparison for MACs

Horia Geantă <horia.geanta@nxp.com>
    crypto: caam - fix gfp allocation flags (part I)

Ian Abbott <abbotti@mev.co.uk>
    staging: comedi: fix clean-up of comedi_class in comedi_init()

Malcolm Priestley <tvboxspy@gmail.com>
    staging: vt6556: vnt_start Fix missing call to vnt_key_init_table.

Kirill Tkhai <ktkhai@virtuozzo.com>
    locking/rwsem-spinlock: Fix EINTR branch in __down_write_common()

Jason Yan <yanaijie@huawei.com>
    md: fix super_offset endianness in super_1_rdev_size_change

Jason Yan <yanaijie@huawei.com>
    md: fix incorrect use of lexx_to_cpu in does_sb_need_changing

Masami Hiramatsu <mhiramat@kernel.org>
    perf probe: Add error checks to offline probe post-processing

Masami Hiramatsu <mhiramat@kernel.org>
    perf probe: Fix to probe on gcc generated symbols for offline kernel

Wang YanQing <udknight@gmail.com>
    perf scripting perl: Fix compile error with some perl5 versions

Arnaldo Carvalho de Melo <acme@redhat.com>
    perf header: Fix handling of PERF_EVENT_UPDATE__SCALE

Arnaldo Carvalho de Melo <acme@redhat.com>
    perf bench numa: Avoid possible truncation when using snprintf()

Arnaldo Carvalho de Melo <acme@redhat.com>
    perf tests: Avoid possible truncation with dirent->d_name + snprintf

Arnaldo Carvalho de Melo <acme@redhat.com>
    perf intel-pt: Use __fallthrough

Arnaldo Carvalho de Melo <acme@redhat.com>
    perf thread_map: Correctly size buffer used with dirent->dt_name

Arnaldo Carvalho de Melo <acme@redhat.com>
    perf top: Use __fallthrough

Arnaldo Carvalho de Melo <acme@redhat.com>
    tools strfilter: Use __fallthrough

Arnaldo Carvalho de Melo <acme@redhat.com>
    tools string: Use __fallthrough in perf_atoll()

Arnaldo Carvalho de Melo <acme@redhat.com>
    tools include: Add a __fallthrough statement

Josh Zimmerman <joshz@google.com>
    tpm: Issue a TPM2_Shutdown for TPM2 devices.

Josh Zimmerman <joshz@google.com>
    Add "shutdown" to "struct class".

Cong Wang <xiyou.wangcong@gmail.com>
    mqueue: fix a use-after-free in sys_mq_notify()


-------------

Diffstat:

 Makefile                                           |  4 +-
 arch/x86/include/asm/pat.h                         |  1 +
 arch/x86/kernel/setup.c                            |  7 +++
 arch/x86/mm/pat.c                                  | 28 ++++------
 crypto/rsa-pkcs1pad.c                              |  2 +-
 drivers/base/core.c                                |  6 +-
 drivers/char/tpm/tpm-chip.c                        | 36 ++++++++++++
 drivers/char/tpm/tpm-sysfs.c                       |  5 ++
 drivers/crypto/caam/caamalg.c                      |  3 +-
 drivers/md/md.c                                    |  4 +-
 drivers/media/pci/saa7134/saa7134-i2c.c            | 31 +++++++++++
 drivers/staging/comedi/comedi_fops.c               |  1 +
 drivers/staging/vt6656/main_usb.c                  |  3 +
 fs/ext4/sysfs.c                                    |  2 +-
 include/linux/device.h                             |  2 +
 ipc/mqueue.c                                       |  4 +-
 kernel/locking/rwsem-spinlock.c                    |  4 +-
 tools/include/linux/compiler.h                     |  9 +++
 tools/perf/bench/numa.c                            |  6 +-
 tools/perf/builtin-top.c                           |  2 +-
 tools/perf/tests/parse-events.c                    |  8 +--
 tools/perf/util/header.c                           |  1 +
 .../perf/util/intel-pt-decoder/intel-pt-decoder.c  |  5 ++
 .../util/intel-pt-decoder/intel-pt-pkt-decoder.c   |  2 +
 tools/perf/util/probe-event.c                      | 64 +++++++++++++++++++++-
 tools/perf/util/scripting-engines/Build            |  2 +-
 tools/perf/util/strfilter.c                        |  1 +
 tools/perf/util/string.c                           |  2 +
 tools/perf/util/thread_map.c                       |  2 +-
 29 files changed, 207 insertions(+), 40 deletions(-)

[toc] | [next] | [standalone]


#1686751 — [PATCH 4.9 14/25] perf probe: Fix to probe on gcc generated symbols for offline kernel

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-07-13 18:10 +0200
Subject[PATCH 4.9 14/25] perf probe: Fix to probe on gcc generated symbols for offline kernel
Message-ID<u2OQH-7O6-59@gated-at.bofh.it>
In reply to#1686750
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Masami Hiramatsu <mhiramat@kernel.org>

commit 8a937a25a7e3c19d5fb3f9d92f605cf5fda219d8 upstream.

Fix perf-probe to show probe definition on gcc generated symbols for
offline kernel (including cross-arch kernel image).

gcc sometimes optimizes functions and generate new symbols with suffixes
such as ".constprop.N" or ".isra.N" etc. Since those symbol names are
not recorded in DWARF, we have to find correct generated symbols from
offline ELF binary to probe on it (kallsyms doesn't correct it).  For
online kernel or uprobes we don't need it because those are rebased on
_text, or a section relative address.

E.g. Without this:

  $ perf probe -k build-arm/vmlinux -F __slab_alloc*
  __slab_alloc.constprop.9
  $ perf probe -k build-arm/vmlinux -D __slab_alloc
  p:probe/__slab_alloc __slab_alloc+0

If you put above definition on target machine, it should fail
because there is no __slab_alloc in kallsyms.

With this fix, perf probe shows correct probe definition on
__slab_alloc.constprop.9:

  $ perf probe -k build-arm/vmlinux -D __slab_alloc
  p:probe/__slab_alloc __slab_alloc.constprop.9+0

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/148350060434.19001.11864836288580083501.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Krister Johansen <kjlx@templeofstupid.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 tools/perf/util/probe-event.c |   48 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 47 insertions(+), 1 deletion(-)

--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -618,6 +618,51 @@ error:
 	return ret ? : -ENOENT;
 }
 
+/*
+ * Rename DWARF symbols to ELF symbols -- gcc sometimes optimizes functions
+ * and generate new symbols with suffixes such as .constprop.N or .isra.N
+ * etc. Since those symbols are not recorded in DWARF, we have to find
+ * correct generated symbols from offline ELF binary.
+ * For online kernel or uprobes we don't need this because those are
+ * rebased on _text, or already a section relative address.
+ */
+static int
+post_process_offline_probe_trace_events(struct probe_trace_event *tevs,
+					int ntevs, const char *pathname)
+{
+	struct symbol *sym;
+	struct map *map;
+	unsigned long stext = 0;
+	u64 addr;
+	int i;
+
+	/* Prepare a map for offline binary */
+	map = dso__new_map(pathname);
+	if (!map || get_text_start_address(pathname, &stext) < 0) {
+		pr_warning("Failed to get ELF symbols for %s\n", pathname);
+		return -EINVAL;
+	}
+
+	for (i = 0; i < ntevs; i++) {
+		addr = tevs[i].point.address + tevs[i].point.offset - stext;
+		sym = map__find_symbol(map, addr);
+		if (!sym)
+			continue;
+		if (!strcmp(sym->name, tevs[i].point.symbol))
+			continue;
+		/* If we have no realname, use symbol for it */
+		if (!tevs[i].point.realname)
+			tevs[i].point.realname = tevs[i].point.symbol;
+		else
+			free(tevs[i].point.symbol);
+		tevs[i].point.symbol = strdup(sym->name);
+		tevs[i].point.offset = addr - sym->start;
+	}
+	map__put(map);
+
+	return 0;
+}
+
 static int add_exec_to_probe_trace_events(struct probe_trace_event *tevs,
 					  int ntevs, const char *exec)
 {
@@ -694,7 +739,8 @@ post_process_kernel_probe_trace_events(s
 
 	/* Skip post process if the target is an offline kernel */
 	if (symbol_conf.ignore_vmlinux_buildid)
-		return 0;
+		return post_process_offline_probe_trace_events(tevs, ntevs,
+						symbol_conf.vmlinux_name);
 
 	reloc_sym = kernel_get_ref_reloc_sym();
 	if (!reloc_sym) {

[toc] | [prev] | [next] | [standalone]


#1686780

FromSumit Semwal <sumit.semwal@linaro.org>
Date2017-07-13 18:50 +0200
Message-ID<u2Ptn-813-11@gated-at.bofh.it>
In reply to#1686750
Hi Greg,

On 13 July 2017 at 21:10, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> This is the start of the stable review cycle for the 4.9.38 release.
> There are 25 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Sat Jul 15 15:39:46 UTC 2017.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
>         kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.38-rc1.gz
> or in the git tree and branch at:
>   git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.9.y
> and the diffstat can be found below.
>

For arm64, Build and boot-tested with arm64 defconfig on hikey - no
regressions noted.

> thanks,
>
> greg k-h
>

[toc] | [prev] | [next] | [standalone]


#1687008

FromGuenter Roeck <linux@roeck-us.net>
Date2017-07-14 03:40 +0200
Message-ID<u2XKi-4Ps-5@gated-at.bofh.it>
In reply to#1686750
On 07/13/2017 08:40 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.9.38 release.
> There are 25 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Sat Jul 15 15:39:46 UTC 2017.
> Anything received after that time might be too late.
> 

Build results:
	total: 145 pass: 145 fail: 0
Qemu test results:
	total: 122 pass: 122 fail: 0

Details are available at http://kerneltests.org/builders.

Guenter

[toc] | [prev] | [next] | [standalone]


#1687220

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-07-14 12:00 +0200
Message-ID<u35ya-1D9-23@gated-at.bofh.it>
In reply to#1686750
On Thu, Jul 13, 2017 at 01:47:46PM -0700, kernelci.org bot wrote:
> stable-rc/linux-4.9.y boot: 246 boots: 6 failed, 237 passed with 2 offline, 1 conflict (v4.9.37-26-g996828f64cac)

Are these 6 failures "ok" to ignore?

thanks,

greg k-h

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web