Re: [PATCH] retpoline/module: Taint kernel for missing retpoline in module

2018-01-13 Thread Greg KH
On Fri, Jan 12, 2018 at 09:55:07AM -0800, Andi Kleen wrote: > From: Andi Kleen > > There's a risk that a kernel that has full retpoline mitigations > becomes vulnerable when a module gets loaded that hasn't been > compiled with the right compiler or the right option. > >

Re: [PATCH] EDAC, mv64x60: Remove some code duplication

2018-01-13 Thread Borislav Petkov
+ Chris Packham who's been fixing some stuff in here too. On Sat, Jan 13, 2018 at 08:28:21AM +0100, Christophe JAILLET wrote: > Reorder the error handling code in order to release the resources in > reverse order than allocation. > > Introduce a new 'release_group' label in the error handling

Re: [PATCHSET v5] blk-mq: reimplement timeout handling

2018-01-13 Thread Ming Lei
On Fri, Jan 12, 2018 at 04:55:34PM -0500, Laurence Oberman wrote: > On Fri, 2018-01-12 at 20:57 +, Bart Van Assche wrote: > > On Tue, 2018-01-09 at 08:29 -0800, Tejun Heo wrote: > > > Currently, blk-mq timeout path synchronizes against the usual > > > issue/completion path using a complex

Re: [PATCH 1/5] x86/ibrs: Introduce native_rdmsrl, and native_wrmsrl

2018-01-13 Thread Andy Lutomirski
> On Jan 13, 2018, at 5:52 AM, Van De Ven, Arjan > wrote: > > >>> We were also worried about the indirect calls that are part of the >>> paravirt interfaces when retpolines are not in place. >>> >> >> How could those possibly be any worse than any other indirect

Re: [PATCH 4.9] x86/pti/efi: broken conversion from efi to kernel page table

2018-01-13 Thread Greg KH
On Sat, Jan 13, 2018 at 12:40:10PM -0500, Pavel Tatashin wrote: > Hi Greg, > > Yeah, the one in pgtable.c needs to be removed, I wonder how it > compiled... I will submit a new patch for 4.9 sometime later. It builds, just gives a warning, easy to miss if you aren't looking for it :)

[PATCH] Coccinelle: alloc_cast: Add more memory allocating functions to the list

2018-01-13 Thread Himanshu Jha
Add more memory allocating functions that are frequently used in the kernel code to the existing list and remove the useless casts where it is unnecessary. But preserve those casts having __attribute__ such as __force, __iomem, etc which are used by Sparse in the static analysis of the code.

[PATCH] Coccinelle: kzalloc-simple: Rename kzalloc-simple to zalloc-simple

2018-01-13 Thread Himanshu Jha
Rename kzalloc-simple to zalloc-simple since now the rule is not specific to kzalloc function only, but also to many other zero memory allocating functions specified in the rule. Signed-off-by: Himanshu Jha --- scripts/coccinelle/api/alloc/kzalloc-simple.cocci | 448

Re: [PATCH] Coccinelle: kzalloc-simple: Rename kzalloc-simple to zalloc-simple

2018-01-13 Thread Julia Lawall
On Sat, 13 Jan 2018, Himanshu Jha wrote: > Rename kzalloc-simple to zalloc-simple since now the rule is not > specific to kzalloc function only, but also to many other zero memory > allocating functions specified in the rule. > > Signed-off-by: Himanshu Jha

[PATCH] fs/proc: Use seq_putc() in show_console_dev()

2018-01-13 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 13 Jan 2018 17:17:59 +0100 A single character (line break) should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring

[PATCH] mtd: onenand: samsung: remove incorrect __iomem annotation

2018-01-13 Thread Christophe JAILLET
'page_buf' and 'oob_buf' are allocated with 'devm_kzalloc()' and should not have __iommem decoration. Remove these decorations and some useless casting. Signed-off-by: Christophe JAILLET --- drivers/mtd/onenand/samsung.c | 12 ++-- 1 file changed, 6

Re: [PATCH 4.9] x86/pti/efi: broken conversion from efi to kernel page table

2018-01-13 Thread Greg KH
On Thu, Jan 11, 2018 at 04:58:20PM -0500, Pavel Tatashin wrote: > The page table order must be increased for EFI table in order to avoid a > bug where NMI tries to change the page table to kernel page table, while > efi page table is active. > > For more disccussion about this bug, see this

Re: Yet another KPTI regression with 4.14.x series in a VM

2018-01-13 Thread David Woodhouse
On Sat, 2018-01-13 at 14:10 +0100, Peter Zijlstra wrote: > On Sat, Jan 13, 2018 at 12:30:11PM +, David Woodhouse wrote: > > > > On Sat, 2018-01-13 at 13:08 +0100, Peter Zijlstra wrote: > > > > > > > > > ALTERNATIVE "orq $(PTI_SWITCH_PGTABLE_MASK), \scratch_reg", > > >    

Re: [PATCH] retpoline/module: Taint kernel for missing retpoline in module

2018-01-13 Thread Greg KH
On Sat, Jan 13, 2018 at 06:53:00AM -0800, Andi Kleen wrote: > > > When the a module hasn't been compiled with a retpoline > > > aware compiler, print a warning and set a taint flag. > > > > Isn't that caught by the "build with a different compiler/version" check > > that we have? Or used to

[PATCH] Coccinelle: ifnullfree: Trim the warning reported in report mode

2018-01-13 Thread Himanshu Jha
Remove the unncessary part of the warning reported, in the report mode, so that a single warning produced does not exceed more than line and hence improve readability of the warnings produced in the subsequent reports to a file. Signed-off-by: Himanshu Jha ---

Re: [PATCH] Coccinelle: alloc_cast: Add more memory allocating functions to the list

2018-01-13 Thread Julia Lawall
On Sat, 13 Jan 2018, Himanshu Jha wrote: > Add more memory allocating functions that are frequently used in the kernel > code to the existing list and remove the useless casts where it is > unnecessary. > > But preserve those casts having __attribute__ such as __force, __iomem, > etc which are

Re: bpf: Change structure passing and assignment

2018-01-13 Thread Alexei Starovoitov
On Sat, Jan 13, 2018 at 02:42:19PM +0200, Karim Eshapa wrote: > I noticed that most of functions here have structure arguements and return > structure, all these structures passed and returned are delt in passing and > assignment like memcpy a structure.In addition it takes size in stack while

Re: [Cocci] [PATCH] Coccinelle: kzalloc-simple: Rename kzalloc-simple to zalloc-simple

2018-01-13 Thread Fabio Estevam
On Sat, Jan 13, 2018 at 1:57 PM, Himanshu Jha wrote: > Rename kzalloc-simple to zalloc-simple since now the rule is not > specific to kzalloc function only, but also to many other zero memory > allocating functions specified in the rule. > > Signed-off-by: Himanshu

Re: [Cocci] [PATCH] Coccinelle: kzalloc-simple: Rename kzalloc-simple to zalloc-simple

2018-01-13 Thread Himanshu Jha
On Sat, Jan 13, 2018 at 03:02:10PM -0200, Fabio Estevam wrote: > On Sat, Jan 13, 2018 at 1:57 PM, Himanshu Jha > wrote: > > Rename kzalloc-simple to zalloc-simple since now the rule is not > > specific to kzalloc function only, but also to many other zero memory > >

Re: [PATCH] retpoline/module: Taint kernel for missing retpoline in module

2018-01-13 Thread Andi Kleen
> > Also what's the point of putting this information into every symbol? > > It makes it easy to check :) Easier than nm? Per symbol still doesn't make any sense to me. > > > Once per module is good enough. > > > > We already have similar checks for staging etc. > > Sure, but this is more

RE: [PATCH] retpoline/module: Taint kernel for missing retpoline in module

2018-01-13 Thread Van De Ven, Arjan
> > When the a module hasn't been compiled with a retpoline > > aware compiler, print a warning and set a taint flag. > > Isn't that caught by the "build with a different compiler/version" check > that we have? Or used to have? If not, can't we just make it into that > type of check to catch

Re: [PATCH] retpoline/module: Taint kernel for missing retpoline in module

2018-01-13 Thread Greg KH
On Sat, Jan 13, 2018 at 02:38:51PM +, Van De Ven, Arjan wrote: > > > When the a module hasn't been compiled with a retpoline > > > aware compiler, print a warning and set a taint flag. > > > > Isn't that caught by the "build with a different compiler/version" check > > that we have? Or used

[PATCH] ocfs2: Combine two seq_printf() calls into one call in ocfs2_dlm_seq_show()

2018-01-13 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 13 Jan 2018 16:36:51 +0100 Some data were printed into a sequence by two separate function calls. Print almost the same data by a single function call instead. (Omit a tab character at the line end within a format string.) This

Re: [PATCH] Coccinelle: ifnullfree: Trim the warning reported in report mode

2018-01-13 Thread Julia Lawall
On Sat, 13 Jan 2018, Himanshu Jha wrote: > Remove the unncessary part of the warning reported, in the report > mode, so that a single warning produced does not exceed more than line > and hence improve readability of the warnings produced in the subsequent > reports to a file. > >

Re: [PATCH v4] devres: combine function devm_ioremap*

2018-01-13 Thread christophe leroy
Hi Yisheng, Le 12/01/2018 à 12:51, Yisheng Xie a écrit : When I tried to use devm_ioremap function and review related code, I found devm_ioremap_* almost have the similar realize with each other, which can be combined. In the former versions, I have tried to kill ioremap_cache to reduce the

Re: [PATCH] firewire-ohci: work around oversized DMA reads on JMicron controllers

2018-01-13 Thread Stefan Richter
On Jan 11 Hector Martin 'marcan' wrote: > On 2017-11-13 06:05, Stefan Richter wrote: > > Thanks Hector for the troubleshooting and for the patch. > > Thanks Clemens for the review. > > > > It's been a while since I last reviewed and tested kernel patches, and > > also my main FireWire equipped PC

Re: [PATCH v13 0/7] cgroup-aware OOM killer

2018-01-13 Thread Johannes Weiner
On Wed, Jan 10, 2018 at 11:33:45AM -0800, Andrew Morton wrote: > On Wed, 10 Jan 2018 05:11:44 -0800 Roman Gushchin wrote: > > On Tue, Jan 09, 2018 at 04:57:53PM -0800, David Rientjes wrote: > > > On Thu, 30 Nov 2017, Andrew Morton wrote: > > > > > This patchset makes the OOM killer

Re: [PATCH 4.9] x86/pti/efi: broken conversion from efi to kernel page table

2018-01-13 Thread Pavel Tatashin
Hi Greg, Yeah, the one in pgtable.c needs to be removed, I wonder how it compiled... I will submit a new patch for 4.9 sometime later. Thank you, Pavel On Sat, Jan 13, 2018 at 12:12 PM, Greg KH wrote: > On Thu, Jan 11, 2018 at 04:58:20PM -0500, Pavel Tatashin wrote:

Re: [PATCH 4/8] irqchip/gic-v3: add ability to save/restore GIC/ITS state

2018-01-13 Thread Marc Zyngier
[I remember asking you to copy Sudeep Hola on this. Please do so the next time around] On Fri, 12 Jan 2018 21:24:18 +, Derek Basehore wrote: > > Some platforms power off GIC logic in S3, so we need to save/restore S3 is a not a GIC concept, and is only vaguely mentioned in terms of the

Re: [PATCH] retpoline/module: Taint kernel for missing retpoline in module

2018-01-13 Thread Andi Kleen
> > When the a module hasn't been compiled with a retpoline > > aware compiler, print a warning and set a taint flag. > > Isn't that caught by the "build with a different compiler/version" check > that we have? Or used to have? If not, can't we just make it into that - the compiler version

Re: [PATCH] EDAC, mv64x60: Remove some code duplication

2018-01-13 Thread Christophe JAILLET
Le 13/01/2018 à 15:22, Borislav Petkov a écrit : + Chris Packham who's been fixing some stuff in here too. On Sat, Jan 13, 2018 at 08:28:21AM +0100, Christophe JAILLET wrote: Reorder the error handling code in order to release the resources in reverse order than allocation. Introduce a new

Re

2018-01-13 Thread Alex
-- Hello, I have a project i want to bring to you.. please respond for details Alex

Re: [PATCHSET v5] blk-mq: reimplement timeout handling

2018-01-13 Thread Ming Lei
On Sat, Jan 13, 2018 at 10:45:14PM +0800, Ming Lei wrote: > On Fri, Jan 12, 2018 at 04:55:34PM -0500, Laurence Oberman wrote: > > On Fri, 2018-01-12 at 20:57 +, Bart Van Assche wrote: > > > On Tue, 2018-01-09 at 08:29 -0800, Tejun Heo wrote: > > > > Currently, blk-mq timeout path synchronizes

[PATCH v3 9/9] vfs, fdtable: prevent bounds-check bypass via speculative execution

2018-01-13 Thread Dan Williams
Expectedly, static analysis reports that 'fd' is a user controlled value that is used as a data dependency to read from the 'fdt->fd' array. In order to avoid potential leaks of kernel memory values, block speculative execution of the instruction stream that could issue reads based on an invalid

[PATCH v3 6/9] asm/nospec: mask speculative execution flows

2018-01-13 Thread Dan Williams
'__array_ptr' is proposed as a generic mechanism to mitigate against Spectre-variant-1 attacks, i.e. an attack that bypasses memory bounds checks via speculative execution). The '__array_ptr' implementation appears safe for current generation cpus across multiple architectures. In comparison,

[PATCH v3 7/9] x86: introduce __uaccess_begin_nospec and ASM_IFENCE

2018-01-13 Thread Dan Williams
For 'get_user' paths, do not allow the kernel to speculate on the value of a user controlled pointer. In addition to the 'stac' instruction for Supervisor Mode Access Protection, an 'ifence' causes the 'access_ok' result to resolve in the pipeline before the cpu might take any speculative action

[PATCH v3 5/9] x86: implement ifence_array_ptr() and array_ptr_mask()

2018-01-13 Thread Dan Williams
'ifence_array_ptr' is provided as an alternative to the default '__array_ptr' implementation that uses a mask to sanitize user controllable pointers. Later patches will allow it to be selected via the kernel command line. The '__array_ptr' implementation otherwise appears safe for current

[PATCH v3 2/9] arm64: implement ifence_array_ptr()

2018-01-13 Thread Dan Williams
From: Mark Rutland This patch implements ifence_array_ptr() for arm64, using an LDR+CSEL+CSDB sequence to inhibit speculative use of the returned value. Signed-off-by: Mark Rutland Signed-off-by: Will Deacon Cc: Catalin Marinas

[PATCH v3 4/9] x86: implement ifence()

2018-01-13 Thread Dan Williams
The new barrier, 'ifence', ensures that speculative execution never crosses the fence. Previously the kernel only needed this fence in 'rdtsc_ordered', but now it is also proposed as a mitigation against Spectre variant1 attacks. When used it needs to be placed in the success path after a bounds

[PATCH v3 3/9] arm: implement ifence_array_ptr()

2018-01-13 Thread Dan Williams
From: Mark Rutland This patch implements ifence_array_ptr() for arm, using an LDR+MOVCS+CSDB sequence to inhibit speculative use of the returned value. Cc: Russell King Signed-off-by: Mark Rutland Signed-off-by: Dan Williams

[PATCH v3 0/9] core, x86: prevent bounds-check bypass via speculative execution

2018-01-13 Thread Dan Williams
Changes since v2 [1]: * style fix in Documentation/speculation.txt (Geert) * add Russell and Catalin to the cc on the ARM patches (Russell) * clarify changelog for "x86: introduce __uaccess_begin_nospec and ASM_IFENCE" (Eric, Linus, Josh) * fix the dynamic 'mask' / 'ifence' toggle vs

Re: [PATCH] kdump: Write a correct address of mem_section into vmcoreinfo

2018-01-13 Thread Kirill A. Shutemov
On Sat, Jan 13, 2018 at 11:48:38AM +0100, Ingo Molnar wrote: > > * Kirill A. Shutemov wrote: > > > Depending on configuration mem_section can now be an array or a pointer > > to an array allocated dynamically. In most cases, we can continue to refer > > to it as

[PATCH v3 8/9] x86: use __uaccess_begin_nospec and ASM_IFENCE in get_user paths

2018-01-13 Thread Dan Williams
Quoting Linus: I do think that it would be a good idea to very expressly document the fact that it's not that the user access itself is unsafe. I do agree that things like "get_user()" want to be protected, but not because of any direct bugs or problems with get_user() and

[PATCH v3 1/9] Documentation: document array_ptr

2018-01-13 Thread Dan Williams
From: Mark Rutland Document the rationale and usage of the new array_ptr() helper. Signed-off-by: Mark Rutland Signed-off-by: Will Deacon Cc: Dan Williams Cc: Jonathan Corbet Cc: Peter

Re: [PATCH v1 4/4] ARM: dts: add pwm node for r40.

2018-01-13 Thread Hao Zhang
2018-01-11 20:47 GMT+08:00 Maxime Ripard : > Hi, > > On Thu, Jan 11, 2018 at 07:34:12PM +0800, hao_zhang wrote: >> This patch add pwm node for r40. >> >> Signed-off-by: hao_zhang >> --- >> arch/arm/boot/dts/sun8i-r40.dtsi | 13 +

Re: [PATCH v1 3/4] ARM: dts: add pwm pins for r40.

2018-01-13 Thread Hao Zhang
2018-01-11 20:47 GMT+08:00 Maxime Ripard : > Hi, > > On Thu, Jan 11, 2018 at 07:33:23PM +0800, hao_zhang wrote: >> This patch add pwm pins for r40. >> >> Signed-off-by: hao_zhang > > You should order your patches differently. We try to be as

Re: KASAN: slab-out-of-bounds Read in map_lookup_elem

2018-01-13 Thread Dmitry Vyukov
On Sun, Jan 14, 2018 at 1:13 AM, Daniel Borkmann wrote: > On 01/13/2018 02:58 AM, syzbot wrote: >> Hello, >> >> syzkaller hit the following crash on 19d28fbd306e7ae7c1acf05c3e6968b56f0d196b >> git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/master >>

Re: [PATCH v2 00/19] prevent bounds-check bypass via speculative execution

2018-01-13 Thread Linus Torvalds
On Fri, Jan 12, 2018 at 4:15 PM, Tony Luck wrote: > > Here there isn't any reason for speculation. The core has the > value of 'x' in a register and the upper bound encoded into the > "cmp" instruction. Both are right there, no waiting, no speculation. So this is an

[PATCH] l2tp: Use seq_putc() in l2tp_dfs_seq_session_show()

2018-01-13 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 13 Jan 2018 20:11:01 +0100 Two single characters (line breaks) should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring

Re: Yet another KPTI regression with 4.14.x series in a VM

2018-01-13 Thread Andy Lutomirski
On Fri, Jan 12, 2018 at 10:33 PM, Willy Tarreau wrote: > On Fri, Jan 12, 2018 at 10:08:20PM -0800, Andy Lutomirski wrote: >> In fact, it looks like this code is totally bogus and has never been >> correct at all. Even in: >> >> commit 4b1d5ae3b103eda43f9d0f85c355bb6995b03a30 >>

Re: [PATCH v3 8/9] x86: use __uaccess_begin_nospec and ASM_IFENCE in get_user paths

2018-01-13 Thread Eric W. Biederman
Linus Torvalds writes: > On Sat, Jan 13, 2018 at 11:05 AM, Linus Torvalds > wrote: >> >> I _know_ that lfence is expensive as hell on P4, for example. >> >> Yes, yes, "sbb" is often more expensive than most ALU instructions, >> and

Re: Yet another KPTI regression with 4.14.x series in a VM

2018-01-13 Thread Andy Lutomirski
On Sat, Jan 13, 2018 at 12:45 PM, Thomas Gleixner wrote: > On Sat, 13 Jan 2018, Andy Lutomirski wrote: >> Trying to inventory this stuff scattered all over the place: >> >> #define PTI_PGTABLE_SWITCH_BITPAGE_SHIFT >> #define PTI_SWITCH_PGTABLES_MASK(1<> #

Re: [PATCH] [net-next] net: netsec: use dma_addr_t for storing dma address

2018-01-13 Thread Ard Biesheuvel
On 13 January 2018 at 21:13, Arnd Bergmann wrote: > On targets that have different sizes for phys_addr_t and dma_addr_t, > we get a type mismatch error: > > drivers/net/ethernet/socionext/netsec.c: In function 'netsec_alloc_dring': > drivers/net/ethernet/socionext/netsec.c:970:9:

Re: [PATCH v5] perf tools: Add ARM Statistical Profiling Extensions (SPE) support

2018-01-13 Thread Arnaldo Carvalho de Melo
Em Fri, Jan 12, 2018 at 07:27:37PM -0600, Kim Phillips escreveu: > 'perf record' and 'perf report --dump-raw-trace' supported in this > release. > > Example usage: > > # perf record -e arm_spe/ts_enable=1,pa_enable=1/ dd if=/dev/zero > of=/dev/null count=1 > # perf report --dump-raw-trace

Re: [PATCH v3 8/9] x86: use __uaccess_begin_nospec and ASM_IFENCE in get_user paths

2018-01-13 Thread Linus Torvalds
On Sat, Jan 13, 2018 at 10:18 AM, Dan Williams wrote: > diff --git a/arch/x86/lib/getuser.S b/arch/x86/lib/getuser.S > index c97d935a29e8..85f400b8ee7c 100644 > --- a/arch/x86/lib/getuser.S > +++ b/arch/x86/lib/getuser.S > @@ -41,6 +41,7 @@ ENTRY(__get_user_1) >

Re: [PATCH] net/mlx4_en: ensure rx_desc updating reaches HW before prod db updating

2018-01-13 Thread Jason Gunthorpe
On Fri, Jan 12, 2018 at 01:01:56PM -0800, Saeed Mahameed wrote: > Simply putting a memory barrier on the top or the bottom of a functions, > means nothing unless you are looking at the whole picture, of all the > callers of that function to understand why is it there. When I review code I want

Re: pci/setup-bus: Delete an error message for a failed memory allocation in add_to_list()

2018-01-13 Thread Bjorn Helgaas
On Sat, Jan 13, 2018 at 07:15:04AM +0100, SF Markus Elfring wrote: > >> Omit an extra message for a memory allocation failure in this function. > > > > If this is an "extra" message, I assume there's some other message? > > Can you mention where that is in the changelog? > > * Would you like to

Re: [PATCH v2 16/22] mmc: tmio: fix never-detected card insertion bug

2018-01-13 Thread Wolfram Sang
> I am talking about the card detection > by the IP-builtin circuit. Yes, I know. As I wrote in one of the previous patches when reviewing it, I disabled GPIO CD and used the internal mechanism (for tests where it is relevant). Like here, too. > - GPIO is not set up ->

[PATCH v5 00/14] Modernization and fixes for NuBus subsystem

2018-01-13 Thread Finn Thain
This series begins with cleanups and fixes for the NuBus subsystem and finishes with a patch to add support for the Linux Driver Model. A separate series (which requires this one) modernizes NuBus drivers. Changes since v1: - Added the missing NULL check in nubus_device_remove(). - Squashed the

[PATCH v5 03/14] nubus: Use static functions where possible

2018-01-13 Thread Finn Thain
This fixes a couple of warnings from 'make W=1': drivers/nubus/nubus.c:790: warning: no previous prototype for 'nubus_probe_slot' drivers/nubus/nubus.c:824: warning: no previous prototype for 'nubus_scan_bus' Tested-by: Stan Johnson Signed-off-by: Finn Thain

[PATCH] Remove structure passing and assignment to save stack and no coping structures.

2018-01-13 Thread Karim Eshapa
Signed-off-by: Karim Eshapa Thanks, Karim --- include/linux/tnum.h | 2 +- kernel/bpf/tnum.c | 13 +++-- kernel/bpf/verifier.c | 12 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/include/linux/tnum.h b/include/linux/tnum.h

Re: [PATCH 1/3] ARM: dts: rockchip: drop veyron's nonstandard 'backlight-boot-off'

2018-01-13 Thread Heiko Stuebner
Am Freitag, 5. Januar 2018, 16:47:55 CET schrieb Brian Norris: > This was used out-of-tree as a hack for resolving issues where some > systems expect the backlight to turn on automatically at boot, while > others expect to manage the backlight status via a DRM/panel driver. > Those issues have

[PATCH] x86_64: trim clear_page.S includes

2018-01-13 Thread Alexey Dobriyan
After alternatives were shifted to the call site, only 2 headers are necessary. Signed-off-by: Alexey Dobriyan --- arch/x86/lib/clear_page_64.S |2 -- 1 file changed, 2 deletions(-) --- a/arch/x86/lib/clear_page_64.S +++ b/arch/x86/lib/clear_page_64.S @@ -1,6 +1,4 @@

Re: [Cocci] [PATCH] Coccinelle: kzalloc-simple: Rename kzalloc-simple to zalloc-simple

2018-01-13 Thread Fabio Estevam
On Sat, Jan 13, 2018 at 3:53 PM, Himanshu Jha wrote: > Yes, I used 'git mv'. > > It doesn't matter when applying through 'git am', both will result the > same AFAIK and only difference is that the patch files generated by 'git > format-patch' are different. But that

[PATCH v2] iio: adc: driver for ti adc081s/adc101s/adc121s

2018-01-13 Thread Milan Stevanovic
From fab687d20ba46d78439b6cdaf0d40b78ae68222c Mon Sep 17 00:00:00 2001 From: Milan Stevanovic Date: Sun, 7 Jan 2018 21:44:33 +0100 Subject: [PATCH v2] iio: adc: driver for ti adc081s/adc101s/adc121s Add Linux device driver for TI single-channel CMOS

[PATCH] sunrpc: Use seq_putc() in unix_gid_show()

2018-01-13 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 13 Jan 2018 20:33:05 +0100 A single character (line break) should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring

[PATCH v3] input: pxrc: new driver for PhoenixRC Flight Controller Adapter

2018-01-13 Thread Marcus Folkesson
This driver let you plug in your RC controller to the adapter and use it as input device in various RC simulators. Signed-off-by: Marcus Folkesson --- v3: - Use RUDDER and MISC instead of TILT_X and TILT_Y - Drop kref and anchor - Rework URB

[GIT PULL] Staging driver fixe for 4.15-rc8

2018-01-13 Thread Greg KH
The following changes since commit 30a7acd573899fd8b8ac39236eff6468b195ac7d: Linux 4.15-rc6 (2017-12-31 14:47:43 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/ tags/staging-4.15-rc8 for you to fetch changes up to

[GIT PULL] USB driver fixes for 4.15-rc8

2018-01-13 Thread Greg KH
The following changes since commit 30a7acd573899fd8b8ac39236eff6468b195ac7d: Linux 4.15-rc6 (2017-12-31 14:47:43 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/ tags/usb-4.15-rc8 for you to fetch changes up to

[GIT PULL] Char/Misc driver fixes for 4.15-rc8

2018-01-13 Thread Greg KH
The following changes since commit 30a7acd573899fd8b8ac39236eff6468b195ac7d: Linux 4.15-rc6 (2017-12-31 14:47:43 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git/ tags/char-misc-4.15-rc8 for you to fetch changes up to

Re: [PATCH 04/11] signal/parisc: Document a conflict with SI_USER with SIGFPE

2018-01-13 Thread Eric W. Biederman
Helge Deller writes: > * Eric W. Biederman : >> Setting si_code to 0 results in a userspace seeing an si_code of 0. >> This is the same si_code as SI_USER. Posix and common sense requires >> that SI_USER not be a signal specific si_code. As such this use

Re: pci/setup-bus: Delete an error message for a failed memory allocation in add_to_list()

2018-01-13 Thread SF Markus Elfring
> Your commit message says "omit an extra message", which suggests that > there are currently two messages about the memory allocation failure, > and that your patch removes one of them. Yes. - There is a general transformation pattern applied. > If that's the case, it would be nice to know

[PATCHv2 5/7] printk: allow kmsg to be encrypted using public key encryption

2018-01-13 Thread Dan Aloni
This commit enables the kernel to encrypt the free-form text that is generated by printk() before it is brought up to `dmesg` in userspace. The encryption is made using one of the trusted public keys which are kept built-in inside the kernel. These keys are presently also used for verifying

[PATCHv2 7/7] docs: add dmesg encryption doc

2018-01-13 Thread Dan Aloni
Reviewed-by: Randy Dunlap Signed-off-by: Dan Aloni --- Documentation/admin-guide/dmesg-encryption.rst | 118 + Documentation/admin-guide/index.rst| 1 + 2 files changed, 119 insertions(+) create mode 100644

[PATCHv2 4/7] certs: allow in-kernel access of trusted keys

2018-01-13 Thread Dan Aloni
CC: David Howells Signed-off-by: Dan Aloni --- certs/system_keyring.c| 56 ++- include/keys/system_keyring.h | 3 +++ 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/certs/system_keyring.c

[PATCHv2 1/7] crypto: fix memory leak in rsa-kcs1pad encryption

2018-01-13 Thread Dan Aloni
The encryption mode of pkcs1pad never uses out_sg and out_buf, so there's no need to allocate the buffer, which presently is not even being freed. CC: Herbert Xu Signed-off-by: Dan Aloni --- crypto/rsa-pkcs1pad.c | 9 - 1 file changed, 9

Re: [PATCH v1] x86/retpoline: Use lfence in the retpoline/RSB filling RSB macros

2018-01-13 Thread Thomas Gleixner
On Sat, 13 Jan 2018, Tom Lendacky wrote: > On 1/13/2018 8:07 AM, Van De Ven, Arjan wrote: > >>> The RSB filling macro is applicable to AMD, and, if software is unable to > >>> verify that lfence is serializing on AMD (possible when running under a > >>> hypervisor), the generic retpoline support

[PATCH] kernel:bpf Remove structure passing and assignment to save stack and no coping structures

2018-01-13 Thread Karim Eshapa
Use pointers to structure as arguments to function instead of coping structures and less stack size. Also transfer TNUM(_v, _m) to tnum.h file to be used in differnet files for creating anonymous structures statically. Signed-off-by: Karim Eshapa Thanks, Karim ---

[PATCH] x86_64: clobber flags in clear_page()

2018-01-13 Thread Alexey Dobriyan
All clear_page() implementations use XOR which resets flags. Judging by allyesconfig disassembly no code is affected. Signed-off-by: Alexey Dobriyan --- arch/x86/include/asm/page_64.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---

Re: stable/linux-3.16.y build: 178 builds: 1 failed, 177 passed, 2 errors, 57 warnings (v3.16.52)

2018-01-13 Thread Manfred Spraul
Hi Arnd, On 01/03/2018 12:15 AM, Arnd Bergmann wrote: 2 ipc/sem.c:377:6: warning: '___p1' may be used uninitialized in this function [-Wmaybe-uninitialized] This code was last touched in 3.16 by the backport of commit 5864a2fd3088 ("ipc/sem.c: fix complex_count vs. simple op race") The

[PATCH] Remove structure passing and assignment to save stack and no coping structures.

2018-01-13 Thread Karim Eshapa
Signed-off-by: Karim Eshapa Thanks, Karim --- include/linux/tnum.h | 2 +- kernel/bpf/tnum.c | 13 +++-- kernel/bpf/verifier.c | 12 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/include/linux/tnum.h b/include/linux/tnum.h

Re: [PATCH v3 8/9] x86: use __uaccess_begin_nospec and ASM_IFENCE in get_user paths

2018-01-13 Thread Linus Torvalds
On Sat, Jan 13, 2018 at 11:05 AM, Linus Torvalds wrote: > > I _know_ that lfence is expensive as hell on P4, for example. > > Yes, yes, "sbb" is often more expensive than most ALU instructions, > and Agner Fog says it has a 10-cycle latency on Prescott (which is >

Re: [Cocci] [PATCH] Coccinelle: kzalloc-simple: Rename kzalloc-simple to zalloc-simple

2018-01-13 Thread Himanshu Jha
On Sat, Jan 13, 2018 at 05:13:36PM -0200, Fabio Estevam wrote: > On Sat, Jan 13, 2018 at 3:53 PM, Himanshu Jha > wrote: > > > Yes, I used 'git mv'. > > > > It doesn't matter when applying through 'git am', both will result the > > same AFAIK and only difference is

[PATCH v2] Coccinelle: kzalloc-simple: Rename kzalloc-simple to zalloc-simple

2018-01-13 Thread Himanshu Jha
Rename kzalloc-simple to zalloc-simple since now the rule is not specific to kzalloc function only, but also to many other zero memory allocating functions specified in the rule. Suggested-by: SF Markus Elfring Signed-off-by: Himanshu Jha

Re: [PATCH v5] leaking_addresses: add generic 32-bit support

2018-01-13 Thread Tobin C. Harding
On Sat, Jan 13, 2018 at 10:55:26AM +, Kaiwan N Billimoria wrote: > Hi Tobin, > > Thanks very much for your detailed review. > Just wanted to say that am up to my neck in work (an exceptionally busy > time), hence will take a while to work on this - around another 3 weeks > perhaps. > I'd like

Re: Yet another KPTI regression with 4.14.x series in a VM

2018-01-13 Thread Thomas Gleixner
On Sat, 13 Jan 2018, Andy Lutomirski wrote: > Trying to inventory this stuff scattered all over the place: > > #define PTI_PGTABLE_SWITCH_BITPAGE_SHIFT > #define PTI_SWITCH_PGTABLES_MASK(1< # define X86_CR3_PTI_SWITCH_BIT11 > #define PTI_SWITCH_MASK >

Re: [PATCH v1] x86/retpoline: Use lfence in the retpoline/RSB filling RSB macros

2018-01-13 Thread Tom Lendacky
On 1/13/2018 8:07 AM, Van De Ven, Arjan wrote: >>> The RSB filling macro is applicable to AMD, and, if software is unable to >>> verify that lfence is serializing on AMD (possible when running under a >>> hypervisor), the generic retpoline support will be used and, so, is also >>> applicable to

[PATCH] [net-next] net: netsec: use dma_addr_t for storing dma address

2018-01-13 Thread Arnd Bergmann
On targets that have different sizes for phys_addr_t and dma_addr_t, we get a type mismatch error: drivers/net/ethernet/socionext/netsec.c: In function 'netsec_alloc_dring': drivers/net/ethernet/socionext/netsec.c:970:9: error: passing argument 3 of 'dma_zalloc_coherent' from incompatible

[PATCHv2 6/7] tools: add dmesg decryption program

2018-01-13 Thread Dan Aloni
Example execution: dmesg | dmesg-decipher Signed-off-by: Dan Aloni --- tools/Makefile | 9 +- tools/kmsg/.gitignore | 1 + tools/kmsg/Makefile | 14 ++ tools/kmsg/dmesg-decipher.c | 354 4

[PATCHv2 0/7] RFC: Public key encryption of dmesg by the kernel

2018-01-13 Thread Dan Aloni
Changes from v1 [1]: - Made suggested fixes following a review from Randy Dunlap - Modified the ASCII encoding of cipher text to base64 instead of hex, with newlines replaced by '~' ; updated dmesg-decipher for it too - Moved base64 code from fs/ceph to lib, and improved it a bit -

[PATCHv2 3/7] base64-armor: add bounds checking

2018-01-13 Thread Dan Aloni
Future use of the API can benefit from bounds checking. Signed-off-by: Dan Aloni --- include/linux/base64-armor.h | 17 +++-- lib/base64-armor.c | 20 ++-- net/ceph/crypto.c| 2 +- 3 files changed, 30 insertions(+), 9

[PATCHv2 2/7] Move net/ceph/armor to lib/ and add docs

2018-01-13 Thread Dan Aloni
Plus, add functions that assist in managing buffer bounds. Signed-off-by: Dan Aloni --- include/linux/base64-armor.h | 65 ++ lib/Kconfig| 7 lib/Makefile | 1 +

[PATCH v5 01/14] nubus: Avoid array underflow and overflow

2018-01-13 Thread Finn Thain
Check array indices. Avoid sprintf. Use buffers of sufficient size. Use appropriate types for array length parameters. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/nubus/nubus.c | 29 +

[PATCH v5 02/14] nubus: Fix up header split

2018-01-13 Thread Finn Thain
Due to the '#ifdef __KERNEL__' being located in the wrong place, some definitions from the kernel API were placed in the UAPI header during the scripted header split. Fix this. Also, remove the duplicate comment which is only relevant to the UAPI header. Fixes: 607ca46e97a1 ("UAPI: (Scripted)

Re: [PATCH v2] delayacct: Account blkio completion on the correct task

2018-01-13 Thread Balbir Singh
On Mon, Dec 18, 2017 at 9:45 PM, Josh Snyder wrote: > Before commit e33a9bba85a8 ("sched/core: move IO scheduling accounting from > io_schedule_timeout() into scheduler"), delayacct_blkio_end was called after > context-switching into the task which completed I/O. This resulted

Re: [alsa-devel] [RESEND PATCH v2 12/15] ASoC: qcom: qdsp6: Add support to q6asm dai driver

2018-01-13 Thread Rohit Kumar
On 12/14/2017 11:03 PM, srinivas.kandaga...@linaro.org wrote: From: Srinivas Kandagatla This patch adds support to q6asm dai driver which configures Q6ASM streams to pass pcm data. Currently the driver only exposes 2 playback streams for hdmi playback support,

[PATCH v2] md-multipath: Use seq_putc() in multipath_status()

2018-01-13 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 13 Jan 2018 09:49:03 +0100 A single character (closing square bracket) should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus

[PATCH] memory-EMIF: Use seq_putc() in emif_regdump_show()

2018-01-13 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 13 Jan 2018 10:24:03 +0100 A single character (line break) should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring

Re: stable-rc build: 0 warnings 5 failures (stable-rc/v3.18.91-23-g72813f7)

2018-01-13 Thread gregkh
On Fri, Jan 12, 2018 at 12:02:10PM +0100, Boris Brezillon wrote: > On Fri, 12 Jan 2018 11:57:55 +0100 > Arnd Bergmann wrote: > > > On Fri, Jan 12, 2018 at 11:49 AM, Olof's autobuilder > > wrote: > > > Here are the build results from automated periodic testing. >

Re: [PATCH 3/8] kvm: vmx: pass MSR_IA32_SPEC_CTRL and MSR_IA32_PRED_CMD down to the guest

2018-01-13 Thread Longpeng (Mike)
On 2018/1/9 20:03, Paolo Bonzini wrote: > Direct access to MSR_IA32_SPEC_CTRL and MSR_IA32_PRED_CMD is important > for performance. Allow load/store of MSR_IA32_SPEC_CTRL, restore guest > IBRS on VM entry and set it to 0 on VM exit (because Linux does not use > it yet). > > Signed-off-by:

[tip:x86/pti] x86/retpoline: Use LFENCE instead of PAUSE in the retpoline/RSB filling RSB macros

2018-01-13 Thread tip-bot for Tom Lendacky
Commit-ID: 2eb9137c8744f9adf1670e9aa52850948a30112b Gitweb: https://git.kernel.org/tip/2eb9137c8744f9adf1670e9aa52850948a30112b Author: Tom Lendacky AuthorDate: Fri, 12 Jan 2018 19:07:28 -0600 Committer: Ingo Molnar CommitDate: Sat, 13 Jan

  1   2   3   4   >