[PATCH v2 03/14] x86/crypto: aesni: Add GCM_INIT macro

2018-02-14 Thread Dave Watson
Reduce code duplication by introducting GCM_INIT macro. This macro will also be exposed as a function for implementing scatter/gather support, since INIT only needs to be called once for the full operation. Signed-off-by: Dave Watson --- arch/x86/crypto/aesni-intel_asm.S | 84 +++---

[PATCH v2 02/14] x86/crypto: aesni: Macro-ify func save/restore

2018-02-14 Thread Dave Watson
Macro-ify function save and restore. These will be used in new functions added for scatter/gather update operations. Signed-off-by: Dave Watson --- arch/x86/crypto/aesni-intel_asm.S | 53 ++- 1 file changed, 24 insertions(+), 29 deletions(-) diff --git a/arc

[PATCH v2 05/14] x86/crypto: aesni: Merge encode and decode to GCM_ENC_DEC macro

2018-02-14 Thread Dave Watson
Make a macro for the main encode/decode routine. Only a small handful of lines differ for enc and dec. This will also become the main scatter/gather update routine. Signed-off-by: Dave Watson --- arch/x86/crypto/aesni-intel_asm.S | 293 +++--- 1 file changed, 1

Re: clang asm-goto support (Was Re: [PATCH v2] x86/retpoline: Add clang support)

2018-02-14 Thread Linus Torvalds
On Wed, Feb 14, 2018 at 2:34 AM, Peter Zijlstra wrote: > > So it's far more than just tracepoints. We use it all over the kernel to > do runtime branch patching. Side note: I have a patch to the user access code to do "asm goto" for the exception handling too. In fact, the infrastructure is ther

[PATCH v2 10/14] x86/crypto: aesni: Move HashKey computation from stack to gcm_context

2018-02-14 Thread Dave Watson
HashKey computation only needs to happen once per scatter/gather operation, save it between calls in gcm_context struct instead of on the stack. Since the asm no longer stores anything on the stack, we can use %rsp directly, and clean up the frame save/restore macros a bit. Hashkeys actually only

[PATCH v2 08/14] x86/crypto: aesni: Fill in new context data structures

2018-02-14 Thread Dave Watson
Fill in aadhash, aadlen, pblocklen, curcount with appropriate values. pblocklen, aadhash, and pblockenckey are also updated at the end of each scatter/gather operation, to be carried over to the next operation. Signed-off-by: Dave Watson --- arch/x86/crypto/aesni-intel_asm.S | 51 +++

[PATCH v2 07/14] x86/crypto: aesni: Split AAD hash calculation to separate macro

2018-02-14 Thread Dave Watson
AAD hash only needs to be calculated once for each scatter/gather operation. Move it to its own macro, and call it from GCM_INIT instead of INITIAL_BLOCKS. Signed-off-by: Dave Watson --- arch/x86/crypto/aesni-intel_asm.S | 71 --- 1 file changed, 43 insertions

Re: [PATCH 1/3] jump_label: Warn on failed jump_label patch

2018-02-14 Thread Steven Rostedt
On Wed, 14 Feb 2018 11:34:07 -0600 Josh Poimboeuf wrote: > And in patch 1 the warning conditions need to be tweaked a bit to > exclude the __init case. > Hmm, I wonder if we could simply remove the references from the jump label table when init is freed. -- Steve

[PATCH v2 11/14] x86/crypto: aesni: Introduce partial block macro

2018-02-14 Thread Dave Watson
Before this diff, multiple calls to GCM_ENC_DEC will succeed, but only if all calls are a multiple of 16 bytes. Handle partial blocks at the start of GCM_ENC_DEC, and update aadhash as appropriate. The data offset %r11 is also updated after the partial block. Signed-off-by: Dave Watson --- arc

[PATCH v2 12/14] x86/crypto: aesni: Add fast path for > 16 byte update

2018-02-14 Thread Dave Watson
We can fast-path any < 16 byte read if the full message is > 16 bytes, and shift over by the appropriate amount. Usually we are reading > 16 bytes, so this should be faster than the READ_PARTIAL macro introduced in b20209c91e2 for the average case. Signed-off-by: Dave Watson --- arch/x86/crypto

[PATCH v2 09/14] x86/crypto: aesni: Move ghash_mul to GCM_COMPLETE

2018-02-14 Thread Dave Watson
Prepare to handle partial blocks between scatter/gather calls. For the last partial block, we only want to calculate the aadhash in GCM_COMPLETE, and a new partial block macro will handle both aadhash update and encrypting partial blocks between calls. Signed-off-by: Dave Watson --- arch/x86/cry

[PATCH v2 13/14] x86/crypto: aesni: Introduce scatter/gather asm function stubs

2018-02-14 Thread Dave Watson
The asm macros are all set up now, introduce entry points. GCM_INIT and GCM_COMPLETE have arguments supplied, so that the new scatter/gather entry points don't have to take all the arguments, and only the ones they need. Signed-off-by: Dave Watson --- arch/x86/crypto/aesni-intel_asm.S | 116 ++

Re: [Nouveau] 4.16-rc1: UBSAN warning in nouveau/nvkm/subdev/therm/base.c + oops in nvkm_therm_clkgate_fini

2018-02-14 Thread Pierre Moreau
On 2018-02-14 — 09:36, Ilia Mirkin wrote: > On Wed, Feb 14, 2018 at 9:35 AM, Ilia Mirkin wrote: > > On Wed, Feb 14, 2018 at 9:29 AM, Meelis Roos wrote: > >>> This is 4.16-rc1+todays git on a lowly P4 with NV5, worked fine in 4.15: > >> > >> NV5 in another PC (secondary card in x86-64) made the sy

[PATCH v2 14/14] x86/crypto: aesni: Update aesni-intel_glue to use scatter/gather

2018-02-14 Thread Dave Watson
Add gcmaes_crypt_by_sg routine, that will do scatter/gather by sg. Either src or dst may contain multiple buffers, so iterate over both at the same time if they are different. If the input is the same as the output, iterate only over one. Currently both the AAD and TAG must be linear, so copy them

[PATCH v2 06/14] x86/crypto: aesni: Introduce gcm_context_data

2018-02-14 Thread Dave Watson
Introduce a gcm_context_data struct that will be used to pass context data between scatter/gather update calls. It is passed as the second argument (after crypto keys), other args are renumbered. Signed-off-by: Dave Watson --- arch/x86/crypto/aesni-intel_asm.S | 115 +--

Re: BUG: free active (active state 0) object type: work_struct hint: strp_work

2018-02-14 Thread Tom Herbert
On Tue, Feb 13, 2018 at 12:15 PM, Dmitry Vyukov wrote: > > On Thu, Jan 4, 2018 at 8:36 PM, Tom Herbert wrote: > > On Thu, Jan 4, 2018 at 4:10 AM, syzbot > > wrote: > >> Hello, > >> > >> syzkaller hit the following crash on > >> 6bb8824732f69de0f233ae6b1a8158e149627b38 > >> git://git.kernel.org/p

[PATCH v2 04/14] x86/crypto: aesni: Add GCM_COMPLETE macro

2018-02-14 Thread Dave Watson
Merge encode and decode tag calculations in GCM_COMPLETE macro. Scatter/gather routines will call this once at the end of encryption or decryption. Signed-off-by: Dave Watson --- arch/x86/crypto/aesni-intel_asm.S | 172 ++ 1 file changed, 63 insertions(+), 109

Re: clang asm-goto support (Was Re: [PATCH v2] x86/retpoline: Add clang support)

2018-02-14 Thread Linus Torvalds
On Wed, Feb 14, 2018 at 7:31 AM, James Y Knight wrote: > > IMO, inline asm is, generally, a valuable feature to provide in the > compiler as an escape hatch, and asm goto is a relatively sane > extension of it. Side note: one thing that limits "asm goto" in gcc is the fact that you can't have out

Re: [PATCH net] bpf: cpumap: use GFP_KERNEL instead of GFP_ATOMIC in __cpu_map_entry_alloc()

2018-02-14 Thread Daniel Borkmann
On 02/14/2018 06:04 PM, Michael S. Tsirkin wrote: > On Wed, Feb 14, 2018 at 10:17:34PM +0800, Jason Wang wrote: >> There're several implications after commit 0bf7800f1799 ("ptr_ring: >> try vmalloc() when kmalloc() fails") with the using of vmalloc() since >> can't allow GFP_ATOMIC but mandate GFP_

[PATCH] bloat-o-meter: fix typo in help

2018-02-14 Thread Matteo Croce
the bloat-o-meter script has two typos in the help, fix both. Fixes: 192efb7a1f9b ("bloat-o-meter: provide 3 different arguments for data, function and All") Signed-off-by: Matteo Croce --- scripts/bloat-o-meter | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bloat-o

Re: plan9 semantics on Linux - mount namespaces

2018-02-14 Thread Richard Weinberger
Am Mittwoch, 14. Februar 2018, 18:21:12 CET schrieb Enrico Weigelt: > On 14.02.2018 16:17, Richard Weinberger wrote: > > From taking a *very* quick look into busybox source, I suspect this > > should fix> > > it: > > > > diff --git a/util-linux/unshare.c b/util-linux/unshare.c > > index 875e3f8

Re: [RFC PATCH ghak21 1/4] audit: make ANOM_LINK obey audit_enabled and audit_dummy_context

2018-02-14 Thread Kees Cook
On Wed, Feb 14, 2018 at 8:18 AM, Richard Guy Briggs wrote: > Audit link denied events emit disjointed records when audit is disabled. > No records should be emitted when audit is disabled. > > See: https://github.com/linux-audit/audit-kernel/issues/21 > Signed-off-by: Richard Guy Briggs > --- >

Re: KASAN: use-after-free Read in rds_find_bound

2018-02-14 Thread Dmitry Vyukov
On Wed, Feb 14, 2018 at 6:35 PM, Santosh Shilimkar wrote: Hi Santosh, What is that fix? You forgot to provide any link/reference. I also don't see any patches from you at around that date... >>> Fix [1] was later not added since there was a still a race. Wanted to >>> see

Re: [PATCH 8/9] x86/mm: Make __VIRTUAL_MASK_SHIFT dynamic

2018-02-14 Thread Kirill A. Shutemov
On Wed, Feb 14, 2018 at 05:22:58PM +, Andy Lutomirski wrote: > On Wed, Feb 14, 2018 at 11:16 AM, Kirill A. Shutemov > wrote: > > For boot-time switching between paging modes, we need to be able to > > adjust virtual mask shifts. > > > > The change doesn't affect the kernel image size much: > >

Re: [PATCH] p9caps: add Plan9 capability devices

2018-02-14 Thread Enrico Weigelt
On 14.02.2018 15:56, Serge E. Hallyn wrote: If it's an out of tree module you'd have to do it this way, but if > it's in-tree, even as a module, adding a bit to the userns struct> would imo be ok. Assuming one doesn't try to load the module when the kernel image previously was built w/o it ;-)

Re: [PATCH net] bpf: cpumap: use GFP_KERNEL instead of GFP_ATOMIC in __cpu_map_entry_alloc()

2018-02-14 Thread Michal Hocko
On Wed 14-02-18 18:34:51, Jesper Dangaard Brouer wrote: > On Wed, 14 Feb 2018 16:06:40 +0100 > Michal Hocko wrote: > > > On Wed 14-02-18 22:17:34, Jason Wang wrote: > > > There're several implications after commit 0bf7800f1799 ("ptr_ring: > > > try vmalloc() when kmalloc() fails") with the using

[PATCH 1/2] x86/entry: reduce static footprint of idtentry

2018-02-14 Thread Dominik Brodowski
Play a little trick in the generic PUSH_AND_CLEAR_REGS macro to insert the GP registers "above" the original return address. This allows us to (re-)insert the macro in error_entry() and paranoid_entry() and to remove it from the idtentry macro. This reduces the static footprint significantly: t

Re: KASAN: use-after-free Read in rds_find_bound

2018-02-14 Thread Santosh Shilimkar
On 2/14/2018 9:52 AM, Dmitry Vyukov wrote: On Wed, Feb 14, 2018 at 6:35 PM, Santosh Shilimkar wrote: Hi Santosh, What is that fix? You forgot to provide any link/reference. I also don't see any patches from you at around that date... Fix [1] was later not added since there was a still a race

[PATCH 2/2] x86/entry/64: use xorl for register clearing

2018-02-14 Thread Dominik Brodowski
Using xorq to clear general-purpose registers is slower than xorl on some architectures. As xorl is sufficient to clear all 64bit of these registers,[*] switch the x86 64-bit entry code to use xorl. [*] According to Intel 64 and IA-32 Architecture Software Developer's Manual, section 3.4.1.1,

[PATCH 0/2] x86/entry: xorq->xorl; idtentry size reduction

2018-02-14 Thread Dominik Brodowski
These two patches apply on top of tip/pti. The first one cuts the idtentry macro as suggested by Linus. I'm not sure whether this patch yet needs an explicit SOB by him though. It was previously sent as RFC / testing only patch "8/7" to the previous x86/entry-related series, cf. http://lkml.kernel

Re: plan9 semantics on Linux - mount namespaces

2018-02-14 Thread Enrico Weigelt
On 14.02.2018 18:50, Richard Weinberger wrote: hmm, now it works, but only when strace'ing it. that's really strange. On my box, with my patch applied, also busybox works now. hmm, w/o strace, too ? Which version are you using ? I've got 1.27.2 But still I wonder whether user_ns really sol

Re: [PATCH 8/9] x86/mm: Make __VIRTUAL_MASK_SHIFT dynamic

2018-02-14 Thread Andy Lutomirski
On Wed, Feb 14, 2018 at 5:55 PM, Kirill A. Shutemov wrote: > On Wed, Feb 14, 2018 at 05:22:58PM +, Andy Lutomirski wrote: >> On Wed, Feb 14, 2018 at 11:16 AM, Kirill A. Shutemov >> wrote: >> > For boot-time switching between paging modes, we need to be able to >> > adjust virtual mask shifts.

apm_32.c: undefined reference to `cpuidle_poll_state_init'

2018-02-14 Thread Meelis Roos
This is 4.16-rc1+git as of today, on a IBM PC 365 that uses APM instead of ACPI. APM linking fails: MODPOST vmlinux.o arch/x86/kernel/apm_32.o: In function `apm_init': apm_32.c:(.init.text+0x597): undefined reference to `cpuidle_poll_state_init' Config: # # Automatically generated file; DO NO

Linux 3.2.99

2018-02-14 Thread Ben Hutchings
I'm announcing the release of the 3.2.99 kernel. All users of the 3.2 kernel series should upgrade. The updated 3.2.y git tree can be found at: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.2.y and can be browsed at the normal kernel.org git web browser:

checkpatch: Improve parse_email signature checking

2018-02-14 Thread Joe Perches
Bare email addresses with non alphanumeric characters require escape quoting before being substituted in the parse_email routine. e.g. Reported-by: syzbot+bbd8e9a06452cc480...@syzkaller.appspotmail.com Do so. Signed-off-by: Joe Perches --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insert

Re: plan9 semantics on Linux - mount namespaces

2018-02-14 Thread Richard Weinberger
Am Mittwoch, 14. Februar 2018, 19:01:52 CET schrieb Enrico Weigelt: > On 14.02.2018 18:50, Richard Weinberger wrote: > >> hmm, now it works, but only when strace'ing it. > >> that's really strange. > > > > On my box, with my patch applied, also busybox works now. > > hmm, w/o strace, too ? Sure.

Re: [PATCH char-misc 1/1] Drivers: hv: vmbus: Fix ring buffer signaling

2018-02-14 Thread Stephen Hemminger
What about the following simplification. If on older hosts you can avoid more code and the additional barrier. Also cleanup comment wording somewhat. From de2d566d9092cbbc8e5974dea581617ef787ff69 Mon Sep 17 00:00:00 2001 From: Michael Kelley Date: Sat, 10 Feb 2018 20:48:49 + Subject: [PATC

Re: linux-next: unnecessary merge in the v4l-dvb tree

2018-02-14 Thread Junio C Hamano
Linus Torvalds writes: > On Tue, Feb 13, 2018 at 9:18 AM, Junio C Hamano wrote: >> >> That makes me wonder if another heuristic I floated earlier is more >> appropriate. When merging a tag object T, if refs/tags/T exists and >> it is that tag object, then an updated "merge" would default to "--

Re: [PATCH] watchdog: hpwdt: Remove spinlock acquire and BIOS calls from NMI context

2018-02-14 Thread Jerry Hoemann
Ingo, I have a patch set under review that brings hpwdt into compliance with the watchdog core. One of the changes removes the callback into firmware in hpwdt_pretimeout and its associated spinlock. https://lkml.org/lkml/2018/2/12/30 I will add you to the CC list of the next version of the set

Re: [RFC PATCH V2 00/22] Intel(R) Resource Director Technology Cache Pseudo-Locking enabling

2018-02-14 Thread Mike Kravetz
On 02/13/2018 07:46 AM, Reinette Chatre wrote: > Adding MM maintainers to v2 to share the new MM change (patch 21/22) that > enables large contiguous regions that was created to support large Cache > Pseudo-Locked regions (patch 22/22). This week MM team received another > proposal to support large

Re: [PATCH v2 1/2] pvcalls-front: introduce a per sock_mapping refcount

2018-02-14 Thread Stefano Stabellini
On Wed, 14 Feb 2018, Juergen Gross wrote: > On 13/02/18 03:13, Stefano Stabellini wrote: > > Introduce a per sock_mapping refcount, in addition to the existing > > global refcount. Thanks to the sock_mapping refcount, we can safely wait > > for it to be 1 in pvcalls_front_release before freeing an

RE: i8042 AUX port [serio1] suspend takes a second on Dell XPS 13 9360

2018-02-14 Thread Mario.Limonciello
> -Original Message- > From: Paul Menzel [mailto:pmenzel+linux-in...@molgen.mpg.de] > Sent: Wednesday, February 14, 2018 10:41 AM > To: Dmitry Torokhov > Cc: linux-in...@vger.kernel.org; linux-kernel@vger.kernel.org; it+linux- > in...@molgen.mpg.de; Limonciello, Mario ; > Thorsten Leemhu

Re: [PATCH v2 1/5] dmaengine: qcom: bam_dma: make bam clk optional

2018-02-14 Thread Srinivas Kandagatla
Thanks for the Review, On 14/02/18 15:41, Bjorn Andersson wrote: bdev->bamclk = devm_clk_get(bdev->dev, "bam_clk"); - if (IS_ERR(bdev->bamclk)) - return PTR_ERR(bdev->bamclk); - - ret = clk_prepare_enable(bdev->bamclk); - if (ret) { - dev_err(b

Re: [PATCH] Make kernel taint on invalid module signatures configurable

2018-02-14 Thread Matthew Garrett
Hi Jessica, Any objections to this patch? Thanks!

Re: [PATCH 2/2] x86/entry/64: use xorl for register clearing

2018-02-14 Thread Alexey Dobriyan
> - xorq%r8, %r8/* nospec r8 */ > + xorl%r8d, %r8d /* nospec r8 */ The suffix should be simply dropped as operand size is unambigious. It is just one more character than necessary on the screen.

[RFC PATCH 3/4] x86/entry/64: move switch_to_thread_stack to interrupt helper function

2018-02-14 Thread Dominik Brodowski
We can also move the SWAPGS and the switch_to_thread_stack to the interrupt helper function. As we do not want call depths of two, convert switch_to_thread_stack to a macro. However, as entry_64_compat.S expects switch_to_thread_stack to be a function, provide a wrapper for that, which leads to som

Re: [GIT PULL] arm64 spectre and meltdown mitigations for v4.14-stable

2018-02-14 Thread Greg KH
On Wed, Feb 14, 2018 at 03:49:36PM +, Ard Biesheuvel wrote: > On 14 February 2018 at 15:40, Greg KH wrote: > > On Wed, Feb 14, 2018 at 02:34:01PM +, Ard Biesheuvel wrote: > >> On 14 February 2018 at 14:24, Ard Biesheuvel > >> wrote: > >> > On 14 February 2018 at 13:54, Greg KH wrote: >

[RFC PATCH 0/4] x86/entry/64: interrupt entry size reduction

2018-02-14 Thread Dominik Brodowski
This patchset applies on top of the two other tip/pti-related patches I sent out moments ago,[*] and try to implement what Linus suggested a few days ago[+]. [+] http://lkml.kernel.org/r/20180214175924.23065-1-li...@dominikbrodowski.net [*] http://lkml.kernel.org/r/CA+55aFwLTF3EtaQ4OpDv2UM41J=EU7

Re: [PATCH] arm64: Move post_ttbr_update_workaround to C code

2018-02-14 Thread Greg KH
On Wed, Feb 14, 2018 at 03:51:40PM +, Ard Biesheuvel wrote: > From: Marc Zyngier > > Commit 95e3de3590e3 upstream. > > We will soon need to invoke a CPU-specific function pointer after changing > page tables, so move post_ttbr_update_workaround out into C code to make > this possible. > > S

Re: Patch "[Variant 2/Spectre-v2] arm64: Implement branch predictor hardening for Falkor" has been added to the 4.14-stable tree

2018-02-14 Thread Greg Kroah-Hartman
On Wed, Feb 14, 2018 at 10:16:51AM -0600, Timur Tabi wrote: > On Wed, Feb 14, 2018 at 7:53 AM, wrote: > > > > This is a note to let you know that I've just added the patch titled > > > > [Variant 2/Spectre-v2] arm64: Implement branch predictor hardening for > > Falkor > > > > to the 4.14-sta

[RFC PATCH 4/4] x86/entry/64: remove interrupt macro

2018-02-14 Thread Dominik Brodowski
It is now trivial to call the interrupt helper function and then the actual worker. Therefore, remove the interrupt macro. Suggested-by: Linus Torvalds Signed-off-by: Dominik Brodowski --- arch/x86/entry/entry_64.S | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --g

[RFC PATCH 1/4] x86/entry/64: move PUSH_AND_CLEAR_REGS from interrupt macro to helper function

2018-02-14 Thread Dominik Brodowski
The PUSH_AND_CLEAR_REGS macro is able to insert the GP registers "above" the original return address. This allows us to move a sizeable part of the interrupt entry macro to an interrupt entry helper function: textdata bss dec hex filename 20987 0 0 2098751fb

[RFC PATCH 2/4] x86/entry/64: move ENTER_IRQ_STACK from interrupt macro to helper function

2018-02-14 Thread Dominik Brodowski
Moving the switch to IRQ stack from the interrupt macro to the helper function requires some trickery: All ENTER_IRQ_STACK really cares about is where the "original" stack -- meaning the GP registers etc. -- is stored. Therefore, we need to offset the stored RSP value by 8 whenever ENTER_IRQ_STACK

[PATCH 8/9] x86/mm: Replace compile-time checks for 5-level with runtime-time

2018-02-14 Thread Kirill A. Shutemov
This patch converts the of CONFIG_X86_5LEVEL check to runtime checks for p4d folding. Signed-off-by: Kirill A. Shutemov --- arch/x86/include/asm/pgtable_64.h | 23 ++- arch/x86/mm/dump_pagetables.c | 4 +--- arch/x86/mm/fault.c | 4 ++-- arch/x86/mm/ident_

[PATCH v3 0/2] pvcalls-front improvements

2018-02-14 Thread Stefano Stabellini
Hi all, this small series introduces a per socket refcount to increase the efficiency on socket release operations, and makes releasing passive sockets safe. Cheers, Stefano Changes in v3: - remove pointless initializers - reorder pvcalls_enter_sock Changes in v2: - add acked-by - fix check i

Re: Read-protected UEFI variables

2018-02-14 Thread Môshe van der Sterre
On 02/14/2018 02:21 PM, Benjamin Drung wrote: > If the UEFI is as secure as storing an unencrypted file on a hard > drive, I am satisfied. Or do you have a better idea where to store the > SSH keys for a diskless system that boots via network? I assume it would be best to use TPM for this (if your

[PATCH 0/2] Add kvzalloc_struct to complement kvzalloc_array

2018-02-14 Thread Matthew Wilcox
From: Matthew Wilcox We all know the perils of multiplying a value provided from userspace by a constant and then allocating the resulting number of bytes. That's why we have kvmalloc_array(), so we don't have to think about it. This solves the same problem when we embed one of these arrays in a

[PATCH 2/2] mm: Add kvmalloc_ab_c and kvzalloc_struct

2018-02-14 Thread Matthew Wilcox
From: Matthew Wilcox We have kvmalloc_array in order to safely allocate an array with a number of elements specified by userspace (avoiding arithmetic overflow leading to a buffer overrun). But it's fairly common to have a header in front of that array (eg specifying the length of the array), so

[PATCH 1/2] mm: Add kernel-doc for kvfree

2018-02-14 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- mm/util.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/mm/util.c b/mm/util.c index c1250501364f..dc4c7b551aaf 100644 --- a/mm/util.c +++ b/mm/util.c @@ -430,6 +430,16 @@ void *kvmalloc_node(size_t size, gfp_t flags, int n

Re: [PATCH 2/2] x86/entry/64: use xorl for register clearing

2018-02-14 Thread Dominik Brodowski
On Wed, Feb 14, 2018 at 09:21:12PM +0300, Alexey Dobriyan wrote: > > - xorq%r8, %r8/* nospec r8 */ > > + xorl%r8d, %r8d /* nospec r8 */ > > The suffix should be simply dropped as operand size is unambigious. > It is just one more character than necessary on the screen.

[PATCH 5/9] x86/mm: Initialize vmemmap_base at boot-time

2018-02-14 Thread Kirill A. Shutemov
vmemmap area has different placement depending on paging mode. Let's adjust it during early boot accodring to machine capability. Signed-off-by: Kirill A. Shutemov --- arch/x86/include/asm/pgtable_64_types.h | 9 +++-- arch/x86/kernel/head64.c| 3 ++- 2 files changed, 5 inser

[PATCH 9/9] x86/mm: Allow to boot without la57 if CONFIG_X86_5LEVEL=y

2018-02-14 Thread Kirill A. Shutemov
All pieces of the puzzle are in place and we can now allow to boot with CONFIG_X86_5LEVEL=y on a machine without la57 support. Kernel will detect that la57 is missing and fold p4d at runtime. Update documentation and Kconfig option description to reflect the change. Signed-off-by: Kirill A. Shut

[PATCH 6/9] x86/mm: Make early boot code support boot-time switching of paging modes

2018-02-14 Thread Kirill A. Shutemov
Early boot code should be able to initialize page tables for both 4- and 5-level paging modes. Signed-off-by: Kirill A. Shutemov --- arch/x86/kernel/head64.c | 33 ++--- arch/x86/kernel/head_64.S | 10 -- 2 files changed, 26 insertions(+), 17 deletions(-) di

[PATCH 7/9] x86/mm: Fold p4d page table layer at runtime

2018-02-14 Thread Kirill A. Shutemov
This patch changes page table helpers to fold p4d at runtime. The logic is the same as in . Signed-off-by: Kirill A. Shutemov --- arch/x86/include/asm/paravirt.h | 10 ++ arch/x86/include/asm/pgalloc.h | 5 - arch/x86/include/asm/pgtable.h | 11 ++- 3 files changed, 20 ins

[PATCH v3 1/2] pvcalls-front: introduce a per sock_mapping refcount

2018-02-14 Thread Stefano Stabellini
Introduce a per sock_mapping refcount, in addition to the existing global refcount. Thanks to the sock_mapping refcount, we can safely wait for it to be 1 in pvcalls_front_release before freeing an active socket, instead of waiting for the global refcount to be 1. Signed-off-by: Stefano Stabellini

[PATCH 0/9] x86: enable boot-time switching between paging modes

2018-02-14 Thread Kirill A. Shutemov
This patchset finally brings support of switching between 4- and 5-level paging modes! There will be few patches after this to optimize switching and support mode Xen modes, but this makes the same kernel image to run on both 4- and 5-level machines. Please review and consider applying. First 5

[PATCH v3 2/2] pvcalls-front: wait for other operations to return when release passive sockets

2018-02-14 Thread Stefano Stabellini
Passive sockets can have ongoing operations on them, specifically, we have two wait_event_interruptable calls in pvcalls_front_accept. Add two wake_up calls in pvcalls_front_release, then wait for the potential waiters to return and release the sock_mapping refcount. Signed-off-by: Stefano Stabel

[PATCH 3/9] x86/mm: Initialize page_offset_base at boot-time

2018-02-14 Thread Kirill A. Shutemov
For 4- and 5-level paging we have different page_offset_base. Let's initialize it at boot-time accordingly to machine capability. We also have to split __PAGE_OFFSET_BASE into two constants -- for 4- and 5-level paging. Signed-off-by: Kirill A. Shutemov --- arch/x86/include/asm/page_64_types.h

[PATCH 4/9] x86/mm: Adjust vmalloc base and size at boot-time

2018-02-14 Thread Kirill A. Shutemov
vmalloc area has different placement and size depending on paging mode. Let's adjust it during early boot accodring to machine capability. Signed-off-by: Kirill A. Shutemov --- arch/x86/include/asm/pgtable_64_types.h | 16 ++-- arch/x86/kernel/head64.c| 3 ++- arch/x

[PATCH 2/9] x86/mm: Initialize pgdir_shift and ptrs_per_p4d at boot-time

2018-02-14 Thread Kirill A. Shutemov
Switching between paging modes requires folding p4d page table level. It means we need to adjust pgdir_shift and ptrs_per_p4d during early boot according to paging mode. Signed-off-by: Kirill A. Shutemov --- arch/x86/boot/compressed/kaslr.c | 6 -- arch/x86/kernel/head64.c | 6 --

[PATCH 1/9] x86/mm: Initialize pgtable_l5_enabled at boot-time

2018-02-14 Thread Kirill A. Shutemov
pgtable_l5_enabled indicates which paging mode we are using. We need to initialize it at boot-time according to machine capability. Signed-off-by: Kirill A. Shutemov --- arch/x86/boot/compressed/kaslr.c | 8 +++- arch/x86/kernel/head64.c | 24 +++- 2 files change

[PATCH 0/2] crypto/caam: Adjustments for eight function implementations

2018-02-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Feb 2018 19:23:45 +0100 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Delete an error message for a failed memory allocation in seven functions Use common error handling code in four functions drivers

[PATCH 1/2] crypto: caam: Delete an error message for a failed memory allocation in seven functions

2018-02-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Feb 2018 18:22:38 +0100 Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/crypto/caam/caamalg.c | 6 +- drivers/crypto/caam/caam

Re: [RFC PATCH V2 00/22] Intel(R) Resource Director Technology Cache Pseudo-Locking enabling

2018-02-14 Thread Reinette Chatre
Hi Mike, On 2/14/2018 10:12 AM, Mike Kravetz wrote: > On 02/13/2018 07:46 AM, Reinette Chatre wrote: >> Adding MM maintainers to v2 to share the new MM change (patch 21/22) that >> enables large contiguous regions that was created to support large Cache >> Pseudo-Locked regions (patch 22/22). This

Assalamu`Alaikum.

2018-02-14 Thread Mohammad Ouattara
Dear Sir/Madam. Assalamu`Alaikum. I am Dr mohammad ouattara, I have ($14.6 Million us dollars) to transfer into your account, I will send you more details about this deal and the procedures to follow when I receive a positive response from you, Have a great day, Dr mohammad ouattara.

[PATCH 2/2] crypto: caam: Use common error handling code in four functions

2018-02-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Feb 2018 19:14:49 +0100 Add jump targets so that a bit of exception handling can be better reused at the end of these functions. Signed-off-by: Markus Elfring --- drivers/crypto/caam/caamalg.c | 32 drivers/crypto/caam/caamha

Re: plan9 semantics on Linux - mount namespaces

2018-02-14 Thread Enrico Weigelt
On 14.02.2018 19:12, Richard Weinberger wrote: BTW: Your issue is fixed/known. Just checked. aha, on 1.2.28 ... I'll have to upgrade. --mtx -- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering i...@metux.net -- +49-151-27565287

Re: [RFC PATCH 2/4] x86/entry/64: move ENTER_IRQ_STACK from interrupt macro to helper function

2018-02-14 Thread Brian Gerst
On Wed, Feb 14, 2018 at 1:21 PM, Dominik Brodowski wrote: > Moving the switch to IRQ stack from the interrupt macro to the helper > function requires some trickery: All ENTER_IRQ_STACK really cares about > is where the "original" stack -- meaning the GP registers etc. -- is > stored. Therefore, we

[PATCH 1/8] docs: kernel-doc: Get rid of xml_escape() and friends

2018-02-14 Thread Jonathan Corbet
XML escaping is a worry that came with DocBook, which we no longer have any dealings with. So get rid of the useless xml_escape()/xml_unescape() functions. No change to the generated output. Signed-off-by: Jonathan Corbet --- scripts/kernel-doc | 65

[PATCH 7/8] docs: kernel-doc: Finish moving STATE_* code out of process_file()

2018-02-14 Thread Jonathan Corbet
Move STATE_INLINE and STATE_DOCBLOCK code out of process_file(), which now actually fits on a single screen. Delete an unused variable and add a couple of comments while I'm at it. Reviewed-by: Jani Nikula Signed-off-by: Jonathan Corbet --- scripts/kernel-doc | 139

[PATCH 8/8] docs: kernel-doc: Don't mangle literal code blocks in comments

2018-02-14 Thread Jonathan Corbet
It can be useful to put code snippets into kerneldoc comments; that can be done with the "::" operator at the end of a line like this:: if (desperate) run_in_circles(); The ".. code-block::" directive can also be used to this end. kernel-doc currently fails to understand these literal

[PATCH 6/8] docs: kernel-doc: Move STATE_PROTO processing into its own function

2018-02-14 Thread Jonathan Corbet
Move the top-level prototype-processing code out of process_file(). Reviewed-by: Jani Nikula Signed-off-by: Jonathan Corbet --- scripts/kernel-doc | 46 -- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/scripts/kernel-doc b/scripts/ke

Re: clang asm-goto support (Was Re: [PATCH v2] x86/retpoline: Add clang support)

2018-02-14 Thread Peter Zijlstra
On Wed, Feb 14, 2018 at 09:31:22AM -0800, Kees Cook wrote: > On Wed, Feb 14, 2018 at 1:08 AM, Peter Zijlstra wrote: > > If you ever get to the point where it makes sense to build a kernel with > > LLVM [...] > > Just to speak to this point in particular: it makes sense to build > kernels with LLV

[PATCH 5/8] docs: kernel-doc: Move STATE_BODY processing to a separate function

2018-02-14 Thread Jonathan Corbet
Also group the pseudo-global $leading_space variable with its peers. Reviewed-by: Jani Nikula Signed-off-by: Jonathan Corbet --- scripts/kernel-doc | 193 - 1 file changed, 101 insertions(+), 92 deletions(-) diff --git a/scripts/kernel-doc b/

[PATCH 2/8] docs: kernel-doc: Rename and split STATE_FIELD

2018-02-14 Thread Jonathan Corbet
STATE_FIELD describes a parser state that can handle any part of a kerneldoc comment body; rename it to STATE_BODY to reflect that. The $in_purpose variable was a hidden substate of STATE_FIELD; get rid of it and make a proper state (STATE_BODY_MAYBE) instead. This will make the subsequent proces

[PATCH 4/8] docs: kernel-doc: Move STATE_NAME processing into its own function

2018-02-14 Thread Jonathan Corbet
Move this code out of process_file() in the name of readability and maintainability. Reviewed-by: Jani Nikula Signed-off-by: Jonathan Corbet --- scripts/kernel-doc | 137 - 1 file changed, 72 insertions(+), 65 deletions(-) diff --git a/script

[PATCH v2 0/8] docs: Cleanup kernel-doc and fix literal block handling

2018-02-14 Thread Jonathan Corbet
So once upon a time I set out to fix the problem reported by Tobin wherein a literal block within a kerneldoc comment would be corrupted in processing. On the way, though, I got annoyed at the way I have to learn how kernel-doc works from the beginning every time I tear into it. As a result, seve

[PATCH 3/8] docs: kernel-doc: Move STATE_NORMAL processing into its own function

2018-02-14 Thread Jonathan Corbet
Begin the process of splitting up the nearly 500-line process_file() function by moving STATE_NORMAL processing to a separate function. Reviewed-by: Jani Nikula Signed-off-by: Jonathan Corbet --- scripts/kernel-doc | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) di

[PATCH] gpu: ipu-v3: make const arrays int_reg static, shrinks object size

2018-02-14 Thread Colin King
From: Colin Ian King Don't populate the const read-only arrays int_reg on the stack but instead make them static. Makes the object code smaller by over 80 bytes: Before: textdata bss dec hex filename 280248936 192 371529120 drivers/gpu/ipu-v3/ipu-common.o Afte

Re: block: oopses on 4.13.*, 4.14.* and 4.15-rc2

2018-02-14 Thread Michele Ballabio
On Tue, 13 Feb 2018 21:20:47 -0600 cso...@cpinternet.com wrote: > Greetings Ming, > > Do you have the patches that fix this? I'm getting these crashes too > on Linux 4.13. > > The link to mark.info doesn't have the patches anymore, at least not > that I can tell. > > TIA! > You can cherry-pick

Re: [PATCH v2 1/5] dmaengine: qcom: bam_dma: make bam clk optional

2018-02-14 Thread Bjorn Andersson
On Wed 14 Feb 10:19 PST 2018, Srinivas Kandagatla wrote: > Thanks for the Review, > > On 14/02/18 15:41, Bjorn Andersson wrote: > > > bdev->bamclk = devm_clk_get(bdev->dev, "bam_clk"); > > > - if (IS_ERR(bdev->bamclk)) > > > - return PTR_ERR(bdev->bamclk); > > > - > > > - ret =

Re: [PATCH 0/2] Add kvzalloc_struct to complement kvzalloc_array

2018-02-14 Thread Joe Perches
On Wed, 2018-02-14 at 10:26 -0800, Matthew Wilcox wrote: > From: Matthew Wilcox > > We all know the perils of multiplying a value provided from userspace > by a constant and then allocating the resulting number of bytes. That's > why we have kvmalloc_array(), so we don't have to think about it.

Re: KASAN: use-after-free Read in rds_tcp_tune

2018-02-14 Thread Jason Gunthorpe
On Wed, Feb 14, 2018 at 10:35:55AM -0500, Sowmini Varadhan wrote: > On (02/14/18 16:28), Dmitry Vyukov wrote: > > syzbot is probably not seeing this problem. However if you don't add > > the Reported-by tag to commit, nor provide syz fix tag, it will > > consider it as "open". One consequence of th

Re: Patch "[Variant 2/Spectre-v2] arm64: Implement branch predictor hardening for Falkor" has been added to the 4.14-stable tree

2018-02-14 Thread Catalin Marinas
On Wed, Feb 14, 2018 at 07:23:46PM +0100, Greg Kroah-Hartman wrote: > On Wed, Feb 14, 2018 at 10:16:51AM -0600, Timur Tabi wrote: > > On Wed, Feb 14, 2018 at 7:53 AM, wrote: > > > > > > This is a note to let you know that I've just added the patch titled > > > > > > [Variant 2/Spectre-v2] arm

Re: arm64/v4.16-rc1: KASAN: use-after-free Read in finish_task_switch

2018-02-14 Thread Mathieu Desnoyers
- On Feb 14, 2018, at 11:51 AM, Mark Rutland mark.rutl...@arm.com wrote: > On Wed, Feb 14, 2018 at 03:07:41PM +, Will Deacon wrote: >> Hi Mark, > > Hi Will, > >> Cheers for the report. These things tend to be a pain to debug, but I've had >> a go. > > Thanks for taking a look! > >> On

Re: [RFC PATCH 3/4] x86/entry/64: move switch_to_thread_stack to interrupt helper function

2018-02-14 Thread Brian Gerst
On Wed, Feb 14, 2018 at 1:21 PM, Dominik Brodowski wrote: > We can also move the SWAPGS and the switch_to_thread_stack to the > interrupt helper function. As we do not want call depths of two, > convert switch_to_thread_stack to a macro. However, as entry_64_compat.S > expects switch_to_thread_sta

Re: KASAN: use-after-free Read in rds_tcp_tune

2018-02-14 Thread Dmitry Vyukov
On Wed, Feb 14, 2018 at 7:49 PM, Jason Gunthorpe wrote: > On Wed, Feb 14, 2018 at 10:35:55AM -0500, Sowmini Varadhan wrote: >> On (02/14/18 16:28), Dmitry Vyukov wrote: >> > syzbot is probably not seeing this problem. However if you don't add >> > the Reported-by tag to commit, nor provide syz fix

Re: [PATCH v7 3/9] arm: omap: Move dmtimer.h out of plat-omap

2018-02-14 Thread Tony Lindgren
* Keerthy [180214 04:51]: > On Tuesday 13 February 2018 07:36 AM, Suman Anna wrote: > > These headers are actually not needed in the first-place since we no > > longer create any non-DT timer devices. I have submitted a series to > > cleanup the presence of this header file, as part of a larger hw

Re: [PATCH 1/8] docs: kernel-doc: Get rid of xml_escape() and friends

2018-02-14 Thread Jani Nikula
On Wed, 14 Feb 2018, Jonathan Corbet wrote: > XML escaping is a worry that came with DocBook, which we no longer have any > dealings with. So get rid of the useless xml_escape()/xml_unescape() > functions. No change to the generated output. > > Signed-off-by: Jonathan Corbet Reviewed-by: Jani

Re: [PATCH 2/2] mtd: nand: gpmi: add support for specific ECC strength

2018-02-14 Thread Boris Brezillon
On Wed, 14 Feb 2018 16:28:36 + Han Xu wrote: > On 02/06/2018 11:40 AM, Stefan Agner wrote: > > Add support for specified ECC strength/size using device tree > > properties nand-ecc-strength/nand-ecc-step-size. > > > > Signed-off-by: Stefan Agner > > --- > > .../devicetree/bindings/mtd/gpmi

<    2   3   4   5   6   7   8   9   10   >