[PATCH 1/2] block: move partitions check code into single helper

2021-02-04 Thread Ming Lei
No functional change, make code more readable, and prepare for supporting safe re-read partitions. Cc: Ewan D. Milne Signed-off-by: Ming Lei --- block/partitions/core.c | 51 ++--- 1 file changed, 37 insertions(+), 14 deletions(-) diff --git

Re: [PATCH v3 2/2] tpm: in tpm2_del_space check if ops pointer is still valid

2021-02-04 Thread Jarkko Sakkinen
On Thu, Feb 04, 2021 at 04:34:11PM -0800, James Bottomley wrote: > On Fri, 2021-02-05 at 00:50 +0100, Lino Sanfilippo wrote: > > From: Lino Sanfilippo > > > > In tpm2_del_space() chip->ops is used for flushing the sessions. > > However > > this function may be called after tpm_chip_unregister()

[PATCH 0/2] block: avoid to drop & re-add partitions if partitions aren't changed

2021-02-04 Thread Ming Lei
Hi Guys, The two patches changes block ioctl(BLKRRPART) for avoiding drop & re-add partitions if partitions state isn't changed. The current behavior confuses userspace because partitions can disappear anytime when ioctl(BLKRRPART). Ming Lei (2): block: move partitions check code into single

[PATCH 2/2] block: avoid to drop & re-add partitions if partitions aren't changed

2021-02-04 Thread Ming Lei
block ioctl(BLKRRPART) always drops current partitions and adds partitions again, even though there isn't any change in partitions table. ioctl(BLKRRPART) may be called by systemd-udevd and some disk utilities frequently. When it is run, partitions disk node are dropped and added back, this way

linux-next: build failure after merge of the amdgpu tree

2021-02-04 Thread Stephen Rothwell
Hi all, After merging the amdgpu tree, today's linux-next build (x86_64 allmodconfig) failed like this: Caused by commit 13a75af50484 ("drm/amd/display: Fix unused variable warning") interacting with commit 4c3a3292730c ("drm/amd/display: fix unused variable warning") from the drm tree.

Re: [PATCH v3] ARM: imx: avic: Convert to using IRQCHIP_DECLARE

2021-02-04 Thread Saravana Kannan
On Thu, Feb 4, 2021 at 5:54 PM Fabio Estevam wrote: > > Hi Saravana, > > On Thu, Feb 4, 2021 at 10:39 PM Saravana Kannan wrote: > > > > Using IRQCHIP_DECLARE lets fw_devlink know that it should not wait for > > these interrupt controllers to be populated as struct devices. Without > > this

[PATCH v1] gpiolib: Don't probe gpio_device if it's not the primary device

2021-02-04 Thread Saravana Kannan
Dmitry reported[1] boot error messages caused by commit 4731210c09f5 ("gpiolib: Bind gpio_device to a driver to enable fw_devlink=on by default"). gpio-1022 (cpu-pwr-req-hog): hogged as input max77620-pinctrl max77620-pinctrl: pin gpio4 already requested by max77620-pinctrl; cannot claim for

[PATCH v2] PCI/AER: Change to use helper pcie_aer_is_native() in some places

2021-02-04 Thread Xiaofei Tan
Use helper function pcie_aer_is_native() in some places to keep the code tidy. No function changes. Signed-off-by: Xiaofei Tan Reviewed-by: Krzysztof Wilczyński --- Changes from v1 to v2: - Add the fix suggested by Krzysztof. --- drivers/pci/pcie/aer.c | 4 ++--

Re: [PATCH v2 0/6] crypto: hisilicon - enable new algorithms of SEC

2021-02-04 Thread liulongfang
On 2021/1/4 19:33, Herbert Xu Wrote: > On Mon, Jan 04, 2021 at 04:15:13PM +0800, liulongfang wrote: >> >> Currently, we have not conducted Fuzz testing. >> For SEC driver, we only adds support for these new algorithms >> with existing interfaces of Crypto. So, do we need to do Fuzz testing on the

[PATCH v2] dma-mapping: benchmark: pretend DMA is transmitting

2021-02-04 Thread Barry Song
In a real dma mapping user case, after dma_map is done, data will be transmit. Thus, in multi-threaded user scenario, IOMMU contention should not be that severe. For example, if users enable multiple threads to send network packets through 1G/10G/100Gbps NIC, usually the steps will be: map ->

Re: [PATCH] tpm/ppi: Constify static struct attribute_group

2021-02-04 Thread Jarkko Sakkinen
On Thu, Feb 04, 2021 at 10:54:27PM +0100, Rikard Falkeborn wrote: > The only usage of ppi_attr_grp is to put its address in an array of > pointers to const struct attribute_group. Make it const to allow the > compiler to put it in read-only memory. > > Signed-off-by: Rikard Falkeborn Thanks.

Re: [PATCH v3 1/2] tpm: fix reference counting for struct tpm_chip

2021-02-04 Thread James Bottomley
On Thu, 2021-02-04 at 20:44 -0500, Stefan Berger wrote: > To clarify: When I tested this I had *both* patches applied. Without > the patches I got the null pointer exception in tpm2_del_space(). The > 2nd patch alone solves that issue when using the steps above. Yes, I can't confirm the bug

Re: [PATCH] xen/netback: avoid race in xenvif_rx_ring_slots_available()

2021-02-04 Thread Jakub Kicinski
On Thu, 4 Feb 2021 06:32:32 +0100 Jürgen Groß wrote: > On 04.02.21 00:48, Jakub Kicinski wrote: > > On Tue, 2 Feb 2021 08:09:38 +0100 Juergen Gross wrote: > >> Since commit 23025393dbeb3b8b3 ("xen/netback: use lateeoi irq binding") > >> xenvif_rx_ring_slots_available() is no longer called only

Re: [PATCH v2 2/2] MIPS: relocatable: Use __kaslr_offset in show_kernel_relocation

2021-02-04 Thread Jinyang He
On 02/04/2021 11:36 PM, Thomas Bogendoerfer wrote: On Wed, Feb 03, 2021 at 06:35:10PM +0800, Jinyang He wrote: The type of the VMLINUX_LOAD_ADDRESS macro is the (unsigned long long) in 32bits kernel but (unsigned long) in the 64-bit kernel. Although there is no error here, avoid using it to

Re: [PATCH v3] ARM: imx: avic: Convert to using IRQCHIP_DECLARE

2021-02-04 Thread Fabio Estevam
Hi Saravana, On Thu, Feb 4, 2021 at 10:39 PM Saravana Kannan wrote: > > Using IRQCHIP_DECLARE lets fw_devlink know that it should not wait for > these interrupt controllers to be populated as struct devices. Without > this change, fw_devlink=on will make the consumers of these interrupt >

[PATCH v2 1/2] interconnect: qcom: icc-rpm: record slave RPM id in error log

2021-02-04 Thread Benjamin Li
Add slave RPM ID to assist with identifying incorrect RPM config. Signed-off-by: Benjamin Li --- drivers/interconnect/qcom/icc-rpm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c index

[PATCH v2 2/2] interconnect: qcom: msm8939: remove rpm-ids from non-RPM nodes

2021-02-04 Thread Benjamin Li
Some nodes are incorrectly marked as RPM-controlled (they have RPM master and slave ids assigned), but are actually controlled by the application CPU instead. The RPM complains when we send requests for resources that it can't control. Let's fix this by replacing the IDs, with the default "-1" in

[PATCH v2 0/2] Clean up MSM8939 interconnect driver

2021-02-04 Thread Benjamin Li
Following up on a review comment on commit 6c6fe5d3dc5e ("interconnect: qcom: Add MSM8939 interconnect provider driver") to clean up some log pollution. This is based on icc-next (which appears to contain a refactor commonizing functions into icc-rpm.c). v2: - Update commit message to add a full

[PATCH 2/3] scsi: ufs: set device state to power-off before 1st link startup

2021-02-04 Thread DooHyun Hwang
In the ufshcd init sequence, device state should be power-off bacause the UFS device is not active. Signed-off-by: DooHyun Hwang --- drivers/scsi/ufs/ufshcd.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index

[PATCH 1/3] scsi: ufs: retry link startup if that fails and device state is not active

2021-02-04 Thread DooHyun Hwang
Remove unnecessary link startup command if it was completed. UniPro stack is reset and enabled when ufshc is enabled. The link startup command is issued after enabling ufshc, if link startup is completed, there is no needed to issue again. Signed-off-by: DooHyun Hwang ---

[PATCH 3/3] scsi: ufs: reset the ufs device before link startup retry

2021-02-04 Thread DooHyun Hwang
If the link startup command fails, trigger hardware reset to reset the UFS device before link startup retry. Signed-off-by: DooHyun Hwang --- drivers/scsi/ufs/ufshcd.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index

Re: [PATCH bpf-next] bpf: clean up for 'const static' in bpf_lsm.c

2021-02-04 Thread Alexei Starovoitov
On Thu, Feb 4, 2021 at 5:40 PM Xu Jia wrote: > > Prefer 'static const' over 'const static' here > > Signed-off-by: Xu Jia > --- > kernel/bpf/bpf_lsm.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/kernel/bpf/bpf_lsm.c b/kernel/bpf/bpf_lsm.c > index

Re: [PATCH v10 08/16] KVM: X86: Introduce KVM_HC_PAGE_ENC_STATUS hypercall

2021-02-04 Thread Steve Rutherford
On Wed, Feb 3, 2021 at 4:38 PM Ashish Kalra wrote: > > From: Brijesh Singh > > This hypercall is used by the SEV guest to notify a change in the page > encryption status to the hypervisor. The hypercall should be invoked > only when the encryption attribute is changed from encrypted -> decrypted

Re: [PATCH v2 4/4] hugetlb: Do early cow when page pinned on src mm

2021-02-04 Thread Peter Xu
On Thu, Feb 04, 2021 at 03:25:37PM -0800, Mike Kravetz wrote: > On 2/4/21 6:50 AM, Peter Xu wrote: > > This is the last missing piece of the COW-during-fork effort when there're > > pinned pages found. One can reference 70e806e4e645 ("mm: Do early cow for > > pinned pages during fork() for ptes",

Re: [PATCH] mm: cma: support sysfs

2021-02-04 Thread Suren Baghdasaryan
On Thu, Feb 4, 2021 at 4:34 PM John Hubbard wrote: > > On 2/4/21 4:25 PM, John Hubbard wrote: > > On 2/4/21 3:45 PM, Suren Baghdasaryan wrote: > > ... > >> 2) The overall CMA allocation attempts/failures (first two items > >> above) seem > >> an odd pair of things to track. Maybe

Re: [PATCH v3 1/2] tpm: fix reference counting for struct tpm_chip

2021-02-04 Thread Stefan Berger
On 2/4/21 7:46 PM, Stefan Berger wrote: On 2/4/21 6:50 PM, Lino Sanfilippo wrote: From: Lino Sanfilippo The following sequence of operations results in a refcount warning: 1. Open device /dev/tpmrm 2. Remove module tpm_tis_spi 3. Write a TPM command to the file descriptor opened at step 1.

Re: [PATCH v4 resend 00/13] MFD/extcon/ASoC: Rework arizona codec jack-detect support

2021-02-04 Thread Chanwoo Choi
On 2/4/21 8:24 PM, Hans de Goede wrote: > Hi all, > > Here is v4 of my series to rework the arizona codec jack-detect support > to use the snd_soc_jack helpers instead of direct extcon reporting. > > This is a resend with some extra *-by tags collected and with the extcon > folks added to the

Re: [PATCH] mm: cma: support sysfs

2021-02-04 Thread Minchan Kim
On Thu, Feb 04, 2021 at 04:24:20PM -0800, John Hubbard wrote: > On 2/4/21 4:12 PM, Minchan Kim wrote: > ... > > > > Then, how to know how often CMA API failed? > > > > > > Why would you even need to know that, *in addition* to knowing specific > > > page allocation numbers that failed? Again,

[git pull] drm fixes for 5.11-rc7

2021-02-04 Thread Dave Airlie
Hi Linus, Fixes for rc7, bit bigger than I'd like at this stage, but most of the i915 stuff and some amdgpu is destined for staging and I'd rather not hold it up, the i915 changes also pulled in a few precusor code movement patches to make things cleaner, but nothing seems that horrible, and I've

[PATCH bpf-next] bpf: clean up for 'const static' in bpf_lsm.c

2021-02-04 Thread Xu Jia
Prefer 'static const' over 'const static' here Signed-off-by: Xu Jia --- kernel/bpf/bpf_lsm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/bpf/bpf_lsm.c b/kernel/bpf/bpf_lsm.c index 1622a44d1617..75b1c678d558 100644 --- a/kernel/bpf/bpf_lsm.c +++

[PATCH v3] ARM: imx: avic: Convert to using IRQCHIP_DECLARE

2021-02-04 Thread Saravana Kannan
Using IRQCHIP_DECLARE lets fw_devlink know that it should not wait for these interrupt controllers to be populated as struct devices. Without this change, fw_devlink=on will make the consumers of these interrupt controllers wait for the struct device to be added and thereby block the consumers'

Re: [PATCH] cpu/hotplug: wait for cpuset_hotplug_work to finish on cpu onlining

2021-02-04 Thread Daniel Jordan
Alexey Klimov writes: > When a CPU offlined and onlined via device_offline() and device_online() > the userspace gets uevent notification. If, after receiving "online" uevent, > userspace executes sched_setaffinity() on some task trying to move it > to a recently onlined CPU, then it often fails

Re: [PATCH] PCI: Use subdir-ccflags-* to inherit debug flag

2021-02-04 Thread Yicong Yang
On 2021/2/5 0:10, Bjorn Helgaas wrote: > [+cc Masahiro, Michal, linux-kbuild, linux-kernel] > > On Thu, Feb 04, 2021 at 07:30:15PM +0800, Yicong Yang wrote: >> From: Junhao He >> >> Use subdir-ccflags-* instead of ccflags-* to inherit the debug >> settings from Kconfig when traversing

[PATCH v5 3/5] dt-bindings: mediatek: add compatible for MT6873/8192 pwrap

2021-02-04 Thread Hsin-Hsiung Wang
This adds dt-binding documentation of pwrap for Mediatek MT6873/8192 SoCs Platform. Signed-off-by: Hsin-Hsiung Wang Acked-by: Rob Herring --- changes since v4: no changes --- Documentation/devicetree/bindings/soc/mediatek/pwrap.txt | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH v5 5/5] arm64: dts: mt8192: add pwrap node

2021-02-04 Thread Hsin-Hsiung Wang
Add pwrap node to SOC MT8192. Signed-off-by: Hsin-Hsiung Wang --- changes since v4: - update correct pwrap node in the Mediatek MT8192 dtsi. --- arch/arm64/boot/dts/mediatek/mt8192.dtsi | 12 1 file changed, 12 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8192.dtsi

[PATCH v5 4/5] soc: mediatek: pwrap: add pwrap driver for MT6873/8192 SoCs

2021-02-04 Thread Hsin-Hsiung Wang
MT6873/8192 are highly integrated SoCs and use PMIC_MT6359 for power management. This patch adds pwrap master driver to access PMIC_MT6359. Signed-off-by: Hsin-Hsiung Wang --- changes since v4: no changes --- drivers/soc/mediatek/mtk-pmic-wrap.c | 29 1 file

[PATCH v5 2/5] soc: mediatek: pwrap: add arbiter capability

2021-02-04 Thread Hsin-Hsiung Wang
Add arbiter capability for pwrap driver. The arbiter capability uses new design to judge the priority and latency for multi-channel. The design with arbiter support cannot change the watchdog timer. This patch is preparing for adding mt6873/8192 pwrap support. Signed-off-by: Hsin-Hsiung Wang ---

[PATCH v5 1/5] soc: mediatek: pwrap: use BIT() macro

2021-02-04 Thread Hsin-Hsiung Wang
Use a better BIT() marco for the bit definition. No functional changes, cleanup only. Signed-off-by: Hsin-Hsiung Wang Reviewed-by: Nicolas Boichat --- changes since v4: no changes --- drivers/soc/mediatek/mtk-pmic-wrap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v5 0/5] Add PMIC wrapper support for Mediatek MT6873/8192 SoC IC

2021-02-04 Thread Hsin-Hsiung Wang
This series adds support for new SoC MT6873/8192 to the pmic-wrap driver. changes since v4: - refine code about PWRAP_CAP_ARB capacity for better code quality. - update correct pwrap node in the Mediatek MT8192 dtsi. Hsin-Hsiung Wang (5): soc: mediatek: pwrap: use BIT() macro soc: mediatek:

[PATCH 1/2] KVM: x86: Remove misleading DR6/DR7 adjustments from RSM emulation

2021-02-04 Thread Sean Christopherson
Drop the DR6/7 volatile+fixed bits adjustments in RSM emulation, which are redundant and misleading. The necessary adjustments are made by kvm_set_dr(), which properly sets the fixed bits that are conditional on the vCPU model. Note, KVM incorrectly reads only bits 31:0 of the DR6/7 fields when

[PATCH 2/2] KVM: x86: Restore all 64 bits of DR6 and DR7 during RSM on x86-64

2021-02-04 Thread Sean Christopherson
Restore the full 64-bit values of DR6 and DR7 when emulating RSM on x86-64, as defined by both Intel's SDM and AMD's APM. Note, bits 63:32 of DR6 and DR7 are reserved, so this is a glorified nop unless the SMM handler is poking into SMRAM, which it most definitely shouldn't be doing since both

[PATCH] platform/surface: Add Surface Hot-Plug driver

2021-02-04 Thread Maximilian Luz
Some Surface Book 2 and 3 models have a discrete GPU (dGPU) that is hot-pluggable. On those devices, the dGPU is contained in the base, which can be separated from the tablet part (containing CPU and touchscreen) while the device is running. It (in general) is presented as/behaves like a standard

[PATCH 0/2] KVM: x86: RSM emulation DR6/DR7 cleanups

2021-02-04 Thread Sean Christopherson
A cleanup and a bug fix (technically) in the RSM loading of DR6 and DR7 I stumbled on when looking at the bus lock detect DR6 changes. Sean Christopherson (2): KVM: x86: Remove misleading DR6/DR7 adjustments from RSM emulation KVM: x86: Restore all 64 bits of DR6 and DR7 during RSM on x86-64

Re: [PATCH 1/1] PCI/AER: Change to use helper pcie_aer_is_native() in some places

2021-02-04 Thread tanxiaofei
Hi Krzysztof, On 2021/2/5 5:50, Krzysztof Wilczyński wrote: Hi Tan, This is very nice! Thank you for this. [...] if (dev->aer_cap && pci_aer_available() && - (pcie_ports_native || host->native_aer)) { + pcie_aer_is_native(dev)) { services |=

RE: [PATCH] dma-mapping: benchmark: pretend DMA is transmitting

2021-02-04 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Robin Murphy [mailto:robin.mur...@arm.com] > Sent: Friday, February 5, 2021 12:51 PM > To: Song Bao Hua (Barry Song) ; > m.szyprow...@samsung.com; h...@lst.de; io...@lists.linux-foundation.org > Cc: linux-kernel@vger.kernel.org; linux...@openeuler.org >

Re: [PATCH] lib: crc-itu-t: Fix typo in comment

2021-02-04 Thread Randy Dunlap
On 2/4/21 5:02 PM, David Mosberger-Tang wrote: > Signed-off-by: David Mosberger-Tang Acked-by: Randy Dunlap Thanks. > --- > lib/crc-itu-t.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/crc-itu-t.c b/lib/crc-itu-t.c > index 1974b355c148..1d26a1647da5 100644 >

Re: [PATCH net 1/1] net: stmmac: set TxQ mode back to DCB after disabling CBS

2021-02-04 Thread Jesse Brandeburg
Song Yoong Siang wrote: > From: Mohammad Athari Bin Ismail > > When disable CBS, mode_to_use parameter is not updated even the operation > mode of Tx Queue is changed to Data Centre Bridging (DCB). Therefore, > when tc_setup_cbs() function is called to re-enable CBS, the operation > mode of Tx

Re: [PATCH 0/2] docs: Add support for relative paths in automarkup

2021-02-04 Thread Nícolas F . R . A . Prado
Em Thu Feb 4, 2021 at 8:28 PM -03, Jonathan Corbet escreveu: > > Nícolas F. R. A. Prado writes: > > > As Jon previously noted [1], it would be nice if automarkup supported > > relative > > paths as well when cross-referencing to other documents. This adds the > > support > > for it, and

[PATCH 0/9] KVM: x86: Move common exit handlers to x86.c

2021-02-04 Thread Sean Christopherson
The main focus of this series is moving common exit handlers to x86.c, to avoid duplicate code between SVM and VMX, and also to help prevent silly divergences between SVM and VMX. Except for patch 03, which is absolutely grotesque, the changes are relatively small. To allow wiring up the common

[patch 11/12] softirq: Allow inlining do_softirq_own_stack()

2021-02-04 Thread Thomas Gleixner
The function to switch to the irq stack on x86 is now minimal and there is only a single caller. Allow the stack switch to be inlined. Signed-off-by: Thomas Gleixner --- include/linux/interrupt.h |2 ++ kernel/softirq.c |4 2 files changed, 6 insertions(+) ---

[PATCH 8/9] KVM: SVM: Don't manually emulate RDPMC if nrips=0

2021-02-04 Thread Sean Christopherson
Remove bizarre code that causes KVM to run RDPMC through the emulator when nrips is disabled. Accelerated emulation of RDPMC doesn't rely on any additional data from the VMCB, and SVM has generic handling for updating RIP to skip instructions when nrips is disabled. Signed-off-by: Sean

[patch 00/12] x86/irq/64: Inline irq stack switching

2021-02-04 Thread Thomas Gleixner
The recent effort to make the ASM entry code slim and unified moved the irq stack switching out of the low level ASM code so that the whole return from interrupt work and state handling can be done in C and the ASM code just handles the true low level details of entry and exit (which is horrible

Re: [LKP] Re: [mm] 10befea91b: hackbench.throughput -62.4% regression

2021-02-04 Thread Roman Gushchin
On Thu, Feb 04, 2021 at 01:19:47PM +0800, Xing Zhengjun wrote: > > > On 2/3/2021 10:49 AM, Roman Gushchin wrote: > > On Tue, Feb 02, 2021 at 04:18:27PM +0800, Xing, Zhengjun wrote: > > > On 1/14/2021 11:18 AM, Roman Gushchin wrote: > > > > On Thu, Jan 14, 2021 at 10:51:51AM +0800, kernel test

[PATCH 3/9] KVM: SVM: Pass @vcpu to exit handlers (and many, many other places)

2021-02-04 Thread Sean Christopherson
Refactor the svm_exit_handlers API to pass @vcpu instead of @svm to allow directly invoking common x86 exit handlers (in a future patch). Opportunistically convert an asburd number of instances of 'svm->vcpu' to direct uses of 'vcpu' to avoid pointless casting. No functional change intended.

[PATCH] lib: crc-itu-t: Fix typo in comment

2021-02-04 Thread David Mosberger-Tang
Signed-off-by: David Mosberger-Tang --- lib/crc-itu-t.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/crc-itu-t.c b/lib/crc-itu-t.c index 1974b355c148..1d26a1647da5 100644 --- a/lib/crc-itu-t.c +++ b/lib/crc-itu-t.c @@ -7,7 +7,7 @@ #include #include -/** CRC table

[PATCH 4/9] KVM: nSVM: Add VMLOAD/VMSAVE helper to deduplicate code

2021-02-04 Thread Sean Christopherson
Add another helper layer for VMLOAD+VMSAVE, the code is identical except for the one line that determines which VMCB is the source and which is the destination. No functional change intended. Signed-off-by: Sean Christopherson --- arch/x86/kvm/svm/svm.c | 79

[PATCH 6/9] KVM: x86: Move trivial instruction-based exit handlers to common code

2021-02-04 Thread Sean Christopherson
Move the trivial exit handlers, e.g. for instructions that KVM "emulates" as nops, to common x86 code. Assign the common handlers directly to the exit handler arrays and drop the vendor trampolines. Opportunistically use pr_warn_once() where appropriate. No functional change intended.

[PATCH 9/9] KVM: SVM: Skip intercepted PAUSE instructions after emulation

2021-02-04 Thread Sean Christopherson
Skip PAUSE after interception to avoid unnecessarily re-executing the instruction in the guest, e.g. after regaining control post-yield. This is a benign bug as KVM disables PAUSE interception if filtering is off, including the case where pause_filter_count is set to zero. Signed-off-by: Sean

[patch 09/12] x86/softirq: Remove indirection in do_softirq_own_stack()

2021-02-04 Thread Thomas Gleixner
Use the new inline stack switching and remove the old ASM indirect call implementation. Signed-off-by: Thomas Gleixner --- arch/x86/entry/entry_64.S| 39 - arch/x86/include/asm/irq_stack.h | 52 ---

[PATCH 5/9] KVM: x86: Move XSETBV emulation to common code

2021-02-04 Thread Sean Christopherson
Move the entirety of XSETBV emulation to x86.c, and assign the function directly to both VMX's and SVM's exit handlers, i.e. drop the unnecessary trampolines. No functional change intended. Signed-off-by: Sean Christopherson --- arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/svm/svm.c

[PATCH 7/9] KVM: x86: Move RDPMC emulation to common code

2021-02-04 Thread Sean Christopherson
Move the entirety of the accelerated RDPMC emulation to x86.c, and assign the common handler directly to the exit handler array for VMX. SVM has bizarre nrips behavior that prevents it from directly invoking the common handler. The nrips goofiness will be addressed in a future patch.

[patch 12/12] x86/softirq/64: Inline do_softirq_own_stack()

2021-02-04 Thread Thomas Gleixner
There is no reason to have this as a seperate function for a single caller. Signed-off-by: Thomas Gleixner --- arch/x86/include/asm/irq.h |3 +++ arch/x86/include/asm/irq_stack.h |3 +-- arch/x86/kernel/irq_64.c |5 - 3 files changed, 4 insertions(+), 7

[PATCH 2/9] KVM: SVM: Remove an unnecessary forward declaration

2021-02-04 Thread Sean Christopherson
Drop a defunct forward declaration of svm_complete_interrupts(). No functional change intended. Signed-off-by: Sean Christopherson --- arch/x86/kvm/svm/svm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index 3fac9e77cca3..8c2ed1633350

[PATCH 1/9] KVM: SVM: Move AVIC vCPU kicking snippet to helper function

2021-02-04 Thread Sean Christopherson
Add a helper function to handle kicking non-running vCPUs when sending virtual IPIs. A future patch will change SVM's interception functions to take @vcpu instead of @svm, at which piont declaring and modifying 'vcpu' in a case statement is confusing, and potentially dangerous. No functional

[patch 07/12] x86/entry: Convert device interrupts to inline stack switching

2021-02-04 Thread Thomas Gleixner
Convert device interrupts to inline stack switching by replacing the existing macro implementation with the new inline version. Tweak the function signature of the actual handler function to have the vector argument as u32. That allows the inline macro to avoid extra intermediates and lets the

[patch 08/12] x86/entry: Use run_sysvec_on_irqstack_cond() for XEN upcall

2021-02-04 Thread Thomas Gleixner
To avoid yet another macro implementation reuse the existing run_sysvec_on_irqstack_cond() and move the set_irq_regs() handling into the called function. Makes the code even simpler. Signed-off-by: Thomas Gleixner --- arch/x86/entry/common.c | 19 ++- 1 file changed, 6

[patch 02/12] x86/irq: Sanitize irq stack tracking

2021-02-04 Thread Thomas Gleixner
The recursion protection for hard interrupt stacks is an unsigned int per CPU variable initialized to -1 named __irq_count. The irq stack switching is only done when the variable is -1, which creates worse code than just checking for 0. When the stack switching happens it uses

[patch 10/12] x86: Select CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK

2021-02-04 Thread Thomas Gleixner
Now that all invocations of irq_exit_rcu() happen on the irq stack, turn on CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK which causes the core code to invoke __do_softirq() directly without going through do_softirq_own_stack(). That means do_softirq_own_stack() is only invoked from task context which means

[patch 01/12] x86/entry: Fix instrumentation annotation

2021-02-04 Thread Thomas Gleixner
Embracing a callout into instrumentation_begin() / instrumentation_begin() does not really make sense. Make the latter instrumentation_end(). Signed-off-by: Thomas Gleixner --- arch/x86/entry/common.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/x86/entry/common.c +++

[patch 06/12] x86/entry: Convert system vectors to irq stack macro

2021-02-04 Thread Thomas Gleixner
To inline the stack switching and to prepare for enabling CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK provide a macro template for system vectors and device interrupts and convert the system vectors over to it. Signed-off-by: Thomas Gleixner --- arch/x86/entry/entry_64.S|1

[patch 04/12] x86/apic: Split out spurious handling code

2021-02-04 Thread Thomas Gleixner
sysvec_spurious_apic_interrupt() calls into the handling body of __spurious_interrupt() which is not obvious as that function is declared inside the DEFINE_IDTENTRY_IRQ(spurious_interrupt) macro. As __spurious_interrupt() is currently always inlined this ends up with two copies of the same code

[patch 05/12] x86/irq: Provide macro for inlining irq stack switching

2021-02-04 Thread Thomas Gleixner
The effort to make the ASM entry code slim and unified moved the irq stack switching out of the low level ASM code so that the whole return from interrupt work and state handling can be done in C and the ASM code just handles the low level details of entry and exit. This ended up being a

[patch 03/12] x86/irq/64: Adjust the per CPU irq stack pointer by 8

2021-02-04 Thread Thomas Gleixner
The per CPU hardirq_stack_ptr contains the pointer to the irq stack in the form that it is ready to be assigned to [ER]SP so that the first push ends up on the top entry of the stack. But the stack switching on 64 bit has the following rules: 1) Store the current stack pointer (RSP) in the

Re: [PATCH] lib: crc-itu-t: Fix comment in typo

2021-02-04 Thread Randy Dunlap
On 2/4/21 4:47 PM, David Mosberger-Tang wrote: > Signed-off-by: David Mosberger-Tang > --- > lib/crc-itu-t.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/crc-itu-t.c b/lib/crc-itu-t.c > index 1974b355c148..56e6e0d63d1e 100644 > --- a/lib/crc-itu-t.c > +++

Re: [PATCH v10 12/16] KVM: x86: Introduce new KVM_FEATURE_SEV_LIVE_MIGRATION feature & Custom MSR.

2021-02-04 Thread Steve Rutherford
On Wed, Feb 3, 2021 at 4:39 PM Ashish Kalra wrote: > > From: Ashish Kalra > > Add new KVM_FEATURE_SEV_LIVE_MIGRATION feature for guest to check > for host-side support for SEV live migration. Also add a new custom > MSR_KVM_SEV_LIVE_MIGRATION for guest to enable the SEV live migration > feature.

Re: [PATCH 1/4] Squashfs: avoid out of bounds writes in decompressors

2021-02-04 Thread Andrew Morton
On Thu, 4 Feb 2021 13:02:46 + Phillip Lougher wrote: > This is a regression introduced by the patch "migrate from ll_rw_block > usage to BIO". Fixes: 93e72b3c612adc ("squashfs: migrate from ll_rw_block usage to BIO") > Sysbot/Syskaller has reported a number of "out of bounds writes" and

[PATCH] lib: crc-itu-t: Fix comment in typo

2021-02-04 Thread David Mosberger-Tang
Signed-off-by: David Mosberger-Tang --- lib/crc-itu-t.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/crc-itu-t.c b/lib/crc-itu-t.c index 1974b355c148..56e6e0d63d1e 100644 --- a/lib/crc-itu-t.c +++ b/lib/crc-itu-t.c @@ -7,7 +7,7 @@ #include #include -/** CRC table

linux-next: build failure after merge of the pm tree

2021-02-04 Thread Stephen Rothwell
intel-mid: Remove unused leftovers (vRTC)") 975272714c6f ("x86/apb_timer: Remove driver for deprecated platform") 08a1ce661b5c ("mfd: intel_msic: Remove driver for deprecated platform") I have used the pm tree from next-20210204 for today. -- Cheers, Stephen Rothwell

Re: [PATCH v2 3/4] mm: Introduce page_needs_cow_for_dma() for deciding whether cow

2021-02-04 Thread Peter Xu
On Thu, Feb 04, 2021 at 07:20:00PM -0400, Jason Gunthorpe wrote: > > +static inline bool is_cow_mapping(vm_flags_t flags) > > +{ > > It feels a bit more logical to pass in a struct vm_area_struct *' here? Agree, but only if I'm adding this as a new function. Though it's a code movement from

Re: [PATCH] printk: Userspace format enumeration support

2021-02-04 Thread Chris Down
Some improvements I noticed that I'll include when sending v2. Chris Down writes: +static void remove_printk_fmt_sec(const struct module *mod) +{ + struct printk_fmt_sec *tmp = NULL, *ps = NULL; + const char **fptr = NULL; fptr can be scoped to list_for_each_entry_safe, I'll move

[PATCH 0/3] Fix some seq_file users that were recently broken

2021-02-04 Thread NeilBrown
A recent change to seq_file broke some users which were using seq_file in a non-"standard" way ... though the "standard" isn't documented, so they can be excused. The result is a possible leak - of memory in one case, of references to a 'transport' in the other. These three patches: 1/

[PATCH 3/3] net: fix iteration for sctp transport seq_files

2021-02-04 Thread NeilBrown
The sctp transport seq_file iterators take a reference to the transport in the ->start and ->next functions and releases the reference in the ->show function. The preferred handling for such resources is to release them in the subsequent ->next or ->stop function call. Since Commit 1f4aace60b0e

Re: [PATCH v3 1/2] tpm: fix reference counting for struct tpm_chip

2021-02-04 Thread Stefan Berger
On 2/4/21 6:50 PM, Lino Sanfilippo wrote: From: Lino Sanfilippo The following sequence of operations results in a refcount warning: 1. Open device /dev/tpmrm 2. Remove module tpm_tis_spi 3. Write a TPM command to the file descriptor opened at step 1. [ cut here ]

[PATCH 2/3] x86: fix seq_file iteration for pat/memtype.c

2021-02-04 Thread NeilBrown
The memtype seq_file iterator allocates a buffer in the ->start and ->next functions and frees it in the ->show function. The preferred handling for such resources is to free them in the subsequent ->next or ->stop function call. Since Commit 1f4aace60b0e ("fs/seq_file.c: simplify seq_file

[PATCH 1/3] seq_file: document how per-entry resources are managed.

2021-02-04 Thread NeilBrown
Users of seq_file will sometimes find it convenient to take a resource, such as a lock or memory allocation, in the ->start or ->next operations. These are per-entry resources, distinct from per-session resources which are taken in ->start and released in ->stop. The preferred management of these

Re: [PATCH] ARM: kexec: Fix panic after TLB are invalidated

2021-02-04 Thread Giancarlo Ferrari
Sorry for polluting, On Fri, Feb 05, 2021 at 12:40:54AM +, Giancarlo Ferrari wrote: > Russell, > > On Fri, Feb 05, 2021 at 12:18:33AM +, Russell King - ARM Linux admin > wrote: > > On Thu, Feb 04, 2021 at 11:48:42PM +, Giancarlo Ferrari wrote: > > > Can I ask about having it

Re: [PATCH 8/9] vfio/pci: use x86 naming instead of igd

2021-02-04 Thread Alexey Kardashevskiy
On 04/02/2021 23:51, Jason Gunthorpe wrote: On Thu, Feb 04, 2021 at 12:05:22PM +1100, Alexey Kardashevskiy wrote: It is system firmware (==bios) which puts stuff in the device tree. The stuff is: 1. emulated pci devices (custom pci bridges), one per nvlink, emulated by the firmware, the

Re: [PATCH] cpu/hotplug: wait for cpuset_hotplug_work to finish on cpu onlining

2021-02-04 Thread Daniel Jordan
Peter Zijlstra writes: > On Thu, Feb 04, 2021 at 12:50:34PM +, Alexey Klimov wrote: >> On Thu, Feb 4, 2021 at 9:46 AM Peter Zijlstra wrote: >> > >> > On Thu, Feb 04, 2021 at 01:01:57AM +, Alexey Klimov wrote: >> > > @@ -1281,6 +1282,11 @@ static int cpu_up(unsigned int cpu, enum >> > >

Re: [PATCH] ARM: kexec: Fix panic after TLB are invalidated

2021-02-04 Thread Giancarlo Ferrari
Russell, On Fri, Feb 05, 2021 at 12:18:33AM +, Russell King - ARM Linux admin wrote: > On Thu, Feb 04, 2021 at 11:48:42PM +, Giancarlo Ferrari wrote: > > Can I ask about having it integrated ? > > Thanks for testing. Are you willing for me to add: > > Tested-by: Giancarlo Ferrari > >

Re: [PATCH v2] ARM: imx: avic: Convert to using IRQCHIP_DECLARE

2021-02-04 Thread Fabio Estevam
Hi Saravana, On Thu, Feb 4, 2021 at 7:56 PM Saravana Kannan wrote: > > Remove a lot of boilerplate code. Also address boot issues on imx25 with > fw_devlink=on that were reported by Martin. The commit message could be improved. It starts like it was just a clean-up and then it says it fixes a

Re: [PATCH] mm: cma: support sysfs

2021-02-04 Thread John Hubbard
On 2/4/21 4:25 PM, John Hubbard wrote: On 2/4/21 3:45 PM, Suren Baghdasaryan wrote: ... 2) The overall CMA allocation attempts/failures (first two items above) seem an odd pair of things to track. Maybe that is what was easy to track, but I'd vote for just omitting them. Then, how to know how

Re: [PATCH v3 2/2] tpm: in tpm2_del_space check if ops pointer is still valid

2021-02-04 Thread James Bottomley
On Fri, 2021-02-05 at 00:50 +0100, Lino Sanfilippo wrote: > From: Lino Sanfilippo > > In tpm2_del_space() chip->ops is used for flushing the sessions. > However > this function may be called after tpm_chip_unregister() which sets > the chip->ops pointer to NULL. > Avoid a possible NULL pointer

Re: Possible deny of service with memfd_create()

2021-02-04 Thread Hugh Dickins
On Thu, 4 Feb 2021, Michal Hocko wrote: > On Thu 04-02-21 17:32:20, Christian Koenig wrote: > > Hi Michal, > > > > as requested in the other mail thread the following sample code gets my test > > system down within seconds. > > > > The issue is that the memory allocated for the file descriptor

Re: [dm-devel] [PATCH AUTOSEL 5.4 03/26] dm integrity: select CRYPTO_SKCIPHER

2021-02-04 Thread Sasha Levin
On Tue, Jan 19, 2021 at 09:47:31PM -0800, Eric Biggers wrote: On Tue, Jan 19, 2021 at 08:26:40PM -0500, Sasha Levin wrote: From: Anthony Iliopoulos [ Upstream commit f7b347acb5f6c29d9229bb64893d8b6a2c7949fb ] The integrity target relies on skcipher for encryption/decryption, but certain

Greylisting on linux-kernel broken?

2021-02-04 Thread Phillip Lougher
Hi, I have sent a patch-set from my usual email address (phil...@squashfs.org.uk), but despite over 18 hours it has still not shown up. Instead I have received bounce warning emails that they are delayed. I have sent emails to autoans...@vger.kernel.org and majord...@vger.kernel.org, and they

Re: [PATCH V3 1/2] dt-bindings: power: bq27xxx: add bq78z10

2021-02-04 Thread Dan Murphy
Li On 2/4/21 5:37 PM, Rob Herring wrote: On Wed, 03 Feb 2021 10:40:59 +, LI Qingwu wrote: Add bindings for TI BQ78Z100. An I2C interface gas gauge. It provides a fully integrated safety protection and authentication for 1 to 2-series cell Li-Ion and Li-Polymer battery packs. $subject has

Re: [PATCH] mm: cma: support sysfs

2021-02-04 Thread John Hubbard
On 2/4/21 3:45 PM, Suren Baghdasaryan wrote: ... 2) The overall CMA allocation attempts/failures (first two items above) seem an odd pair of things to track. Maybe that is what was easy to track, but I'd vote for just omitting them. Then, how to know how often CMA API failed? Why would you

Re: [PATCH v5 05/11] crypto: qce: skcipher: Return error for zero length messages

2021-02-04 Thread Eric Biggers
On Thu, Feb 04, 2021 at 07:09:53PM -0500, Thara Gopinath wrote: > > > @@ -260,6 +261,10 @@ static int qce_skcipher_crypt(struct > > > skcipher_request *req, int encrypt) > > > rctx->flags |= encrypt ? QCE_ENCRYPT : QCE_DECRYPT; > > > keylen = IS_XTS(rctx->flags) ?

Re: Conflict with Mickaël Salaün's blacklist patches [was [PATCH v5 0/4] Add EFI_CERT_X509_GUID support for dbx/mokx entries]

2021-02-04 Thread Eric Snowberg
> On Feb 4, 2021, at 1:26 AM, Mickaël Salaün wrote: > > > On 04/02/2021 04:53, Eric Snowberg wrote: >> >>> On Feb 3, 2021, at 11:49 AM, Mickaël Salaün wrote: >>> >>> This looks good to me, and it still works for my use case. Eric's >>> patchset only looks for asymmetric keys in the

Re: [PATCH v5 06/11] crypto: qce: skcipher: Return error for non-blocksize data(ECB/CBC algorithms)

2021-02-04 Thread Thara Gopinath
On 2/4/21 5:50 PM, Eric Biggers wrote: On Thu, Feb 04, 2021 at 04:43:54PM -0500, Thara Gopinath wrote: + /* +* ECB and CBC algorithms require message lengths to be +* multiples of block size. +* TODO: The spec says AES CBC mode for certain versions +* of

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