Re: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems

2021-04-14 Thread Matthew Wilcox
On Wed, Apr 14, 2021 at 10:10:44AM +0200, Jesper Dangaard Brouer wrote: > Yes, indeed! - And very frustrating. It's keeping me up at night. > I'm dreaming about 32 vs 64 bit data structures. My fitbit stats tell > me that I don't sleep well with these kind of dreams ;-) Then you're going to love

[PATCH] leds: pca9532: Assign gpio base dynamically

2021-04-14 Thread Stefan Riedmueller
When using devicetree, gpio_base holds its initial zero value which can lead to a rejection if another gpio controller already occupies this base. To prevent that collision let the gpio base be assigned dynamically. Signed-off-by: Stefan Riedmueller --- drivers/leds/leds-pca9532.c | 2 ++ 1 file

[Outreachy kernel] [PATCH] staging: rtl8723bs: Remove useless led_blink_hdl()

2021-04-14 Thread Fabio M. De Francesco
Removed the led_blink_hdl() function (declaration and definition). Declared dummy_function() in include/rtw_mlme_ext.h and defined it in core/rtw_cmd.c. Changed the second parameter of GEN_MLME_EXT_HANDLER macro to make use of dummy_function(). Reported-by: Julia Lawall Suggested-by: Dan Carpente

Re: [PATCH v3 2/4] mfd: simple-mfd-i2c: Adds Ampere's Altra SMpro support

2021-04-14 Thread kernel test robot
onfig-r033-20210414 (attached as .config) compiler: ia64-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/li

Re: [PATCH v7 2/7] mm,compaction: Let isolate_migratepages_{range,block} return error codes

2021-04-14 Thread David Hildenbrand
On 13.04.21 12:47, Oscar Salvador wrote: Currently, isolate_migratepages_{range,block} and their callers use a pfn == 0 vs pfn != 0 scheme to let the caller know whether there was any error during isolation. This does not work as soon as we need to start reporting different error codes and make s

Re: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems

2021-04-14 Thread Ilias Apalodimas
On Wed, Apr 14, 2021 at 12:50:52PM +0100, Matthew Wilcox wrote: > On Wed, Apr 14, 2021 at 10:10:44AM +0200, Jesper Dangaard Brouer wrote: > > Yes, indeed! - And very frustrating. It's keeping me up at night. > > I'm dreaming about 32 vs 64 bit data structures. My fitbit stats tell > > me that I do

Re: [PATCH v7 4/4] fs: unicode: Add utf8 module and a unicode layer

2021-04-14 Thread Shreeya Patel
On 09/04/21 12:40 am, Gabriel Krisman Bertazi wrote: Shreeya Patel writes: utf8data.h_shipped has a large database table which is an auto-generated decodification trie for the unicode normalization functions. It is not necessary to load this large table in the kernel if no filesystem is usin

Re: [PATCH v2 0/2] fuse: Fix clearing SGID when access ACL is set

2021-04-14 Thread Miklos Szeredi
On Thu, Mar 25, 2021 at 4:19 PM Vivek Goyal wrote: > > > Hi, > > This is V2 of the patchset. Posted V1 here. > > https://lore.kernel.org/linux-fsdevel/20210319195547.427371-1-vgo...@redhat.com/ > > Changes since V1: > > - Dropped the helper to determine if SGID should be cleared and open > coded

Re: [PATCH] cifs: remove unnecessary copies of tcon->crfid.fid

2021-04-14 Thread Aurélien Aptel
Muhammad Usama Anjum writes: > pfid is being set to tcon->crfid.fid and they are copied in each other > multiple times. Remove the memcopy between same pointers. > > Addresses-Coverity: ("Overlapped copy") > Fixes: 9e81e8ff74b9 ("cifs: return cached_fid from open_shroot") > Signed-off-by: Muhammad

Re: [Outreachy kernel] [PATCH] staging: rtl8723bs: Remove useless led_blink_hdl()

2021-04-14 Thread Fabio Aiuto
On Wed, Apr 14, 2021 at 01:52:43PM +0200, Fabio M. De Francesco wrote: > Removed the led_blink_hdl() function (declaration and definition). > Declared dummy_function() in include/rtw_mlme_ext.h and defined it in > core/rtw_cmd.c. Changed the second parameter of GEN_MLME_EXT_HANDLER > macro to make

Re: [PATCH v7 3/7] mm,hugetlb: Clear HPageFreed outside of the lock

2021-04-14 Thread David Hildenbrand
On 14.04.21 13:09, Michal Hocko wrote: On Wed 14-04-21 12:49:53, Oscar Salvador wrote: On Wed, Apr 14, 2021 at 12:32:58PM +0200, Michal Hocko wrote: [...] I checked, and when we get there in __alloc_bootmem_huge_page, page->private is still zeroed, so I guess it should be safe to assume that w

Re: [PATCH v7 5/6] x86/signal: Detect and prevent an alternate signal stack overflow

2021-04-14 Thread Borislav Petkov
On Wed, Apr 14, 2021 at 01:30:43PM +0200, Florian Weimer wrote: > Is this discussion about better behavior (at least diagnostics) for > existing applications, without any code changes? Or an alternative > programming model? Former. > Does noavx512 acutally reduce the XSAVE size to AVX2 levels?

Re: [RFC PATCH v2 1/1] arm64: Implement stack trace termination record

2021-04-14 Thread Madhavan T. Venkataraman
Hi Mark Rutland, Mark Brown, Could you take a look at this version for proper stack termination and let me know what you think? Thanks! Madhavan On 4/1/21 10:24 PM, madve...@linux.microsoft.com wrote: > From: "Madhavan T. Venkataraman" > > Reliable stacktracing requires that we identify when

Re: [PATCH v8 1/8] pwm: pca9685: Switch to atomic API

2021-04-14 Thread Clemens Gruber
Hi Uwe, On Tue, Apr 13, 2021 at 09:38:18PM +0200, Uwe Kleine-König wrote: > Hello Clemens, > > On Tue, Apr 13, 2021 at 02:11:38PM +0200, Clemens Gruber wrote: > > On Mon, Apr 12, 2021 at 10:10:19PM +0200, Uwe Kleine-König wrote: > > > On Mon, Apr 12, 2021 at 06:39:28PM +0200, Clemens Gruber wrote

Re: [PATCH v4] docs/zh_CN: add translations in zh_CN/dev-tools/gcov

2021-04-14 Thread Alex Shi
On 2021/4/14 下午7:24, Wu XiangCheng wrote: > From: Bernard Zhao > > Add new zh translations > * zh_CN/dev-tools/gcov.rst > * zh_CN/dev-tools/index.rst > and link them to zh_CN/index.rst > > Signed-off-by: Bernard Zhao > Reviewed-by: Wu Xiangcheng > Signed-off-by: Wu XiangCheng > --- > base:

[PATCH 1/6] kvfree_rcu: Release a page cache under memory pressure

2021-04-14 Thread Uladzislau Rezki (Sony)
From: Zhang Qiang Add a drain_page_cache() function to drain a per-cpu page cache. The reason behind of it is a system can run into a low memory condition, in that case a page shrinker can ask for its users to free their caches in order to get extra memory available for other needs in a system.

[PATCH 2/6] kvfree_rcu: use [READ/WRITE]_ONCE() macros to access to nr_bkv_objs

2021-04-14 Thread Uladzislau Rezki (Sony)
nr_bkv_objs represents the counter of objects in the page-cache. Accessing to it requires taking the lock. Switch to READ_ONCE() WRITE_ONCE() macros to provide an atomic access to that counter. A shrinker is one of the user of it. Signed-off-by: Uladzislau Rezki (Sony) --- kernel/rcu/tree.c | 18

[PATCH 4/6] kvfree_rcu: add a bulk-list check when a scheduler is run

2021-04-14 Thread Uladzislau Rezki (Sony)
RCU_SCHEDULER_RUNNING is set when a scheduling is available. That signal is used in order to check and queue a "monitor work" to reclaim freed objects(if they are) during a boot-up phase. We have it because, the main path of the kvfree_rcu() call can not queue the work untill the scheduler is up a

[PATCH 3/6] kvfree_rcu: introduce "flags" variable

2021-04-14 Thread Uladzislau Rezki (Sony)
We have a few extra variables within kfree_rcu_cpu structure which are control ones and behave as regular booleans. Instead we can pack them into only one, define bit descriptions which will represent an individual boolean state. This reduces the size of the per-cpu kfree_rcu_cpu structure. To acc

[PATCH 6/6] kvfree_rcu: use kfree_rcu_monitor() instead of open-coded variant

2021-04-14 Thread Uladzislau Rezki (Sony)
To queue a new batch we have a kfree_rcu_monitor() function that checks KRC_MONITOR_TODO bit and invokes kfree_rcu_drain_unlock() to start a new batch after a GP. Get rid of open-coded case by switching it to the separate function. Signed-off-by: Uladzislau Rezki (Sony) --- kernel/rcu/tree.c | 8

[PATCH 5/6] kvfree_rcu: clear KRC_MONITOR_TODO bit once a batch is started

2021-04-14 Thread Uladzislau Rezki (Sony)
Before attempting of starting a new batch the KRC_MONITOR_TODO bit is cleared and set back when a previous RCU batch is still in progress. Clear the KRC_MONITOR_TODO bit only when a new batch has been successfully queued, if not, it stays active anyway, thus no reason in setting it back. Please no

Re: [PATCH V3] watchdog: mtk: support pre-timeout when the bark irq is available

2021-04-14 Thread Guenter Roeck
On 4/14/21 4:48 AM, Wang Qing wrote: > Use the bark interrupt as the pretimeout notifier if available. > > By default, the pretimeout notification shall occur one second earlier > than the timeout. > > V2: > - panic() by default if WATCHDOG_PRETIMEOUT_GOV is not enabled. > > V3: > - Modify the p

Re: [PATCH v1 2/4] i2c: mpc: Remove CONFIG_PM_SLEEP ifdeffery

2021-04-14 Thread Andy Shevchenko
On Tue, Apr 13, 2021 at 11:43:25PM +, Chris Packham wrote: > On 14/04/21 2:37 am, Andy Shevchenko wrote: > > Use __maybe_unused for the suspend()/resume() hooks and get rid of > > the CONFIG_PM_SLEEP ifdeffery to improve the code. > This has a trivial conflict with my series because I'm also t

Re: [PATCH AUTOSEL 5.10 07/22] scsi: iscsi: Fix race condition between login and sync thread

2021-04-14 Thread Sasha Levin
On Tue, Apr 06, 2021 at 12:24:32PM -0500, Mike Christie wrote: On 4/5/21 11:04 AM, Sasha Levin wrote: From: Gulam Mohamed [ Upstream commit 9e67600ed6b8565da4b85698ec659b5879a6c1c6 ] A kernel panic was observed due to a timing issue between the sync thread and the initiator processing a login

Re: [PATCH v7 4/7] mm,hugetlb: Split prep_new_huge_page functionality

2021-04-14 Thread David Hildenbrand
On 14.04.21 06:59, Oscar Salvador wrote: On Tue, Apr 13, 2021 at 02:33:41PM -0700, Mike Kravetz wrote: -static void prep_new_huge_page(struct hstate *h, struct page *page, int nid) +/* + * Must be called with the hugetlb lock held + */ +static void __prep_account_new_huge_page(struct hstate *h,

Re: [PATCH v4 02/13] mm/mempolicy: convert single preferred_node to full nodemask

2021-04-14 Thread Michal Hocko
On Wed 17-03-21 11:39:59, Feng Tang wrote: > From: Dave Hansen > > The NUMA APIs currently allow passing in a "preferred node" as a > single bit set in a nodemask. If more than one bit it set, bits > after the first are ignored. Internally, this is implemented as > a single integer: mempolicy->

[PATCH] scsi: qla4xxx: Simplify judgement condition

2021-04-14 Thread Wan Jiabing
Fix the following coccicheck warning: ./drivers/scsi/qla4xxx/ql4_83xx.c:475:23-25: WARNING !A || A && B is equivalent to !A || B Signed-off-by: Wan Jiabing --- drivers/scsi/qla4xxx/ql4_83xx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/qla4xxx/ql4_83xx.c b

Re: [PATCH] MIPS: Loongson64: Add Loongson-2K1000 reset support

2021-04-14 Thread Jiaxun Yang
On Wed, Apr 14, 2021, at 9:26 AM, Qing Zhang wrote: > Add power management register operations to support reboot and poweroff. > > Signed-off-by: Qing Zhang No that's not what we intended to do. Please add a devicetree node for pm block. Thanks > --- > .../include/asm/mach-loongson64/loo

Re: [Outreachy kernel] [PATCH] staging: rtl8723bs: Remove useless led_blink_hdl()

2021-04-14 Thread Greg Kroah-Hartman
On Wed, Apr 14, 2021 at 01:52:43PM +0200, Fabio M. De Francesco wrote: > Removed the led_blink_hdl() function (declaration and definition). > Declared dummy_function() in include/rtw_mlme_ext.h and defined it in > core/rtw_cmd.c. Changed the second parameter of GEN_MLME_EXT_HANDLER > macro to make

Re: [PATCH AUTOSEL 4.19 6/8] radix tree test suite: Fix compilation

2021-04-14 Thread Sasha Levin
On Mon, Apr 05, 2021 at 07:11:09PM +0100, Matthew Wilcox wrote: On Mon, Apr 05, 2021 at 12:05:13PM -0400, Sasha Levin wrote: From: "Matthew Wilcox (Oracle)" [ Upstream commit dd841a749d1ded8e2e5facc4242ee0b6779fc0cb ] Introducing local_lock broke compilation; fix it all up. I don't think lo

[PATCH v2 0/3] staging: rtl8723bs: replace DBG_871X_SEL_NL macro with netdev_dbg()

2021-04-14 Thread Fabio Aiuto
This patchset replaces DGB_871X_SEL_NL macro with the driver recommended log function netdev_dbg(). Here are contained the patches not accepted yet in v1. Macro DBG_871X_SEL_NL indeed executes a raw printk call as default behaviour. The other behaviour is doing a seq_printf() call which never occ

[PATCH v2 1/3] staging: rtl8723bs: replace DBG_871X_SEL_NL with netdev_dbg()

2021-04-14 Thread Fabio Aiuto
replace DGB_871X_SEL_NL macro with netdev_dbg(). DBG_871X_SEL_NL macro expands to a raw prink call or a seq_printf if selected stream _is not_ a local debug symbol set to null. This second scenario never occurs so replace all macro usages with netdev_dbg(). This is done with the following coccine

[PATCH v2 2/3] staging: rtl8723bs: remove DBG_871X_SEL_NL macro declaration

2021-04-14 Thread Fabio Aiuto
remove DBG_871X_SEL_NL obsolete macro declaration. Signed-off-by: Fabio Aiuto --- drivers/staging/rtl8723bs/include/rtw_debug.h | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h index f1b37d5

Proposal of improvement for DMA - direct passing of hugepages to the SG list

2021-04-14 Thread wzab
Hi, I'm working both on DMA engines implementations in FPGA and their Linux drivers. Now I need to create an engine that takes the hugepages-backed buffer allocated by the user-space application and passes it to the device. My current solution: https://forums.xilinx.com/t5/Embedded-Linux/How-

[PATCH v2 3/3] staging: rtl8723bs: remove unused argument in function

2021-04-14 Thread Fabio Aiuto
removed unused 'void *sel' argument in rtw_odm_dbg_comp_msg() function, after DBG_871X_SEL_NL replacement. Signed-off-by: Fabio Aiuto --- drivers/staging/rtl8723bs/core/rtw_odm.c | 2 +- drivers/staging/rtl8723bs/include/rtw_odm.h| 2 +- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c |

Re: [PATCH 0/4 POC] Allow executing code and syscalls in another address space

2021-04-14 Thread Florian Weimer
* Jann Horn: > On Wed, Apr 14, 2021 at 12:27 PM Florian Weimer wrote: >> >> * Andrei Vagin: >> >> > We already have process_vm_readv and process_vm_writev to read and write >> > to a process memory faster than we can do this with ptrace. And now it >> > is time for process_vm_exec that allows exe

Re: [PATCH v3 2/4] mfd: simple-mfd-i2c: Adds Ampere's Altra SMpro support

2021-04-14 Thread Guenter Roeck
On Fri, Apr 09, 2021 at 10:13:30AM +0700, Quan Nguyen wrote: > Adds an MFD driver for SMpro found on the Mt.Jade hardware reference > platform with Ampere's Altra processor family. > > Signed-off-by: Quan Nguyen > Reported-by: kernel test robot > --- > drivers/mfd/Kconfig | 10

RE: Regression v5.12-rc3: net: stmmac: re-init rx buffers when mac resume back

2021-04-14 Thread Joakim Zhang
> -Original Message- > From: Joakim Zhang > Sent: 2021年4月14日 16:07 > To: Thierry Reding > Cc: David S. Miller ; Jakub Kicinski ; > Jon Hunter ; Giuseppe Cavallaro > ; Alexandre Torgue ; > Jose Abreu ; net...@vger.kernel.org; Linux Kernel > Mailing List ; linux-tegra > > Subject: RE: Reg

Re: [PATCH V3 1/2] perf/x86: Move cpuc->running into P4 specific code

2021-04-14 Thread Peter Zijlstra
Thanks for these Kan!

Re: [PATCH v2 1/2] fuse: Fix possible deadlock when writing back dirty pages

2021-04-14 Thread Peng Tao
On Tue, Apr 13, 2021 at 5:42 PM Miklos Szeredi wrote: > > On Mon, Apr 12, 2021 at 3:23 PM Baolin Wang > wrote: > > > > Hi Miklos, > > > > 在 2021/3/27 14:36, Baolin Wang 写道: > > > We can meet below deadlock scenario when writing back dirty pages, and > > > writing files at the same time. The deadl

[PATCH v2 0/1] arm: topology: parse the topology from the dt

2021-04-14 Thread Ruifeng Zhang
From: Ruifeng Zhang In Unisoc, the sc9863a SoC which using cortex-a55, it has two software version, one of them is the kernel running on EL1 using aarch32. user(EL0) kernel(EL1) sc9863a_go aarch32 aarch32 sc9863a aarch64 aarch64

Re: [PATCH v7] perf annotate: Fix sample events lost in stdio mode

2021-04-14 Thread Arnaldo Carvalho de Melo
Em Mon, Apr 12, 2021 at 03:22:29PM +0800, Yang Jihong escreveu: > On 2021/3/31 10:18, Yang Jihong wrote: > > On 2021/3/30 15:26, Namhyung Kim wrote: > > > On Sat, Mar 27, 2021 at 11:16 AM Yang Jihong > > > wrote: > > > > On 2021/3/26 20:06, Arnaldo Carvalho de Melo wrote: > > > > > So it seems to

Re: [RFC PATCH v2 0/4] arm64: Implement stack trace reliability checks

2021-04-14 Thread Mark Brown
On Tue, Apr 13, 2021 at 05:53:10PM -0500, Josh Poimboeuf wrote: > On Mon, Apr 12, 2021 at 05:59:33PM +0100, Mark Brown wrote: > > Some more explict pointer to live patching as the only user would > > definitely be good but I think the more important thing would be writing > > down any assumptions

[PATCH v2 1/1] arm: topology: parse the topology from the dt

2021-04-14 Thread Ruifeng Zhang
From: Ruifeng Zhang The arm topology still parse from the MPIDR, but it is incomplete. When the armv8.2 or above cpu runs kernel in EL1 with aarch32 mode, it will parse out the wrong topology. Changed: 1) Arm using the same parse_dt_topology function as arm64. 2) For compatibility to keep the f

[PATCH] Remove BCM2835 SPI chipselect limit.

2021-04-14 Thread Joe Burmeister
The limit of 4 chipselects for the BCM2835 was not required and also was not inforced. Without inforcement it was possible to make a device tree over this limit which would trample memory. The chipselect count is now obtained from the device tree and expanded if more devices are added. Signed-off

Re: [PATCH 5/6] KVM: SVM: pass a proper reason in kvm_emulate_instruction()

2021-04-14 Thread David Edmondson
On Tuesday, 2021-04-13 at 11:45:52 -07, Aaron Lewis wrote: >> >> > Depending on what you're trying to do with the info, maybe there's a better >> > option. E.g. Aaron is working on a series that includes passing pass the >> > code >> > stream (instruction bytes) to userspace on emulation failure

Re: [PATCH v7 5/7] mm: Make alloc_contig_range handle free hugetlb pages

2021-04-14 Thread David Hildenbrand
+static inline int isolate_or_dissolve_huge_page(struct page *page) +{ + return -ENOMEM; Without CONFIG_HUGETLB_PAGE, there is no way someone could possible pass in something valid. Although it doesn't matter too much, -EINVAL or similar sounds a bit better. +} + static inline struc

Re: [PATCH v1 1/2] powerpc/bitops: Use immediate operand when possible

2021-04-14 Thread Segher Boessenkool
On Wed, Apr 14, 2021 at 12:01:21PM +1000, Nicholas Piggin wrote: > Would be nice if we could let the compiler deal with it all... > > static inline unsigned long lr(unsigned long *mem) > { > unsigned long val; > > /* > * This doesn't clobber memory but want to avoid memor

Re: [PATCh stable 4.19] net: phy: broadcom: Only advertise EEE for supported modes

2021-04-14 Thread Sasha Levin
On Mon, Apr 12, 2021 at 04:30:14PM -0700, Florian Fainelli wrote: commit c056d480b40a68f2520ccc156c7fae672d69d57d upstream We should not be advertising EEE for modes that we do not support, correct that oversight by looking at the PHY device supported linkmodes. Fixes: 99cec8a4dda2 ("net: phy:

Re: [PATCH v3 3/4] hwmon: smpro: Add Ampere's Altra smpro-hwmon driver

2021-04-14 Thread Guenter Roeck
On Fri, Apr 09, 2021 at 10:13:31AM +0700, Quan Nguyen wrote: > This commit adds support for Ampere SMpro hwmon driver. This driver > supports accessing various CPU sensors provided by the SMpro co-processor > including temperature, power, voltages, and current. > > Signed-off-by: Quan Nguyen > --

Re: [PATCH] asm-generic/io.h: Silence -Wnull-pointer-arithmetic warning on PCI_IOBASE

2021-04-14 Thread Niklas Schnelle
On Tue, 2021-04-13 at 14:12 +, David Laight wrote: > From: Arnd Bergmann > > Sent: 13 April 2021 14:40 > > > > On Tue, Apr 13, 2021 at 3:06 PM David Laight > > wrote: > > > From: Arnd Bergmann > > > > Sent: 13 April 2021 13:58 > > > ... > > > > The remaining ones (csky, m68k, sparc32) need t

[PATCH 0/5] x86/kvm: Refactor KVM PV features teardown and fix restore from hibernation

2021-04-14 Thread Vitaly Kuznetsov
This series is a successor of Lenny's "[PATCH] x86/kvmclock: Stop kvmclocks for hibernate restore". While reviewing his patch I realized that PV features teardown we have is a bit messy: it is scattered across kvm.c and kvmclock.c and not all features are being shutdown an all paths. This series un

[PATCH 1/5] x86/kvm: Fix pr_info() for async PF setup/teardown

2021-04-14 Thread Vitaly Kuznetsov
'pr_fmt' already has 'kvm-guest: ' so 'KVM' prefix is redundant. "Unregister pv shared memory" is very ambiguous, it's hard to say which particular PV feature it relates to. Signed-off-by: Vitaly Kuznetsov --- arch/x86/kernel/kvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH 2/5] x86/kvm: Teardown PV features on boot CPU as well

2021-04-14 Thread Vitaly Kuznetsov
Various PV features (Async PF, PV EOI, steal time) work through memory shared with hypervisor and when we restore from hibernation we must properly teardown all these features to make sure hypervisor doesn't write to stale locations after we jump to the previously hibernated kernel (which can try t

[PATCH 3/5] x86/kvm: Disable kvmclock on all CPUs on shutdown

2021-04-14 Thread Vitaly Kuznetsov
Currenly, we disable kvmclock from machine_shutdown() hook and this only happens for boot CPU. We need to disable it for all CPUs to guard against memory corruption e.g. on restore from hibernate. Note, writing '0' to kvmclock MSR doesn't clear memory location, it just prevents hypervisor from upd

[PATCH 4/5] x86/kvm: Disable all PV features on crash

2021-04-14 Thread Vitaly Kuznetsov
Crash shutdown handler only disables kvmclock and steal time, other PV features remain active so we risk corrupting memory or getting some side-effects in kdump kernel. Move crash handler to kvm.c and unify with CPU offline. Signed-off-by: Vitaly Kuznetsov --- arch/x86/include/asm/kvm_para.h |

[PATCH 5/5] x86/kvm: Unify kvm_pv_guest_cpu_reboot() with kvm_guest_cpu_offline()

2021-04-14 Thread Vitaly Kuznetsov
Simplify the code by making PV features shutdown happen in one place. Signed-off-by: Vitaly Kuznetsov --- arch/x86/kernel/kvm.c | 42 +- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index 175

Re: [RFC PATCH v2 0/4] arm64: Implement stack trace reliability checks

2021-04-14 Thread Mark Brown
On Wed, Apr 14, 2021 at 05:23:38AM -0500, Madhavan T. Venkataraman wrote: > On 4/13/21 6:02 AM, Mark Brown wrote: > > On Mon, Apr 12, 2021 at 02:55:35PM -0500, Madhavan T. Venkataraman wrote: > >> 3. We are going to assume that the reliable unwinder is only for livepatch > >> purposes > >>and

Re: [PATCH v2 1/1] arm: topology: parse the topology from the dt

2021-04-14 Thread Ruifeng Zhang
Dear Dietmar, In the last, update_cpu_capacity(cpuid) must be called in store_cpu_topology because the cpuid_topo->package_id is always be the initialization value. Because of added the DT parsing logic, the cpuid_topo->package_id will be parse in driver/base/arch_topology and the update_cpu_capa

Re: [PATCH] cxl/mem: Clarify UAPI documentation

2021-04-14 Thread Jonathan Cameron
On Tue, 13 Apr 2021 07:32:47 -0700 Ben Widawsky wrote: > Signed-off-by: Ben Widawsky Sensible update. Acked-by: Jonathan Cameron > --- > include/uapi/linux/cxl_mem.h | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/include/uapi/linux/cxl_mem.h b/include/uapi/linux/cxl_mem.h

linux-next: Tree for Apr 14

2021-04-14 Thread Stephen Rothwell
Hi all, Changes since 20210413: Non-merge commits (relative to Linus' tree): 11611 10392 files changed, 569164 insertions(+), 261078 deletions(-) I have created today's linux-next tree at git://git.kernel.org/pub/scm/

Re: [RFC][PATCH] locking: Generic ticket-lock

2021-04-14 Thread Guo Ren
On Wed, Apr 14, 2021 at 6:16 PM Peter Zijlstra wrote: > > On Wed, Apr 14, 2021 at 11:05:24AM +0200, Peter Zijlstra wrote: > > > That made me look at the qspinlock code, and queued_spin_*lock() uses > > atomic_try_cmpxchg_acquire(), which means any arch that uses qspinlock > > and has RCpc atomics

Re: [PATCH] cxl/mem: Add media provisioning required commands

2021-04-14 Thread Jonathan Cameron
On Tue, 13 Apr 2021 07:09:07 -0700 Ben Widawsky wrote: > Some of the commands have already been defined for the support of RAW > commands (to be blocked). Unlike their usage in the RAW interface, when > used through the supported interface, they will be coordinated and > marshalled along with oth

Re: [PATCH v1 1/2] powerpc/bitops: Use immediate operand when possible

2021-04-14 Thread Christophe Leroy
Le 14/04/2021 à 14:24, Segher Boessenkool a écrit : On Wed, Apr 14, 2021 at 12:01:21PM +1000, Nicholas Piggin wrote: Would be nice if we could let the compiler deal with it all... static inline unsigned long lr(unsigned long *mem) { unsigned long val; /* * This d

Re: [RFC] ITS fails to allocate on rk3568/rk3566

2021-04-14 Thread Marc Zyngier
On Wed, 14 Apr 2021 12:41:20 +0100, Peter Geis wrote: > > On Tue, Apr 13, 2021 at 11:51 AM Marc Zyngier wrote: > > > > On Tue, 13 Apr 2021 16:03:51 +0100, > > Peter Geis wrote: > > > > > > On Tue, Apr 13, 2021 at 10:01 AM Marc Zyngier wrote: > > > > [...] > > > > > > What happens if you hack a

Re: [”PATCH” 2/5] PCI: armada8k: Add link-down handle

2021-04-14 Thread Jonathan Cameron
On Mon, 12 Apr 2021 18:30:53 +0300 wrote: > From: Ben Peled > > In PCIE ISR routine caused by RST_LINK_DOWN > we schedule work to handle the link-down procedure. > Link-down procedure will: > 1. Remove PCIe bus > 2. Reset the MAC > 3. Reconfigure link back up > 4. Rescan PCIe bus > > Signed-of

Re: [RFC][PATCH] locking: Generic ticket-lock

2021-04-14 Thread Peter Zijlstra
On Wed, Apr 14, 2021 at 12:16:38PM +0200, Peter Zijlstra wrote: > On Wed, Apr 14, 2021 at 11:05:24AM +0200, Peter Zijlstra wrote: > > > That made me look at the qspinlock code, and queued_spin_*lock() uses > > atomic_try_cmpxchg_acquire(), which means any arch that uses qspinlock > > and has RCpc

Re: [PATCH v3] kdb: Refactor env variables get/set code

2021-04-14 Thread Daniel Thompson
On Mon, Feb 08, 2021 at 01:32:22PM +0530, Sumit Garg wrote: > > Add two new kdb environment access methods as kdb_setenv() and > kdb_printenv() in order to abstract out environment access code > from kdb command functions. > > Also, replace (char *)0 with NULL as an initializer for environment >

Re: [PATCH v4 03/13] mm/mempolicy: Add MPOL_PREFERRED_MANY for multiple preferred nodes

2021-04-14 Thread Michal Hocko
On Wed 17-03-21 11:40:00, Feng Tang wrote: > From: Dave Hansen > > MPOL_PREFERRED honors only a single node set in the nodemask. Add the > bare define for a new mode which will allow more than one. > > The patch does all the plumbing without actually adding the new policy > type. > > v2: > Plu

[PATCH v1 1/1] PM / wakeup: use dev_set_name() directly

2021-04-14 Thread Andy Shevchenko
We have open coded dev_set_name() implementation, replace that with a direct call. Signed-off-by: Andy Shevchenko --- drivers/base/power/wakeup_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/power/wakeup_stats.c b/drivers/base/power/wakeup_stats.c index

Re: [PATCH 1/4] dt-bindings: phy: Add binding for TI TCAN104x CAN transceivers

2021-04-14 Thread Aswath Govindraju
Hi Marc, On 13/04/21 6:45 pm, Rob Herring wrote: > On Tue, Apr 13, 2021 at 2:41 AM Marc Kleine-Budde wrote: >> >> On 12.04.2021 12:49:56, Rob Herring wrote: >>> On Mon, Apr 12, 2021 at 12:19:30PM +0200, Marc Kleine-Budde wrote: On 4/9/21 3:40 PM, Aswath Govindraju wrote: > Add binding do

[PATCH v2] staging: media: omap4iss: Remove unused macro function

2021-04-14 Thread Aline Santana Cordeiro
Remove unused macro function "v4l2_dev_to_iss_device(dev)". Signed-off-by: Aline Santana Cordeiro --- drivers/staging/media/omap4iss/iss.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/media/omap4iss/iss.h b/drivers/staging/media/omap4iss/iss.h index b88f952..3f587e0 100

Re: [PATCH net v1] lan743x: fix ethernet frame cutoff issue

2021-04-14 Thread Julian Wiedmann
On 09.04.21 02:39, Sven Van Asbroeck wrote: > From: Sven Van Asbroeck > > The ethernet frame length is calculated incorrectly. Depending on > the value of RX_HEAD_PADDING, this may result in ethernet frames > that are too short (cut off at the end), or too long (garbage added > to the end). > >

Re: [PATCH v4 04/13] mm/mempolicy: allow preferred code to take a nodemask

2021-04-14 Thread Michal Hocko
On Wed 17-03-21 11:40:01, Feng Tang wrote: > From: Dave Hansen > > Create a helper function (mpol_new_preferred_many()) which is usable > both by the old, single-node MPOL_PREFERRED and the new > MPOL_PREFERRED_MANY. > > Enforce the old single-node MPOL_PREFERRED behavior in the "new" > version

Re: [PATCH v3] firmware_loader: fix use-after-free in firmware_fallback_sysfs

2021-04-14 Thread Luis Chamberlain
Shuah, a question for you toward the end here. On Wed, Apr 14, 2021 at 02:24:05PM +0530, Anirudh Rayabharam wrote: > This use-after-free happens when a fw_priv object has been freed but > hasn't been removed from the pending list (pending_fw_head). The next > time fw_load_sysfs_fallback tries to i

Re: [PATCH net-next v2 1/2] of: net: pass the dst buffer to of_get_mac_address()

2021-04-14 Thread Michael Walle
Hi Dan, Am 2021-04-14 07:33, schrieb Dan Carpenter: url: https://github.com/0day-ci/linux/commits/Michael-Walle/of-net-support-non-platform-devices-in-of_get_mac_address/20210406-234030 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git cc0626c2aaed8e475efdd85fa374b497a7192

Re: [PATCH 04/11] mm/vmstat: Convert NUMA statistics to basic NUMA counters

2021-04-14 Thread Vlastimil Babka
On 4/7/21 10:24 PM, Mel Gorman wrote: > NUMA statistics are maintained on the zone level for hits, misses, foreign > etc but nothing relies on them being perfectly accurate for functional > correctness. The counters are used by userspace to get a general overview > of a workloads NUMA behaviour but

Re: [PATCH v4 05/13] mm/mempolicy: refactor rebind code for PREFERRED_MANY

2021-04-14 Thread Michal Hocko
On Wed 17-03-21 11:40:02, Feng Tang wrote: > From: Dave Hansen > > Again, this extracts the "only one node must be set" behavior of > MPOL_PREFERRED. It retains virtually all of the existing code so it can > be used by MPOL_PREFERRED_MANY as well. > > v2: > Fixed typos in commit message. (Ben)

Re: [RFC][PATCH] locking: Generic ticket-lock

2021-04-14 Thread Peter Zijlstra
On Wed, Apr 14, 2021 at 08:39:33PM +0800, Guo Ren wrote: > I've tested it on csky SMP*4 hw (860) & riscv SMP*4 hw (c910) and it's okay. W00t :-) > Hope you can keep > typedef struct { > union { > atomic_t lock; > struct __raw_tickets { > #ifdef __BIG_ENDIA

Re: [PATCH v2 3/4] powerpc: Rename probe_kernel_read_inst()

2021-04-14 Thread Christophe Leroy
Le 14/04/2021 à 07:23, Aneesh Kumar K.V a écrit : Christophe Leroy writes: When probe_kernel_read_inst() was created, it was to mimic probe_kernel_read() function. Since then, probe_kernel_read() has been renamed copy_from_kernel_nofault(). Rename probe_kernel_read_inst() into copy_from_k

Re: [PATCH v4 06/13] mm/mempolicy: kill v.preferred_nodes

2021-04-14 Thread Michal Hocko
On Wed 17-03-21 11:40:03, Feng Tang wrote: > From: Ben Widawsky > > Now that preferred_nodes is just a mask, and policies are mutually > exclusive, there is no reason to have a separate mask. > > This patch is optional. It definitely helps clean up code in future > patches, but there is no funct

Re: [PATCH v2 0/2] fuse: Fix clearing SGID when access ACL is set

2021-04-14 Thread Vivek Goyal
On Wed, Apr 14, 2021 at 01:57:01PM +0200, Miklos Szeredi wrote: > On Thu, Mar 25, 2021 at 4:19 PM Vivek Goyal wrote: > > > > > > Hi, > > > > This is V2 of the patchset. Posted V1 here. > > > > https://lore.kernel.org/linux-fsdevel/20210319195547.427371-1-vgo...@redhat.com/ > > > > Changes since V1

Re: [PATCH v2 1/4] dt-bindings: arm: imx: Add i.mx6q DaSheng COM-9XX SBC board dts support

2021-04-14 Thread Krzysztof Kozlowski
On 14/04/2021 08:51, dillon.min...@gmail.com wrote: > From: dillon min > > The DaSheng Com-9xx is and ARM based signle board computer (SBC) > featuring: > - i.MX6Q > - 2GiB LPDDR3 DRAM > - 8GiB eMMC 5.0 FLASH > - 4MiB SPI Flash > - USB 2.0 Host/Device > - Multiple multi-protocol RS232/RS485 Seria

Re: [PATCH v2 4/4] dt-bindings: add dasheng vendor prefix

2021-04-14 Thread Krzysztof Kozlowski
On 14/04/2021 08:51, dillon.min...@gmail.com wrote: > From: dillon min > > Add vendor prefix for DaSheng, Inc. > > Signed-off-by: dillon min > --- > v2: new add > > Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ > 1 file changed, 2 insertions(+) This should be the first patch

Re: [PATCH v4 07/13] mm/mempolicy: handle MPOL_PREFERRED_MANY like BIND

2021-04-14 Thread Michal Hocko
On Wed 17-03-21 11:40:04, Feng Tang wrote: > From: Ben Widawsky > > Begin the real plumbing for handling this new policy. Now that the > internal representation for preferred nodes and bound nodes is the same, > and we can envision what multiple preferred nodes will behave like, > there are obvio

Re: [PATCH 3/4] mce/copyin: fix to not SIGBUS when copying from user hits poison

2021-04-14 Thread Borislav Petkov
On Tue, Apr 13, 2021 at 04:13:03PM +, Luck, Tony wrote: > Even if no applications ever do anything with it, it is still useful to avoid > crashing the whole system and just terminate one application/guest. True. > There's one more item on my long term TODO list. Add fixups so that > copy_to_u

Re: [PATCH V4 2/2] net: ethernet: ravb: Enable optional refclk

2021-04-14 Thread Adam Ford
On Tue, Apr 13, 2021 at 2:33 AM Geert Uytterhoeven wrote: > > Hi Adam, > > On Mon, Apr 12, 2021 at 3:27 PM Adam Ford wrote: > > For devices that use a programmable clock for the AVB reference clock, > > the driver may need to enable them. Add code to find the optional clock > > and enable it whe

Re: [PATCH v4 08/13] mm/mempolicy: Create a page allocator for policy

2021-04-14 Thread Michal Hocko
On Wed 17-03-21 11:40:05, Feng Tang wrote: > From: Ben Widawsky > > Add a helper function which takes care of handling multiple preferred > nodes. It will be called by future patches that need to handle this, > specifically VMA based page allocation, and task based page allocation. > Huge pages d

[PATCH v3 1/4] powerpc: Remove probe_user_read_inst()

2021-04-14 Thread Christophe Leroy
Its name comes from former probe_user_read() function. That function is now called copy_from_user_nofault(). probe_user_read_inst() uses copy_from_user_nofault() to read only a few bytes. It is suboptimal. It does the same as get_user_inst() but in addition disables page faults. But on the other

[PATCH v3 2/4] powerpc: Make probe_kernel_read_inst() common to PPC32 and PPC64

2021-04-14 Thread Christophe Leroy
We have two independant versions of probe_kernel_read_inst(), one for PPC32 and one for PPC64. The PPC32 is identical to the first part of the PPC64 version. The remaining part of PPC64 version is not relevant for PPC32, but not contradictory, so we can easily have a common function with the PPC64

[PATCH v3 4/4] powerpc: Move copy_from_kernel_nofault_inst()

2021-04-14 Thread Christophe Leroy
When probe_kernel_read_inst() was created, there was no good place to put it, so a file called lib/inst.c was dedicated for it. Since then, probe_kernel_read_inst() has been renamed copy_from_kernel_nofault_inst(). And mm/maccess.h didn't exist at that time. Today, mm/maccess.h is related to copy_

[PATCH] staging: media: tegra-video: Align line break to match with the open parenthesis in file vi.c

2021-04-14 Thread Aline Santana Cordeiro
Align line break to match with the open parenthesis. Issue detected by checkpatch.pl. Signed-off-by: Aline Santana Cordeiro --- drivers/staging/media/tegra-video/vi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/media/tegra-video/vi.c b/drivers/staging/m

[PATCH v3 3/4] powerpc: Rename probe_kernel_read_inst()

2021-04-14 Thread Christophe Leroy
When probe_kernel_read_inst() was created, it was to mimic probe_kernel_read() function. Since then, probe_kernel_read() has been renamed copy_from_kernel_nofault(). Rename probe_kernel_read_inst() into copy_inst_from_kernel_nofault(). Signed-off-by: Christophe Leroy --- v3: copy_inst_from_kern

Re: [RFC][PATCH] locking: Generic ticket-lock

2021-04-14 Thread Peter Zijlstra
On Wed, Apr 14, 2021 at 02:55:57PM +0200, Peter Zijlstra wrote: > On Wed, Apr 14, 2021 at 08:39:33PM +0800, Guo Ren wrote: > > > + * It further assumes atomic_*_release() + atomic_*_acquire() is RCpc > > > and hence > > > + * uses atomic_fetch_add() which is SC to create an RCsc lock. > > This ^

Re: [PATCH 3/4] mce/copyin: fix to not SIGBUS when copying from user hits poison

2021-04-14 Thread Borislav Petkov
On Tue, Apr 13, 2021 at 10:47:21PM -0700, Jue Wang wrote: > This path is when EPT #PF finds accesses to a hwpoisoned page and > sends SIGBUS to user space (KVM exits into user space) with the same > semantic as if regular #PF found access to a hwpoisoned page. > > The KVM_X86_SET_MCE ioctl actuall

[GIT PULL] Immutable branch between MFD, Clock, GPIO, Regulator and RTC due for the v5.13 merge window

2021-04-14 Thread Lee Jones
Please note that this PR will break your build unless you have the required Regulator API update. fb8fee9efdcf0 regulator: Add regmap helper for ramp-delay setting e3baacf542756 regulator: helpers: Export helper voltage listing Pull at your peril! :) The following changes since commit a38fd874

Re: [PATCH] x86/kprobes: Simplify alloc_insn_page() with __vmalloc_node_range

2021-04-14 Thread Jarkko Sakkinen
On Wed, Apr 14, 2021 at 03:27:28PM +0800, Jisheng Zhang wrote: > Jisheng Zhang wrote: > > > > > > > Hi, > > Hi > > > > > On Tue, 13 Apr 2021 18:03:24 +0800 > > Jisheng Zhang wrote: > > > > > Use the __vmalloc_node_range() to simplify x86's alloc_insn_page() > > > implementation. > >

Re: [PATCH] x86/kprobes: Simplify alloc_insn_page() with __vmalloc_node_range

2021-04-14 Thread Jarkko Sakkinen
On Wed, Apr 14, 2021 at 05:22:58PM +0900, Masami Hiramatsu wrote: > Hi Jisheng, > > On Wed, 14 Apr 2021 15:27:28 +0800 > Jisheng Zhang wrote: > > \ > > > > > > On Tue, 13 Apr 2021 18:03:24 +0800 > > > Jisheng Zhang wrote: > > > > > > > Use the __vmalloc_node_range() to simplify x86's alloc_

Re: [PATCH] genirq: reduce irqdebug bouncing cachelines

2021-04-14 Thread Cédric Le Goater
On 4/13/21 10:24 PM, Thomas Gleixner wrote: > On Tue, Apr 13 2021 at 14:16, Cédric Le Goater wrote: We could test irq_settings_no_debug() directly under handle_nested_irq() and handle_irq_event_percpu() to avoid calling note_interrupt(), just like we do for noirqdebug. >>> >>> We c

Re: [PATCH v4 10/13] mm/mempolicy: VMA allocation for many preferred

2021-04-14 Thread Michal Hocko
On Wed 17-03-21 11:40:07, Feng Tang wrote: [...] > @@ -2301,10 +2300,26 @@ alloc_pages_vma(gfp_t gfp, int order, struct > vm_area_struct *vma, >* does not allow the current node in its nodemask, we allocate >* the standard way. >*/ > - if

<    1   2   3   4   5   6   7   8   9   10   >