[PATCH 0/6] [GIT PULL] tracing: Some fixes to filter parsing

2018-02-09 Thread Steven Rostedt
Linus, Al Viro discovered some breakage with the parsing of the set_ftrace_filter as well as the removing of function probes. This fixes the code with Al's suggestions. I also added a few selftests to test the broken cases such that they wont happen again. Please pull the latest trace-v4.16-rc1

[PATCH 1/6] ftrace: Remove incorrect setting of glob search field

2018-02-09 Thread Steven Rostedt
From: "Steven Rostedt (VMware)" __unregister_ftrace_function_probe() will incorrectly parse the glob filter because it resets the search variable that was setup by filter_parse_regex(). Al Viro reported this: After that call of filter_parse_regex() we could have func_g.search not equal

[GIT] Networking

2018-02-09 Thread David Miller
1) Make allocations less aggressive in x_tables, from Minchal Hocko. 2) Fix netfilter flowtable Kconfig deps, from Pablo Neira Ayuso. 3) Fix connection loss problems in rtlwifi, from Larry Finger. 4) Correct DRAM dump length for some chips in ath10k driver, from Yu Wang. 5) Fix ABORT handli

Re: [PATCH 09/31] x86/entry/32: Leave the kernel via trampoline stack

2018-02-09 Thread Linus Torvalds
On Fri, Feb 9, 2018 at 11:25 AM, Joerg Roedel wrote: > > Ugh, okay. So I switch to movsl, that should at least perform on-par > with the chain of 'pushl' instructions I had before. It should generally be roughly in the same ballpark. I think the instruction scheduling ends up basically breaking

Re: [RFC] Rebasing the IDR

2018-02-09 Thread Matthew Wilcox
On Mon, Dec 11, 2017 at 10:54:51AM +, Chris Wilson wrote: > Quoting Matthew Wilcox (2017-11-30 17:36:30) > > About 40 of the approximately 180 users of the IDR in the kernel are > > "1-based" instead of "0-based". That is, they never want to have ID 0 > > allocated; they want to see IDs alloca

Re: [GIT PULL] xen: fixes for 4.16 rc1

2018-02-09 Thread Linus Torvalds
On Fri, Feb 9, 2018 at 10:59 AM, Juergen Gross wrote: > > Do you want me to setup the patches for pulling again? No, I've pulled, I just don't want to see these unexplained merges again. Preferably I don't want to see back-merges at all, but when I do see them, I want to see an explanation for w

Re: [PATCH 1/7] watchdog: sama5d4: make use of timeout-secs provided in devicetree

2018-02-09 Thread Marcus Folkesson
The summary email did not make it for some reason. However. All these drivers is using watchdog_init_timeout() to set timeout. If the timeout-parameter is set to an valid value, it will allways pick that and not even consider if timeout-secs is set in devicetree. Most of the patches will just rem

[PATCH 1/7] watchdog: sama5d4: make use of timeout-secs provided in devicetree

2018-02-09 Thread Marcus Folkesson
watchdog_init_timeout() will allways pick timeout_param since it defaults to a valid timeout. Following best practice described in Documentation/watchdog/watchdog-kernel-api.txt to make use of the parameter logic. Signed-off-by: Marcus Folkesson --- drivers/watchdog/sama5d4_wdt.c | 4 ++-- 1 fi

Re: [PATCH 09/31] x86/entry/32: Leave the kernel via trampoline stack

2018-02-09 Thread Denys Vlasenko
On 02/09/2018 08:02 PM, Joerg Roedel wrote: On Fri, Feb 09, 2018 at 09:05:02AM -0800, Linus Torvalds wrote: On Fri, Feb 9, 2018 at 1:25 AM, Joerg Roedel wrote: + + /* Copy over the stack-frame */ + cld + rep movsb Ugh. This is going to be horrendous. Maybe not noticeable on

[PATCH 3/7] watchdog: sirfsoc: allow setting timeout in devicetree

2018-02-09 Thread Marcus Folkesson
watchdog_init_timeout() will allways pick timeout_param since it defaults to a valid timeout. By following best practice described in Documentation/watchdog/watchdog-kernel-api.txt, it also let us to set timout-sec property in devicetree. Signed-off-by: Marcus Folkesson --- Documentation/device

[PATCH 2/7] watchdog: sunxi: allow setting timeout in devicetree

2018-02-09 Thread Marcus Folkesson
watchdog_init_timeout() will allways pick timeout_param since it defaults to a valid timeout. By following best practice described in Documentation/watchdog/watchdog-kernel-api.txt, it also let us to set timout-sec property in devicetree. Signed-off-by: Marcus Folkesson --- Documentation/device

[PATCH 5/7] watchdog: mtk: allow setting timeout in devicetree

2018-02-09 Thread Marcus Folkesson
watchdog_init_timeout() will allways pick timeout_param since it defaults to a valid timeout. By following best practice described in Documentation/watchdog/watchdog-kernel-api.txt, it also let us to set timout-sec property in devicetree. Signed-off-by: Marcus Folkesson --- Documentation/device

Re: WARNING: suspicious RCU usage in tipc_bearer_find

2018-02-09 Thread Dmitry Vyukov
On Fri, Feb 9, 2018 at 8:27 PM, syzbot wrote: > Hello, > > syzbot hit the following crash on net-next commit > 617aebe6a97efa539cc4b8a52adccd89596e6be0 (Sun Feb 4 00:25:42 2018 +) > Merge tag 'usercopy-v4.16-rc1' of > git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux > > So far this cra

Re: [PATCH V4 1/2] ptr_ring: fail early if queue occupies more than KMALLOC_MAX_SIZE

2018-02-09 Thread David Miller
From: Jason Wang Date: Fri, 9 Feb 2018 17:45:49 +0800 > To avoid slab to warn about exceeded size, fail early if queue > occupies more than KMALLOC_MAX_SIZE. > > Reported-by: syzbot+e4d4f9ddd42955397...@syzkaller.appspotmail.com > Fixes: 2e0ab8ca83c12 ("ptr_ring: array based FIFO for pointers")

Re: [PATCH V4 2/2] ptr_ring: try vmalloc() when kmalloc() fails

2018-02-09 Thread David Miller
From: Jason Wang Date: Fri, 9 Feb 2018 17:45:50 +0800 > This patch switch to use kvmalloc_array() for using a vmalloc() > fallback to help in case kmalloc() fails. > > Reported-by: syzbot+e4d4f9ddd42955397...@syzkaller.appspotmail.com > Fixes: 2e0ab8ca83c12 ("ptr_ring: array based FIFO for poin

[PATCH 7/7] watchdog: coh901327: make use of timeout-secs provided in devicetree

2018-02-09 Thread Marcus Folkesson
watchdog_init_timeout() will allways pick timeout_param since it defaults to a valid timeout. Following best practice described in Documentation/watchdog/watchdog-kernel-api.txt to make use of the parameter logic. Signed-off-by: Marcus Folkesson --- drivers/watchdog/coh901327_wdt.c | 2 +- 1 fi

Re: [PATCH v4 00/20] crypto: arm64 - play nice with CONFIG_PREEMPT

2018-02-09 Thread Ard Biesheuvel
On 9 February 2018 at 18:02, Sebastian Andrzej Siewior wrote: > On 2017-12-26 10:29:20 [+], Ard Biesheuvel wrote: >> As reported by Sebastian, the way the arm64 NEON crypto code currently >> keeps kernel mode NEON enabled across calls into skcipher_walk_xxx() is > … >> So let's clean this up f

[PATCH 0/7] watchdog: make use of timeout-secs

2018-02-09 Thread Marcus Folkesson
All these drivers is using watchdog_init_timeout() to set timeout. If the timeout-parameter is set to an valid value, it will allways pick that and not even consider if timeout-secs is set in the devicetree. Most of the patches will just remove the initial value for timeout-parameter. Some of the

Re: suspicious RCU usage at net/tipc/bearer.c:LINE

2018-02-09 Thread Dmitry Vyukov
On Thu, Feb 1, 2018 at 11:22 PM, Eric Biggers wrote: > On Sun, Dec 31, 2017 at 10:58:01AM -0800, syzbot wrote: >> Hello, >> >> syzkaller hit the following crash on >> 5aa90a84589282b87666f92b6c3c917c8080a9bf >> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/master >> compiler: gc

[PATCH 4/7] watchdog: pnx4008: make use of timeout-secs provided in devicetree

2018-02-09 Thread Marcus Folkesson
watchdog_init_timeout() will allways pick timeout_param since it defaults to a valid timeout. Following best practice described in Documentation/watchdog/watchdog-kernel-api.txt to make use of the parameter logic. Signed-off-by: Marcus Folkesson --- drivers/watchdog/pnx4008_wdt.c | 2 +- 1 file

[PATCH 6/7] watchdog: meson: allow setting timeout in devicetree

2018-02-09 Thread Marcus Folkesson
watchdog_init_timeout() will allways pick timeout_param since it defaults to a valid timeout. By following best practice described in Documentation/watchdog/watchdog-kernel-api.txt, it also let us to set timout-sec property in devicetree. Signed-off-by: Marcus Folkesson --- Documentation/device

Re: [PATCH 09/31] x86/entry/32: Leave the kernel via trampoline stack

2018-02-09 Thread Joerg Roedel
On Fri, Feb 09, 2018 at 11:17:35AM -0800, Linus Torvalds wrote: > Yeah, it's only true on the very latest uarchs, and even there it's > not perfect for small copies. > > On the older machines that are relevant for 32-bit code, it's often > tens of cycles just for the ucode overhead, I think, and "

Re: [PATCH net-next 0/3] stmmac irq fixes/cleanups

2018-02-09 Thread David Miller
From: Niklas Cassel Date: Fri, 9 Feb 2018 17:22:44 +0100 > A couple of small stmmac irq fixes/cleanups. Seires applied.

[PATCH v3 0/1] initialize pages on demand during boot

2018-02-09 Thread Pavel Tatashin
Change log: v2 - v3 Andrew Morton's comments: - Moved read of pgdat->first_deferred_pfn into deferred_zone_grow_lock, thus got rid of READ_ONCE()/WRITE_ONCE() - Replaced spin_lock() with spin_lock_irqsave() in deferred_grow_zone - Updated

[PATCH v3 1/1] mm: initialize pages on demand during boot

2018-02-09 Thread Pavel Tatashin
Deferred page initialization allows the boot cpu to initialize a small subset of the system's pages early in boot, with other cpus doing the rest later on. It is, however, problematic to know how many pages the kernel needs during boot. Different modules and kernel parameters may change the requi

Re: [PATCH 09/31] x86/entry/32: Leave the kernel via trampoline stack

2018-02-09 Thread Linus Torvalds
On Fri, Feb 9, 2018 at 11:02 AM, Joerg Roedel wrote: > > Okay, I used movsb because I remembered that being the recommendation > for the most efficient memcpy, and it safes me an instruction. But that > is probably only true on modern CPUs. Yeah, it's only true on the very latest uarchs, and even

Re: [PATCH] mm: thp: fix potential clearing to referenced flag in page_idle_clear_pte_refs_one()

2018-02-09 Thread Yang Shi
On 2/9/18 12:16 AM, Kirill A. Shutemov wrote: On Thu, Feb 08, 2018 at 08:47:35PM -0800, Yang Shi wrote: On 2/8/18 8:33 PM, Kirill A. Shutemov wrote: On Thu, Feb 08, 2018 at 02:39:26PM -0800, Andrew Morton wrote: On Tue, 6 Feb 2018 08:06:36 +0800 Yang Shi wrote: For PTE-mapped THP, the c

[PATCH v2] mm: thp: fix potential clearing to referenced flag in page_idle_clear_pte_refs_one()

2018-02-09 Thread Yang Shi
For PTE-mapped THP, the compound THP has not been split to normal 4K pages yet, the whole THP is considered referenced if any one of sub page is referenced. When walking PTE-mapped THP by pvmw, all relevant PTEs will be checked to retrieve referenced bit. But, the current code just returns the res

Re: [PATCH] perf report: Add support to display group output for non group events

2018-02-09 Thread Arnaldo Carvalho de Melo
Em Fri, Feb 09, 2018 at 08:10:57PM +0100, Jiri Olsa escreveu: > On Fri, Feb 09, 2018 at 03:37:11PM -0300, Arnaldo Carvalho de Melo wrote: > > Em Fri, Feb 09, 2018 at 10:27:34AM +0100, Jiri Olsa escreveu: > > Humm, its a nice hack, but it would be even better if it didn't showed > > it as if it was

Re: [PATCH 00/31 v2] PTI support for x86_32

2018-02-09 Thread Joerg Roedel
Hi Andy, On Fri, Feb 09, 2018 at 05:47:43PM +, Andy Lutomirski wrote: > One thing worth noting is that performance of this whole series is > going to be abysmal due to the complete lack of 32-bit PCID. Maybe > any kernel built with this option set that runs on a CPU that has the > PCID bit se

Re: [PATCH] perf report: Add support to display group output for non group events

2018-02-09 Thread Jiri Olsa
On Fri, Feb 09, 2018 at 03:37:11PM -0300, Arnaldo Carvalho de Melo wrote: > Em Fri, Feb 09, 2018 at 10:27:34AM +0100, Jiri Olsa escreveu: > > On Wed, Feb 07, 2018 at 10:52:35AM -0800, Stephane Eranian wrote: > > > > SNIP > > > > > >> Similar to what I get if I do instead: > > > >> $ perf record -

Re: [PATCH 20/31] x86/mm/pae: Populate the user page-table with user pgd's

2018-02-09 Thread Joerg Roedel
On Fri, Feb 09, 2018 at 05:48:36PM +, Andy Lutomirski wrote: > Can you rename the helper from pti_set_user_pgd() to > pti_set_user_top_level_entry() or similar? The name was already a bit > absurd, but now it's just nuts. Sure, I can do that, just pti_set_user_top_level_entry() is a bit long.

Re: [PATCH 09/31] x86/entry/32: Leave the kernel via trampoline stack

2018-02-09 Thread Joerg Roedel
On Fri, Feb 09, 2018 at 05:43:55PM +, Andy Lutomirski wrote: > The 64-bit code mostly uses a bunch of push instructions for this. I had it implemented with tons of push instructions first, but that doesn't work in cases where the stack switch needs to happen only after everything is copied o

Re: [PATCH 09/31] x86/entry/32: Leave the kernel via trampoline stack

2018-02-09 Thread Joerg Roedel
On Fri, Feb 09, 2018 at 09:05:02AM -0800, Linus Torvalds wrote: > On Fri, Feb 9, 2018 at 1:25 AM, Joerg Roedel wrote: > > + > > + /* Copy over the stack-frame */ > > + cld > > + rep movsb > > Ugh. This is going to be horrendous. Maybe not noticeable on modern > CPU's, but the wh

Re: [GIT PULL] xen: fixes for 4.16 rc1

2018-02-09 Thread Juergen Gross
On 09/02/18 19:48, Linus Torvalds wrote: > On Fri, Feb 9, 2018 at 6:28 AM, Juergen Gross wrote: >> >> git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git >> for-linus-4.16-rc1-tag > > So I've pulled this, but the back-merges *really* annoy me. > > Seriously, DON'T DO MERGES IF YOU CANNOT

Re: [PATCH v3 21/22] arm64: Delay enabling hardware DBM feature

2018-02-09 Thread Dave Martin
On Fri, Feb 09, 2018 at 05:55:12PM +, Suzuki K Poulose wrote: > We enable hardware DBM bit in a capable CPU, very early in the > boot via __cpu_setup. This doesn't give us a flexibility of > optionally disable the feature, as the clearing the bit > is a bit costly as the TLB can cache the setti

Re: [PATCH 1/2] acpi/dptf: document sysfs atttributes

2018-02-09 Thread Srinivas Pandruvada
On Fri, 2018-02-09 at 11:31 +0100, Rafael J. Wysocki wrote: > On Wed, Feb 7, 2018 at 2:18 PM, Aishwarya Pant > wrote: > > The descriptions have been collected from git commit logs and > > reading > > through code. > > > > Signed-off-by: Aishwarya Pant > > --- > >  Documentation/ABI/testing/sysfs

Re: [PATCH v2 2/2] arm64: dts: rockchip: enable I2S codec on rk3399-puma-haikou

2018-02-09 Thread Heiko Stuebner
Hi Klaus, Am Samstag, 3. Februar 2018, 16:50:16 CET schrieb Klaus Goger: > Enable the NXP SGTL5000 audio codec on the RK3399-Q7 EVK baseboard > Haikou. > > The i2s0_2ch_bus definition is only done in the SoM dtsi as it is > missing the LRCK_RX pin (that is used otherwise) and therefore not > gene

Re: [GIT PULL] xen: fixes for 4.16 rc1

2018-02-09 Thread Linus Torvalds
On Fri, Feb 9, 2018 at 6:28 AM, Juergen Gross wrote: > > git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git > for-linus-4.16-rc1-tag So I've pulled this, but the back-merges *really* annoy me. Seriously, DON'T DO MERGES IF YOU CANNOT EVEN BE BOTHERED TO WRITE A REASON FOR THEM! There a

Re: [PATCH RFC tip/lkmm 04/10] EXP litmus_tests: Add comments explaining tests' purposes

2018-02-09 Thread Alan Stern
On Fri, 9 Feb 2018, Paul E. McKenney wrote: > This commit adds comments to the litmus tests summarizing what these > tests are intended to demonstrate. > > Suggested-by: Ingo Molnar > Signed-off-by: Paul E. McKenney > [ paulmck: Apply Andrea's and Alan's feedback. ] > --- > --- a/tools/memory-

Re: [PATCH] perf report: Add support to display group output for non group events

2018-02-09 Thread Arnaldo Carvalho de Melo
Em Fri, Feb 09, 2018 at 03:37:11PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Fri, Feb 09, 2018 at 10:27:34AM +0100, Jiri Olsa escreveu: > > On Wed, Feb 07, 2018 at 10:52:35AM -0800, Stephane Eranian wrote: > > > > SNIP > > > > > >> Similar to what I get if I do instead: > > > >> $ perf recor

[GIT PULL] target updates for v4.16-rc1

2018-02-09 Thread Nicholas A. Bellinger
Hi Linus, Here are the target-pending updates for v4.16-rc1. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git for-next The highlights include: - Numerous target-core-user improvements related to queue full and timeout handling. (MNC) - Prev

Re: [PATCH] perf report: Add support to display group output for non group events

2018-02-09 Thread Arnaldo Carvalho de Melo
Em Fri, Feb 09, 2018 at 10:27:34AM +0100, Jiri Olsa escreveu: > On Wed, Feb 07, 2018 at 10:52:35AM -0800, Stephane Eranian wrote: > > SNIP > > > >> Similar to what I get if I do instead: > > >> $ perf record -e '{branches,branches,branches,branches}' my_test > > >> $ perf report --group > > >> >

Re: [RFC][PATCH] : fix end_name_hash() for 64bit long

2018-02-09 Thread Linus Torvalds
On Mon, Feb 5, 2018 at 9:32 AM, Amir Goldstein wrote: > The comment claims that this helper will try not to loose bits, but > for 64bit long it looses the high bits before hashing 64bit long into > 32bit int. Use the helper hash_long() to do the right thing for 64bit > long. For 32bit long, there

Re: [PATCH v3 11/22] arm64: capabilities: Group handling of features and errata workarounds

2018-02-09 Thread Dave Martin
On Fri, Feb 09, 2018 at 05:54:51PM +, Suzuki K Poulose wrote: > Now that the features and errata workarounds have the same > rules and flow, group the handling of the tables. > > Cc: Dave Martin > Signed-off-by: Suzuki K Poulose The naming gets a bit confusing, particularly with setup_syste

Re: linux-next: manual merge of the tip tree with Linus' tree

2018-02-09 Thread Will Deacon
On Thu, Feb 08, 2018 at 07:04:56PM +, Mathieu Desnoyers wrote: > - On Feb 8, 2018, at 1:56 PM, Will Deacon will.dea...@arm.com wrote: > > > On Thu, Feb 08, 2018 at 08:03:50AM +0100, Ingo Molnar wrote: > >> > >> * Will Deacon wrote: > >> > >> > For the sake of avoiding the conflict, can

Re: [PATCH v3 10/22] arm64: capabilities: Allow features based on local CPU scope

2018-02-09 Thread Dave Martin
On Fri, Feb 09, 2018 at 05:54:49PM +, Suzuki K Poulose wrote: > So far we have treated the feature capabilities as system wide > and this doesn't help with features that could be detected on doesn't -> wouldn't (since no such features exist yet) detected to "detected locally" (maybe) > one o

Re: [PATCH 4.14 00/22] 4.14.19-stable review

2018-02-09 Thread Timur Tabi
On 02/09/2018 12:18 PM, Greg Kroah-Hartman wrote: Oops, yeah, I'll pick them up for the next release, sorry. Was traveling all this week and with the middle of the merge window, finding all of the stable patches that can be applied right now was hard. After 4.16-rc1 is out, it will get easier.

Re: [PATCH 4.14 00/22] 4.14.19-stable review

2018-02-09 Thread Greg Kroah-Hartman
On Fri, Feb 09, 2018 at 12:01:45PM -0600, Timur Tabi wrote: > On Fri, Feb 9, 2018 at 7:39 AM, Greg Kroah-Hartman > wrote: > > This is the start of the stable review cycle for the 4.14.19 release. > > There are 22 patches in this series, all will be posted as a response > > to this one. If anyone

Re: [PATCH v3 09/22] arm64: capabilities: Split the processing of errata work arounds

2018-02-09 Thread Dave Martin
On Fri, Feb 09, 2018 at 05:54:48PM +, Suzuki K Poulose wrote: > Right now we run through the errata workarounds check on all boot > active CPUs, with SCOPE_ALL. This doesn't help with detecting the > errata's with a SYSTEM_SCOPE. While nobody uses it, let us clean > this up in preparation for m

Re: [PATCH v3 08/22] arm64: capabilities: Prepare for grouping features and errata work arounds

2018-02-09 Thread Dave Martin
On Fri, Feb 09, 2018 at 05:54:45PM +, Suzuki K Poulose wrote: > We are about to group the handling of all capabilities (features > and errata workarounds). This patch open codes the wrapper routines > to make it easier to merge the handling. > > Cc: Dave Martin > Signed-off-by: Suzuki K Poulo

[PATCH] ACPI: SPCR: Mark expected switch fall-through in acpi_parse_spcr

2018-02-09 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1465078 Signed-off-by: Gustavo A. R. Silva --- This code was compiled with GCC 7.3.0 drivers/acpi/spcr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/driver

[PATCH v3 02/21] arm64: capabilities: Move errata processing code

2018-02-09 Thread Suzuki K Poulose
We have errata work around processing code in cpu_errata.c, which calls back into helpers defined in cpufeature.c. Now that we are going to make the handling of capabilities generic, by adding the information to each capability, move the errata work around specific processing code. No functional ch

[PATCH v3 02/22] arm64: capabilities: Move errata work around check on boot CPU

2018-02-09 Thread Suzuki K Poulose
We trigger CPU errata work around check on the boot CPU from smp_prepare_boot_cpu() to make sure that we run the checks only after the CPU feature infrastructure is initialised. While this is correct, we can also do this from init_cpu_features() which initilises the infrastructure, and is called on

[PATCH v3 03/21] arm64: capabilities: Prepare for fine grained capabilities

2018-02-09 Thread Suzuki K Poulose
We use arm64_cpu_capabilities to represent CPU ELF HWCAPs exposed to the userspace and the CPU hwcaps used by the kernel, which include cpu features and CPU errata work arounds. Capabilities have some properties that decide how they should be treated : 1) Detection, i.e scope : A cap could be "de

[PATCH v3 03/22] arm64: capabilities: Move errata processing code

2018-02-09 Thread Suzuki K Poulose
We have errata work around processing code in cpu_errata.c, which calls back into helpers defined in cpufeature.c. Now that we are going to make the handling of capabilities generic, by adding the information to each capability, move the errata work around specific processing code. No functional ch

[PATCH v3 04/21] arm64: capabilities: Add flags to handle the conflicts on late CPU

2018-02-09 Thread Suzuki K Poulose
When a CPU is brought up, it is checked against the caps that are known to be enabled on the system (via verify_local_cpu_capabilities()). Based on the state of the capability on the CPU vs. that of System we could have the following combinations of conflict. x-

[PATCH v3 05/22] arm64: capabilities: Add flags to handle the conflicts on late CPU

2018-02-09 Thread Suzuki K Poulose
When a CPU is brought up, it is checked against the caps that are known to be enabled on the system (via verify_local_cpu_capabilities()). Based on the state of the capability on the CPU vs. that of System we could have the following combinations of conflict. x-

[PATCH v3 05/21] arm64: capabilities: Unify the verification

2018-02-09 Thread Suzuki K Poulose
Now that each capability describes how to treat the conflicts of CPU cap state vs System wide cap state, we can unify the verification logic to a single place. Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose --- arch/arm64/kernel/cpufeature.c | 89 ++

[PATCH v3 07/22] arm64: capabilities: Filter the entries based on a given mask

2018-02-09 Thread Suzuki K Poulose
While processing the list of capabilities, it is useful to filter out some of the entries based on the given mask for the scope of the capabilities to allow better control. This can be used later for handling LOCAL vs SYSTEM wide capabilities and more. All capabilities should have their scope set t

Re: [PATCH v3 00/21] arm64: Rework cpu capabilities handling

2018-02-09 Thread Suzuki K Poulose
On 09/02/18 17:54, Suzuki K Poulose wrote: This series reworks the arm64 CPU capabilities handling (which manages the system features and errata). The current infrastructure doesn't allow fine control for handling different features or errata. There is one rule for features and another rule for e

[PATCH v3 06/21] arm64: capabilities: Filter the entries based on a given mask

2018-02-09 Thread Suzuki K Poulose
While processing the list of capabilities, it is useful to filter out some of the entries based on the given mask for the scope of the capabilities to allow better control. This can be used later for handling LOCAL vs SYSTEM wide capabilities and more. All capabilities should have their scope set t

[PATCH v3 08/22] arm64: capabilities: Prepare for grouping features and errata work arounds

2018-02-09 Thread Suzuki K Poulose
We are about to group the handling of all capabilities (features and errata workarounds). This patch open codes the wrapper routines to make it easier to merge the handling. Cc: Dave Martin Signed-off-by: Suzuki K Poulose --- arch/arm64/kernel/cpufeature.c | 60 +

[PATCH v3 09/21] arm64: capabilities: Allow features based on local CPU scope

2018-02-09 Thread Suzuki K Poulose
So far we have treated the feature capabilities as system wide and this doesn't help with features that could be detected on one or more CPUs (e.g, KPTI, Software prefetch). This patch splits the feature detection to two phases : 1) Local CPU features are checked on all boot time active CPUs. 2)

[PATCH v3 10/21] arm64: capabilities: Group handling of features and errata workarounds

2018-02-09 Thread Suzuki K Poulose
Now that the features and errata workarounds have the same rules and flow, group the handling of the tables. Cc: Dave Martin Signed-off-by: Suzuki K Poulose --- arch/arm64/kernel/cpufeature.c | 72 -- 1 file changed, 41 insertions(+), 31 deletions(-) dif

[PATCH v3 10/22] arm64: capabilities: Allow features based on local CPU scope

2018-02-09 Thread Suzuki K Poulose
So far we have treated the feature capabilities as system wide and this doesn't help with features that could be detected on one or more CPUs (e.g, KPTI, Software prefetch). This patch splits the feature detection to two phases : 1) Local CPU features are checked on all boot time active CPUs. 2)

[PATCH v3 11/22] arm64: capabilities: Group handling of features and errata workarounds

2018-02-09 Thread Suzuki K Poulose
Now that the features and errata workarounds have the same rules and flow, group the handling of the tables. Cc: Dave Martin Signed-off-by: Suzuki K Poulose --- arch/arm64/kernel/cpufeature.c | 72 -- 1 file changed, 41 insertions(+), 31 deletions(-) dif

[PATCH v3 12/21] arm64: capabilities: Restrict KPTI detection to boot-time CPUs

2018-02-09 Thread Suzuki K Poulose
KPTI is treated as a system wide feature and is only detected if all the CPUs in the sysetm needs the defense, unless it is forced via kernel command line. This leaves a system with a mix of CPUs with and without the defense vulnerable. Also, if a late CPU needs KPTI but KPTI was not activated at b

[PATCH v3 13/22] arm64: capabilities: Restrict KPTI detection to boot-time CPUs

2018-02-09 Thread Suzuki K Poulose
KPTI is treated as a system wide feature and is only detected if all the CPUs in the sysetm needs the defense, unless it is forced via kernel command line. This leaves a system with a mix of CPUs with and without the defense vulnerable. Also, if a late CPU needs KPTI but KPTI was not activated at b

Re: [PATCH v4 00/20] crypto: arm64 - play nice with CONFIG_PREEMPT

2018-02-09 Thread Sebastian Andrzej Siewior
On 2017-12-26 10:29:20 [+], Ard Biesheuvel wrote: > As reported by Sebastian, the way the arm64 NEON crypto code currently > keeps kernel mode NEON enabled across calls into skcipher_walk_xxx() is … > So let's clean this up for arm64: update the NEON based skcipher drivers to > no longer keep t

Re: [PATCH 4.14 00/22] 4.14.19-stable review

2018-02-09 Thread Timur Tabi
On Fri, Feb 9, 2018 at 7:39 AM, Greg Kroah-Hartman wrote: > This is the start of the stable review cycle for the 4.14.19 release. > There are 22 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. Is it

[PATCH v3 12/22] arm64: capabilities: Introduce weak features based on local CPU

2018-02-09 Thread Suzuki K Poulose
Now that we have the flexibility of defining system features based on individual CPUs, introduce CPU feature type that can be detected on a local SCOPE and ignores the conflict on late CPUs. This is applicable for ARM64_HAS_NO_HW_PREFETCH, where it is fine for the system to have CPUs without hardwa

[PATCH v3 15/22] arm64: capabilities: Change scope of VHE to Boot CPU feature

2018-02-09 Thread Suzuki K Poulose
We expect all CPUs to be running at the same EL inside the kernel with or without VHE enabled and we have strict checks to ensure that any mismatch triggers a kernel panic. If VHE is enabled, we use the feature based on the boot CPU and all other CPUs should follow. This makes it a perfect candidat

[PATCH v3 16/21] arm64: Add helpers for checking CPU MIDR against a range

2018-02-09 Thread Suzuki K Poulose
Add helpers for checking if the given CPU midr falls in a range of variants/revisions for a given model. Cc: Will Deacon Cc: Mark Rutland Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose --- arch/arm64/include/asm/cpufeature.h | 7 ++- arch/arm64/include/asm/cputype.h| 30 +++

[PATCH v3 17/22] arm64: Add helpers for checking CPU MIDR against a range

2018-02-09 Thread Suzuki K Poulose
Add helpers for checking if the given CPU midr falls in a range of variants/revisions for a given model. Cc: Will Deacon Cc: Mark Rutland Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose --- arch/arm64/include/asm/cpufeature.h | 7 ++- arch/arm64/include/asm/cputype.h| 30 +++

[PATCH v3 16/22] arm64: capabilities: Clean up midr range helpers

2018-02-09 Thread Suzuki K Poulose
We are about to introduce generic MIDR range helpers. Clean up the existing helpers in erratum handling, preparing them to use generic version. Cc: Will Deacon Cc: Mark Rutland Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose --- arch/arm64/kernel/cpu_errata.c | 100 ++

[PATCH v3 18/21] arm64: capabilities: Handle shared entries

2018-02-09 Thread Suzuki K Poulose
Some capabilities have different criteria for detection and associated actions based on the matching criteria, even though they all share the same capability bit. So far we have used multiple entries with the same capability bit to handle this. This is prone to errors, as the cpu_enable is invoked

[PATCH v3 18/22] arm64: capabilities: Add support for checks based on a list of MIDRs

2018-02-09 Thread Suzuki K Poulose
Add helpers for detecting an errata on list of midr ranges of affected CPUs, with the same work around. Cc: Will Deacon Cc: Mark Rutland Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose --- arch/arm64/include/asm/cpufeature.h | 1 + arch/arm64/include/asm/cputype.h| 8 + arc

[PATCH v3 19/22] arm64: capabilities: Handle shared entries

2018-02-09 Thread Suzuki K Poulose
Some capabilities have different criteria for detection and associated actions based on the matching criteria, even though they all share the same capability bit. So far we have used multiple entries with the same capability bit to handle this. This is prone to errors, as the cpu_enable is invoked

[PATCH v3 22/22] arm64: Add work around for Arm Cortex-A55 Erratum 1024718

2018-02-09 Thread Suzuki K Poulose
Some variants of the Arm Cortex-55 cores (r0p0, r0p1, r1p0) suffer from an erratum 1024718, which causes incorrect updates when DBM/AP bits in a page table entry is modified without a break-before-make sequence. The work around is to skip enabling the hardware DBM feature on the affected cores. The

[PATCH v3 20/21] arm64: Delay enabling hardware DBM feature

2018-02-09 Thread Suzuki K Poulose
We enable hardware DBM bit in a capable CPU, very early in the boot via __cpu_setup. This doesn't give us a flexibility of optionally disable the feature, as the clearing the bit is a bit costly as the TLB can cache the settings. Instead, we delay enabling the feature until the CPU is brought up in

[PATCH v3 21/22] arm64: Delay enabling hardware DBM feature

2018-02-09 Thread Suzuki K Poulose
We enable hardware DBM bit in a capable CPU, very early in the boot via __cpu_setup. This doesn't give us a flexibility of optionally disable the feature, as the clearing the bit is a bit costly as the TLB can cache the settings. Instead, we delay enabling the feature until the CPU is brought up in

[PATCH v3 20/22] arm64: Add MIDR encoding for Arm Cortex-A55 and Cortex-A35

2018-02-09 Thread Suzuki K Poulose
Update the MIDR encodings for the Cortex-A55 and Cortex-A35 Cc: Mark Rutland Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose --- arch/arm64/include/asm/cputype.h | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm64/include/asm/cputype.h b/arch/arm64/include/asm/cputype.h

[PATCH v3 21/21] arm64: Add work around for Arm Cortex-A55 Erratum 1024718

2018-02-09 Thread Suzuki K Poulose
Some variants of the Arm Cortex-55 cores (r0p0, r0p1, r1p0) suffer from an erratum 1024718, which causes incorrect updates when DBM/AP bits in a page table entry is modified without a break-before-make sequence. The work around is to skip enabling the hardware DBM feature on the affected cores. The

[PATCH v3 14/22] arm64: capabilities: Add support for features enabled early

2018-02-09 Thread Suzuki K Poulose
The kernel detects and uses some of the features based on the boot CPU and expects that all the following CPUs conform to it. e.g, with VHE and the boot CPU running at EL2, the kernel decides to keep the kernel running at EL2. If another CPU is brought up without this capability, we use custom hook

[PATCH v3 13/21] arm64: capabilities: Add support for features enabled early

2018-02-09 Thread Suzuki K Poulose
The kernel detects and uses some of the features based on the boot CPU and expects that all the following CPUs conform to it. e.g, with VHE and the boot CPU running at EL2, the kernel decides to keep the kernel running at EL2. If another CPU is brought up without this capability, we use custom hook

[PATCH v3 17/21] arm64: capabilities: Add support for checks based on a list of MIDRs

2018-02-09 Thread Suzuki K Poulose
Add helpers for detecting an errata on list of midr ranges of affected CPUs, with the same work around. Cc: Will Deacon Cc: Mark Rutland Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose --- arch/arm64/include/asm/cpufeature.h | 1 + arch/arm64/include/asm/cputype.h| 8 + arc

[PATCH v3 07/21] arm64: capabilities: Prepare for grouping features and errata work arounds

2018-02-09 Thread Suzuki K Poulose
We are about to group the handling of all capabilities (features and errata workarounds). This patch open codes the wrapper routines to make it easier to merge the handling. Cc: Dave Martin Signed-off-by: Suzuki K Poulose --- arch/arm64/kernel/cpufeature.c | 60 +

[PATCH v3 14/21] arm64: capabilities: Change scope of VHE to Boot CPU feature

2018-02-09 Thread Suzuki K Poulose
We expect all CPUs to be running at the same EL inside the kernel with or without VHE enabled and we have strict checks to ensure that any mismatch triggers a kernel panic. If VHE is enabled, we use the feature based on the boot CPU and all other CPUs should follow. This makes it a perfect candidat

[PATCH v3 09/22] arm64: capabilities: Split the processing of errata work arounds

2018-02-09 Thread Suzuki K Poulose
Right now we run through the errata workarounds check on all boot active CPUs, with SCOPE_ALL. This doesn't help with detecting the errata's with a SYSTEM_SCOPE. While nobody uses it, let us clean this up in preparation for merging capability handling. So, we run the checks with SCOPE_LOCAL_CPU on

[PATCH v3 06/22] arm64: capabilities: Unify the verification

2018-02-09 Thread Suzuki K Poulose
Now that each capability describes how to treat the conflicts of CPU cap state vs System wide cap state, we can unify the verification logic to a single place. Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose --- arch/arm64/kernel/cpufeature.c | 89 ++

[PATCH v3 15/21] arm64: capabilities: Clean up midr range helpers

2018-02-09 Thread Suzuki K Poulose
We are about to introduce generic MIDR range helpers. Clean up the existing helpers in erratum handling, preparing them to use generic version. Cc: Will Deacon Cc: Mark Rutland Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose --- arch/arm64/kernel/cpu_errata.c | 100 ++

[PATCH v3 08/21] arm64: capabilities: Split the processing of errata work arounds

2018-02-09 Thread Suzuki K Poulose
Right now we run through the errata workarounds check on all boot active CPUs, with SCOPE_ALL. This doesn't help with detecting the errata's with a SYSTEM_SCOPE. While nobody uses it, let us clean this up in preparation for merging capability handling. So, we run the checks with SCOPE_LOCAL_CPU on

[PATCH v3 19/21] arm64: Add MIDR encoding for Arm Cortex-A55 and Cortex-A35

2018-02-09 Thread Suzuki K Poulose
Update the MIDR encodings for the Cortex-A55 and Cortex-A35 Cc: Mark Rutland Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose --- arch/arm64/include/asm/cputype.h | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm64/include/asm/cputype.h b/arch/arm64/include/asm/cputype.h

[PATCH v3 11/21] arm64: capabilities: Introduce weak features based on local CPU

2018-02-09 Thread Suzuki K Poulose
Now that we have the flexibility of defining system features based on individual CPUs, introduce CPU feature type that can be detected on a local SCOPE and ignores the conflict on late CPUs. This is applicable for ARM64_HAS_NO_HW_PREFETCH, where it is fine for the system to have CPUs without hardwa

[PATCH v3 04/22] arm64: capabilities: Prepare for fine grained capabilities

2018-02-09 Thread Suzuki K Poulose
We use arm64_cpu_capabilities to represent CPU ELF HWCAPs exposed to the userspace and the CPU hwcaps used by the kernel, which include cpu features and CPU errata work arounds. Capabilities have some properties that decide how they should be treated : 1) Detection, i.e scope : A cap could be "de

[PATCH v3 01/22] arm64: capabilities: Update prototype for enable call back

2018-02-09 Thread Suzuki K Poulose
From: Dave Martin We issue the enable() call back for all CPU hwcaps capabilities available on the system, on all the CPUs. So far we have ignored the argument passed to the call back, which had a prototype to accept a "void *" for use with on_each_cpu() and later with stop_machine(). However, wi

[PATCH v3 01/21] arm64: capabilities: Move errata work around check on boot CPU

2018-02-09 Thread Suzuki K Poulose
We trigger CPU errata work around check on the boot CPU from smp_prepare_boot_cpu() to make sure that we run the checks only after the CPU feature infrastructure is initialised. While this is correct, we can also do this from init_cpu_features() which initilises the infrastructure, and is called on

[PATCH v3 00/21] arm64: Rework cpu capabilities handling

2018-02-09 Thread Suzuki K Poulose
This series reworks the arm64 CPU capabilities handling (which manages the system features and errata). The current infrastructure doesn't allow fine control for handling different features or errata. There is one rule for features and another rule for errata. * Features are checked only once, aft

[PATCH] tracing: Use swap macro in update_max_tr

2018-02-09 Thread Gustavo A. R. Silva
Make use of the swap macro and remove unnecessary variable _buf_. This makes the code easier to read and maintain. Also, reduces the stack usage. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- kernel/trace/trace.c | 6 +- 1 file changed, 1 inserti

<    1   2   3   4   5   6   7   8   9   >