arm64 physmap (was Re: [kernel-hardening] [PATCH 4/6] Protectable Memory)

2018-02-14 Thread Laura Abbott
On 02/13/2018 01:43 PM, Kees Cook wrote: On Tue, Feb 13, 2018 at 8:09 AM, Laura Abbott wrote: No, arm64 doesn't fixup the aliases, mostly because arm64 uses larger page sizes which can't be broken down at runtime. CONFIG_PAGE_POISONING does use 4K pages which could be adjusted at runtime. So ye

Re: Read-protected UEFI variables

2018-02-14 Thread Benjamin Drung
Am Mittwoch, den 14.02.2018, 19:18 +0100 schrieb 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 sys

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

2018-02-14 Thread Dominik Brodowski
On Wed, Feb 14, 2018 at 01:57:15PM -0500, Brian Gerst wrote: > 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 t

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

2018-02-14 Thread Jani Nikula
On Wed, 14 Feb 2018, Jonathan Corbet wrote: > 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.

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

2018-02-14 Thread Lyude Paul
Actually this was brought up to me already, there's a fix on the mailing list for this I reviewed a little while ago from nvidia that we should pull in: https://patchwork.freedesktop.org/patch/203205/ Would you guys mind confirming that this patch fixes your issues? On Wed, 2018-02-14 at 18:41 +

Re: [PATCH v3 3/3] arm64: dts: sdm845: Add serial console support

2018-02-14 Thread Bjorn Andersson
On Tue 13 Feb 16:32 PST 2018, Doug Anderson wrote: > On Sun, Feb 11, 2018 at 10:28 PM, Rajendra Nayak > wrote: [..] > > +&soc { > > + geni-se@ac { > > + serial@a84000 { > > + status = "okay"; > > + }; > > + }; > > If others at QC

Re: [PATCH -next v4] mtd: nand: toshiba: Retrieve ECC requirements from extended ID

2018-02-14 Thread Boris Brezillon
-linux-mmc +linux-mtd On Thu, 15 Feb 2018 00:35:06 +0900 KOBAYASHI Yoshitake wrote: > This patch enables support to read the ECC strength and size from the > NAND flash using Toshiba Memory SLC NAND extended-ID. This patch is > based on the information of the 6th ID byte of the Toshiba Memory SL

Re: [PATCH] Revert "ARM: dts: sunxi: Add regulators for Sinovoip BPI-M2"

2018-02-14 Thread Emmanuel Vadot
On Tue, 13 Feb 2018 18:36:24 +0800 Chen-Yu Tsai wrote: > On Sat, Feb 10, 2018 at 5:20 AM, Emmanuel Vadot wrote: > > On 2018-02-05 10:05, Icenowy Zheng wrote: > >> > >> ? 2018?2?5? GMT+08:00 ??4:55:58, Emmanuel Vadot > >> ??: > >>> > >>> > >>> Hello, > >>> > >>> On Sat, 3 Feb 2018 19:23:53 +080

Re: [tip:x86/pti] x86/speculation: Use IBRS if available before calling into firmware

2018-02-14 Thread Tim Chen
On 02/14/2018 12:56 AM, Peter Zijlstra wrote: > > At the very least this must disable and re-enable preemption, such that > we guarantee we inc/dec the same counter. ISTR some firmware calls (EFI) > actually are preemptible so that wouldn't work. > > Further, consider: > > this_cpu_inc_re

Re: WARNING in kvmalloc_node

2018-02-14 Thread Dmitry Vyukov
On Wed, Feb 14, 2018 at 3:55 AM, Matthew Wilcox wrote: > On Tue, Feb 13, 2018 at 03:59:01PM -0800, syzbot wrote: >> Hello, >> >> syzbot hit the following crash on bpf-next commit >> 7928b2cbe55b2a410a0f5c1f154610059c57b1b2 (Sun Feb 11 23:04:29 2018 +) >> Linux 4.16-rc1 >> >> So far this crash

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

2018-02-14 Thread Kees Cook
On Wed, Feb 14, 2018 at 10:26 AM, Matthew Wilcox wrote: > 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

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

2018-02-14 Thread Kees Cook
On Wed, Feb 14, 2018 at 10:47 AM, Joe Perches wrote: > 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

ERROR: "sst_context_init" [sound/soc/intel/atom/sst/snd-intel-sst-acpi.ko] undefined!

2018-02-14 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 6556677a80400ca5744340d8ff6fbed22621293e commit: 4772c16ede522d46219a59646503d2020841a6f4 ASoC: Intel: Kconfig: Simplify-clarify ACPI/PCI dependencies date: 5 weeks ago config: x86_64-randconfig-s2-0215001

Re: [PATCH 1/2] mmc: bcm2835: reset host on timeout

2018-02-14 Thread Michal Suchánek
On Wed, 14 Feb 2018 17:49:31 +0100 Stefan Wahren wrote: > Hi Michal, > > [add Phil] > > Am 14.02.2018 um 17:13 schrieb Michal Suchánek: > > On Wed, 14 Feb 2018 16:36:49 +0100 > > Michal Suchánek wrote: > > > >> On Wed, 14 Feb 2018 15:58:31 +0100 > >> Stefan Wahren wrote: > >> > >>> Hi Mic

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 2:06 PM, Dominik Brodowski wrote: > On Wed, Feb 14, 2018 at 01:57:15PM -0500, Brian Gerst wrote: >> 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

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

2018-02-14 Thread Julia Lawall
On Wed, 14 Feb 2018, Kees Cook wrote: > On Wed, Feb 14, 2018 at 10:26 AM, Matthew Wilcox wrote: > > 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 buffe

Re: arm64 physmap (was Re: [kernel-hardening] [PATCH 4/6] Protectable Memory)

2018-02-14 Thread Ard Biesheuvel
On 14 February 2018 at 19:06, Laura Abbott wrote: > On 02/13/2018 01:43 PM, Kees Cook wrote: >> >> On Tue, Feb 13, 2018 at 8:09 AM, Laura Abbott wrote: >>> >>> No, arm64 doesn't fixup the aliases, mostly because arm64 uses larger >>> page sizes which can't be broken down at runtime. CONFIG_PAGE_P

Re: [PATCH] platform/x86: intel_turbo_max_3: Remove restriction for HWP platforms

2018-02-14 Thread Andy Shevchenko
On Mon, Feb 12, 2018 at 9:50 PM, Srinivas Pandruvada wrote: > On systems supporting HWP (Hardware P-States) mode, we expected to > enumerate core priority via ACPI-CPPC tables. Unfortunately deployment of > TURBO 3.0 didn't use this method to show core priority. So users are not > able to utilize

Re: arm64 physmap (was Re: [kernel-hardening] [PATCH 4/6] Protectable Memory)

2018-02-14 Thread Kees Cook
On Wed, Feb 14, 2018 at 11:06 AM, Laura Abbott wrote: > On 02/13/2018 01:43 PM, Kees Cook wrote: >> >> On Tue, Feb 13, 2018 at 8:09 AM, Laura Abbott wrote: >>> >>> No, arm64 doesn't fixup the aliases, mostly because arm64 uses larger >>> page sizes which can't be broken down at runtime. CONFIG_PA

Re: [PATCH] platform/x86: intel_turbo_max_3: Remove restriction for HWP platforms

2018-02-14 Thread Arjan van de Ven
On 2/14/2018 11:29 AM, Andy Shevchenko wrote: On Mon, Feb 12, 2018 at 9:50 PM, Srinivas Pandruvada wrote: On systems supporting HWP (Hardware P-States) mode, we expected to enumerate core priority via ACPI-CPPC tables. Unfortunately deployment of TURBO 3.0 didn't use this method to show core pr

Re: [PATCH -next v4] mtd: nand: toshiba: Retrieve ECC requirements from extended ID

2018-02-14 Thread Boris Brezillon
On Wed, 14 Feb 2018 20:15:41 +0100 Boris Brezillon wrote: > -linux-mmc > +linux-mtd > > On Thu, 15 Feb 2018 00:35:06 +0900 > KOBAYASHI Yoshitake wrote: > > > This patch enables support to read the ECC strength and size from the > > NAND flash using Toshiba Memory SLC NAND extended-ID. This pat

Re: [PATCH] platform/x86: ideapad-laptop: Increase timeout to wait for EC answer

2018-02-14 Thread Andy Shevchenko
On Sun, Feb 11, 2018 at 11:18 AM, Aaron Ma wrote: > Lenovo E41-20 needs more time than 100ms to read VPC, > the funtion keys always failed responding. > Increase timeout to get the value from VPC, then > the funtion keys like mic mute key work well. > Pushed to my review and testing queue, thanks

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

2018-02-14 Thread Joe Perches
On Wed, 2018-02-14 at 11:23 -0800, Kees Cook wrote: > On Wed, Feb 14, 2018 at 10:47 AM, Joe Perches wrote: > > 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

Re: [PATCH v2 2/2] dt-bindings: introduce Command DB for QCOM SoCs

2018-02-14 Thread Bjorn Andersson
On Thu 08 Feb 11:51 PST 2018, Lina Iyer wrote: > From: Mahesh Sivasubramanian > > Command DB provides information on shared resources like clocks, > regulators etc., probed at boot by the remote subsytem and made > available in shared memory. > > Cc: devicet...@vger.kernel.org > Signed-off-by:

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

2018-02-14 Thread Matthew Wilcox
On Wed, Feb 14, 2018 at 11:22:38AM -0800, Kees Cook wrote: > > +/** > > + * kvmalloc_ab_c() - Allocate memory. > > Longer description, maybe? "Allocate a *b + c bytes of memory"? Done! > > + * @n: Number of elements. > > + * @size: Size of each element (should be constant). > > + * @c: Size of h

Re: [PATCH 1/3] x86/MCE/AMD: Redo function to get SMCA bank type

2018-02-14 Thread Borislav Petkov
On Wed, Feb 14, 2018 at 04:38:34PM +, Ghannam, Yazen wrote: > I know that we're declaring smca_banks[] to have MAX_NR_BANKS items. But > shouldn't we directly check that an index is within the bounds of the array? > We'll have a bug if we check against MAX_NR_BANKS and the definition of > smca_

Re: arm64 physmap (was Re: [kernel-hardening] [PATCH 4/6] Protectable Memory)

2018-02-14 Thread Kees Cook
On Wed, Feb 14, 2018 at 11:29 AM, Kees Cook wrote: > Why does using finer granularity on the physmap degrade performance? I > assume TLB pressure, but what is heavily using that area? (I must not > be understanding what physmap actually gets used for -- I thought it > was just a convenience to hav

Re: [PATCH v3 00/13] gpu: drm: amd: remove unused headers

2018-02-14 Thread Tom St Denis
This will break umr since we source the headers from the kernel. The kernel might not use them but the different IP blocks have deltas that umr is aware of. One might argue that we should then publish the headers somewhere else that is public but the kernel is our vehicle right now. Thought

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

2018-02-14 Thread Matthew Wilcox
On Wed, Feb 14, 2018 at 11:32:45AM -0800, Joe Perches wrote: > On Wed, 2018-02-14 at 11:23 -0800, Kees Cook wrote: > > On Wed, Feb 14, 2018 at 10:47 AM, Joe Perches wrote: > > > I think expanding the number of allocation functions > > > is not necessary. > > > > I think removing common mispattern

Re: [PATCH v14 2/9] fw_cfg: add a public uapi header

2018-02-14 Thread Michael S. Tsirkin
On Wed, Feb 14, 2018 at 03:18:43PM +0100, Marc-André Lureau wrote: > Create a common header file for well-known values and structures to be > shared by the Linux kernel with qemu or other projects. > > Suggested-by: Michael S. Tsirkin > Signed-off-by: Marc-André Lureau > > --- > > The related

[PATCH 1/2] power: supply: ACPI/AXP288: Add quirk to avoid using PMIC

2018-02-14 Thread Carlo Caione
From: Carlo Caione With commits af3ec837 and dccfae6d a blacklist was introduced to avoid using the ACPI drivers for AC and battery when a native PMIC driver was already present. While this is in general a good idea (because of broken DSDT or proprietary and undocumented ACPI opregions for the AC

[PATCH 2/2] power: supply: ACPI/AXP288: Add quirks for ECS EF20EA

2018-02-14 Thread Carlo Caione
From: Carlo Caione On the ECS EF20EA laptop we need to move away from the AXP288 FG driver and enable again the ACPI AC/battery drivers. Add the required quirks to do that. We rely only on the product name because all the other DMI entries are dummy or not filled in on this platform. Signed-off-

[PATCH 0/2] power: supply: Fix AXP288 fallback when not needed

2018-02-14 Thread Carlo Caione
From: Carlo Caione With commits af3ec837 and dccfae6d a blacklist was introduced to avoid using the ACPI drivers for AC and battery when a native PMIC driver was already present. While this is in general a good idea (because of broken DSDT or proprietary and undocumented ACPI opregions for the AC

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

2018-02-14 Thread Joe Perches
On Wed, 2018-02-14 at 11:36 -0800, Matthew Wilcox wrote: > On Wed, Feb 14, 2018 at 11:32:45AM -0800, Joe Perches wrote: > > On Wed, 2018-02-14 at 11:23 -0800, Kees Cook wrote: > > > On Wed, Feb 14, 2018 at 10:47 AM, Joe Perches wrote: > > > > I think expanding the number of allocation functions >

Re: [PATCH 2/2] mmc: bcm2835: print some informational messages during reset

2018-02-14 Thread Michal Suchánek
On Wed, 14 Feb 2018 08:50:16 -0800 Florian Fainelli wrote: > On February 14, 2018 6:38:58 AM PST, Michal Suchanek > wrote: > >The previous patch does reset during hardware error so make the reset > >progress more visible. > > Based on your previous email it looks like this can happen quite >

Re: [PATCH v3 00/13] gpu: drm: amd: remove unused headers

2018-02-14 Thread Alex Deucher
On Wed, Feb 14, 2018 at 2:35 PM, Tom St Denis wrote: > This will break umr since we source the headers from the kernel. The kernel > might not use them but the different IP blocks have deltas that umr is aware > of. > > One might argue that we should then publish the headers somewhere else that >

Re: arm64 physmap (was Re: [kernel-hardening] [PATCH 4/6] Protectable Memory)

2018-02-14 Thread Kees Cook
On Wed, Feb 14, 2018 at 11:06 AM, Laura Abbott wrote: > fixed. Modules yes are not fully protected. The conclusion from past > experience has been that we cannot safely break down larger page sizes > at runtime like x86 does. We could theoretically > add support for fixing up the alias if PAGE_POI

Re: [PATCH v2] .gitignore: ignore ASN.1 auto generated files

2018-02-14 Thread Pablo Neira Ayuso
On Mon, Feb 12, 2018 at 09:45:42PM +0800, Zhu Lingshan wrote: > when build kernel with default configure, files: > > generatenet/ipv4/netfilter/nf_nat_snmp_basic-asn1.c > net/ipv4/netfilter/nf_nat_snmp_basic-asn1.h > > will be automatically generated by ASN.1 compiler, so > No need to track them

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

2018-02-14 Thread Christopher Lameter
On Wed, 14 Feb 2018, Matthew Wilcox wrote: > +#define kvzalloc_struct(p, member, n, gfp) \ > + (typeof(p))kvzalloc_ab_c(n, \ > + sizeof(*(p)->member) + __must_be_array((p)->member),\ > + offsetof(typeof(*

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

2018-02-14 Thread Matthew Wilcox
On Wed, Feb 14, 2018 at 11:43:46AM -0800, Joe Perches wrote: > On Wed, 2018-02-14 at 11:36 -0800, Matthew Wilcox wrote: > > If somebody wants them, then we can add them. > > Yeah, but I don't think any of it is necessary. > > How many of these struct+bufsize * count entries > actually exist? Wro

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

2018-02-14 Thread Joe Perches
On Wed, 2018-02-14 at 11:56 -0800, Matthew Wilcox wrote: > On Wed, Feb 14, 2018 at 11:43:46AM -0800, Joe Perches wrote: > > On Wed, 2018-02-14 at 11:36 -0800, Matthew Wilcox wrote: > > > If somebody wants them, then we can add them. > > > > Yeah, but I don't think any of it is necessary. > > > >

[PATCH 2/3] exec: Introduce finalize_exec() before start_thread()

2018-02-14 Thread Kees Cook
Provide a final call back into fs/exec.c before start_thread() takes over, to handle any last-minute changes, like the coming restoration of the stack limit. Signed-off-by: Kees Cook --- As an alternative, fs/exec.c could provide a wrapper for start_thread()... --- fs/binfmt_aout.c| 1 +

[RESEND][PATCH 0/3] exec: Pin stack limit during exec

2018-02-14 Thread Kees Cook
Attempts to solve problems with the stack limit changing during exec continue to be frustrated[1][2]. In addition to the specific issues around the Stack Clash family of flaws, Andy Lutomirski pointed out[3] other places during exec where the stack limit is used and is assumed to be unchanging. Giv

[PATCH 3/3] exec: Pin stack limit during exec

2018-02-14 Thread Kees Cook
Since the stack rlimit is used in multiple places during exec and it can be changed via other threads (via setrlimit()) or processes (via prlimit()), the assumption that the value doesn't change cannot be made. This leads to races with mm layout selection and argument size calculations. This change

[PATCH 1/3] exec: Pass stack rlimit into mm layout functions

2018-02-14 Thread Kees Cook
Since it is possible that the stack rlimit can change externally during exec (either via another thread calling setrlimit() or another process calling prlimit()), provide a way to pass the rlimit down into the per-architecture mm layout functions so that the rlimit can stay in the bprm structure in

[PATCH v5 02/12] clk: sunxi-ng: Use u64 for calculation of nkmp rate

2018-02-14 Thread Jernej Skrabec
When parent rate is 24MHz and multiplier N >= 180, intermediate clock rate doesn't fit in 32 bit variable anymore. Because of that, introduce function for calculating clock rate which uses 64 bit variable for intermediate result. Acked-by: Maxime Ripard Signed-off-by: Jernej Skrabec --- driver

[PATCH v5 00/12] drm/sun4i: Add A83T HDMI support

2018-02-14 Thread Jernej Skrabec
This patch series implements support for A83T DW HDMI and PHY. Contrary to v1 series, this one is based on latest linux-next, since all needed patches were merged. While exactly this combination of HDMI controller and PHY is not common in Allwinner SoCs, this patch series nevertheless makes ground

[PATCH v5 11/12] ARM: dts: sun8i: a83t: Add HDMI display pipeline

2018-02-14 Thread Jernej Skrabec
This commit adds all bits necessary for HDMI on A83T - mixer1, tcon1, hdmi, hdmi phy and hdmi pinctrl entries. Signed-off-by: Jernej Skrabec --- arch/arm/boot/dts/sun8i-a83t.dtsi | 108 +- 1 file changed, 107 insertions(+), 1 deletion(-) diff --git a/arch/arm

[PATCH v5 04/12] drm/bridge/synopsys: dw-hdmi: Export some PHY related functions

2018-02-14 Thread Jernej Skrabec
Parts of PHY code could be useful also for custom PHYs. For example, Allwinner A83T has custom PHY which is probably Synopsys gen2 PHY with few additional memory mapped registers, so most of the Synopsys PHY related code could be reused. Functions exported here are actually not specific to Synopsy

[PATCH v5 12/12] ARM: dts: sun8i: a83t: Enable HDMI on BananaPi M3

2018-02-14 Thread Jernej Skrabec
BananaPi M3 includes HDMI connector, so add support for it. Signed-off-by: Jernej Skrabec --- arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts | 25 + 1 file changed, 25 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts b/arch/arm/boot/dts/sun8i-a83t-b

[PATCH v5 05/12] drm/bridge/synopsys: dw-hdmi: don't clobber drvdata

2018-02-14 Thread Jernej Skrabec
dw_hdmi shouldn't set drvdata since some drivers might need to store it's own data there. Rework dw_hdmi in a way to return struct dw_hdmi instead to store it in drvdata. This way drivers are responsible to store and pass structure when needed. Idea was taken from the following commit: 8242ecbd597

[PATCH v5 10/12] drm/sun4i: Implement A83T HDMI driver

2018-02-14 Thread Jernej Skrabec
A83T has DW HDMI IP block with a custom PHY similar to Synopsys gen2 HDMI PHY. Only video output was tested, while HW also supports audio and CEC. Support for them will be added later. Signed-off-by: Jernej Skrabec --- drivers/gpu/drm/sun4i/Kconfig | 9 ++ drivers/gpu/drm/sun4i/Makef

[PATCH v5 09/12] drm/sun4i: Add support for A83T second DE2 mixer

2018-02-14 Thread Jernej Skrabec
It supports 1 VI and 1 UI plane and HW scaling on both planes. Acked-by: Maxime Ripard Signed-off-by: Jernej Skrabec --- drivers/gpu/drm/sun4i/sun8i_mixer.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.

[PATCH v2 5/8] Convert infiniband uverbs to kvzalloc_struct

2018-02-14 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- drivers/infiniband/core/uverbs_cmd.c | 4 ++-- include/rdma/ib_verbs.h | 5 + 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index

[PATCH v2 3/8] Convert virtio_console to kvzalloc_struct

2018-02-14 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- drivers/char/virtio_console.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 468f06134012..e0816cc2c6bd 100644 --- a/drivers/char/virtio_console.c ++

[PATCH v5 07/12] drm/sun4i: Add has_channel_0 TCON quirk

2018-02-14 Thread Jernej Skrabec
Some TCONs on newer SoCs doesn't support channel 0, since they are meant to be used only with TV or HDMI encoder. Prepare support for them with adding has_channel_0 quirk. Acked-by: Maxime Ripard Signed-off-by: Jernej Skrabec --- drivers/gpu/drm/sun4i/sun4i_tcon.c | 41

[PATCH v2 4/8] Convert dax device to kvzalloc_struct

2018-02-14 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- drivers/dax/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dax/device.c b/drivers/dax/device.c index 2137dbc29877..5821cde340f6 100644 --- a/drivers/dax/device.c +++ b/drivers/dax/device.c @@ -586,7 +58

[PATCH v2 6/8] Convert v4l2 event to kvzalloc_struct

2018-02-14 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- drivers/media/v4l2-core/v4l2-event.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-event.c b/drivers/media/v4l2-core/v4l2-event.c index 968c2eb08b5a..20afb01301e8 100644 --- a/drivers/me

[PATCH v2 8/8] Convert jffs2 acl to kvzalloc_struct

2018-02-14 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- fs/jffs2/acl.c | 3 ++- fs/jffs2/acl.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/jffs2/acl.c b/fs/jffs2/acl.c index 7ebacf14837f..9df7feffd6ea 100644 --- a/fs/jffs2/acl.c +++ b/fs/jffs2/acl.c @@ -13,6 +13,7 @@

[PATCH v2 7/8] Convert vhost to kvzalloc_struct

2018-02-14 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- drivers/vhost/vhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 1b3e8d2d5c8b..fa6c8fa80dd1 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -1284

Re: arm64 physmap (was Re: [kernel-hardening] [PATCH 4/6] Protectable Memory)

2018-02-14 Thread Laura Abbott
On 02/14/2018 11:28 AM, Ard Biesheuvel wrote: On 14 February 2018 at 19:06, Laura Abbott wrote: On 02/13/2018 01:43 PM, Kees Cook wrote: On Tue, Feb 13, 2018 at 8:09 AM, Laura Abbott wrote: No, arm64 doesn't fixup the aliases, mostly because arm64 uses larger page sizes which can't be brok

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

2018-02-14 Thread Matthew Wilcox
On Wed, Feb 14, 2018 at 01:55:59PM -0600, Christopher Lameter wrote: > On Wed, 14 Feb 2018, Matthew Wilcox wrote: > > > +#define kvzalloc_struct(p, member, n, gfp) \ > > + (typeof(p))kvzalloc_ab_c(n, \ > > + sizeof(*(p)->membe

[PATCH v2 1/8] 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

[PATCH v2 2/8] 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 v2 0/8] 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 v5 08/12] drm/sun4i: Add support for A83T second TCON

2018-02-14 Thread Jernej Skrabec
This TCON is connected to HDMI encoder. Acked-by: Maxime Ripard Signed-off-by: Jernej Skrabec --- drivers/gpu/drm/sun4i/sun4i_tcon.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c index 32d9a5eb9e25..48678705ef43

[PATCH v5 03/12] drm/bridge/synopsys: dw-hdmi: Enable workaround for v1.32a

2018-02-14 Thread Jernej Skrabec
Allwinner SoCs have dw hdmi controller v1.32a which exhibits same magenta line issue as i.MX6Q and i.MX6DL. Enable workaround for it. Tests show that one iteration is enough. Acked-by: Laurent Pinchart Signed-off-by: Jernej Skrabec --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 8 +--- 1

[PATCH v5 06/12] dt-bindings: display: sun4i-drm: Add A83T HDMI pipeline

2018-02-14 Thread Jernej Skrabec
This commit adds all necessary compatibles and descriptions needed to implement A83T HDMI pipeline. Mixer is already properly described, so only compatible is added. However, A83T TV TCON, which is connected to HDMI, doesn't have channel 0, contrary to all TCONs currently described. Because of th

Re: [PATCH] PCI: Add quirk for Cavium Thunder-X2 PCIe erratum #173

2018-02-14 Thread Bjorn Helgaas
[+cc Rafael, PM question below] On Wed, Feb 14, 2018 at 04:58:08PM +0530, George Cherian wrote: > On 02/13/2018 08:39 PM, Bjorn Helgaas wrote: > >On Fri, Feb 02, 2018 at 07:00:46AM +, George Cherian wrote: > >>The PCIe Controller on Cavium ThunderX2 processors does not > >>respond to downstrea

[PATCH v5 01/12] clk: sunxi-ng: Mask nkmp factors when setting register

2018-02-14 Thread Jernej Skrabec
Currently, if one of the factors isn't present, bit 0 gets always set to 1. For example, A83T has NMP PLLs modelled as NKMP PLL without K. Since K is not specified, it's offset, width and shift is 0. Driver assumes that lowest value possible is 1, otherwise we would get division by 0. That situatio

Re: [PATCH v2 3/8] Convert virtio_console to kvzalloc_struct

2018-02-14 Thread Joe Perches
On Wed, 2018-02-14 at 12:11 -0800, Matthew Wilcox wrote: > From: Matthew Wilcox > > Signed-off-by: Matthew Wilcox > --- > drivers/char/virtio_console.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c > ind

[GIT PULL] SCSI fixes for 4.16-rc1

2018-02-14 Thread James Bottomley
These are mostly fixes for problems with merge window code.  In addition we have one doc update (alua) and two dead code removals (aiclib and octogon) a spurious assignment removal (csiostor) and a performance improvement for storvsc involving better interrupt spreading and increasing the command p

Re: [PATCH 1/4] rtc: isl1208: Fix unintended clear of SR bits

2018-02-14 Thread Alexandre Belloni
On 23/01/2018 at 13:17:58 +0100, Michael Grzeschik wrote: > From: Denis Osterland > > After successful > sr = isl1208_i2c_set_regs(client, 0, regs, ISL1208_RTC_SECTION_LEN); > sr will be 0. > As a result > sr = i2c_smbus_write_byte_data(client, ISL1208_REG_SR, > sr & ~ISL120

Re: [GIT PULL] SCSI fixes for 4.16-rc1

2018-02-14 Thread James Bottomley
On Wed, 2018-02-14 at 12:19 -0800, James Bottomley wrote: > These are mostly fixes for problems with merge window code.  In > addition we have one doc update (alua) and two dead code removals > (aiclib and octogon) a spurious assignment removal (csiostor) and a > performance improvement for storvsc

Re: [PATCH v2 3/8] Convert virtio_console to kvzalloc_struct

2018-02-14 Thread Matthew Wilcox
On Wed, Feb 14, 2018 at 12:19:47PM -0800, Joe Perches wrote: > On Wed, 2018-02-14 at 12:11 -0800, Matthew Wilcox wrote: > > */ > > - buf = kmalloc(sizeof(*buf) + sizeof(struct scatterlist) * pages, > > - GFP_KERNEL); > > + buf = kvzalloc_struct(buf, sg, pages, GFP_KERNEL);

Re: [PATCH v2 3/8] Convert virtio_console to kvzalloc_struct

2018-02-14 Thread Joe Perches
On Wed, 2018-02-14 at 12:28 -0800, Matthew Wilcox wrote: > On Wed, Feb 14, 2018 at 12:19:47PM -0800, Joe Perches wrote: > > On Wed, 2018-02-14 at 12:11 -0800, Matthew Wilcox wrote: > > >*/ > > > - buf = kmalloc(sizeof(*buf) + sizeof(struct scatterlist) * pages, > > > - GFP_KERNEL)

Re: [GIT PULL] SCSI fixes for 4.16-rc1

2018-02-14 Thread Martin K. Petersen
James, > These are mostly fixes for problems with merge window code.  In > addition we have one doc update (alua) and two dead code removals > (aiclib and octogon) a spurious assignment removal (csiostor) and a > performance improvement for storvsc involving better interrupt > spreading and incre

Re: [PATCH 1/2] mmc: bcm2835: reset host on timeout

2018-02-14 Thread Stefan Wahren
Hi Michal, > Michal Suchánek hat am 14. Februar 2018 um 20:24 > geschrieben: > > > On Wed, 14 Feb 2018 17:49:31 +0100 > Stefan Wahren wrote: > > > Hi Michal, > > > > [add Phil] > > > > Am 14.02.2018 um 17:13 schrieb Michal Suchánek: > > > On Wed, 14 Feb 2018 16:36:49 +0100 > > > Michal Suc

Re: Read-protected UEFI variables

2018-02-14 Thread Austin S. Hemmelgarn
On 2018-02-14 08:21, Benjamin Drung wrote: Am Mittwoch, den 14.02.2018, 13:09 + schrieb Ard Biesheuvel: On 14 February 2018 at 12:52, Benjamin Drung wrote: Hi, I am exploring the possibility to store SSH and other keys in UEFI variables for systems that do not have persistent storage. The

Re: [PATCH v3 1/2] net: phy: dp83867: Add binding for the CLK_OUT pin muxing option

2018-02-14 Thread David Miller
From: Daniel Schultz Date: Wed, 14 Feb 2018 17:07:11 +0100 > From: Wadim Egorov > > The DP83867 has a muxing option for the CLK_OUT pin. It is possible > to set CLK_OUT for different channels. > Create a binding to select a specific clock for CLK_OUT pin. > > Signed-off-by: Wadim Egorov > Sig

Re: [PATCH v3 2/2] net: phy: dp83867: Add documentation for CLK_OUT pin muxing

2018-02-14 Thread David Miller
From: Daniel Schultz Date: Wed, 14 Feb 2018 17:07:12 +0100 > From: Wadim Egorov > > Add documentation of ti,clk-output-sel which can be used to select > a specific clock for CLK_OUT. > > Signed-off-by: Wadim Egorov > Signed-off-by: Daniel Schultz > --- > Changes: > v2: > - >

Re: DM Regression in 4.16-rc1 - read() returns data when it shouldn't

2018-02-14 Thread NeilBrown
On Wed, Feb 14 2018, Milan Broz wrote: > Hi, > > the commit (found by bisect) > > commit 18a25da84354c6bb655320de6072c00eda6eb602 > Author: NeilBrown > Date: Wed Sep 6 09:43:28 2017 +1000 > > dm: ensure bio submission follows a depth-first tree walk > > cause serious regression while

Re: plan9 semantics on Linux - mount namespaces

2018-02-14 Thread Aleksa Sarai
On 2018-02-14, Enrico Weigelt wrote: > But still I wonder whether user_ns really solves my problem, as I don't > want to create sandboxed users, but only private namespaces just like > on Plan9. On Linux you need to have CAP_SYS_ADMIN (in the user_ns that owns your current mnt_ns) in order to mou

Re: [PATCH v14 2/9] fw_cfg: add a public uapi header

2018-02-14 Thread Michael S. Tsirkin
On Wed, Feb 14, 2018 at 03:18:43PM +0100, Marc-André Lureau wrote: > Create a common header file for well-known values and structures to be > shared by the Linux kernel with qemu or other projects. > > Suggested-by: Michael S. Tsirkin > Signed-off-by: Marc-André Lureau > > --- > > The related

Re: [PATCH] rtc: gemini/ftrtc010: disable clk on error paths in ftrtc010_rtc_probe()

2018-02-14 Thread Alexandre Belloni
Hi Alexey, On 03/02/2018 at 00:45:57 +0300, Alexey Khoroshilov wrote: > ftrtc010_rtc_probe() leaves clks enabled in case of errors. > The patch adds proper disabling code. > > Found by Linux Driver Verification project (linuxtesting.org). > > Signed-off-by: Alexey Khoroshilov > --- > drivers/r

[PATCH] crypto: bfin_crc: Delete an error message for a failed memory allocation in bfin_crypto_crc_probe()

2018-02-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Feb 2018 21:34:54 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/crypto/bfin_crc.c | 4 +--- 1 file changed, 1 insertion(+), 3

Re: [PATCH v2 2/8] mm: Add kvmalloc_ab_c and kvzalloc_struct

2018-02-14 Thread Joe Perches
On Wed, 2018-02-14 at 12:11 -0800, Matthew Wilcox wrote: > 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

Re: [PATCHv2] arch/arm/Kconfig: default ARM_MODULE_PLTS to 'y'

2018-02-14 Thread Anders Roxell
On 31 January 2018 at 21:25, Russell King - ARM Linux wrote: > On Wed, Jan 31, 2018 at 09:19:11PM +0100, Anders Roxell wrote: >> While testing multi_v7_defconfig with LOCKDEP enabled, the kernel >> fails to load simple modules, as reported by kselftest: >> >> [ 34.107620] test_printf: section 4

Re: [PATCH v14 3/9] fw_cfg: fix sparse warnings in fw_cfg_sel_endianness()

2018-02-14 Thread Michael S. Tsirkin
On Wed, Feb 14, 2018 at 03:18:44PM +0100, Marc-André Lureau wrote: > The function is used for both LE & BE target type, use __force casting. > > Fixes: > $ make C=1 CF=-D__CHECK_ENDIAN__ drivers/firmware/qemu_fw_cfg.o > > drivers/firmware/qemu_fw_cfg.c:55:33: warning: restricted __be16 degrades t

Re: [GIT PULL] SCSI fixes for 4.16-rc1

2018-02-14 Thread Linus Torvalds
On Wed, Feb 14, 2018 at 12:28 PM, James Bottomley wrote: > > Actually, can I cancel this. We've had a tree rebase between mine and > Martin's which means I need to do a reset. I'll do that now and submit > a new pull request next week. Ok, dropped. Linus

Re: [PATCH v2 06/11] watchdog/hpwdt: Modify to use watchdog core.

2018-02-14 Thread Jerry Hoemann
On Mon, Feb 12, 2018 at 10:06:21AM +0100, Marcus Folkesson wrote: > Hi Jerry, > > On Sun, Feb 11, 2018 at 10:21:06PM -0700, Jerry Hoemann wrote: > > Follow Documentation/watchdog/convert_drivers_to_kernel_api.txt to > > convert hpwdt from legacy watchdog driver to use the watchdog core. > > > > R

Re: [PATCH] staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR

2018-02-14 Thread Gustavo A. R. Silva
Hi all, I was just wondering about the status of this patch. Thanks -- Gustavo On 01/24/2018 06:14 PM, Steve Longerbeam wrote: Acked-by: Steve Longerbeam On 01/23/2018 04:43 PM, Gustavo A. R. Silva wrote: Fix inconsistent IS_ERR and PTR_ERR in vdic_get_ipu_resources. The proper pointer to

[PATCH] x86, nospec: Fix uninitialized mask in array_index_mask_nospec()

2018-02-14 Thread Dan Williams
Break the false dependency on the uninitialized value of 'mask' in array_index_mask_nospec(). This potentially allows the CPU to rename the register, avoids reports from tools that can detect uninitialized inline asm arguments, and makes it explicit that this sequence wants the result of (0 - 0 - C

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

2018-02-14 Thread Meelis Roos
> Actually this was brought up to me already, there's a fix on the mailing list > for this I reviewed a little while ago from nvidia that we should pull in: > > https://patchwork.freedesktop.org/patch/203205/ > > Would you guys mind confirming that this patch fixes your issues? It works on my am

Re: [PATCH v4 06/24] fpga: dfl: adds fpga_cdev_find_port

2018-02-14 Thread Moritz Fischer
Hi Hao, On Tue, Feb 13, 2018 at 05:24:35PM +0800, Wu Hao wrote: > For feature devices, we need a method to find the port dedicated > to the device. This patch adds a function fpga_cdev_find_port > for this purpose. e.g FPGA Management Engine (FME) Partial > Reconfiguration sub feature, it uses thi

Re: [PATCH] audit: update bugtracker and source URIs

2018-02-14 Thread Paul Moore
On Sat, Feb 3, 2018 at 5:44 PM, Paul Moore wrote: > On Sat, Feb 3, 2018 at 12:33 AM, Richard Guy Briggs wrote: >> Since the Linux Audit project has transitioned completely over to >> github, update the MAINTAINERS file and the primary audit source file to >> reflect that reality. >> >> Signed-off

Re: [PATCH v4 03/24] fpga: mgr: add status for fpga-manager

2018-02-14 Thread Moritz Fischer
Hi Hao, with Alan's Feedback On Tue, Feb 13, 2018 at 05:24:32PM +0800, Wu Hao wrote: > This patch adds status to fpga-manager data structure, to allow > driver to store full/partial reconfiguration errors and other > status information, and adds one status callback to fpga_manager_ops > to allow

RE: [RFC PATCH] MIPS: Provide cmpxchg64 for 32-bit builds

2018-02-14 Thread Michael, Alice
As has previously been said, we're going to be removing the need for cmpxchg64. But it takes a little bit of time and work to do so. I'm adding the dev that is taking care of the work back onto this email thread as well so he can see any concerns with it. Alice -Original Message- Fro

Re: [PATCH] x86, nospec: Fix uninitialized mask in array_index_mask_nospec()

2018-02-14 Thread Linus Torvalds
On Wed, Feb 14, 2018 at 12:50 PM, Dan Williams wrote: > Break the false dependency on the uninitialized value of 'mask' in > array_index_mask_nospec(). This potentially allows the CPU to rename the > register, avoids reports from tools that can detect uninitialized inline > asm arguments, and make

Re: [PATCH v4 07/24] fpga: dfl: add feature device infrastructure

2018-02-14 Thread Moritz Fischer
HI Hao, On Tue, Feb 13, 2018 at 05:24:36PM +0800, Wu Hao wrote: > From: Xiao Guangrong > > This patch abstracts the common operations of the sub features, and defines > the feature_ops data structure, including init, uinit and ioctl function > pointers. And this patch adds some common helper fun

<    3   4   5   6   7   8   9   10   >