[PATCH 36/44] perf feature detection: Add -lopcodes to feature-libbfd

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Song Liu Both libbfd and libopcodes are distributed with binutil-dev/devel. When libbfd is present, it is OK to assume that libopcodes also present. This has been a safe assumption for bpftool. This patch adds -lopcodes to perf/Makefile.config. libopcodes will be used in the next commit

[PATCH 42/44] perf tools: Save bpf_prog_info and BTF of new BPF programs

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Song Liu To fully annotate BPF programs with source code mapping, 4 different information are needed: 1) PERF_RECORD_KSYMBOL 2) PERF_RECORD_BPF_EVENT 3) bpf_prog_info 4) btf This patch handles 3) and 4) for BPF programs loaded after 'perf record|top'. For timely process

[PATCH 37/44] perf symbols: Introduce DSO_BINARY_TYPE__BPF_PROG_INFO

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Song Liu Introduce a new dso type DSO_BINARY_TYPE__BPF_PROG_INFO for BPF programs. In symbol__disassemble(), DSO_BINARY_TYPE__BPF_PROG_INFO dso will call into a new function symbol__disassemble_bpf() in an upcoming patch, where annotation line information is filled based bpf_prog_info and

[PATCH 38/44] perf bpf: Process PERF_BPF_EVENT_PROG_LOAD for annotation

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Song Liu This patch adds processing of PERF_BPF_EVENT_PROG_LOAD, which sets proper DSO type/id/etc of memory regions mapped to BPF programs to DSO_BINARY_TYPE__BPF_PROG_INFO. Signed-off-by: Song Liu Reviewed-by: Jiri Olsa Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Namhyung Kim

[PATCH 29/44] perf bpf: Synthesize bpf events with bpf_program__get_prog_info_linear()

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Song Liu With bpf_program__get_prog_info_linear, we can simplify the logic that synthesizes bpf events. This patch doesn't change the behavior of the code. Commiter notes: Needed this (for all four variables), suggested by Song, to overcome build failure on debian experimental cross

[PATCH 28/44] bpftool: use bpf_program__get_prog_info_linear() in prog.c:do_dump()

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Song Liu This patches uses bpf_program__get_prog_info_linear() to simplify the logic in prog.c do_dump(). Committer testing: Before: # bpftool prog dump xlated id 208 > /tmp/dump.xlated.before # bpftool prog dump jited id 208 > /tmp/dump.jited.before # bpftool map dump id 107 >

[PATCH 35/44] perf top: Add option --no-bpf-event

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Song Liu This patch adds option --no-bpf-event to 'perf top', which is the same as the option of 'perf record'. The following patches will use this option. Committer testing: # perf top -vv 2> /tmp/perf_event_attr.out # cat /tmp/perf_event_attr.out

[PATCH 34/44] perf bpf: Save BTF information as headers to perf.data

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Song Liu This patch enables 'perf record' to save BTF information as headers to perf.data. A new header type HEADER_BPF_BTF is introduced for this data. Committer testing: As root, being on the kernel sources top level directory, run: # perf trace -e

[PATCH 33/44] perf bpf: Save BTF in a rbtree in perf_env

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Song Liu BTF contains information necessary to annotate BPF programs. This patch saves BTF for BPF programs loaded in the system. Signed-off-by: Song Liu Reviewed-by: Jiri Olsa Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stanislav Fomichev Cc:

[PATCH 30/44] perf bpf: Make synthesize_bpf_events() receive perf_session pointer instead of perf_tool

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Song Liu This patch changes the arguments of perf_event__synthesize_bpf_events() to include perf_session* instead of perf_tool*. perf_session will be used in the next patch. Signed-off-by: Song Liu Reviewed-by: Jiri Olsa Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Namhyung Kim Cc:

Re: [PATCH] staging: ralink-gdma: Prefer u32 over uint32_t

2019-03-21 Thread Greg KH
On Fri, Mar 22, 2019 at 12:18:58AM +0530, Bharath Vedartham wrote: > On Thu, Mar 21, 2019 at 07:46:09PM +0100, Greg KH wrote: > > On Fri, Mar 22, 2019 at 12:07:10AM +0530, Bharath Vedartham wrote: > > > Change uint32_t to u32 > > > > That says _what_ you did, but _why_ are you doing this? That's

[PATCH 32/44] perf bpf: Save bpf_prog_info information as headers to perf.data

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Song Liu This patch enables perf-record to save bpf_prog_info information as headers to perf.data. A new header type HEADER_BPF_PROG_INFO is introduced for this data. Committer testing: As root, being on the kernel sources top level directory, run: # perf trace -e

[PATCH 19/44] perf map: Remove map from 'names' tree in __maps__remove()

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Changbin Du There are two trees for each map inserted by maps__insert(), so remove it from the 'names' tree in __maps__remove(). Detected with gcc's ASan. Signed-off-by: Changbin Du Reviewed-by: Jiri Olsa Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Eric Saint-Etienne Cc: Namhyung

[PATCH 26/44] perf record: Replace option --bpf-event with --no-bpf-event

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Song Liu Currently, monitoring of BPF programs through bpf_event is off by default for 'perf record'. To turn it on, the user need to use option "--bpf-event". As BPF gets wider adoption in different subsystems, this option becomes inconvenient. This patch makes bpf_event on by default,

[PATCH 17/44] perf top: Fix error handling in cmd_top()

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Changbin Du We should go to the cleanup path, to avoid leaks, detected using gcc's ASan. Signed-off-by: Changbin Du Reviewed-by: Jiri Olsa Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Link:

[PATCH 27/44] tools lib bpf: Introduce bpf_program__get_prog_info_linear()

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Song Liu Currently, bpf_prog_info includes 9 arrays. The user has the option to fetch any combination of these arrays. However, this requires a lot of handling. This work becomes more tricky when we need to store bpf_prog_info to a file, because these arrays are allocated independently.

[PATCH 25/44] perf tests: Fix a memory leak in test__perf_evsel__tp_sched_test()

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Changbin Du = ==20875==ERROR: LeakSanitizer: detected memory leaks Direct leak of 1160 byte(s) in 1 object(s) allocated from: #0 0x7f1b6fc84138 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xee138) #1

[PATCH 18/44] perf hist: Add missing map__put() in error case

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Changbin Du We need to map__put() before returning from failure of sample__resolve_callchain(). Detected with gcc's ASan. Signed-off-by: Changbin Du Reviewed-by: Jiri Olsa Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Krister Johansen Cc: Namhyung Kim Cc: Peter Zijlstra Cc:

[PATCH 24/44] perf tests: Fix memory leak by expr__find_other() in test__expr()

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Changbin Du = ==7506==ERROR: LeakSanitizer: detected memory leaks Direct leak of 13 byte(s) in 3 object(s) allocated from: #0 0x7f03339d6070 in __interceptor_strdup

[PATCH 21/44] perf top: Fix global-buffer-overflow issue

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Changbin Du The array str[] should have six elements. = ==4322==ERROR: AddressSanitizer: global-buffer-overflow on address 0x56463844e300 at pc 0x564637e7ad0d bp 0x7f30c8c89d10 sp 0x7f30c8c89d00 READ of size 8 at

[PATCH 23/44] perf tests: Fix a memory leak of cpu_map object in the openat_syscall_event_on_all_cpus test

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Changbin Du = ==7497==ERROR: LeakSanitizer: detected memory leaks Direct leak of 40 byte(s) in 1 object(s) allocated from: #0 0x7f0333a88f30 in __interceptor_malloc

[PATCH 20/44] perf maps: Purge all maps from the 'names' tree

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Changbin Du Add function __maps__purge_names() to purge all maps from the names tree. We need to cleanup the names tree in maps__exit(). Detected with gcc's ASan. Signed-off-by: Changbin Du Reviewed-by: Jiri Olsa Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Eric Saint-Etienne Cc:

[PATCH 22/44] perf evsel: Free evsel->counts in perf_evsel__exit()

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo Using gcc's ASan, Changbin reports: = ==7494==ERROR: LeakSanitizer: detected memory leaks Direct leak of 48 byte(s) in 1 object(s) allocated from: #0 0x7f0333a89138 in calloc

[PATCH 16/44] perf top: Delete the evlist before perf_session, fixing heap-use-after-free issue

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Changbin Du The evlist should be destroyed before the perf session. Detected with gcc's ASan: = ==27350==ERROR: AddressSanitizer: heap-use-after-free on address 0x62b02e38 at pc 0x5611da276999 bp 0x7ffce8f1d1a0 sp

[PATCH 15/44] perf build-id: Fix memory leak in print_sdt_events()

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Changbin Du Detected with gcc's ASan: Direct leak of 4356 byte(s) in 120 object(s) allocated from: #0 0x7ff1a2b5a070 in __interceptor_strdup (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x3b070) #1 0x55719aef4814 in build_id_cache__origname util/build-id.c:215 #2

[PATCH 13/44] perf config: Fix an error in the config template documentation

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Changbin Du The option 'sort-order' should be 'sort_order'. Signed-off-by: Changbin Du Reviewed-by: Jiri Olsa Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Milian Wolff Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Fixes: 893c5c798be9 ("perf config: Show default

[PATCH 14/44] perf config: Fix a memory leak in collect_config()

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Changbin Du Detected with gcc's ASan: Direct leak of 66 byte(s) in 5 object(s) allocated from: #0 0x7ff3b1f32070 in __interceptor_strdup (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x3b070) #1 0x560c8761034d in collect_config util/config.c:597 #2 0x560c8760d9cb in

[PATCH 12/44] perf tools: Fix errors under optimization level '-Og'

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Changbin Du Optimization level '-Og' offers a reasonable level of optimization while maintaining fast compilation and a good debugging experience. This patch tries to make it work. $ make DEBUG=1 EXTRA_CFLAGS='-Og' bench/epoll-ctl.c: In function ‘do_threads’:

[PATCH 10/44] perf tools: Add doc about how to build perf with Asan and UBSan

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Changbin Du AddressSanitizer (or ASan) and UndefinedBehaviorSanitizer (or UBSan) are very useful tools to detect program bugs: - AddressSanitizer (or ASan) is a GCC feature that detects memory corruption bugs such as buffer overflows and memory leaks. - UndefinedBehaviorSanitizer

[PATCH 08/44] perf stat: Improve scaling

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Andi Kleen The multiplexing scaling in perf stat mysteriously adds 0.5 to the value. This dates back to the original perf tool. Other scaling code doesn't use that strange convention. Remove the extra 0.5. Before: $ perf stat -e 'cycles,cycles,cycles,cycles,cycles,cycles' grep -rq foo

[PATCH 09/44] perf vendor events: Remove P8 HW events which are not supported

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Mamatha Inamdar This patch is to remove following hardware events from JSON file which are not supported on POWER8. pm_co_disp_fail pm_co_tm_sc_footprint pm_iside_disp pm_iside_disp_fail pm_iside_disp_fail_other pm_iside_mru_touch pm_l2_castout_mod pm_l2_castout_shr

[PATCH 11/44] perf list: Don't forget to drop the reference to the allocated thread_map

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Changbin Du Detected via gcc's ASan: Direct leak of 2048 byte(s) in 64 object(s) allocated from: 6 #0 0x7f606512e370 in __interceptor_realloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xee370) 7 #1 0x556b0f1d7ddd in thread_map__realloc util/thread_map.c:43 8 #2

[PATCH 07/44] perf stat: Fix --no-scale

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Andi Kleen The -c option to enable multiplex scaling has been useless for quite some time because scaling is default. It's only useful as --no-scale to disable scaling. But the non scaling code path has bitrotted and doesn't print anything because perf output code relies on value run/ena

[GIT PULL 00/44] perf/core fixes and improvements

2019-03-21 Thread Arnaldo Carvalho de Melo
dfcbc2f2994b8a3af3605a26dc29c07ad7378bf4: tools lib bpf: Fix the build by adding a missing stdarg.h include (2019-03-11 17:14:31 -0300) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-5.1-20190321 for you to fetch changes up

[PATCH 05/44] perf report: Indicate JITed code better in report

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Andi Kleen Print [TID] tid %d instead of the crypted /tmp/perf-%d.map default. % cat >loop.java public class loop { public static void main(String[] args) { for (;;); } } ^D % javac loop.java % perf record java loop ^C Before:

[PATCH 06/44] perf script: Support relative time

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Andi Kleen When comparing time stamps in 'perf script' traces it can be annoying to work with the full perf time stamps. Add a --reltime option that displays time stamps relative to the trace start to make it easier to read the traces. Note: not currently supported for --time. Report an

[PATCH 04/44] perf report: Show all sort keys in help output

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Andi Kleen Show all the supported sort keys in the command line help output, so that it's not needed to refer to the manpage. Before: % perf report -h ... -s, --sort sort by key(s): pid, comm, dso, symbol, parent, cpu, srcline, ... Please refer

[PATCH 03/44] perf record: Clarify help for --switch-output

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Andi Kleen The help description for --switch-output looks like there are multiple comma separated fields. But it's actually a choice of different options. Make it clear and less confusing. Before: % perf record -h ... --switch-output[=] Switch

[PATCH 01/44] perf list: Filter metrics too

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Andi Kleen When a filter is specified on the command line, filter the metrics too. Before: % perf list foo List of pre-defined events (to be used in -e): Metric Groups: DSB: DSB_Coverage [Fraction of Uops delivered by the DSB (aka Decoded Icache; or Uop Cache)]

[PATCH 02/44] perf record: Allow to limit number of reported perf.data files

2019-03-21 Thread Arnaldo Carvalho de Melo
From: Andi Kleen When doing long term recording and waiting for some event to snapshot on, we often only care about the last minute or so. The --switch-output command line option supports rotating the perf.data file when the size exceeds a threshold. But the disk would still be filled with

linux-next: Signed-off-by missing for commit in the cifs tree

2019-03-21 Thread Stephen Rothwell
Hi all, Commit 828a8dfb7069 ("cifs: update internal module version number") is missing a Signed-off-by from its author and committer. -- Cheers, Stephen Rothwell pgpNr2uKRMEgN.pgp Description: OpenPGP digital signature

Re: [PATCH] staging: ralink-gdma: Prefer u32 over uint32_t

2019-03-21 Thread Greg KH
On Fri, Mar 22, 2019 at 12:07:10AM +0530, Bharath Vedartham wrote: > Change uint32_t to u32 That says _what_ you did, but _why_ are you doing this? That's the main content a changelog text should have in it. thanks, greg k-h

Re: [RFC][PATCH] tracing/x86: Save CR2 before tracing irqsoff on error_entry

2019-03-21 Thread Peter Zijlstra
On Thu, Mar 21, 2019 at 11:38:25AM -0700, Andy Lutomirski wrote: > I suspect we'll want PV spinlocks and other goodies like PV TLB > shootdown for a long time. The stuff I'd like to kill eventually is > the PV "I'm not actually at CPL 0 so I'm faking it" part. Right, and it's exactly those bits

[PATCH v5 1/2] staging: iio: ad5933: change attributes to match ABI

2019-03-21 Thread Marcelo Schmitt
Change device attributes' names to match ABI documentation. Names were chosen such that they tend to be similar to existing ABI so it should be easier to standardize them when necessary. Signed-off-by: Marcelo Schmitt --- .../staging/iio/impedance-analyzer/ad5933.c | 24 +-- 1

[PATCH v5 2/2] staging: iio: ad5933: move out of staging

2019-03-21 Thread Marcelo Schmitt
Move ad5933 impedance-analyzer driver from staging to mainline. The ad5933 is a high precision impedance converter system solution that combines an on-board frequency generator with an analog-to-digital converter (ADC). This driver was designed to be compatible with both ad5933 and ad5934 chips.

[PATCH v5 0/2] staging: iio: ad5933: move out of staging

2019-03-21 Thread Marcelo Schmitt
This series of patches makes device attributes' names equal to ABI documentation and move ad5933 driver out of staging. More precisely: It changes device attributes' names to match or be similar to existing ABI. It moves the ad5933 driver from staging directory to iio main drivers directory.

Re: [RFC][PATCH] tracing/x86: Save CR2 before tracing irqsoff on error_entry

2019-03-21 Thread Andy Lutomirski
On Thu, Mar 21, 2019 at 11:37 AM Peter Zijlstra wrote: > > On Thu, Mar 21, 2019 at 11:25:44AM -0700, Linus Torvalds wrote: > > On Thu, Mar 21, 2019 at 11:21 AM Andy Lutomirski wrote: > > > > > > I dunno. Lots of people at least use to have serious commercial interest > > > in it. > > > > Yes,

Re: [RFC][PATCH] tracing/x86: Save CR2 before tracing irqsoff on error_entry

2019-03-21 Thread Andy Lutomirski
On Thu, Mar 21, 2019 at 11:33 AM Linus Torvalds wrote: > > On Thu, Mar 21, 2019 at 11:21 AM Andy Lutomirski wrote: > > > > I dunno. Lots of people at least use to have serious commercial interest > > in it. > > Yes, it used to be a big deal. But full virtualization has gotten a > lot more

[PATCH] staging: ralink-gdma: Prefer u32 over uint32_t

2019-03-21 Thread Bharath Vedartham
Change uint32_t to u32 Signed-off-by: Bharath Vedartham --- drivers/staging/ralink-gdma/ralink-gdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ralink-gdma/ralink-gdma.c b/drivers/staging/ralink-gdma/ralink-gdma.c index d78042e..2c19287 100644 ---

Re: [RFC][PATCH] tracing/x86: Save CR2 before tracing irqsoff on error_entry

2019-03-21 Thread Peter Zijlstra
On Thu, Mar 21, 2019 at 11:25:44AM -0700, Linus Torvalds wrote: > On Thu, Mar 21, 2019 at 11:21 AM Andy Lutomirski wrote: > > > > I dunno. Lots of people at least use to have serious commercial interest > > in it. > > Yes, it used to be a big deal. But full virtualization has gotten a > lot

Re: [RFC][PATCH] tracing/x86: Save CR2 before tracing irqsoff on error_entry

2019-03-21 Thread Peter Zijlstra
On Thu, Mar 21, 2019 at 11:28:50AM -0700, Andy Lutomirski wrote: > On Thu, Mar 21, 2019 at 11:27 AM Peter Zijlstra wrote: > > > > On Thu, Mar 21, 2019 at 11:05:06AM -0700, Andy Lutomirski wrote: > > > > > Ugh. > > > > > > I certainly agree in principle that sticking the CR2 read into the asm > >

Re: [PATCH v2] sched/fair: Limit sched_cfs_period_timer loop to avoid hard lockup

2019-03-21 Thread Phil Auld
On Thu, Mar 21, 2019 at 07:01:37PM +0100 Peter Zijlstra wrote: > On Tue, Mar 19, 2019 at 09:00:05AM -0400, Phil Auld wrote: > > sched/fair: Limit sched_cfs_period_timer loop to avoid hard lockup > > > > With extremely short cfs_period_us setting on a parent task group with a > > large > > number

Re: Stable patches that don't apply to older kernels and how to get them

2019-03-21 Thread Greg KH
On Thu, Mar 21, 2019 at 07:19:46PM +0100, David Sterba wrote: > On Thu, Mar 21, 2019 at 05:39:41PM +0100, Greg KH wrote: > > On Thu, Mar 21, 2019 at 04:14:14PM +0100, David Sterba wrote: > > > Hi, > > > > > > would it be possible to have a git repository with all patches that are > > > submitted

Re: [RFC] [PATCH 0/5] procfs: reduce duplication by using symlinks

2019-03-21 Thread Jeff Mahoney
On 4/24/18 10:14 AM, Eric W. Biederman wrote: > je...@suse.com writes: > >> From: Jeff Mahoney >> >> Hi all - >> >> I recently encountered a customer issue where, on a machine with many TiB >> of memory and a few hundred cores, after a task with a few thousand threads >> and hundreds of files

Re: [RFC][PATCH] tracing/x86: Save CR2 before tracing irqsoff on error_entry

2019-03-21 Thread Andy Lutomirski
On Thu, Mar 21, 2019 at 11:27 AM Peter Zijlstra wrote: > > On Thu, Mar 21, 2019 at 11:05:06AM -0700, Andy Lutomirski wrote: > > > Ugh. > > > > I certainly agree in principle that sticking the CR2 read into the asm > > is the right solution. But this patch makes the spaghetti even more > >

Re: [RFC][PATCH] tracing/x86: Save CR2 before tracing irqsoff on error_entry

2019-03-21 Thread Peter Zijlstra
On Thu, Mar 21, 2019 at 02:10:20PM -0400, Steven Rostedt wrote: > On Thu, 21 Mar 2019 11:05:06 -0700 > Andy Lutomirski wrote: > > > In the long run, I think the right solution is to rewrite even more of > > this mess in C. We really ought to be able to put the IRQ flag > > tracing and the

Re: [RFC][PATCH] tracing/x86: Save CR2 before tracing irqsoff on error_entry

2019-03-21 Thread Peter Zijlstra
On Thu, Mar 21, 2019 at 11:05:06AM -0700, Andy Lutomirski wrote: > Ugh. > > I certainly agree in principle that sticking the CR2 read into the asm > is the right solution. But this patch makes the spaghetti even more > tangled. Maybe we can rearrange the code a bit so that the entry > sequence

Re: [RFC][PATCH] tracing/x86: Save CR2 before tracing irqsoff on error_entry

2019-03-21 Thread Andy Lutomirski
On Thu, Mar 21, 2019 at 11:10 AM Steven Rostedt wrote: > > On Thu, 21 Mar 2019 11:05:06 -0700 > Andy Lutomirski wrote: > > > In the long run, I think the right solution is to rewrite even more of > > this mess in C. We really ought to be able to put the IRQ flag > > tracing and the context

Re: [RFC][PATCH] tracing/x86: Save CR2 before tracing irqsoff on error_entry

2019-03-21 Thread Linus Torvalds
On Thu, Mar 21, 2019 at 11:21 AM Andy Lutomirski wrote: > > I dunno. Lots of people at least use to have serious commercial interest in > it. Yes, it used to be a big deal. But full virtualization has gotten a lot more common and better. > Hey Xen folks, how close are we to being able to say

Re: [RFC][PATCH] tracing/x86: Save CR2 before tracing irqsoff on error_entry

2019-03-21 Thread hpa
On March 21, 2019 11:18:53 AM PDT, Linus Torvalds wrote: >On Thu, Mar 21, 2019 at 11:05 AM Andy Lutomirski >wrote: >> >> In the long run, I think the right solution is to rewrite even more >of >> this mess in C. We really ought to be able to put the IRQ flag >> tracing and the context tracking

Re: BUG: unable to handle kernel NULL pointer dereference in hci_uart_set_flow_control

2019-03-21 Thread syzbot
syzbot has bisected this bug to: commit 162f812f23bab583f5d514ca0e4df67797ac9cdf Author: Loic Poulain Date: Mon Sep 19 14:29:27 2016 + Bluetooth: hci_uart: Add Marvell support bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=112f0a3b20 start commit: 162f812f

Re: [PATCH 01/25] x86: Make SMAP 64-bit only

2019-03-21 Thread Linus Torvalds
On Thu, Mar 21, 2019 at 10:25 AM Denys Vlasenko wrote: > > > > > But iirc pushf/popf isn't really that expensive - in fact I think it's > > pretty cheap when system flags don't change. > > I did not see evidence of this. In my testing, > POPF is always ~20 cycles, even if popped flags are

Re: [RFC][PATCH] tracing/x86: Save CR2 before tracing irqsoff on error_entry

2019-03-21 Thread Andy Lutomirski
On Thu, Mar 21, 2019 at 11:19 AM Linus Torvalds wrote: > > On Thu, Mar 21, 2019 at 11:05 AM Andy Lutomirski wrote: > > > > In the long run, I think the right solution is to rewrite even more of > > this mess in C. We really ought to be able to put the IRQ flag > > tracing and the context

Re: [PATCH 1/8] perf/x86/intel: Fix memory corruption

2019-03-21 Thread Peter Zijlstra
On Thu, Mar 21, 2019 at 06:17:01PM +0100, Thomas Gleixner wrote: > On Thu, 21 Mar 2019, Peter Zijlstra wrote: > > On Thu, Mar 21, 2019 at 05:45:41PM +0100, Thomas Gleixner wrote: > > > On Thu, 21 Mar 2019, Peter Zijlstra wrote: > > > > Subject: perf/x86/intel: Initialize TFA MSR > > > > > > > >

Re: [PATCH 01/25] x86: Make SMAP 64-bit only

2019-03-21 Thread hpa
On March 21, 2019 10:25:05 AM PDT, Denys Vlasenko wrote: >On 3/18/19 7:10 PM, Linus Torvalds wrote: >> On Mon, Mar 18, 2019 at 10:51 AM Peter Zijlstra > wrote: >>> >>> How about I do a patch that schedules EFLAGS for both 32bit and >64bit, >>> mark this for backporting to infinity. >>> >>> And

panic from iwl_mvm_vif_dbgfs_register with 5.0

2019-03-21 Thread Laura Abbott
Hi, Fedora got a bug report of a panic with kernels > 5.0: Mar 20 10:52:38 kernel: BUG: unable to handle kernel NULL pointer dereference at 0043 Mar 20 10:52:38 kernel: #PF error: [normal kernel read fault] Mar 20 10:52:38 kernel: PGD 8003de1d7067 P4D 8003de1d7067 PUD

Re: Stable patches that don't apply to older kernels and how to get them

2019-03-21 Thread David Sterba
On Thu, Mar 21, 2019 at 05:39:41PM +0100, Greg KH wrote: > On Thu, Mar 21, 2019 at 04:14:14PM +0100, David Sterba wrote: > > Hi, > > > > would it be possible to have a git repository with all patches that are > > submitted to stable@ but don't apply directly? > > > > I get notified by mail,

Re: [RFC][PATCH] tracing/x86: Save CR2 before tracing irqsoff on error_entry

2019-03-21 Thread Linus Torvalds
On Thu, Mar 21, 2019 at 11:05 AM Andy Lutomirski wrote: > > In the long run, I think the right solution is to rewrite even more of > this mess in C. We really ought to be able to put the IRQ flag > tracing and the context tracking into C code. Tangentially about this long run thing - can we

Re: [RFC PATCH v2 1/5] mtd: cfi_cmdset_0002: Add support for polling status register

2019-03-21 Thread Joakim Tjernlund
On Thu, 2019-03-21 at 23:15 +0530, Vignesh Raghavendra wrote: > > HyperFlash devices are compliant with CFI AMD/Fujitsu Extended Command > Set(0x0002) for flash operations, therefore > drivers/mtd/chips/cfi_cmdset_0002.c > can be use as is. But these devices do not support DQ polling method of >

Re: [GIT PULL] fanotify and inotify fixes for v5.1-rc2

2019-03-21 Thread pr-tracker-bot
The pull request you sent on Thu, 21 Mar 2019 09:59:50 +0100: > git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs.git > fsnotify_for_v5.1-rc2 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/7294fbd4416ab29bfb280f4f84ac78c28957c035 Thank you! --

Re: [RFC][PATCH] tracing/x86: Save CR2 before tracing irqsoff on error_entry

2019-03-21 Thread Steven Rostedt
On Thu, 21 Mar 2019 11:05:06 -0700 Andy Lutomirski wrote: > In the long run, I think the right solution is to rewrite even more of > this mess in C. We really ought to be able to put the IRQ flag > tracing and the context tracking into C code. And once we do that, we can work on getting the

Re: [GIT PULL] udf fixes for v5.1-rc2

2019-03-21 Thread pr-tracker-bot
The pull request you sent on Thu, 21 Mar 2019 10:03:38 +0100: > git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs.git > fixes_for_v5.1-rc2 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/0939221e64687f7df9bc6572ace80ff5a90c9794 Thank you! --

Re: [RFC][PATCH] tracing/x86: Save CR2 before tracing irqsoff on error_entry

2019-03-21 Thread Andy Lutomirski
On Thu, Mar 21, 2019 at 10:22 AM Peter Zijlstra wrote: > > On Thu, Mar 21, 2019 at 09:32:42AM -0400, Steven Rostedt wrote: > > On Thu, 21 Mar 2019 11:45:17 +0100 > > Peter Zijlstra wrote: > > > > > - .if \paranoid > > > + .if \read_cr2 > > > + mov %cr2, %rdx /* XXX

Re: [PATCH v2] sched/fair: Limit sched_cfs_period_timer loop to avoid hard lockup

2019-03-21 Thread Peter Zijlstra
On Tue, Mar 19, 2019 at 09:00:05AM -0400, Phil Auld wrote: > sched/fair: Limit sched_cfs_period_timer loop to avoid hard lockup > > With extremely short cfs_period_us setting on a parent task group with a large > number of children the for loop in sched_cfs_period_timer can run until the >

Re: [PATCH v2 0/4] RCU fixes for rcu_assign_pointer() usage

2019-03-21 Thread Peter Zijlstra
On Wed, Mar 20, 2019 at 08:34:22PM -0400, Joel Fernandes (Google) wrote: > This is just a resend with scheduler patches split from the driver fixes and > Paul's Reviewed-by(s) added. > > These patches fix various sparse errors ccaused as a result of the recent > check > to add rcu_check_sparse()

Re: [PATCH 1/8] perf/x86/intel: Fix memory corruption

2019-03-21 Thread Thomas Gleixner
On Thu, 21 Mar 2019, Stephane Eranian wrote: > On Thu, Mar 21, 2019 at 9:45 AM Thomas Gleixner wrote: > > > > On Thu, 21 Mar 2019, Peter Zijlstra wrote: > > > Subject: perf/x86/intel: Initialize TFA MSR > > > > > > Stephane reported that we don't initialize the TFA MSR, which could lead > > > to

[RFC PATCH v2 5/5] mtd: hyperbus: Add driver for TI's Hyperbus memory controller

2019-03-21 Thread Vignesh Raghavendra
Add driver for Hyperbus memory controller on TI's AM654 SoC. Programming IP is pretty simple and provides direct memory mapped access to connected Flash devices. Add basic support for the IP without DMA. Second ChipSelect is not supported for now. Signed-off-by: Vignesh Raghavendra ---

[RFC PATCH v2 3/5] mtd: Add support for Hyperbus memory devices

2019-03-21 Thread Vignesh Raghavendra
Cypress' Hyperbus is Low Signal Count, High Performance Double Data Rate Bus interface between a host system master and one or more slave interfaces. Hyperbus is used to connect microprocessor, microcontroller, or ASIC devices with random access NOR flash memory (called Hyperflash) or self refresh

Re: crypto: Kernel memory overwrite attempt detected to spans multiple pages

2019-03-21 Thread Kees Cook
On Wed, Mar 20, 2019 at 11:57 AM Eric Biggers wrote: > > On Tue, Mar 19, 2019 at 10:09:13AM -0700, Eric Biggers wrote: > > On Tue, Mar 19, 2019 at 12:54:23PM +0100, Geert Uytterhoeven wrote: > > > When running the sha1-asm crypto selftest on arm with > > > CONFIG_HARDENED_USERCOPY_PAGESPAN=y: > >

[RFC PATCH v2 4/5] dt-bindings: mtd: Add bindings for TI's AM654 Hyperbus memory controller

2019-03-21 Thread Vignesh Raghavendra
Add binding documentation for TI's Hyperbus memory controller present on AM654 SoC. Signed-off-by: Vignesh Raghavendra --- .../devicetree/bindings/mtd/ti,am654-hbmc.txt | 27 +++ MAINTAINERS | 1 + 2 files changed, 28 insertions(+) create mode

[RFC PATCH v2 2/5] dt-bindings: mtd: Add binding documentation for Hyperbus memory devices

2019-03-21 Thread Vignesh Raghavendra
Add DT binding documentation for Hyperbus memory devices. Only Hyperflash is supported at the moment. Signed-off-by: Vignesh Raghavendra --- Documentation/devicetree/bindings/mtd/cypress,hyperbus.txt | 6 ++ 1 file changed, 6 insertions(+) create mode 100644

[RFC PATCH v2 1/5] mtd: cfi_cmdset_0002: Add support for polling status register

2019-03-21 Thread Vignesh Raghavendra
HyperFlash devices are compliant with CFI AMD/Fujitsu Extended Command Set(0x0002) for flash operations, therefore drivers/mtd/chips/cfi_cmdset_0002.c can be use as is. But these devices do not support DQ polling method of determining chip ready/good status. These flashes provide Status Register

Re: [PATCH] security/keys/trusted: Allow operation without hardware TPM

2019-03-21 Thread Roberto Sassu
On 3/21/2019 5:30 PM, Dan Williams wrote: On Thu, Mar 21, 2019 at 7:27 AM Roberto Sassu wrote: On 3/21/2019 2:54 PM, Jarkko Sakkinen wrote: On Mon, Mar 18, 2019 at 04:45:13PM -0700, Dan Williams wrote: Rather than fail initialization of the trusted.ko module, arrange for the module to load,

[RFC PATCH v2 0/5] MTD: Add Initial Hyperbus support

2019-03-21 Thread Vignesh Raghavendra
Cypress HyperBus is Low Signal Count, High Performance Double Data Rate Bus interface between a host system master and one or more slave interfaces. HyperBus is used to connect microprocessor, microcontroller, or ASIC devices with random access NOR flash memory(called HyperFlash) or self refresh

Re: [PATCH] tty: fix NULL pointer issue when tty_port ops is not set

2019-03-21 Thread Greg Kroah-Hartman
On Thu, Mar 21, 2019 at 04:43:26PM +0100, Fabien Dessenne wrote: > Unlike 'client_ops' which is initialized to 'default_client_ops', the > port operations 'ops' may be left to NULL. > Check the 'ops' value before checking the 'ops->x' value. > > Signed-off-by: Fabien Dessenne > --- >

[GIT PULL] arm64 updates for 5.1-rc2

2019-03-21 Thread Catalin Marinas
Hi Linus, Please pull the arm64 changes below. It's mostly fixes apart from the kprobe blacklist checking which was deferred because of conflicting with a fix merged after I pinned the arm64 for-next/core branch (f2b3d8566d81 "arm64: kprobe: Always blacklist the KVM world-switch code"). Thanks.

Re: [RFC PATCH 4/8] vfs: Convert pstore to fs_context

2019-03-21 Thread Kees Cook
On Thu, Mar 21, 2019 at 10:03 AM David Howells wrote: > > Kees Cook wrote: > > > Why the separation between parse and apply now? Is this due to the > > reconfigure calls? (i.e. why not call pstore_set_kmsg_bytes() in > > pstore_parse_param()? > > Because parameter parsing is now done up front,

Re: Stable patches that don't apply to older kernels and how to get them

2019-03-21 Thread Greg KH
On Thu, Mar 21, 2019 at 05:39:41PM +0100, Greg KH wrote: > On Thu, Mar 21, 2019 at 04:14:14PM +0100, David Sterba wrote: > > Hi, > > > > would it be possible to have a git repository with all patches that are > > submitted to stable@ but don't apply directly? > > > > I get notified by mail,

Re: INFO: rcu detected stall in ext4_file_write_iter

2019-03-21 Thread syzbot
Bisection is inconclusive: the bug happens on the oldest tested release. bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=17b1becf20 start commit: [unknown git tree: upstream final crash:https://syzkaller.appspot.com/x/report.txt?x=1471becf20 console output:

Re: WARNING: syz-executor still has locks held!

2019-03-21 Thread Oleg Nesterov
On 03/20, Michal Hocko wrote: > > So we need > freezable_schedule_unsafe unsafe here to workaround the original problem > and do not trigger the warning. Yes, but note the comment above freezable_schedule_unsafe() ;) that is why I didn't even try to suggest to use _unsafe() instead of reverting.

Re: [RFC PATCH] mm: mempolicy: remove MPOL_MF_LAZY

2019-03-21 Thread Yang Shi
On 3/21/19 9:51 AM, Michal Hocko wrote: On Thu 21-03-19 09:21:39, Yang Shi wrote: On 3/21/19 7:57 AM, Michal Hocko wrote: On Wed 20-03-19 08:27:39, Yang Shi wrote: MPOL_MF_LAZY was added by commit b24f53a0bea3 ("mm: mempolicy: Add MPOL_MF_LAZY"), then it was disabled by commit

Re: [PATCH 01/25] x86: Make SMAP 64-bit only

2019-03-21 Thread Denys Vlasenko
On 3/18/19 7:10 PM, Linus Torvalds wrote: On Mon, Mar 18, 2019 at 10:51 AM Peter Zijlstra wrote: How about I do a patch that schedules EFLAGS for both 32bit and 64bit, mark this for backporting to infinity. And then at the end, after the objtool-ac bits land, I do a patch removing the EFLAGS

Re: [PATCH 1/8] perf/x86/intel: Fix memory corruption

2019-03-21 Thread Stephane Eranian
On Thu, Mar 21, 2019 at 9:45 AM Thomas Gleixner wrote: > > On Thu, 21 Mar 2019, Peter Zijlstra wrote: > > Subject: perf/x86/intel: Initialize TFA MSR > > > > Stephane reported that we don't initialize the TFA MSR, which could lead > > to trouble if the RESET value is not 0 or on kexec. > > That

Re: [RFC][PATCH] tracing/x86: Save CR2 before tracing irqsoff on error_entry

2019-03-21 Thread Linus Torvalds
On Thu, Mar 21, 2019 at 6:55 AM Steven Rostedt wrote: > > Looks to be an issue with the save_stack_trace_user() not checking if > the address is canonical before reading it. I guess access_ok() doesn't > check that. access_ok() definitely does check for non-canonical. But it only does so when

Re: [RFC][PATCH] tracing/x86: Save CR2 before tracing irqsoff on error_entry

2019-03-21 Thread Peter Zijlstra
On Thu, Mar 21, 2019 at 09:32:42AM -0400, Steven Rostedt wrote: > On Thu, 21 Mar 2019 11:45:17 +0100 > Peter Zijlstra wrote: > > > - .if \paranoid > > + .if \read_cr2 > > + mov %cr2, %rdx /* XXX paravirt crap */ > > + .endif > > + > > I'm guessing this breaks

Re: [PATCH v4] lib/string.c: implement a basic bcmp

2019-03-21 Thread Nick Desaulniers
On Thu, Mar 21, 2019 at 10:02 AM Nick Desaulniers wrote: > > On Wed, Mar 20, 2019 at 7:11 PM Andrew Morton > wrote: > > I guess we should backport this into -stable so that older kernels can > > be built with newer Clang. > > Ah, you're right. I always forget. Is it too late to add > > Cc:

[PATCH v5 6/8] scsi: ufs: qcom: Expose the reset controller for PHY

2019-03-21 Thread Evan Green
Expose a reset controller that the phy will later use to control its own PHY reset in the UFS controller. This will enable the combining of PHY init functionality into a single function. Signed-off-by: Evan Green Reviewed-by: Stephen Boyd --- Note: The remaining changes in this series need

[PATCH v5 5/8] arm64: dts: msm8996: Add UFS PHY reset controller

2019-03-21 Thread Evan Green
Add the reset controller for the UFS controller, and wire it up so that the UFS PHY can initialize itself without relying on implicit sequencing between the two drivers. Signed-off-by: Evan Green Reviewed-by: Stephen Boyd --- Changes in v5: None Changes in v4: None Changes in v3: None Changes

[PATCH v5 3/8] dt-bindings: phy: qcom-ufs: Add resets property

2019-03-21 Thread Evan Green
Add a resets property to the PHY that represents the PHY reset register in the UFS controller itself. This better describes the complete specification of the PHY, and allows the PHY to perform its initialization in a single function, rather than relying on back-channel sequencing of initialization

[PATCH v5 1/8] dt-bindings: ufs: Add #reset-cells for Qualcomm controllers

2019-03-21 Thread Evan Green
Enable Qualcomm UFS controllers to expose the PHY reset via a reset controller. Signed-off-by: Evan Green Reviewed-by: Rob Herring Reviewed-by: Stephen Boyd --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None

<    1   2   3   4   5   6   7   8   9   >