Re: [PATCH net-next 1/3] bpf: introduce current->pid, tgid, uid, gid, comm accessors

2015-06-12 Thread Andy Lutomirski
On Fri, Jun 12, 2015 at 3:44 PM, Alexei Starovoitov wrote: > On 6/12/15 3:08 PM, Andy Lutomirski wrote: >> >> On Fri, Jun 12, 2015 at 2:40 PM, Alexei Starovoitov >> wrote: >>> >>> eBPF programs attached to kprobes need to filter based on >>> current->pid, uid and other fields, so introduce helper

Re: [PATCH 06/12] x86/mm: Enable and use the arch_pgd_init_late() method

2015-06-12 Thread Oleg Nesterov
On 06/13, Oleg Nesterov wrote: > > Afaics, we need to ensure that: > > > + if (pgd_val(*pgd_src)) > > + WRITE_ONCE(*pgd_dst, *pgd_src); > > either we notice the recent update of this PGD, or (say) the subsequent > sync_global_pgds() can miss the child. a

Re: [PATCH v2 2/2] locking/qrwlock: Don't contend with readers when setting _QW_WAITING

2015-06-12 Thread Waiman Long
On 06/12/2015 04:45 AM, Ingo Molnar wrote: * Waiman Long wrote: Mind posting the microbenchmark? I have attached the tool that I used for testing. Thanks, that's interesting! Btw., we could also do something like this in user-space, in tools/perf/bench/, we have no 'perf bench locking' sub

Re: [PATCH 1/1] PCI: X-Gene: Disable Configuration Request Retry Status for X-Gene v1 PCIe

2015-06-12 Thread Bjorn Helgaas
On Fri, Jun 12, 2015 at 5:10 PM, Duc Dang wrote: > Hi Bjorn, > > On Fri, Jun 12, 2015 at 2:59 PM, Bjorn Helgaas wrote: >> Hi Duc, >> >> On Thu, Jun 11, 2015 at 01:08:14PM -0700, Duc Dang wrote: >>> X-Gene v1 PCIe controller has a bug in Configuration Request Retry >>> Status (CRS) logic: >>> Wh

Re: [Xen-devel] RIP MTRR - status update for upcoming v4.2

2015-06-12 Thread Andy Lutomirski
On Jun 12, 2015 12:59 AM, "Jan Beulich" wrote: > > >>> On 12.06.15 at 01:23, wrote: > > There are two usages on MTRRs: > > 1) MTRR entries set by firmware > > 2) MTRR entries set by OS drivers > > > > We can obsolete 2), but we have no control over 1). As UEFI firmwares > > also set this up, t

Re: [PATCH v2 3/4] x86, mwaitt: introduce mwaix delay with a configurable timer

2015-06-12 Thread Andy Lutomirski
On Jun 12, 2015 1:43 AM, "Borislav Petkov" wrote: > > On Tue, Jun 09, 2015 at 09:46:52AM -0700, Andy Lutomirski wrote: > > I don't like this hack. The compiler is entirely within is rights to > > poke addr's cacheline (i.e. the stack) between the two instructions. > > I'd suggest either making th

Re: [PATCH 02/12] x86/mm/hotplug: Remove pgd_list use from the memory hotplug code

2015-06-12 Thread Oleg Nesterov
On 06/11, Ingo Molnar wrote: > > void sync_global_pgds(unsigned long start, unsigned long end, int removed) > { > @@ -169,29 +169,33 @@ void sync_global_pgds(unsigned long start, unsigned > long end, int removed) > > for (address = start; address <= end; address += PGDIR_SIZE) { >

lånetilbud

2015-06-12 Thread SUN EAST FEDERAL CREDIT UNION
Hallo Hilsen fra SUN EAST Federal Credit Union, er vi godt etablert og godkjent britiske lån selskaper, i løpet av årene har vi utviklet en god forståelse av dine behov og individuelle behov. vi forpliktet oss til å behandle våre kunder rettferdig og tilbyr en tjeneste som er profesjonell og

Re: [PATCH net-next 1/3] bpf: introduce current->pid, tgid, uid, gid, comm accessors

2015-06-12 Thread Alexei Starovoitov
On 6/12/15 3:54 PM, Andy Lutomirski wrote: On Fri, Jun 12, 2015 at 3:44 PM, Alexei Starovoitov wrote: On 6/12/15 3:08 PM, Andy Lutomirski wrote: On Fri, Jun 12, 2015 at 2:40 PM, Alexei Starovoitov wrote: eBPF programs attached to kprobes need to filter based on current->pid, uid and other

Re: [PATCH v2 6/6] regulator: qcom-spmi: Add vendor specific configuration

2015-06-12 Thread Stephen Boyd
On 06/11/2015 08:13 PM, Rob Herring wrote: > On Thu, Jun 11, 2015 at 7:37 PM, Stephen Boyd wrote: >> Add support for over current protection (OCP), pin control >> selection, soft start and soft start strength, auto-mode, input >> current limiting, and pull down. >> >> Cc: >> Signed-off-by: Stephe

Re: [PATCH] x86/asm/entry/32: Slightly better handling of syscall errors in auditing

2015-06-12 Thread Andy Lutomirski
On Thu, Jun 11, 2015 at 4:47 AM, Denys Vlasenko wrote: > "setbe %al" insn has a register merge stall: it needs to combine > previous %eax value with new value for the lowest byte. > Subsequent "movzbl %al,%edi" in turn depends on its completion. > > This patch replaces "setbe %al + movzbl %al,%edi

Re: [PATCH net-next 1/3] bpf: introduce current->pid, tgid, uid, gid, comm accessors

2015-06-12 Thread Andy Lutomirski
On Fri, Jun 12, 2015 at 4:23 PM, Alexei Starovoitov wrote: > On 6/12/15 3:54 PM, Andy Lutomirski wrote: >> >> On Fri, Jun 12, 2015 at 3:44 PM, Alexei Starovoitov >> wrote: >>> >>> On 6/12/15 3:08 PM, Andy Lutomirski wrote: On Fri, Jun 12, 2015 at 2:40 PM, Alexei Starovoitov w

Re: [PATCH 3/5] x86/asm/entry/32: Shorten __audit_syscall_entry args preparation

2015-06-12 Thread Andy Lutomirski
On Jun 9, 2015 11:21 PM, "Ingo Molnar" wrote: > > > * Denys Vlasenko wrote: > > > We use three MOVs to swap edx and ecx. We can use one XCHG instead. > > > > Expand the comments. It's difficult to keep track which arg# every register > > corresponds to, so spell it out. > > > + /* > > +

Re: [PATCH v4] seccomp: add ptrace options for suspend/resume

2015-06-12 Thread Andy Lutomirski
On Wed, Jun 10, 2015 at 1:18 PM, Kees Cook wrote: > On Wed, Jun 10, 2015 at 10:20 AM, Andy Lutomirski wrote: >> On Wed, Jun 10, 2015 at 9:31 AM, Oleg Nesterov wrote: >>> On 06/09, Andy Lutomirski wrote: On Tue, Jun 9, 2015 at 5:49 PM, Tycho Andersen > > @@ -556,6 +556,15 @@ s

Re: [Xen-devel] RIP MTRR - status update for upcoming v4.2

2015-06-12 Thread James Bottomley
On Fri, 2015-06-12 at 16:15 -0700, Andy Lutomirski wrote: > On Jun 12, 2015 12:59 AM, "Jan Beulich" wrote: > > > > >>> On 12.06.15 at 01:23, wrote: > > > There are two usages on MTRRs: > > > 1) MTRR entries set by firmware > > > 2) MTRR entries set by OS drivers > > > > > > We can obsolete 2),

Re: [PATCH v4] seccomp: add ptrace options for suspend/resume

2015-06-12 Thread Kees Cook
On Fri, Jun 12, 2015 at 4:27 PM, Andy Lutomirski wrote: > On Wed, Jun 10, 2015 at 1:18 PM, Kees Cook wrote: >> On Wed, Jun 10, 2015 at 10:20 AM, Andy Lutomirski >> wrote: >>> On Wed, Jun 10, 2015 at 9:31 AM, Oleg Nesterov wrote: On 06/09, Andy Lutomirski wrote: > > On Tue, Jun 9,

lånetilbud

2015-06-12 Thread SUN EAST FEDERAL CREDIT UNION
Hallo Hilsen fra SUN EAST Federal Credit Union, er vi godt etablert og godkjent britiske lån selskaper, i løpet av årene har vi utviklet en god forståelse av dine behov og individuelle behov. vi forpliktet oss til å behandle våre kunder rettferdig og tilbyr en tjeneste som er profesjonell og

Re: [PATCH 07/12] x86/virt/guest/xen: Remove use of pgd_list from the Xen guest code

2015-06-12 Thread Oleg Nesterov
On 06/12, Boris Ostrovsky wrote: > > On 06/12/2015 04:53 PM, Oleg Nesterov wrote: >>> >>> for_each_process(p) { >>> >>> for_each_thread(p, t) { >>> if (t->mm) { >>> do_something(t->mm); >>> break; >>>

Re: [PATCH net-next 1/3] bpf: introduce current->pid, tgid, uid, gid, comm accessors

2015-06-12 Thread Alexei Starovoitov
On 6/12/15 4:25 PM, Andy Lutomirski wrote: It's a dangerous tool. Also, shouldn't the returned uid match the namespace of the task that installed the probe, not the task that's being probed? so leaking info to unprivileged apps is the concern? The whole thing is for root only as you know. The

[PATCH 00/17] x86/tsc: Clean up rdtsc helpers

2015-06-12 Thread Andy Lutomirski
After the some recent threads about rdtsc barriers, I remembered that our RDTSC wrappers are a big mess. Let's clean it up. Currently we have rdtscl, rdtscll, native_read_tsc, paravirt_read_tsc, and rdtsc_barrier. For people who haven't noticed rdtsc_barrier and who haven't carefully read the do

[PATCH 10/17] input/joystick/analog: Switch from rdtscl() to native_read_tsc()

2015-06-12 Thread Andy Lutomirski
This timing code is hideous, and this doesn't help. It gets rid of one of the last users of rdtscl, though. Cc: Dmitry Torokhov Cc: linux-in...@vger.kernel.org Signed-off-by: Andy Lutomirski --- drivers/input/joystick/analog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --g

[PATCH 04/17] x86/tsc: Remove the rdtscp and rdtscpll macros

2015-06-12 Thread Andy Lutomirski
They have no users. Leave native_read_tscp, which seems potentially useful despite also having no callers. Signed-off-by: Andy Lutomirski --- arch/x86/include/asm/msr.h | 9 - arch/x86/include/asm/paravirt.h | 16 2 files changed, 25 deletions(-) diff --git a/arc

[PATCH 16/17] x86/tsc: Use rdtsc_unordered() in check_tsc_warp()

2015-06-12 Thread Andy Lutomirski
Using get_cycles was unnecessary: check_tsc_warp() is not called on TSC-less systems. Replace barrier_before_rdtsc(); get_cycles() with rdtsc_ordered(). While we're at it, make the somewhat more dangerous change of removing barrier_before_rdtsc after RDTSC in the TSC warp check code. This should

[PATCH 17/17] x86/tsc: In read_tsc, use rdtsc_ordered() instead of get_cycles()

2015-06-12 Thread Andy Lutomirski
There are two logical changes here. First, this removes a check for cpu_has_tsc. That check is unnecessary, as we don't register the TSC as a clocksource on systems that have no TSC. Second, it adds a barrier, thus preventing observable non-monotonicity. I suspect that the missing barrier was n

[PATCH 11/17] drivers/input/gameport: Replace rdtscl() with native_read_tsc()

2015-06-12 Thread Andy Lutomirski
It's unclear to me why this code exists in the first place. Cc: Dmitry Torokhov Cc: linux-in...@vger.kernel.org Signed-off-by: Andy Lutomirski --- drivers/input/gameport/gameport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/gameport/gameport.c b/drive

[PATCH 15/17] x86: Add rdtsc_ordered() and use it in trivial call sites

2015-06-12 Thread Andy Lutomirski
barrier_before_rdtsc(); rdtsc_unordered() is an unnecessary mouthful and requires more thought than should be necessary. Add an rdtsc_ordered() helper and replace the trivial call sites with it. This should not change generated code. Signed-off-by: Andy Lutomirski --- arch/x86/entry/vdso/vcloc

[PATCH 16/17] x86/tsc: Use rdtsc_ordered() in check_tsc_warp() and drop extra barriers

2015-06-12 Thread Andy Lutomirski
Using get_cycles was unnecessary: check_tsc_warp() is not called on TSC-less systems. Replace barrier_before_rdtsc(); get_cycles() with rdtsc_ordered(). While we're at it, make the somewhat more dangerous change of removing barrier_before_rdtsc after RDTSC in the TSC warp check code. This should

Re: [PATCH V3 4/4] acpi, apei: use EFI memmap to map GHES memory

2015-06-12 Thread Zhang, Jonathan Zhixiong
On 6/12/2015 9:29 AM, Borislav Petkov wrote: On Thu, Jun 11, 2015 at 11:26:00AM -0700, Jonathan (Zhixiong) Zhang wrote: From: "Jonathan (Zhixiong) Zhang" With ACPI APEI firmware first handling, generic hardware error record is updated by firmware in GHES memory region. When firmware updated

[PATCH 13/17] x86/tsc: Rename native_read_tsc() to rdtsc_unordered()

2015-06-12 Thread Andy Lutomirski
Now that there is no paravirt TSC, the "native" is inappropriate. The fact that rdtsc is not ordered can catch people by surprise, so call it rdtsc_unordered(). Signed-off-by: Andy Lutomirski --- arch/x86/boot/compressed/aslr.c | 2 +- arch/x86/entry/vdso/vclock_gettime.c

[PATCH 14/17] x86/tsc: Move rdtsc_barrier() and rename it to barrier_before_rdtsc()

2015-06-12 Thread Andy Lutomirski
rdtsc_barrier() (i.e. MFENCE or LFENCE depending on vendor) is supported by the docs as a barrier immediately before RDTSC. There is neither empirical evidence that it's needed at all after RDTSC nor is there any reason to believe that the type of fence to put after RDTSC (if any) would be the sam

[PATCH 12/17] x86/tsc: Remove rdtscl()

2015-06-12 Thread Andy Lutomirski
It has no more callers, and it was never a very sensible interface to begin with. Users of the TSC should either read all 64 bits or explicitly throw out the high bits. Signed-off-by: Andy Lutomirski --- arch/x86/include/asm/msr.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/x86/i

[PATCH v2 05/17] x86/tsc: Remove the rdtscp and rdtscpll macros

2015-06-12 Thread Andy Lutomirski
They have no users. Leave native_read_tscp, which seems potentially useful despite also having no callers. Signed-off-by: Andy Lutomirski --- arch/x86/include/asm/msr.h | 9 - 1 file changed, 9 deletions(-) diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h index 7273

[PATCH v2 07/17] x86/cpu/amd: Use the full 64-bit TSC to detect the 2.6.2 bug

2015-06-12 Thread Andy Lutomirski
This code is timing 100k indirect calls, so the added overhead of counting the number of cycles elapsed as a 64-bit number should be insignificant. Drop the optimization of using a 32-bit count. Signed-off-by: Andy Lutomirski --- arch/x86/kernel/cpu/amd.c | 6 +++--- 1 file changed, 3 insertion

[PATCH v2 11/17] drivers/input/gameport: Replace rdtscl() with native_read_tsc()

2015-06-12 Thread Andy Lutomirski
It's unclear to me why this code exists in the first place. Cc: Dmitry Torokhov Cc: linux-in...@vger.kernel.org Signed-off-by: Andy Lutomirski --- drivers/input/gameport/gameport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/gameport/gameport.c b/drive

[PATCH v2 16/17] x86/tsc: Use rdtsc_ordered() in check_tsc_warp() and drop extra barriers

2015-06-12 Thread Andy Lutomirski
Using get_cycles was unnecessary: check_tsc_warp() is not called on TSC-less systems. Replace barrier_before_rdtsc(); get_cycles() with rdtsc_ordered(). While we're at it, make the somewhat more dangerous change of removing barrier_before_rdtsc after RDTSC in the TSC warp check code. This should

[PATCH v2 17/17] x86/tsc: In read_tsc, use rdtsc_ordered() instead of get_cycles()

2015-06-12 Thread Andy Lutomirski
There are two logical changes here. First, this removes a check for cpu_has_tsc. That check is unnecessary, as we don't register the TSC as a clocksource on systems that have no TSC. Second, it adds a barrier, thus preventing observable non-monotonicity. I suspect that the missing barrier was n

[PATCH v2 12/17] x86/tsc: Remove rdtscl()

2015-06-12 Thread Andy Lutomirski
It has no more callers, and it was never a very sensible interface to begin with. Users of the TSC should either read all 64 bits or explicitly throw out the high bits. Signed-off-by: Andy Lutomirski --- arch/x86/include/asm/msr.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/x86/i

[PATCH v2 14/17] x86/tsc: Move rdtsc_barrier() and rename it to barrier_before_rdtsc()

2015-06-12 Thread Andy Lutomirski
rdtsc_barrier() (i.e. MFENCE or LFENCE depending on vendor) is supported by the docs as a barrier immediately before RDTSC. There is neither empirical evidence that it's needed at all after RDTSC nor is there any reason to believe that the type of fence to put after RDTSC (if any) would be the sam

Re: [PATCH] staging: comedi: replace ENOSYS by proper error codes

2015-06-12 Thread Greg KH
On Fri, Jun 12, 2015 at 03:26:26PM -0700, Greg KH wrote: > On Fri, Jun 12, 2015 at 10:06:16PM +0100, One Thousand Gnomes wrote: > > On Fri, 12 Jun 2015 13:43:27 -0700 > > Greg KH wrote: > > > > > On Fri, Jun 12, 2015 at 10:20:38PM +0200, julien.de...@gmail.com wrote: > > > > From: Julien Dehee >

[PATCH v2 15/17] x86: Add rdtsc_ordered() and use it in trivial call sites

2015-06-12 Thread Andy Lutomirski
barrier_before_rdtsc(); rdtsc_unordered() is an unnecessary mouthful and requires more thought than should be necessary. Add an rdtsc_ordered() helper and replace the trivial call sites with it. This should not change generated code. Signed-off-by: Andy Lutomirski --- arch/x86/entry/vdso/vcloc

[PATCH v2 13/17] x86/tsc: Rename native_read_tsc() to rdtsc_unordered()

2015-06-12 Thread Andy Lutomirski
Now that there is no paravirt TSC, the "native" is inappropriate. The fact that rdtsc is not ordered can catch people by surprise, so call it rdtsc_unordered(). Signed-off-by: Andy Lutomirski --- arch/x86/boot/compressed/aslr.c | 2 +- arch/x86/entry/vdso/vclock_gettime.c

Re: [PATCH net-next 1/3] bpf: introduce current->pid, tgid, uid, gid, comm accessors

2015-06-12 Thread Andy Lutomirski
On Fri, Jun 12, 2015 at 4:38 PM, Alexei Starovoitov wrote: > On 6/12/15 4:25 PM, Andy Lutomirski wrote: >> >> It's a dangerous tool. Also, shouldn't the returned uid match the >> namespace of the task that installed the probe, not the task that's >> being probed? > > > so leaking info to unprivil

[PATCH v2 06/17] x86/tsc: Use the full 64-bit tsc in tsc_delay

2015-06-12 Thread Andy Lutomirski
As a very minor optimization, tsc_delay was only using the low 32 bits of the TSC. It's a delay function, so just use the whole thing. Signed-off-by: Andy Lutomirski --- arch/x86/lib/delay.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/lib/delay.c b/arch/

[PATCH v2 09/17] staging/lirc_serial: Remove TSC-based timing

2015-06-12 Thread Andy Lutomirski
It wasn't compiled in by default. I suspect that the driver was and still is broken, though -- it's calling udelay with a parameter that's derived from loops_per_jiffy. Cc: Jarod Wilson Cc: de...@driverdev.osuosl.org Cc: Greg Kroah-Hartman Signed-off-by: Andy Lutomirski --- drivers/staging/me

[PATCH v2 10/17] input/joystick/analog: Switch from rdtscl() to native_read_tsc()

2015-06-12 Thread Andy Lutomirski
This timing code is hideous, and this doesn't help. It gets rid of one of the last users of rdtscl, though. Cc: Dmitry Torokhov Cc: linux-in...@vger.kernel.org Signed-off-by: Andy Lutomirski --- drivers/input/joystick/analog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --g

[PATCH v2 04/17] x86/tsc: Replace rdtscll with native_read_tsc

2015-06-12 Thread Andy Lutomirski
Now that the read_tsc paravirt hook is gone, rdtscll() is just a wrapper around native_read_tsc(). Unwrap it. Signed-off-by: Andy Lutomirski --- arch/x86/boot/compressed/aslr.c | 2 +- arch/x86/include/asm/msr.h | 3 --- arch/x86/include/asm/tsc.h

[PATCH v2 08/17] baycom_epp: Replace rdtscl() with native_read_tsc()

2015-06-12 Thread Andy Lutomirski
This is only used if BAYCOM_DEBUG is defined. Cc: Thomas Sailer Cc: linux-h...@vger.kernel.org Signed-off-by: Andy Lutomirski --- drivers/net/hamradio/baycom_epp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/bayco

Re: [PATCH V3 1/4] x86: acpi: define uncached page flag

2015-06-12 Thread Zhang, Jonathan Zhixiong
On 6/12/2015 12:52 AM, Ingo Molnar wrote: * Jonathan (Zhixiong) Zhang wrote: From: "Jonathan (Zhixiong) Zhang" This definition is used in APEI code when needing to map pages as uncached. Signed-off-by: Jonathan (Zhixiong) Zhang --- arch/x86/include/asm/acpi.h | 4 1 file changed

[PATCH v2 02/17] x86/msr/kvm: Remove vget_cycles()

2015-06-12 Thread Andy Lutomirski
The only caller was kvm's read_tsc. The only difference between vget_cycles and native_read_tsc was that vget_cycles returned zero instead of crashing on TSC-less systems. KVM's already checks vclock_mode before calling that function, so the extra check is unnecessary. (Off-topic, but the whole

[PATCH v2 03/17] x86/tsc/paravirt: Remove the read_tsc and read_tscp paravirt hooks

2015-06-12 Thread Andy Lutomirski
We've had read_tsc and read_tscp paravirt hooks since the very beginning of paravirt, i.e., d3561b7fa0fb ("[PATCH] paravirt: header and stubs for paravirtualisation"). AFAICT the only paravirt guest implementation that ever replaced these calls was vmware, and it's gone. Arguably even vmware shou

[PATCH v2 01/17] x86/tsc: Inline native_read_tsc and remove __native_read_tsc

2015-06-12 Thread Andy Lutomirski
In cdc7957d1954 ("x86: move native_read_tsc() offline"), native_read_tsc was moved out of line, presumably for some now-obsolete vDSO-related reason. Undo it. The entire rdtsc, shl, or sequence is only 11 bytes, and calls via rdtscl and similar helpers were already inlined. Signed-off-by: Andy L

[PATCH v2 00/17] x86/tsc: Clean up rdtsc helpers

2015-06-12 Thread Andy Lutomirski
My sincere apologies for the spam. I send an unholy mixture of the real patch set and an old poorly split-up patch set, and the result is incomprehensible. Here's what I meant to send. After the some recent threads about rdtsc barriers, I remembered that our RDTSC wrappers are a big mess. Let's

[PATCH 07/17] x86/cpu/amd: Use the full 64-bit TSC to detect the 2.6.2 bug

2015-06-12 Thread Andy Lutomirski
This code is timing 100k indirect calls, so the added overhead of counting the number of cycles elapsed as a 64-bit number should be insignificant. Drop the optimization of using a 32-bit count. Signed-off-by: Andy Lutomirski --- arch/x86/kernel/cpu/amd.c | 6 +++--- 1 file changed, 3 insertion

[PATCH 09/17] staging/lirc_serial: Remove TSC-based timing

2015-06-12 Thread Andy Lutomirski
It wasn't compiled in by default. I suspect that the driver was and still is broken, though -- it's calling udelay with a parameter that's derived from loops_per_jiffy. Cc: Jarod Wilson Cc: de...@driverdev.osuosl.org Cc: Greg Kroah-Hartman Signed-off-by: Andy Lutomirski --- drivers/staging/me

[PATCH 08/17] baycom_epp: Replace rdtscl() with native_read_tsc()

2015-06-12 Thread Andy Lutomirski
This is only used if BAYCOM_DEBUG is defined. Cc: Thomas Sailer Cc: linux-h...@vger.kernel.org Signed-off-by: Andy Lutomirski --- drivers/net/hamradio/baycom_epp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/bayco

[PATCH 06/17] x86/tsc: Use the full 64-bit tsc in tsc_delay

2015-06-12 Thread Andy Lutomirski
As a very minor optimization, tsc_delay was only using the low 32 bits of the TSC. It's a delay function, so just use the whole thing. Signed-off-by: Andy Lutomirski --- arch/x86/lib/delay.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/lib/delay.c b/arch/

[PATCH 03/17] x86/tsc: Replace rdtscll with native_read_tsc

2015-06-12 Thread Andy Lutomirski
rdtscll() was a wrapper around native_read_tsc(). Unwrap it. Signed-off-by: Andy Lutomirski --- arch/x86/boot/compressed/aslr.c | 2 +- arch/x86/include/asm/msr.h | 3 --- arch/x86/include/asm/paravirt.h | 2 -- arch/x86/includ

[PATCH 04/17] x86/tsc: Replace rdtscll with native_read_tsc

2015-06-12 Thread Andy Lutomirski
Now that the read_tsc paravirt hook is gone, rdtscll() is just a wrapper around native_read_tsc(). Unwrap it. Signed-off-by: Andy Lutomirski --- arch/x86/boot/compressed/aslr.c | 2 +- arch/x86/include/asm/msr.h | 3 --- arch/x86/include/asm/tsc.h

[PATCH 05/17] x86/tsc: Remove the rdtscp and rdtscpll macros

2015-06-12 Thread Andy Lutomirski
They have no users. Leave native_read_tscp, which seems potentially useful despite also having no callers. Signed-off-by: Andy Lutomirski --- arch/x86/include/asm/msr.h | 9 - 1 file changed, 9 deletions(-) diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h index 7273

[PATCH 05/17] x86/tsc/paravirt: Remove the read_tsc and read_tscp paravirt hooks

2015-06-12 Thread Andy Lutomirski
We've had read_tsc and read_tscp paravirt hooks since the very beginning of paravirt, i.e., d3561b7fa0fb ("[PATCH] paravirt: header and stubs for paravirtualisation"). AFAICT the only paravirt guest implementation that ever replaced these calls was vmware, and it's gone. Arguably even vmware shou

[PATCH 03/17] x86/tsc/paravirt: Remove the read_tsc and read_tscp paravirt hooks

2015-06-12 Thread Andy Lutomirski
We've had read_tsc and read_tscp paravirt hooks since the very beginning of paravirt, i.e., d3561b7fa0fb ("[PATCH] paravirt: header and stubs for paravirtualisation"). AFAICT the only paravirt guest implementation that ever replaced these calls was vmware, and it's gone. Arguably even vmware shou

[PATCH 02/17] x86/msr/kvm: Remove vget_cycles()

2015-06-12 Thread Andy Lutomirski
The only caller was kvm's read_tsc. The only difference between vget_cycles and native_read_tsc was that vget_cycles returned zero instead of crashing on TSC-less systems. KVM's already checks vclock_mode before calling that function, so the extra check is unnecessary. (Off-topic, but the whole

[PATCH 01/17] x86/tsc: Inline native_read_tsc and remove __native_read_tsc

2015-06-12 Thread Andy Lutomirski
In cdc7957d1954 ("x86: move native_read_tsc() offline"), native_read_tsc was moved out of line, presumably for some now-obsolete vDSO-related reason. Undo it. The entire rdtsc, shl, or sequence is only 11 bytes, and calls via rdtscl and similar helpers were already inlined. Signed-off-by: Andy L

Re: [PATCH net-next 1/3] bpf: introduce current->pid, tgid, uid, gid, comm accessors

2015-06-12 Thread Alexei Starovoitov
On 6/12/15 4:47 PM, Andy Lutomirski wrote: On Fri, Jun 12, 2015 at 4:38 PM, Alexei Starovoitov wrote: On 6/12/15 4:25 PM, Andy Lutomirski wrote: It's a dangerous tool. Also, shouldn't the returned uid match the namespace of the task that installed the probe, not the task that's being probed?

[GIT] Networking

2015-06-12 Thread David Miller
1) Fix uninitialized struct station_info in cfg80211_wireless_stats(), from Johannes Berg. 2) Revert commit attempt to fix ipv6 protocol resubmission, it adds regressions. 3) Endless loops can be created in bridge port lists, fix from Nikolay Aleksandrov. 4) Don't WARN_ON() if sk->sk_f

Re: [PATCH V2 01/10] cpu-hotplug: export cpu_hotplug_enable/cpu_hotplug_disable

2015-06-12 Thread Greg KH
On Thu, Jun 04, 2015 at 04:26:07PM -0700, K. Y. Srinivasan wrote: > From: Vitaly Kuznetsov > > Loaded Hyper-V module will use these functions to disable CPU > hotplug under certain circumstances. Convert cpu_hotplug_disabled > to a counter (protected by cpu_add_remove_lock) to support e.g. > disa

Re: [PATCH net-next 1/3] bpf: introduce current->pid, tgid, uid, gid, comm accessors

2015-06-12 Thread Andy Lutomirski
On Fri, Jun 12, 2015 at 4:55 PM, Alexei Starovoitov wrote: > On 6/12/15 4:47 PM, Andy Lutomirski wrote: >> >> On Fri, Jun 12, 2015 at 4:38 PM, Alexei Starovoitov >> wrote: >>> >>> On 6/12/15 4:25 PM, Andy Lutomirski wrote: It's a dangerous tool. Also, shouldn't the returned uid ma

Re: [PATCH] staging: comedi: cb_pcimdas: fix handlers for DI and DO subdevices

2015-06-12 Thread Greg Kroah-Hartman
On Fri, Jun 12, 2015 at 04:37:41PM +0100, Ian Abbott wrote: > Normally, low-level Comedi drivers set an `insn_bits` handler for > digital input (DI), digital output (DO) and digital input/output (DIO) > subdevice types to handle normal reading and writing of digital > channels. The "cb_pcimdas" dr

For your amusement: slightly faster syscalls

2015-06-12 Thread Andy Lutomirski
The SYSCALL prologue starts with SWAPGS immediately followed by a gs-prefixed instruction. I think this causes a pipeline stall. If we instead do: mov %rsp, rsp_scratch(%rip) mov sp0(%rip), %rsp) swapgs ... pushq rsp_scratch(%rip) then we avoid the stall and save about three cycles. Horrible h

Re: [PATCH 1/1] usb: core: lpm: set lpm_capable for root hub device

2015-06-12 Thread Lu, Baolu
On 06/13/2015 01:43 AM, Alan Stern wrote: On Fri, 12 Jun 2015, Lu Baolu wrote: Commit 25cd2882e2fc ("usb/xhci: Change how we indicate a host supports Link PM.") removed the code to set lpm_capable for USB 3.0 super-speed root hub. The intention of that change was to avoid touching usb core in

Re: [PATCH net-next 1/3] bpf: introduce current->pid, tgid, uid, gid, comm accessors

2015-06-12 Thread Alexei Starovoitov
On 6/12/15 5:03 PM, Andy Lutomirski wrote: On Fri, Jun 12, 2015 at 4:55 PM, Alexei Starovoitov wrote: On 6/12/15 4:47 PM, Andy Lutomirski wrote: On Fri, Jun 12, 2015 at 4:38 PM, Alexei Starovoitov wrote: On 6/12/15 4:25 PM, Andy Lutomirski wrote: It's a dangerous tool. Also, shouldn't

Re: [PATCH v4 1/2] staging: ion: Add generic ion-physmem driver

2015-06-12 Thread Greg Kroah-Hartman
On Tue, Jun 09, 2015 at 05:58:24PM +0300, Andrew Andrianov wrote: > This patch adds a generic ion driver that allows > ion heaps to be added via devicetree. It provides > a simple and generic way to feed physical memory regions > to ion without writing a custom driver, e.g. > > ion_sram: ion

Re: [PATCH v4 0/7] staging: fsl-mc: New functionality to the MC bus driver

2015-06-12 Thread Greg KH
On Tue, Jun 09, 2015 at 04:59:01PM -0500, J. German Rivera wrote: > This patch series includes new functionality for the Freescale fsl-mc > bus driver. Why are people working on "new functionality" instead of working on getting this out of the staging tree? I really hate adding new functions to s

Re: [PATCH net-next 1/3] bpf: introduce current->pid, tgid, uid, gid, comm accessors

2015-06-12 Thread Andy Lutomirski
On Fri, Jun 12, 2015 at 5:15 PM, Alexei Starovoitov wrote: > On 6/12/15 5:03 PM, Andy Lutomirski wrote: >> >> On Fri, Jun 12, 2015 at 4:55 PM, Alexei Starovoitov >> wrote: >>> >>> On 6/12/15 4:47 PM, Andy Lutomirski wrote: On Fri, Jun 12, 2015 at 4:38 PM, Alexei Starovoitov w

Re: [PATCH net-next 1/3] bpf: introduce current->pid, tgid, uid, gid, comm accessors

2015-06-12 Thread Alexei Starovoitov
On 6/12/15 5:24 PM, Andy Lutomirski wrote: >so what specifically you proposing? >Use from_kuid(&init_user_ns,...) instead? That seems reasonable to me. After all, you can't install one of these probes from a non-init userns. ok. will respin with that change. -- To unsubscribe from this list:

Re: [PATCHv3 08/16] staging: vme_user: provide DMA functionality

2015-06-12 Thread Greg Kroah-Hartman
On Thu, May 28, 2015 at 03:07:05PM +0300, Dmitry Kalinkin wrote: > This introduces a new dma device that provides a single ioctl call that > provides DMA read and write functionality to the user space. > > Signed-off-by: Dmitry Kalinkin > Cc: Igor Alekseev > --- > drivers/staging/vme/devices/vm

[PATCH] module: add per-module param_lock

2015-06-12 Thread Dan Streetman
Add a "param_lock" mutex to each module, and update params.c to use the correct built-in or module mutex while locking kernel params. Remove the kparam_block_sysfs_r/w() macros, replace them with direct calls to kernel_param_[un]lock(module). The kernel param code currently uses a single mutex to

Re: [PATCHv3 00/16] vme DMA and user space driver improvements

2015-06-12 Thread Greg Kroah-Hartman
On Wed, Jun 10, 2015 at 04:09:19PM +0300, Dmitry Kalinkin wrote: > On Sun, May 31, 2015 at 6:06 AM, Greg Kroah-Hartman > wrote: > > On Thu, May 28, 2015 at 03:06:57PM +0300, Dmitry Kalinkin wrote: > >> The first item in this submission documents previously introduced > >> vme_master_mmap() call. F

Re: [PATCHv3 16/16] vme: provide uapi header

2015-06-12 Thread Greg Kroah-Hartman
On Thu, May 28, 2015 at 03:07:13PM +0300, Dmitry Kalinkin wrote: > This separates VME related constants that are a part of both kernel and > user space API into a common uapi header. Why? We don't want non-userspace things in the uapi header file, that's not needed and just exports things to user

Re: [PATCH V2 0/3] Add RS-485 support and fix RTS/CTS implementation

2015-06-12 Thread Greg KH
On Mon, Jun 08, 2015 at 11:28:13AM +0530, Bhuvanchandra DV wrote: > Hello, > > Ping! > > On 06/01/2015 10:51 AM, Bhuvanchandra DV wrote: 7 days later? Please be patient... -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kern

[PATCH v2 1/1] PCI: X-Gene: Disable Configuration Request Retry Status for X-Gene v1 PCIe

2015-06-12 Thread Duc Dang
X-Gene v1 PCIe controller has a bug in Configuration Request Retry Status (CRS) logic: When CPU tries to read Vendor ID and Device ID of not-existed remote device, the controller returns 0x0001 instead of 0x; this will add significant delay in boot time as pci_bus_read_dev_vendo

Re: [PATCH v2] USB SERIAL: option.c: add 2020:4000 IDs

2015-06-12 Thread Greg Kroah-Hartman
On Fri, Jun 12, 2015 at 09:32:31AM +0200, Claudio Cappelli wrote: > On Wednesday 10 June 2015 20:38:30 Claudio Cappelli wrote: > > From: Claudio Cappelli > > > > Add device Olivetti Olicard 300 (Network Connect: MT6225) - IDs 2020:4000. > > > > Signed-off-by: Claudio Cappelli > > Suggested-by:

Re: Locking issues w/ functionfs gadget and aio?

2015-06-12 Thread John Stultz
On Mon, Jun 8, 2015 at 6:14 PM, John Stultz wrote: > After setting up functionfs for adb w/ 4.1-rc7, I noticed some flakey > behavior. > I enabled some lock debugging and got the following: > > [ 91.648093] read strings > [ 91.650264] g_ffs gadget: g_ffs ready > [ 91.652551] ci_hdrc ci_hdrc

[PATCH V4 0/4] map GHES memory region according to EFI memory map

2015-06-12 Thread Jonathan (Zhixiong) Zhang
From: "Jonathan (Zhixiong) Zhang" On a platform with APEI (ACPI Platform Error Interface) enabled, firmware updates a memory region with hardware error record using nocache attribute. When OS reads the region, since it maps the region with cacahed attribute even though EFI memory map defines this

[PATCH V4 1/4] efi: x86: rearrange efi_mem_attributes()

2015-06-12 Thread Jonathan (Zhixiong) Zhang
From: "Jonathan (Zhixiong) Zhang" x86 and ia64 implement efi_mem_attributes() differently. This function needs to be available for other arch (such as arm64) as well, such as for the purpose of ACPI/APEI. ia64 efi does not setup memmap variable and does not set EFI_MEMMAP flag, so it needs to ha

[PATCH V4 2/4] x86: acpi: add arch_apei_get_mem_attributes()

2015-06-12 Thread Jonathan (Zhixiong) Zhang
From: "Jonathan (Zhixiong) Zhang" ... to allow arch specific implementation of getting page protection type associated with a physical address. If the physical address has memory attributes defined by EFI memmap as EFI_MEMORY_UC, the page protection type is PAGE_KENERL_NOCACHE. Otherwise, the pa

[PATCH V4 4/4] acpi, apei: use appropriate pgprot_t to map GHES memory

2015-06-12 Thread Jonathan (Zhixiong) Zhang
From: "Jonathan (Zhixiong) Zhang" With ACPI APEI firmware first handling, generic hardware error record is updated by firmware in GHES memory region. When firmware updated GHES memory region with uncached access attribute, Linux reads stale data from cache. GHES memory region should be mapped wi

[PATCH V4 3/4] arm64: apei: implement arch_apei_get_mem_attributes()

2015-06-12 Thread Jonathan (Zhixiong) Zhang
From: "Jonathan (Zhixiong) Zhang" If the physical address has memory attributes defined by EFI memmap as EFI_MEMORY_UC, the page protection type is PROT_DEVICE_nGnRE. Otherwise, the page protection type is PAGE_KERNEL. Signed-off-by: Jonathan (Zhixiong) Zhang --- arch/arm64/kernel/Makefile |

Re: perf,ftrace: fuzzer triggers warning in trace_events_filter code

2015-06-12 Thread Vince Weaver
On Fri, 12 Jun 2015, Steven Rostedt wrote: > On Fri, 12 Jun 2015 17:18:22 -0400 (EDT) > Vince Weaver wrote: > > > > > So I've modified my fuzzer to try to exercise the > > PERF_EVENT_IOC_SET_FILTER ioctl() and it is starting to turn up some > > warnings. > > Is there any way to know what the

Re: [PATCH perf/core 1/4] [BUGFIX] perf probe: List probes in stdout

2015-06-12 Thread Masami Hiramatsu
On 2015/06/13 4:12, Arnaldo Carvalho de Melo wrote: > Em Fri, Jun 12, 2015 at 02:08:13PM +0900, Masami Hiramatsu escreveu: >> Since commit 5e17b28f1e24 ("perf probe: Add --quiet option to >> suppress output result message") have replaced printf with pr_info, >> perf probe -l outputs its result in s

Re: [PATCH perf/core 3/4] [BUGFIX] perf probe: Check non-probe-able symbols when using symbol map

2015-06-12 Thread Masami Hiramatsu
On 2015/06/13 4:17, Arnaldo Carvalho de Melo wrote: > Em Fri, Jun 12, 2015 at 02:08:27PM +0900, Masami Hiramatsu escreveu: >> Fix to check both of non-exist symbols and kprobe blacklist symbols at >> symbol-map based converting too. >> >> E.g. without this fix, perf-probe failes to write the event.

Re: perf,ftrace: fuzzer triggers warning in trace_events_filter code

2015-06-12 Thread Steven Rostedt
On Fri, 12 Jun 2015 21:15:10 -0400 (EDT) Vince Weaver wrote: > On Fri, 12 Jun 2015, Steven Rostedt wrote: > > > On Fri, 12 Jun 2015 17:18:22 -0400 (EDT) > > Vince Weaver wrote: > > > > > > > > So I've modified my fuzzer to try to exercise the > > > PERF_EVENT_IOC_SET_FILTER ioctl() and it is

[PATCH perf/core v2 3/3] [BUGFIX] perf probe: Show usage even if the last event is skipped

2015-06-12 Thread Masami Hiramatsu
When the last part of converted events are blacklisted or out-of-text, those are skipped and perf probe doesn't show usage examples. This fixes it to show the example even if the last part of event list is skipped. E.g. without this patch, events are added, but suddenly end; # perf probe

[PATCH perf/core v2 0/3] perf-probe bugfixes

2015-06-12 Thread Masami Hiramatsu
Hi Arnaldo, Here is the updated series of bugfix patches for perf-probe. I've fixed inverted bool flags bug on the 1/3. This series fixes below bugs; - --list shows the list of probes in stderr. (It is refined from https://lkml.org/lkml/2015/5/30/34) - non-probe-able symbols (out of .text) a

[PATCH perf/core v2 2/3] [BUGFIX] perf probe: Check non-probe-able symbols when using symbol map

2015-06-12 Thread Masami Hiramatsu
Fix to check both of non-exist symbols and kprobe blacklist symbols at symbol-map based converting too. E.g. without this fix, perf-probe failes to write the event. # perf probe vfs_caches_init_early Added new event: Failed to write event: Invalid argument Error: Failed to add eve

[PATCH perf/core v2 1/3] [BUGFIX] perf probe: List probes in stdout

2015-06-12 Thread Masami Hiramatsu
Since commit 5e17b28f1e24 ("perf probe: Add --quiet option to suppress output result message") have replaced printf with pr_info, perf probe -l outputs its result in stderr. However, that is not what the commit expected. e.g. - # perf probe -l > /dev/null probe:vfs_read (on vfs_re

Re: perf probe and structs

2015-06-12 Thread Masami Hiramatsu
On 2015/06/13 4:27, Arnaldo Carvalho de Melo wrote: > Hi Masami, > > I tried somethig with perf probe today, namely to ask for a > variable that is a struct perf_event_attr to be collected after > the perf_event_open syscall copies it from userspace, and got this > message: > > [root@zoo ~]

Re: [RFC/RFT PATCH v2] PCI: move pci_read_bridge_bases to the generic PCI layer

2015-06-12 Thread Guenter Roeck
On Tue, Jun 09, 2015 at 10:01:45AM +0100, Lorenzo Pieralisi wrote: > When a PCI bus is scanned, upon PCI bridge detection the kernel > has to read the bridge registers to set-up its resources so that > the PCI resource hierarchy can be validated properly. > > Most if not all architectures read PCI

Re: [PATCH] perf, tools: Fix crash in 'perf trace'

2015-06-12 Thread Sukadev Bhattiprolu
Arnaldo Carvalho de Melo [a...@kernel.org] wrote: | Em Thu, Jun 11, 2015 at 11:00:04PM -0700, Sukadev Bhattiprolu escreveu: | > >From 6669ed960a3ee4f9a02790f60b6a73ffc82fd6de Mon Sep 17 00:00:00 2001 | > From: Sukadev Bhattiprolu | > Date: Fri, 12 Jun 2015 01:28:36 -0400 | > Subject: [PATCH] perf,

Re: [PATCHv3 00/16] vme DMA and user space driver improvements

2015-06-12 Thread Dmitry Kalinkin
On Sat, Jun 13, 2015 at 3:31 AM, Greg Kroah-Hartman wrote: > On Wed, Jun 10, 2015 at 04:09:19PM +0300, Dmitry Kalinkin wrote: >> Also, there are some patches that IMO don't need any special VME >> subsystem expertise, namely: >> Documentation: mention vme_master_mmap() in VME API >> vme: ca91c

<    2   3   4   5   6   7   8   >