[PATCH] remoteproc: qcom: wcnss: Fix race with iris probe

2021-03-11 Thread Bjorn Andersson
The remoteproc driver is split between the responsibilities of getting the SoC-internal ARM core up and running and the external RF (aka "Iris") part configured. In order to satisfy the regulator framework's need of a struct device * to look up supplies this was implemented as two different driver

[PATCH v2] remoteproc: qcom: wcnss: Allow specifying firmware-name

2021-03-11 Thread Bjorn Andersson
Introduce a firmware-name property, in order to be able to support device/platform specific firmware for the wireless connectivity subsystem; in line with other Qualcomm remoteproc drivers. Acked-by: Mathieu Poirier Signed-off-by: Bjorn Andersson --- Changes since v1: - Rebased patch - Added de

[PATCH] remoteproc: qcom_q6v5_mss: Provide errors for firmware-name parsing

2021-03-11 Thread Bjorn Andersson
Failing to read the "firmware-name" DT property without informing the developer is annoying, add some helpful debug prints. Signed-off-by: Bjorn Andersson --- drivers/remoteproc/qcom_q6v5_mss.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/qcom_q6

drivers/gpu/drm/etnaviv/etnaviv_dump.c:213 etnaviv_core_dump() warn: should - mem_map) + arch_pfn_offset) << 12' be a 64 bit

2021-03-11 Thread kernel test robot
-randconfig-m031-20210311 (attached as .config) compiler: arceb-elf-gcc (GCC) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot smatch warnings: drivers/gpu/drm/etnaviv/etnaviv_dump.c:213 etnaviv_core_dump() warn: should '(((*pages++) - me

Re: [PATCH 4/4] ftgmac100: Restart MAC HW once

2021-03-11 Thread Joel Stanley
On Tue, 20 Oct 2020 at 04:14, Joel Stanley wrote: > > On Mon, 19 Oct 2020 at 08:57, Dylan Hung wrote: > > > > The interrupt handler may set the flag to reset the mac in the future, > > but that flag is not cleared once the reset has occured. > > > > Fixes: 10cbd6407609 ("ftgmac100: Rework NAPI &

Re: [PATCH 4/4] ftgmac100: Restart MAC HW once

2021-03-11 Thread David Miller
From: Joel Stanley Date: Fri, 12 Mar 2021 00:26:43 + > On Tue, 20 Oct 2020 at 04:14, Joel Stanley wrote: >> >> On Mon, 19 Oct 2020 at 08:57, Dylan Hung wrote: >> > >> > The interrupt handler may set the flag to reset the mac in the future, >> > but that flag is not cleared once the reset ha

Re: [PATCH net] net: lapbether: Prevent racing when checking whether the netif is running

2021-03-11 Thread Xie He
On Thu, Mar 11, 2021 at 4:10 PM Jakub Kicinski wrote: > > And the "noqueue" queue is there because it's on top of hdlc_fr.c > somehow or some out of tree driver? Or do you install it manually? No, this driver is not related to "hdlc_fr.c" or any out-of-tree driver. The default qdisc is "noqueue"

Re: [PATCH rdma-next 0/4] Clean the mlx5 MR deregistration logic

2021-03-11 Thread Jason Gunthorpe
On Thu, Mar 04, 2021 at 02:07:41PM +0200, Leon Romanovsky wrote: > From: Leon Romanovsky > > Hi, > > The following patchset is a cleanup of mlx5_ib_mr dereg logic. > > Thanks > > Jason Gunthorpe (4): > RDMA/mlx5: Zero out ODP related items in the mlx5_ib_mr > RDMA/mlx5: Use a union inside

[PATCH 0/5] qcom: wcnss: Allow overriding firmware form DT

2021-03-11 Thread Bjorn Andersson
The wireless subsystem found in Qualcomm MSM8974 and MSM8916 among others needs platform-, and perhaps even board-, specific firmware. Add support for providing this in devicetree. Bjorn Andersson (5): dt-bindings: soc: qcom: wcnss: Add firmware-name property wcn36xx: Allow firmware name to be

[PATCH 1/5] dt-bindings: soc: qcom: wcnss: Add firmware-name property

2021-03-11 Thread Bjorn Andersson
The WCNSS needs firmware which differs between platforms, and possibly boards. Add a new property "firmware-name" to allow the DT to specify the platform/board specific path to this firmware file. Signed-off-by: Bjorn Andersson --- Documentation/devicetree/bindings/soc/qcom/qcom,wcnss.txt | 7 ++

[PATCH 3/5] soc: qcom: wcnss_ctrl: Introduce local variable "dev"

2021-03-11 Thread Bjorn Andersson
Introduce a local variable to carry the struct device *, to reduce the line lengths in the next patch. Signed-off-by: Bjorn Andersson --- drivers/soc/qcom/wcnss_ctrl.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/soc/qcom/wcnss_ctrl.c b/drivers/soc/qcom/wc

[PATCH 4/5] soc: qcom: wcnss_ctrl: Allow reading firmware-name from DT

2021-03-11 Thread Bjorn Andersson
The WLAN NV firmware blob differs between platforms, and possibly devices, so add support in the wcnss_ctrl driver for reading the path of this file from DT in order to allow these files to live in a generic file system (or linux-firmware). The new property is optional and the code falls back to t

[PATCH 5/5] arm64: dts: qcom: msm8916: Enable modem and WiFi

2021-03-11 Thread Bjorn Andersson
Enable the modem and WiFi subsystems and specify msm8916 specific firmware path for these and the WCNSS control service. Signed-off-by: Bjorn Andersson --- arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 12 arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +- 2 files changed, 13 insertio

[PATCH 2/5] wcn36xx: Allow firmware name to be overridden by DT

2021-03-11 Thread Bjorn Andersson
The WLAN NV firmware blob differs between platforms, and possibly devices, so add support in the wcn36xx driver for reading the path of this file from DT in order to allow these files to live in a generic file system (or linux-firmware). For some reason the parent (wcnss_ctrl) also needs to upload

[syzbot] WARNING in handle_mm_fault

2021-03-11 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:05a59d79 Merge git://git.kernel.org:/pub/scm/linux/kernel/.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=16f493ead0 kernel config: https://syzkaller.appspot.com/x/.config?x=750735fdbc630971 das

[PATCH 00/17] Add support for Clang CFI

2021-03-11 Thread Sami Tolvanen
This series adds support for Clang's Control-Flow Integrity (CFI) checking. With CFI, the compiler injects a runtime check before each indirect function call to ensure the target is a valid function with the correct static type. This restricts possible call targets and makes it more difficult for a

[PATCH 01/17] add support for Clang CFI

2021-03-11 Thread Sami Tolvanen
This change adds support for Clang’s forward-edge Control Flow Integrity (CFI) checking. With CONFIG_CFI_CLANG, the compiler injects a runtime check before each indirect function call to ensure the target is a valid function with the correct static type. This restricts possible call targets and mak

[PATCH 02/17] cfi: add __cficanonical

2021-03-11 Thread Sami Tolvanen
With CONFIG_CFI_CLANG, the compiler replaces a function address taken in C code with the address of a local jump table entry, which passes runtime indirect call checks. However, the compiler won't replace addresses taken in assembly code, which will result in a CFI failure if we later jump to such

[PATCH 03/17] mm: add generic __va_function and __pa_function macros

2021-03-11 Thread Sami Tolvanen
With CONFIG_CFI_CLANG, the compiler replaces function addresses in instrumented C code with jump table addresses. This means that __pa_symbol(function) returns the physical address of the jump table entry instead of the actual function, which may not work as the jump table code will immediately jum

[PATCH 04/17] module: cfi: ensure __cfi_check alignment

2021-03-11 Thread Sami Tolvanen
CONFIG_CFI_CLANG_SHADOW assumes the __cfi_check() function is page aligned and at the beginning of the .text section. While Clang would normally align the function correctly, it fails to do so for modules with no executable code. This change ensures the correct __cfi_check() location and alignment

[PATCH 05/17] workqueue: cfi: disable callback pointer check with modules

2021-03-11 Thread Sami Tolvanen
With CONFIG_CFI_CLANG, a callback function passed to __queue_delayed_work from a module points to a jump table entry defined in the module instead of the one used in the core kernel, which breaks function address equality in this check: WARN_ON_ONCE(timer->function != delayed_work_timer_fn); Di

[PATCH 06/17] kthread: cfi: disable callback pointer check with modules

2021-03-11 Thread Sami Tolvanen
With CONFIG_CFI_CLANG, a callback function passed to __kthread_queue_delayed_work from a module points to a jump table entry defined in the module instead of the one used in the core kernel, which breaks function address equality in this check: WARN_ON_ONCE(timer->function != kthread_delayed_wor

[PATCH 09/17] lib/list_sort: fix function type mismatches

2021-03-11 Thread Sami Tolvanen
Casting the comparison function to a different type trips indirect call Control-Flow Integrity (CFI) checking. Remove the additional consts from cmp_func, and the now unneeded casts. Fixes: 043b3f7b6388 ("lib/list_sort: simplify and remove MAX_LIST_LENGTH_BITS") Signed-off-by: Sami Tolvanen ---

[PATCH 08/17] bpf: disable CFI in dispatcher functions

2021-03-11 Thread Sami Tolvanen
BPF dispatcher functions are patched at runtime to perform direct instead of indirect calls. Disable CFI for the dispatcher functions to avoid conflicts. Signed-off-by: Sami Tolvanen --- include/linux/bpf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/bpf

[PATCH 13/17] arm64: use __pa_function

2021-03-11 Thread Sami Tolvanen
With CONFIG_CFI_CLANG, the compiler replaces function address references with the address of the function's CFI jump table entry. This means that __pa_symbol(function) returns the physical address of the jump table entry, which can lead to address space confusion as the jump table points to the fun

[PATCH 12/17] arm64: implement __va_function

2021-03-11 Thread Sami Tolvanen
With CONFIG_CFI_CLANG, the compiler replaces function addresses in instrumented C code with jump table addresses. This change implements the __va_function() macro, which returns the actual function address instead. Signed-off-by: Sami Tolvanen --- arch/arm64/include/asm/memory.h | 15 +++

[PATCH 16/17] KVM: arm64: Disable CFI for nVHE

2021-03-11 Thread Sami Tolvanen
Disable CFI for the nVHE code to avoid address space confusion. Signed-off-by: Sami Tolvanen --- arch/arm64/kvm/hyp/nvhe/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/kvm/hyp/nvhe/Makefile b/arch/arm64/kvm/hyp/nvhe/Makefile index a6707df4f6c0..fb24

[PATCH 15/17] arm64: add __nocfi to __apply_alternatives

2021-03-11 Thread Sami Tolvanen
__apply_alternatives makes indirect calls to functions whose address is taken in assembly code using the alternative_cb macro. With non-canonical CFI, the compiler won't replace these function references with the jump table addresses, which trips CFI. Disable CFI checking in the function to work ar

[PATCH 07/17] kallsyms: cfi: strip hashes from static functions

2021-03-11 Thread Sami Tolvanen
With CONFIG_CFI_CLANG and ThinLTO, Clang appends a hash to the names of all static functions not marked __used. This can break userspace tools that don't expect the function name to change, so strip out the hash from the output. Suggested-by: Jack Pham Signed-off-by: Sami Tolvanen --- kernel/ka

[PATCH 11/17] psci: use __pa_function for cpu_resume

2021-03-11 Thread Sami Tolvanen
With CONFIG_CFI_CLANG, the compiler replaces function pointers with jump table addresses, which results in __pa_symbol returning the physical address of the jump table entry. As the jump table contains an immediate jump to an EL1 virtual address, this typically won't work as intended. Use __pa_func

[PATCH 14/17] arm64: add __nocfi to functions that jump to a physical address

2021-03-11 Thread Sami Tolvanen
Disable CFI checking for functions that switch to linear mapping and make an indirect call to a physical address, since the compiler only understands virtual addresses and the CFI check for such indirect calls would always fail. Signed-off-by: Sami Tolvanen --- arch/arm64/include/asm/mmu_context

[PATCH 10/17] lkdtm: use __va_function

2021-03-11 Thread Sami Tolvanen
To ensure we take the actual address of a function in kernel text, use __va_function. Otherwise, with CONFIG_CFI_CLANG, the compiler replaces the address with a pointer to the CFI jump table, which is actually in the module when compiled with CONFIG_LKDTM=m. Signed-off-by: Sami Tolvanen --- driv

[PATCH 17/17] arm64: allow CONFIG_CFI_CLANG to be selected

2021-03-11 Thread Sami Tolvanen
Select ARCH_SUPPORTS_CFI_CLANG to allow CFI to be enabled. Signed-off-by: Sami Tolvanen --- arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 1f212b47a48a..6be5b61a0f17 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@

[PATCH net] net: phy: broadcom: Fix RGMII delays for BCM50160 and BCM50610M

2021-03-11 Thread Florian Fainelli
The PHY driver entry for BCM50160 and BCM50610M calls bcm54xx_config_init() but does not call bcm54xx_config_clock_delay() in order to configuration appropriate clock delays on the PHY, fix that. Fixes: 76262b28 ("net: phy: Allow BCM5481x PHYs to setup internal TX/RX clock delay") Signed-off-

Re: 'make O=' indigestion with module signing

2021-03-11 Thread Valdis Klētnieks
On Thu, 11 Mar 2021 12:04:19 +, David Howells said: > EXTRACT_CERTS /usr/src/linux-next/"certs/signing_key.pem" > > but I don't know why. There are some odd quotes in your line also which may > be related to the problem. The relevant config line looks the same: > > CONFIG_MODUL

[PATCH v3] mm: huge_memory: a new debugfs interface for splitting THP tests.

2021-03-11 Thread Zi Yan
From: Zi Yan We do not have a direct user interface of splitting the compound page backing a THP and there is no need unless we want to expose the THP implementation details to users. Make /split_huge_pages accept a new command to do that. By writing ",," to /split_huge_pages, THPs within the gi

Re: [PATCH v2 36/43] powerpc/32: Set current->thread.regs in C interrupt entry

2021-03-11 Thread Nicholas Piggin
Excerpts from Christophe Leroy's message of March 11, 2021 10:38 pm: > > > Le 11/03/2021 à 11:38, Christophe Leroy a écrit : >> >> >> Le 10/03/2021 à 02:33, Nicholas Piggin a écrit : >>> Excerpts from Christophe Leroy's message of March 9, 2021 10:10 pm: No need to do that is assembly, do

Re: linux-next: build failure after merge of the bpf-next tree

2021-03-11 Thread Stephen Rothwell
Hi Björn, [Cc'ing a few (maybe) interested parties] On Thu, 11 Mar 2021 07:47:03 +0100 Björn Töpel wrote: > > On 2021-03-11 01:47, Stephen Rothwell wrote: > > > > After merging the bpf-next tree, today's linux-next build (perf) failed > > like this: > > > > make[3]: *** No rule to make target

[PATCH] staging: rtl8723bs: remove extra space

2021-03-11 Thread Hao Peng
Remove extra space in hal_intf.c. Signed-off-by: Hao Peng --- drivers/staging/rtl8723bs/hal/hal_intf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_intf.c b/drivers/staging/rtl8723bs/hal/hal_intf.c index ac3066a91c84..9fb377633852 100644

Re: [PATCH] KVM: x86: Ensure deadline timer has truly expired before posting its IRQ

2021-03-11 Thread Wanpeng Li
On Fri, 5 Mar 2021 at 10:19, Sean Christopherson wrote: > > When posting a deadline timer interrupt, open code the checks guarding > __kvm_wait_lapic_expire() in order to skip the lapic_timer_int_injected() > check in kvm_wait_lapic_expire(). The injection check will always fail > since the inter

[PATCH] Makefile: LTO: have linker check -Wframe-larger-than

2021-03-11 Thread Nick Desaulniers
-Wframe-larger-than= requires stack frame information, which the frontend cannot provide. This diagnostic is emitted late during compilation once stack frame size is available. When building with LTO, the frontend simply lowers C to LLVM IR and does not have stack frame information, so it cannot e

Re: [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan

2021-03-11 Thread Nicolin Chen
On Thu, Mar 11, 2021 at 03:06:25PM +0300, Dmitry Osipenko wrote: > 11.03.2021 01:17, Nicolin Chen пишет: > > On Wed, Mar 10, 2021 at 11:22:57PM +0300, Dmitry Osipenko wrote: > >> 10.03.2021 22:13, Dmitry Osipenko пишет: > >>> I found that this patch introduced a serious regression on Tegra30 using

[PATCH] staging: rtl8723bs: remove extra lines

2021-03-11 Thread Hao Peng
Remove extra lines in many functions in hal_intf.c. Signed-off-by: Hao Peng --- drivers/staging/rtl8723bs/hal/hal_intf.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_intf.c b/drivers/staging/rtl8723bs/hal/hal_intf.c index 9fb377633852..e74e9c0608ee

Re: [PATCH v2] iommu/tegra-smmu: Add pagetable mappings to debugfs

2021-03-11 Thread Nicolin Chen
On Thu, Mar 11, 2021 at 05:04:06PM +0300, Dmitry Osipenko wrote: > 10.03.2021 06:36, Nicolin Chen пишет: > ... > > +static int tegra_smmu_mappings_show(struct seq_file *s, void *data) > > +{ > > + struct tegra_smmu_group_debug *group_debug = s->private; > > + const struct tegra_smmu_swgroup *gr

RE: [PATCH] infiniband/i40iw: Fix a use after free in i40iw_cm_event_handler

2021-03-11 Thread Saleem, Shiraz
> Subject: Re: [PATCH] infiniband/i40iw: Fix a use after free in > i40iw_cm_event_handler > > On Wed, Mar 10, 2021 at 07:14:14PM -0800, Lv Yunlong wrote: > > In the case of I40IW_CM_EVENT_ABORTED, i40iw_event_connect_error() > > could be called to free the event->cm_node. However, event->cm_node >

Re: [PATCH] kbuild: collect minimum tool versions into scripts/min-tool-version.sh

2021-03-11 Thread Nicolas Pitre
On Thu, 11 Mar 2021, Miguel Ojeda wrote: > On Thu, Mar 11, 2021 at 10:47 AM Masahiro Yamada wrote: > > > > +# When you raise the minimum version, please update > > +# Documentation/process/changes.rst as well. > > +min_gcc_version=4.9.0 > > +min_llvm_version=10.0.1 > > +min_icc_version=16.0.3 # t

Re: [PATCH v26 2/4] scsi: ufs: L2P map management for HPB read

2021-03-11 Thread Can Guo
On 2021-03-03 14:28, Daejun Park wrote: This is a patch for managing L2P map in HPB module. The HPB divides logical addresses into several regions. A region consists of several sub-regions. The sub-region is a basic unit where L2P mapping is managed. The driver loads L2P mapping data of each s

Re: [PATCH v2 5/6] media: uvcvideo: Add support for V4L2_CTRL_TYPE_CTRL_CLASS

2021-03-11 Thread Laurent Pinchart
Hi Ricardo, Thank you for the patch. On Thu, Mar 11, 2021 at 11:19:45PM +0100, Ricardo Ribalda wrote: > Create all the class controls for the device defined controls. > > Fixes v4l2-compliance: > Control ioctls (Input 0): > fail: v4l2-test-controls.cpp(216): missing control class f

RE: Re: [PATCH v26 2/4] scsi: ufs: L2P map management for HPB read

2021-03-11 Thread Daejun Park
> > The HPB divides logical addresses into several regions. A region > > consists > > of several sub-regions. The sub-region is a basic unit where L2P > > mapping is > > managed. The driver loads L2P mapping data of each sub-region. The > > loaded > > sub-region is called active-state. The HPB d

Re: [PATCH v26 3/4] scsi: ufs: Prepare HPB read for cached sub-region

2021-03-11 Thread Can Guo
On 2021-03-03 14:28, Daejun Park wrote: This patch changes the read I/O to the HPB read I/O. If the logical address of the read I/O belongs to active sub-region, the HPB driver modifies the read I/O command to HPB read. It modifies the UPIU command of UFS instead of modifying the existing SCS

Re: [PATCH v11 2/2] ufs: sysfs: Resume the proper scsi device

2021-03-11 Thread Can Guo
On 2021-03-12 06:19, Asutosh Das wrote: Resumes the actual scsi device the unit descriptor of which is being accessed instead of the hba alone. Signed-off-by: Asutosh Das You lost my reviewed-by: reviewed-by: Can Guo --- drivers/scsi/ufs/ufs-sysfs.c | 30 +- 1

Re: [PATCH] dt-bindings: media: Convert video-mux to DT schema

2021-03-11 Thread Laurent Pinchart
Hi Rob, Thank you for the patch. On Thu, Mar 11, 2021 at 04:40:42PM -0700, Rob Herring wrote: > Now that we have the graph schema, convert the video-mux binding to DT > schema. > > Cc: Sakari Ailus > Cc: Laurent Pinchart > Cc: Mauro Carvalho Chehab > Cc: linux-me...@vger.kernel.org > Signed-o

[git pull] drm fixes for 5.12-rc3

2021-03-11 Thread Dave Airlie
Hi Linus, Regular fixes for rc3. The i915 pull was based on the rc1 tag so I just cherry-picked the single fix from there to avoid it. The misc and amd trees seem to be on okay bases. It's a bunch of fixes across the tree, amdgpu has most of them a few ttm fixes around qxl, and nouveau. Dave. d

Re: [PATCH 1/2] vhost-vdpa: fix use-after-free of v->config_ctx

2021-03-11 Thread Zhu, Lingshan
On 3/11/2021 9:52 PM, Stefano Garzarella wrote: When the 'v->config_ctx' eventfd_ctx reference is released we didn't set it to NULL. So if the same character device (e.g. /dev/vhost-vdpa-0) is re-opened, the 'v->config_ctx' is invalid and calling again vhost_vdpa_config_put() causes use-after-

Re: [PATCH net] net: lapbether: Prevent racing when checking whether the netif is running

2021-03-11 Thread Jakub Kicinski
On Thu, 11 Mar 2021 16:28:47 -0800 Xie He wrote: > On Thu, Mar 11, 2021 at 4:10 PM Jakub Kicinski wrote: > > > > And the "noqueue" queue is there because it's on top of hdlc_fr.c > > somehow or some out of tree driver? Or do you install it manually? > > No, this driver is not related to "hdlc_f

Re: [PATCH 6/6] media: uvcvideo: Use dma_alloc_noncontiguos API

2021-03-11 Thread Laurent Pinchart
Hi Christoph and Ricardo, Thank you for the patch. On Mon, Mar 01, 2021 at 09:52:36AM +0100, Christoph Hellwig wrote: > From: Ricardo Ribalda > > On architectures where the is no coherent caching such as ARM use the s/the is/there is/ > dma_alloc_noncontiguos API and handle manually the cache

Re: [PATCH 6/6] media: uvcvideo: Use dma_alloc_noncontiguos API

2021-03-11 Thread Laurent Pinchart
And I forgot to mention: On Fri, Mar 12, 2021 at 03:42:14AM +0200, Laurent Pinchart wrote: > Hi Christoph and Ricardo, > > Thank you for the patch. > > On Mon, Mar 01, 2021 at 09:52:36AM +0100, Christoph Hellwig wrote: > > From: Ricardo Ribalda > > > > On architectures where the is no coherent

Re: [PATCH] bootconfig: Update prototype of setup_boot_config()

2021-03-11 Thread Masami Hiramatsu
Hi Steve, On Thu, 11 Mar 2021 09:04:39 -0500 Steven Rostedt wrote: > On Thu, 11 Mar 2021 18:50:21 +0900 > Masami Hiramatsu wrote: > > > On Thu, 11 Mar 2021 16:52:13 +0800 > > Cao jin wrote: > > > > > Parameter "cmdline" has no use, drop it. > > > > OK, this looks good to me. > > Why is t

RE: Re: [PATCH v26 2/4] scsi: ufs: L2P map management for HPB read

2021-03-11 Thread Daejun Park
> > This is a patch for managing L2P map in HPB module. > > > > The HPB divides logical addresses into several regions. A region > > consists > > of several sub-regions. The sub-region is a basic unit where L2P > > mapping is > > managed. The driver loads L2P mapping data of each sub-region. The

Re: [git pull] drm fixes for 5.12-rc3

2021-03-11 Thread pr-tracker-bot
The pull request you sent on Fri, 12 Mar 2021 11:35:33 +1000: > git://anongit.freedesktop.org/drm/drm tags/drm-fixes-2021-03-12-1 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/f78d76e72a4671ea52d12752d92077788b4f5d50 Thank you! -- Deet-doot-dot, I am a bot. https:/

Re: RE: [PATCH] infiniband/i40iw: Fix a use after free in i40iw_cm_event_handler

2021-03-11 Thread lyl2019
> -原始邮件- > 发件人: "Saleem, Shiraz" > 发送时间: 2021-03-12 09:13:39 (星期五) > 收件人: "Jason Gunthorpe" , "Lv Yunlong" > > 抄送: "Latif, Faisal" , "dledf...@redhat.com" > , "linux-r...@vger.kernel.org" > , "linux-kernel@vger.kernel.org" > > 主题: RE: [PATCH] infiniband/i40iw: Fix a use after free

[PATCH] perf-stat: introduce bperf, share hardware PMCs with BPF

2021-03-11 Thread Song Liu
perf uses performance monitoring counters (PMCs) to monitor system performance. The PMCs are limited hardware resources. For example, Intel CPUs have 3x fixed PMCs and 4x programmable PMCs per cpu. Modern data center systems use these PMCs in many different ways: system level monitoring, (maybe ne

Re: [PATCH v26 2/4] scsi: ufs: L2P map management for HPB read

2021-03-11 Thread Can Guo
On 2021-03-12 09:48, Daejun Park wrote: > This is a patch for managing L2P map in HPB module. > > The HPB divides logical addresses into several regions. A region > consists > of several sub-regions. The sub-region is a basic unit where L2P > mapping is > managed. The driver loads L2P mapping dat

Re: [PATCH 1/2] zram: fix crashes due to use of cpu hotplug multistate

2021-03-11 Thread Minchan Kim
On Wed, Mar 10, 2021 at 01:11:15PM +, Luis Chamberlain wrote: > On Mon, Mar 08, 2021 at 06:55:30PM -0800, Minchan Kim wrote: > > On Sat, Mar 06, 2021 at 02:20:34AM +, Luis Chamberlain wrote: > > > The zram driver makes use of cpu hotplug multistate support, > > > whereby it associates a zra

Re: [PATCH] bootconfig: Update prototype of setup_boot_config()

2021-03-11 Thread Masami Hiramatsu
On Thu, 11 Mar 2021 09:03:21 -0500 Steven Rostedt wrote: > On Thu, 11 Mar 2021 16:52:13 +0800 > Cao jin wrote: > > > Parameter "cmdline" has no use, drop it. > > Actually, I wonder if it should be using that instead of boot_command_line, > as the cmdline passed in is boot_command_line plus any

Re: [PATCH 1/2] zram: fix crashes due to use of cpu hotplug multistate

2021-03-11 Thread Minchan Kim
On Wed, Mar 10, 2021 at 09:21:28PM +, Luis Chamberlain wrote: > On Mon, Mar 08, 2021 at 06:55:30PM -0800, Minchan Kim wrote: > > If I understand correctly, bugs you found were related to module > > unloading race while the zram are still working. > > No, that is a simplifcation of the issue. T

[PATCH] message: fusion: delete the useless casting value returned

2021-03-11 Thread Wang Qing
Fix the following coccicheck warning: WARNING: casting value returned by memory allocation function is useless. Signed-off-by: Wang Qing --- drivers/message/fusion/mptbase.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/message/fusion/mptbase.c b/drivers/messa

[PATCH] scsi: fnic: delete the useless casting value returned

2021-03-11 Thread Wang Qing
Fix the following coccicheck warning: WARNING: casting value returned by memory allocation function is useless. Signed-off-by: Wang Qing --- drivers/scsi/fnic/fnic_debugfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/fnic/fnic_debugfs.c b/drivers/scsi/fnic

Re: [RFC PATCH v2 11/11] nvme-pci: Convert to using dma_map_sg for p2pdma pages

2021-03-11 Thread Logan Gunthorpe
On 2021-03-11 4:59 p.m., Jason Gunthorpe wrote: > On Thu, Mar 11, 2021 at 04:31:41PM -0700, Logan Gunthorpe wrote: >> Convert to using dma_[un]map_sg() for PCI p2pdma pages. >> >> This should be equivalent, though support will be somewhat less >> (only dma-direct and dma-iommu are currently supp

Re: [PATCH] cxl: don't manipulate the mm.mm_users field directly

2021-03-11 Thread Andrew Donnellan
On 11/3/21 4:44 am, Laurent Dufour wrote: It is better to rely on the API provided by the MM layer instead of directly manipulating the mm_users field. Signed-off-by: Laurent Dufour LGTM, thanks for picking this up Acked-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Ca

[PATCH] include: fix inconsistent indenting in dma_alloc_coherent()

2021-03-11 Thread Wang Qing
fix inconsistent indenting in dma_alloc_coherent() Signed-off-by: Wang Qing --- include/linux/dma-mapping.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index fbfa3f5..6e4d513 --- a/include/linux/dma-mapping.h +++ b/include/linux/dm

[PATCH] scsi: ibmvscsi: delete the useless casting value returned

2021-03-11 Thread Wang Qing
Fix the following coccicheck warning: WARNING: casting value returned by memory allocation function is useless. Signed-off-by: Wang Qing --- drivers/scsi/ibmvscsi/ibmvscsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmv

[PATCH] rdma: delete the useless casting value returned

2021-03-11 Thread Wang Qing
Fix the following coccicheck warning: WARNING: casting value returned by memory allocation function is useless. Signed-off-by: Wang Qing --- include/rdma/ib_verbs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index ca28fca

Re: [PATCH] tracing: remove holes in events

2021-03-11 Thread Tony Lu
On Thu, Mar 11, 2021 at 08:56:19AM -0500, Steven Rostedt wrote: > On Thu, 11 Mar 2021 17:44:15 +0800 > Tony Lu wrote: > > > --- > > include/trace/events/net.h| 42 +-- > > include/trace/events/qdisc.h | 4 ++-- > > include/trace/events/sunrpc.h | 4 ++-- > >

[PATCH] ASoC: mediatek: mt8192: fix tdm out data is valid on rising edge

2021-03-11 Thread Jiaxin Yu
This patch correct tdm out bck inverse register to AUDIO_TOP_CON3[3]. Signed-off-by: Jiaxin Yu --- sound/soc/mediatek/mt8192/mt8192-dai-tdm.c | 4 +++- sound/soc/mediatek/mt8192/mt8192-reg.h | 8 +--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sound/soc/mediatek/mt819

[PATCH] usbip: fix vhci races in connection tear down

2021-03-11 Thread Shuah Khan
vhci_shutdown_connection() references connection state (tcp_socket, tcp_rx, tcp_tx, sockfd) saved in usbpip_device without holding the lock. Current connection tear down sequence: Step 1: shutdown the socket Step 2: stop rx thread and reset tcp_rx pointer Step 3: stop tx thread and reset tcp_tx po

Re: [syzbot] WARNING in handle_mm_fault

2021-03-11 Thread Andy Lutomirski
Your warning is odd, but I see the bug. It's in KVM. On Thu, Mar 11, 2021 at 4:37 PM syzbot wrote: > > Hello, > > syzbot found the following issue on: > > HEAD commit:05a59d79 Merge git://git.kernel.org:/pub/scm/linux/kernel/.. > git tree: upstream > console output: https://syzkaller.a

Re: [PATCH net v2] net: phy: broadcom: Add power down exit reset state delay

2021-03-11 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Wed, 10 Mar 2021 20:53:42 -0800 you wrote: > Per the datasheet, when we clear the power down bit, the PHY remains in > an internal reset state for 40us and then resume normal operation. > Account for that delay to avoid any i

Re: [PATCH] net/qlcnic: Fix a use after free in qlcnic_83xx_get_minidump_template

2021-03-11 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Wed, 10 Mar 2021 20:01:40 -0800 you wrote: > In qlcnic_83xx_get_minidump_template, fw_dump->tmpl_hdr was freed by > vfree(). But unfortunately, it is used when extended is true. > > Fixes: 7061b2bdd620e ("qlogic: Deletion of

Re: [PATCH] mISDN: fix crash in fritzpci

2021-03-11 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Wed, 10 Mar 2021 23:27:35 -0500 you wrote: > setup_fritz() in avmfritz.c might fail with -EIO and in this case the > isac.type and isac.write_reg is not initialized and remains 0(NULL). > A subsequent call to isac_release() w

Re: [PATCH] isdn: remove extra spaces in the header file

2021-03-11 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Wed, 10 Mar 2021 23:27:55 -0500 you wrote: > fix some coding style issues in the isdn header > > Signed-off-by: Tong Zhang > --- > drivers/isdn/hardware/mISDN/iohelper.h | 14 +++--- > 1 file changed, 7 insert

Re: [PATCH][next] scsi: sg: return -ENOMEM on out of memory error

2021-03-11 Thread Douglas Gilbert
On 2021-03-11 6:33 p.m., Colin King wrote: From: Colin Ian King The sg_proc_seq_show_debug should return -ENOMEM on an out of memory error rather than -1. Fix this. Fixes: 94cda6cf2e44 ("scsi: sg: Rework debug info") Signed-off-by: Colin Ian King Acked-by: Douglas Gilbert Thanks. ---

Re: [PATCH] powerpc/vdso32: Add missing _restgpr_31_x to fix build failure

2021-03-11 Thread Segher Boessenkool
Hi! On Tue, Mar 09, 2021 at 06:19:30AM +, Christophe Leroy wrote: > With some defconfig including CONFIG_CC_OPTIMIZE_FOR_SIZE, > (for instance mvme5100_defconfig and ps3_defconfig), gcc 5 > generates a call to _restgpr_31_x. > I don't know if there is a way to tell GCC not to emit that call,

Re: [PATCH 04/17] module: cfi: ensure __cfi_check alignment

2021-03-11 Thread Kees Cook
On Thu, Mar 11, 2021 at 04:49:06PM -0800, Sami Tolvanen wrote: > CONFIG_CFI_CLANG_SHADOW assumes the __cfi_check() function is page > aligned and at the beginning of the .text section. While Clang would > normally align the function correctly, it fails to do so for modules > with no executable code

Re: [PATCH 01/17] add support for Clang CFI

2021-03-11 Thread Kees Cook
On Thu, Mar 11, 2021 at 04:49:03PM -0800, Sami Tolvanen wrote: > This change adds support for Clang’s forward-edge Control Flow > Integrity (CFI) checking. With CONFIG_CFI_CLANG, the compiler > injects a runtime check before each indirect function call to ensure > the target is a valid function wit

Re: [PATCH 02/17] cfi: add __cficanonical

2021-03-11 Thread Kees Cook
On Thu, Mar 11, 2021 at 04:49:04PM -0800, Sami Tolvanen wrote: > With CONFIG_CFI_CLANG, the compiler replaces a function address taken > in C code with the address of a local jump table entry, which passes > runtime indirect call checks. However, the compiler won't replace > addresses taken in asse

Re: [PATCH 03/17] mm: add generic __va_function and __pa_function macros

2021-03-11 Thread Kees Cook
On Thu, Mar 11, 2021 at 04:49:05PM -0800, Sami Tolvanen wrote: > With CONFIG_CFI_CLANG, the compiler replaces function addresses > in instrumented C code with jump table addresses. This means that > __pa_symbol(function) returns the physical address of the jump table > entry instead of the actual f

Re: [question] Panic in dax_writeback_one

2021-03-11 Thread chenjun (AM)
在 2021/3/11 20:20, Matthew Wilcox 写道: > On Thu, Mar 11, 2021 at 07:48:25AM +, chenjun (AM) wrote: >> static int dax_writeback_one(struct xa_state *xas, struct dax_device >> *dax_dev, struct address_space *mapping, void *entry) >> dax_flush(dax_dev, page_address(pfn_to_page(pfn)), count * PA

Re: [PATCH 05/17] workqueue: cfi: disable callback pointer check with modules

2021-03-11 Thread Kees Cook
On Thu, Mar 11, 2021 at 04:49:07PM -0800, Sami Tolvanen wrote: > With CONFIG_CFI_CLANG, a callback function passed to > __queue_delayed_work from a module points to a jump table entry > defined in the module instead of the one used in the core kernel, > which breaks function address equality in thi

Re: [PATCH 06/17] kthread: cfi: disable callback pointer check with modules

2021-03-11 Thread Kees Cook
On Thu, Mar 11, 2021 at 04:49:08PM -0800, Sami Tolvanen wrote: > With CONFIG_CFI_CLANG, a callback function passed to > __kthread_queue_delayed_work from a module points to a jump table > entry defined in the module instead of the one used in the core > kernel, which breaks function address equalit

Re: [PATCH 07/17] kallsyms: cfi: strip hashes from static functions

2021-03-11 Thread Kees Cook
On Thu, Mar 11, 2021 at 04:49:09PM -0800, Sami Tolvanen wrote: > With CONFIG_CFI_CLANG and ThinLTO, Clang appends a hash to the names > of all static functions not marked __used. This can break userspace > tools that don't expect the function name to change, so strip out the > hash from the output.

Re: [PATCH 08/17] bpf: disable CFI in dispatcher functions

2021-03-11 Thread Kees Cook
On Thu, Mar 11, 2021 at 04:49:10PM -0800, Sami Tolvanen wrote: > BPF dispatcher functions are patched at runtime to perform direct > instead of indirect calls. Disable CFI for the dispatcher functions to > avoid conflicts. > > Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook -- Kees Cook

Re: [PATCH 09/17] lib/list_sort: fix function type mismatches

2021-03-11 Thread Kees Cook
On Thu, Mar 11, 2021 at 04:49:11PM -0800, Sami Tolvanen wrote: > Casting the comparison function to a different type trips indirect > call Control-Flow Integrity (CFI) checking. Remove the additional > consts from cmp_func, and the now unneeded casts. > > Fixes: 043b3f7b6388 ("lib/list_sort: simpl

Re: [PATCH 10/17] lkdtm: use __va_function

2021-03-11 Thread Kees Cook
On Thu, Mar 11, 2021 at 04:49:12PM -0800, Sami Tolvanen wrote: > To ensure we take the actual address of a function in kernel text, use > __va_function. Otherwise, with CONFIG_CFI_CLANG, the compiler replaces > the address with a pointer to the CFI jump table, which is actually in > the module when

[PATCH] KVM: X86: Fix missing local pCPU when executing wbinvd on all dirty pCPUs

2021-03-11 Thread Wanpeng Li
From: Wanpeng Li We should execute wbinvd on all dirty pCPUs when guest wbinvd exits to maintain datat consistency in order to deal with noncoherent DMA. smp_call_function_many() does not execute the provided function on the local core, this patch replaces it by on_each_cpu_mask(). Reported-by

Re: [PATCH 11/17] psci: use __pa_function for cpu_resume

2021-03-11 Thread Kees Cook
On Thu, Mar 11, 2021 at 04:49:13PM -0800, Sami Tolvanen wrote: > With CONFIG_CFI_CLANG, the compiler replaces function pointers with > jump table addresses, which results in __pa_symbol returning the > physical address of the jump table entry. As the jump table contains > an immediate jump to an EL

Re: [PATCH 12/17] arm64: implement __va_function

2021-03-11 Thread Kees Cook
On Thu, Mar 11, 2021 at 04:49:14PM -0800, Sami Tolvanen wrote: > With CONFIG_CFI_CLANG, the compiler replaces function addresses in > instrumented C code with jump table addresses. This change implements > the __va_function() macro, which returns the actual function address > instead. > > Signed-o

Re: [PATCH 13/17] arm64: use __pa_function

2021-03-11 Thread Kees Cook
On Thu, Mar 11, 2021 at 04:49:15PM -0800, Sami Tolvanen wrote: > With CONFIG_CFI_CLANG, the compiler replaces function address > references with the address of the function's CFI jump table > entry. This means that __pa_symbol(function) returns the physical > address of the jump table entry, which

Re: [PATCH 14/17] arm64: add __nocfi to functions that jump to a physical address

2021-03-11 Thread Kees Cook
On Thu, Mar 11, 2021 at 04:49:16PM -0800, Sami Tolvanen wrote: > Disable CFI checking for functions that switch to linear mapping and > make an indirect call to a physical address, since the compiler only > understands virtual addresses and the CFI check for such indirect calls > would always fail.

Re: [PATCH 1/3] pinctrl: qcom: spmi-gpio: Add support for four variants

2021-03-11 Thread Bjorn Andersson
On Fri 05 Mar 00:29 CST 2021, satya priya wrote: > Add PM7325, PM8350c, PMK8350 and PMR735A compatibles for GPIO > support. > Acked-by: Bjorn Andersson Regards, Bjorn > Signed-off-by: satya priya > --- > drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 4 > 1 file changed, 4 insertions(+) >

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