Re: blktests: block/009 next-20210304 failure rate average of 1/448

2021-03-18 Thread Luis Chamberlain
Adding linux-fsdevel as folks working on fstests might be interested. On Tue, Mar 16, 2021 at 05:46:45PM +, Luis Chamberlain wrote: > My personal suspicion is not on the block layer but on scsi_debug > because this can fail: > > modprobe scsi_debug; rmmod scsi_debug > > This second issue

Re: [RFC] scripts: kernel-doc: avoid warnings due to initial commented lines in file

2021-03-18 Thread Lukas Bulwahn
On Thu, Mar 18, 2021 at 5:37 PM Jonathan Corbet wrote: > > Lukas Bulwahn writes: > > > I wonder if we could extend kernel-doc (not your preferred option as > > it seems) for a new dedicated warning message or maintain a separate > > kernel-doc sanity checking script to emit a dedicated warning

Re: [PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism

2021-03-18 Thread Enrico Weigelt, metux IT consult
On 15.03.21 00:55, Pali Rohár wrote: Moreover for mPCIe form factor cards, boards can share one PERST# signal with more PCIe cards and control this signal via GPIO. So asserting PERST# GPIO can trigger Warm reset for more PCIe cards, not just one. It depends on board or topology. The

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

2021-03-18 Thread Nick Desaulniers
On Thu, Mar 18, 2021 at 10:11 AM 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 assembly

Re: [PATCH] drm/i915/dpcd_bl: Don't try vesa interface unless specified by VBT

2021-03-18 Thread Lyude Paul
Actually-NAK this. I just realized I've been misreading the bug and that this doesn't actually seem to be fixed. Will resend once I figure out what's going on On Thu, 2021-03-18 at 13:02 -0400, Lyude Paul wrote: > Looks like that there actually are another subset of laptops on the market > that

Re: [PATCH master] module: remove never implemented MODULE_SUPPORTED_DEVICE

2021-03-18 Thread Leon Romanovsky
On Thu, Mar 18, 2021 at 10:36:36AM -0700, Linus Torvalds wrote: > On Thu, Mar 18, 2021 at 12:55 AM Leon Romanovsky wrote: > > > > > > Also, your email seems to have swallowed spaces at the ends of lines. > > > > > > I can (and did) apply the patch with "--whitespace=fix", but that then > > >

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

2021-03-18 Thread Uladzislau Rezki
On Tue, Mar 16, 2021 at 02:01:25PM -0700, Paul E. McKenney wrote: > On Tue, Mar 16, 2021 at 09:42:07PM +0100, Uladzislau Rezki wrote: > > > On Wed, Mar 10, 2021 at 09:07:57PM +0100, Uladzislau Rezki (Sony) wrote: > > > > From: Zhang Qiang > > > > > > > > Add a drain_page_cache() function to

[PATCH 1/1] powerpc/kernel/iommu: Use largepool as a last resort when !largealloc

2021-03-18 Thread Leonardo Bras
As of today, doing iommu_range_alloc() only for !largealloc (npages <= 15) will only be able to use 3/4 of the available pages, given pages on largepool not being available for !largealloc. This could mean some drivers not being able to fully use all the available pages for the DMA window. Add

[PATCH 1/1] powerpc/kernel/iommu: Align size for IOMMU_PAGE_SIZE() to save TCEs

2021-03-18 Thread Leonardo Bras
Currently both iommu_alloc_coherent() and iommu_free_coherent() align the desired allocation size to PAGE_SIZE, and gets system pages and IOMMU mappings (TCEs) for that value. When IOMMU_PAGE_SIZE < PAGE_SIZE, this behavior may cause unnecessary TCEs to be created for mapping the whole system

Re: [PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism

2021-03-18 Thread Amey Narkhede
On 21/03/18 07:35PM, Leon Romanovsky wrote: > On Thu, Mar 18, 2021 at 10:31:43PM +0530, Amey Narkhede wrote: > > On 21/03/18 04:57PM, Leon Romanovsky wrote: > > > On Thu, Mar 18, 2021 at 07:52:52PM +0530, Amey Narkhede wrote: > > > > On 21/03/18 11:09AM, Leon Romanovsky wrote: > > > > > On Wed,

Re: [PATCH 1/2] x86/sgx: Replace section->init_laundry_list with sgx_dirty_page_list

2021-03-18 Thread Borislav Petkov
On Thu, Mar 18, 2021 at 01:53:30AM +0200, Jarkko Sakkinen wrote: > From: Jarkko Sakkinen > > During normal runtime, the "ksgxd" daemon behaves like a version of > kswapd just for SGX. But, before it starts acting like kswapd, its > first job is to initialize enclave memory. > > Currently, the

Re: [RFC PATCH v2 2/8] arm64: Implement frame types

2021-03-18 Thread Mark Brown
On Mon, Mar 15, 2021 at 11:57:54AM -0500, madve...@linux.microsoft.com wrote: > To summarize, pt_regs->stackframe is used (or will be used) as a marker > frame in stack traces. To enable the unwinder to detect these frames, tag > each pt_regs->stackframe with a type. To record the type, use the

Re: [PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism

2021-03-18 Thread Amey Narkhede
On 21/03/18 07:22PM, Leon Romanovsky wrote: > On Thu, Mar 18, 2021 at 10:39:35AM -0600, Alex Williamson wrote: > > On Thu, 18 Mar 2021 11:09:34 +0200 > > Leon Romanovsky wrote: > > <...> > > > > I'm lost here, does vfio-pci use sysfs interface or internal to the > > > kernel API? > > > > > > If

Re: [PATCH 5/9] objtool: Rework rebuild_reloc logic

2021-03-18 Thread Josh Poimboeuf
On Thu, Mar 18, 2021 at 06:04:25PM +0100, Peter Zijlstra wrote: > On Thu, Mar 18, 2021 at 11:36:40AM -0500, Josh Poimboeuf wrote: > > > I was thinking you could get a section changed without touching > > > relocations, but while that is theoretically possible, it is exceedingly > > > unlikely (and

Re: [PATCH master] module: remove never implemented MODULE_SUPPORTED_DEVICE

2021-03-18 Thread Linus Torvalds
On Thu, Mar 18, 2021 at 12:55 AM Leon Romanovsky wrote: > > > > Also, your email seems to have swallowed spaces at the ends of lines. > > > > I can (and did) apply the patch with "--whitespace=fix", but that then > > causes git to fix some _other_ whitespace too, so the end result isn't > > quite

Re: [PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism

2021-03-18 Thread Leon Romanovsky
On Thu, Mar 18, 2021 at 10:31:43PM +0530, Amey Narkhede wrote: > On 21/03/18 04:57PM, Leon Romanovsky wrote: > > On Thu, Mar 18, 2021 at 07:52:52PM +0530, Amey Narkhede wrote: > > > On 21/03/18 11:09AM, Leon Romanovsky wrote: > > > > On Wed, Mar 17, 2021 at 11:31:40AM -0600, Alex Williamson wrote:

Re: [PATCH] selftests/kvm: add get_msr_index_features

2021-03-18 Thread Paolo Bonzini
On 18/03/21 18:03, Andrew Jones wrote: TEST_GEN_PROGS_x86_64 = x86_64/cr4_cpuid_sync_test +TEST_GEN_PROGS_x86_64 += x86_64/get_msr_index_features Maybe we should give up trying to keep an alphabetic order. FWIW I had fixed that but yeah maybe we should just give up. +int main(int argc,

Re: [PATCH v10 1/2] scsi: ufs: Enable power management for wlun

2021-03-18 Thread Asutosh Das (asd)
On 3/18/2021 7:00 AM, Rafael J. Wysocki wrote: On Wed, Mar 17, 2021 at 7:37 AM Adrian Hunter wrote: On 16/03/21 10:35 pm, Asutosh Das (asd) wrote: On 3/16/2021 12:48 AM, Adrian Hunter wrote: On 16/03/21 12:22 am, Asutosh Das (asd) wrote: On 3/14/2021 1:11 AM, Adrian Hunter wrote: On

[PATCH-tip 0/5] locking/locktorture: Fix locktorture ww_mutex test problems

2021-03-18 Thread Waiman Long
This is a follow-up patch series for the previous patchset on fixing locktorture ww_mutex test problem [1]. The first 3 patches of that series were merged into tip. It turns out that the last one of the three wasn't quite right. So this patch series revert the last patch. The rests of the patch

[PATCH-tip 5/5] locking/locktorture: locking/locktorture: Fix incorrect use of ww_acquire_ctx in ww_mutex test

2021-03-18 Thread Waiman Long
The ww_acquire_ctx structure for ww_mutex needs to persist for a complete lock/unlock cycle. In the ww_mutex test in locktorture, however, both ww_acquire_init() and ww_acquire_fini() are called within the lock function only. This causes a lockdep splat of "WARNING: Nested lock was not taken" when

[PATCH-tip 4/5] locking/locktorture: Pass thread id to lock/unlock functions

2021-03-18 Thread Waiman Long
To allow the lock and unlock functions in locktorture to access per-thread information, we need to pass some hint on how to locate those information. One way to do this is to pass in a unique thread id which can then be used to access a global array for thread specific information. Change the

[PATCH-tip 3/5] locking/ww_mutex: Remove DEFINE_WW_MUTEX() macro

2021-03-18 Thread Waiman Long
The current DEFINE_WW_MUTEX() macro fails to properly set up the lockdep key of the ww_mutexes causing potential circular locking dependency splat. Though it is possible to add more macro magic to make it work, but the result is rather ugly. Since locktorture was the only user of

[PATCH-tip 1/5] locking/ww_mutex: Revert "Treat ww_mutex_lock() like a trylock"

2021-03-18 Thread Waiman Long
It turns out that treating ww_mutex_lock() as a trylock will fail to catch real deadlock hazard like: mutex_lock(); ww_mutex_lock(, ctx); ww_mutex_lock(, ctx); mutex_lock(); The current lockdep code should be able to handle mixed lock ordering of

[PATCH-tip 2/5] locking/locktorture: Fix false positive circular locking splat in ww_mutex test

2021-03-18 Thread Waiman Long
In order to avoid false positive circular locking lockdep splat when runnng the ww_mutex torture test, we need to make sure that the ww_mutexes have the same lock class as the acquire_ctx. This means the ww_mutexes must have the same lockdep key as the acquire_ctx. Unfortunately the current

[PATCH v2 4/4] clk: ti: add am33xx spread spectrum clock support

2021-03-18 Thread Dario Binacchi
The patch enables spread spectrum clocking (SSC) for MPU and LCD PLLs. As reported by the TI spruh73x RM, SSC is only supported for the DISP/LCD and MPU PLLs on am33xx device. SSC is not supported for DDR, PER, and CORE PLLs. Calculating the required values and setting the registers accordingly

[PATCH v2 3/4] ARM: dts: am33xx-clocks: add spread spectrum support

2021-03-18 Thread Dario Binacchi
Registers for adjusting the spread spectrum clocking (SSC) have been added. As reported by the TI spruh73x RM, SSC is supported only for LCD and MPU PLLs. Signed-off-by: Dario Binacchi --- Changes in v2: - Remove SSC registers from dpll_core_ck@490 node (SSC is not supported) - Add SSC

[PATCH v2 1/4] clk: ti: fix typo in routine description

2021-03-18 Thread Dario Binacchi
Replace _omap3_noncore_dpll_program with omap3_noncore_dpll_program. Signed-off-by: Dario Binacchi --- (no changes since v1) drivers/clk/ti/dpll3xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/ti/dpll3xxx.c b/drivers/clk/ti/dpll3xxx.c index

[PATCH v2 2/4] dt-bindings: ti: dpll: add spread spectrum support

2021-03-18 Thread Dario Binacchi
DT bindings for enabling and adjusting spread spectrum clocking have been added. Signed-off-by: Dario Binacchi --- (no changes since v1) .../devicetree/bindings/clock/ti/dpll.txt | 20 +++ 1 file changed, 20 insertions(+) diff --git

[PATCH v2 0/4] clk: ti: add am33xx spread spectrum clock support

2021-03-18 Thread Dario Binacchi
As reported by the TI spruh73x RM, MPU and LCD modules support spread spectrum clocking (SSC) on their output clocks. SSC is used to spread the spectral peaking of the clock to reduce any electromagnetic interference (EMI) that may be caused due to the clock’s fundamental or any of its

[PATCH] checkpatch: remove check for include/asm modifications

2021-03-18 Thread Dwaipayan Ray
include/asm/ got removed over a decade back. checkpatch still has a check for it: MODIFIED_INCLUDE_ASM Remove the check as it is no longer useful. Signed-off-by: Dwaipayan Ray --- scripts/checkpatch.pl | 4 1 file changed, 4 deletions(-) diff --git a/scripts/checkpatch.pl

[PATCH] MAINTAINERS: remove obsolete OMAP HWMOD DATA FOR OMAP4-BASED DEVICES

2021-03-18 Thread Lukas Bulwahn
Commit 2584d7e7f87a ("ARM: OMAP2+: Drop legacy platform data for omap4 hwmod") drops the file ./arch/arm/mach-omap2/omap_hwmod_44xx_data.c, but misses to drop the now obsolete OMAP HWMOD DATA FOR OMAP4-BASED DEVICES section in MAINTAINERS, which refers to only that file. Hence,

[PATCH] powerpc/embedded6xx: Remove CONFIG_MV64X60

2021-03-18 Thread Christophe Leroy
Commit 92c8c16f3457 ("powerpc/embedded6xx: Remove C2K board support") moved the last selector of CONFIG_MV64X60. As it is not a user selectable config, it can be removed. Signed-off-by: Christophe Leroy --- arch/powerpc/platforms/embedded6xx/Kconfig | 5 - drivers/i2c/busses/Kconfig

[PATCH] watchdog: Remove MV64x60 watchdog driver

2021-03-18 Thread Christophe Leroy
Commit 92c8c16f3457 ("powerpc/embedded6xx: Remove C2K board support") removed the last selector of CONFIG_MV64X60. Therefore CONFIG_MV64X60_WDT cannot be selected anymore and can be removed. Signed-off-by: Christophe Leroy --- drivers/watchdog/Kconfig | 4 - drivers/watchdog/Makefile

[PATCH] net: marvell: Remove reference to CONFIG_MV64X60

2021-03-18 Thread Christophe Leroy
Commit 92c8c16f3457 ("powerpc/embedded6xx: Remove C2K board support") removed last selector of CONFIG_MV64X60. As it is not a user selectable config item, all references to it are stale. Remove them. Signed-off-by: Christophe Leroy --- drivers/net/ethernet/marvell/Kconfig | 4 ++--

[PATCH v2 14/14] objtool,x86: Rewrite retpoline thunk calls

2021-03-18 Thread Peter Zijlstra
When the compiler emits: "CALL __x86_indirect_thunk_\reg" for an indirect call, have objtool rewrite it to: ALTERNATIVE "call __x86_indirect_thunk_\reg", "call *%reg", ALT_NOT(X86_FEATURE_RETPOLINE) Additionally, in order to not emit endless identical

[PATCH v2 06/14] objtool: Fix static_call list generation

2021-03-18 Thread Peter Zijlstra
Currently objtool generates tail call entries in add_jump_destination() but waits until validate_branch() to generate the regular call entries, move these to add_call_destination() for consistency. Signed-off-by: Peter Zijlstra (Intel) --- tools/objtool/check.c | 18 +- 1 file

[PATCH v2 11/14] objtool: Add elf_create_undef_symbol()

2021-03-18 Thread Peter Zijlstra
Allow objtool to create undefined symbols; this allows creating relocations to symbols not currently in the symbol table. Signed-off-by: Peter Zijlstra (Intel) --- tools/objtool/elf.c | 63 tools/objtool/include/objtool/elf.h |1 2

[PATCH v2 08/14] objtool: Add elf_create_reloc() helper

2021-03-18 Thread Peter Zijlstra
We have 4 instances of adding a relocation. Create a common helper to avoid growing even more. Signed-off-by: Peter Zijlstra (Intel) --- tools/objtool/check.c | 76 ++-- tools/objtool/elf.c | 90 +++---

[PATCH v2 05/14] objtool: Per arch retpoline naming

2021-03-18 Thread Peter Zijlstra
The __x86_indirect_ naming is obviously not generic. Shorten to allow matching some additional magic names later. Signed-off-by: Peter Zijlstra (Intel) --- tools/objtool/arch/x86/decode.c |5 + tools/objtool/check.c|7 ++-

[PATCH v2 09/14] objtool: Extract elf_strtab_concat()

2021-03-18 Thread Peter Zijlstra
Create a common helper to append strings to a strtab. Signed-off-by: Peter Zijlstra (Intel) --- tools/objtool/elf.c | 73 +--- 1 file changed, 42 insertions(+), 31 deletions(-) --- a/tools/objtool/elf.c +++ b/tools/objtool/elf.c @@ -676,13

[PATCH v2 12/14] objtool: Allow archs to rewrite retpolines

2021-03-18 Thread Peter Zijlstra
When retpolines are employed, compilers typically emit calls to retpoline thunks. Objtool recognises these calls and marks them as dynamic calls. Provide infrastructure for architectures to rewrite/augment what the compiler wrote for us. Signed-off-by: Peter Zijlstra (Intel) ---

[PATCH v2 10/14] objtool: Extract elf_symbol_add()

2021-03-18 Thread Peter Zijlstra
Create a common helper to add symbols. Signed-off-by: Peter Zijlstra (Intel) --- tools/objtool/elf.c | 57 ++-- 1 file changed, 33 insertions(+), 24 deletions(-) --- a/tools/objtool/elf.c +++ b/tools/objtool/elf.c @@ -290,12 +290,41 @@ static

[PATCH v2 13/14] objtool: Skip magical retpoline .altinstr_replacement

2021-03-18 Thread Peter Zijlstra
When the .altinstr_replacement is a retpoline, skip the alternative. We already special case retpolines anyway. Signed-off-by: Peter Zijlstra (Intel) --- tools/objtool/special.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) --- a/tools/objtool/special.c +++

[PATCH v2 03/14] x86/retpoline: Simplify retpolines

2021-03-18 Thread Peter Zijlstra
Due to commit c9c324dc22aa ("objtool: Support stack layout changes in alternatives"), it is possible to simplify the retpolines. Currently our retpolines consist of 2 symbols, __x86_indirect_thunk_\reg, which is the compiler target, and __x86_retpoline_\reg, which is the actual retpoline. Both

[PATCH v2 02/14] x86/alternatives: Optimize optimize_nops()

2021-03-18 Thread Peter Zijlstra
Currently optimize_nops() scans to see if the alternative starts with NOPs. However, the emit pattern is: 141: \oldinstr 142: .skip (len-(142b-141b)), 0x90 That is, when oldinstr is short, we pad the tail with NOPs. This case never gets optimized. Rewrite optimize_nops() to replace any

[PATCH v2 04/14] objtool: Correctly handle retpoline thunk calls

2021-03-18 Thread Peter Zijlstra
Just like JMP handling, convert a direct CALL to a retpoline thunk into a retpoline safe indirect CALL. Signed-off-by: Peter Zijlstra (Intel) --- tools/objtool/check.c | 12 1 file changed, 12 insertions(+) --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -953,6

[PATCH v2 01/14] x86: Add insn_decode_kernel()

2021-03-18 Thread Peter Zijlstra
Add a helper to decode kernel instructions; there's no point in endlessly repeating those last two arguments. Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/include/asm/insn.h|2 ++ arch/x86/kernel/alternative.c |2 +- arch/x86/kernel/cpu/mce/severity.c |2 +-

[PATCH v2 00/14] x86,objtool: Optimize !RETPOLINE

2021-03-18 Thread Peter Zijlstra
Hi, Respin of the !RETPOLINE optimization patches. Boris, the first 3 should probably go into tip/x86/core, it's an ungodly tangle since it relies on the insn decoder patches in tip/x86/core, the NOP patches in tip/x86/cpu and the alternative patches in tip/x86/alternatives. Just to make life

[PATCH v2 07/14] objtool: Rework rebuild_reloc logic

2021-03-18 Thread Peter Zijlstra
Instead of manually calling elf_rebuild_reloc_section() on sections we've called elf_add_reloc() on, have elf_write() DTRT. This makes it easier to add random relocations in places without carefully tracking when we're done and need to flush what section. Signed-off-by: Peter Zijlstra (Intel)

Re: [PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism

2021-03-18 Thread Leon Romanovsky
On Thu, Mar 18, 2021 at 10:39:35AM -0600, Alex Williamson wrote: > On Thu, 18 Mar 2021 11:09:34 +0200 > Leon Romanovsky wrote: <...> > > I'm lost here, does vfio-pci use sysfs interface or internal to the kernel > > API? > > > > If it is latter then we don't really need sysfs, if not, we still

Re: [PATCH 3/3] KVM: SVM: allow to intercept all exceptions for debug

2021-03-18 Thread Sean Christopherson
On Thu, Mar 18, 2021, Maxim Levitsky wrote: > On Thu, 2021-03-18 at 16:35 +, Sean Christopherson wrote: > > Skipping SEV-ES guests should not be difficult; KVM could probably even > > print a message stating that the debug hook is being ignored. One thought > > would > > be to snapshot

Re: [PATCH 01/10] alpha: use libata instead of the legacy ide driver

2021-03-18 Thread Måns Rullgård
Christoph Hellwig writes: > On Thu, Mar 18, 2021 at 05:54:55AM +, Al Viro wrote: >> On Thu, Mar 18, 2021 at 05:56:57AM +0100, Christoph Hellwig wrote: >> > Switch the alpha defconfig from the legacy ide driver to libata. >> >> Umm... I don't have an IDE alpha box in a usable shape (fans on

[PATCH 1/2] arm64: dts: fsl-ls1028a-kontron-sl28: move MTD partitions

2021-03-18 Thread Michael Walle
Move the MTD partitions to the partitions subnode. This is the new way to specify the partitions, see Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml Signed-off-by: Michael Walle --- .../freescale/fsl-ls1028a-kontron-sl28.dts| 94 ++- 1 file changed, 49

[PATCH 2/2] arm64: dts: fsl-ls1028a-kontron-sl28: combine unused partitions

2021-03-18 Thread Michael Walle
The failsafe partitions for the DP firmware and for AT-F are unused. If AT-F will ever be supported in the failsafe mode, then it will be a FIT image. Thus fold the unused partitions into the failsafe bootloader one to have enough storage if the bootloader image will grow. While at it, remove the

Re: Checkpatch still worries about include/asm/ ?

2021-03-18 Thread Dwaipayan Ray
On Thu, Mar 18, 2021 at 10:33 PM Lukas Bulwahn wrote: > > On Thu, Mar 18, 2021 at 5:47 PM Dwaipayan Ray wrote: > > > > Hello, > > include/asm/ got removed a long time back (probably v1.1.45). > > Checkpatch still worries about that: > > > > if ($realfile =~ m@^include/asm/@) { > >

Re: [PATCH v4 2/2] crypto: qat: ADF_STATUS_PF_RUNNING should be set after adf_dev_init

2021-03-18 Thread Giovanni Cabiddu
Just a minor comment on the commit message: crypto: qat: ADF_STATUS_PF_RUNNING ... ^ Patches to the qat driver have the following headline: crypto: qat - not crypto: qat : Regards, -- Giovanni On Thu, Mar 18, 2021 at 12:21:05PM -0400, Tong Zhang wrote: >

[PATCH net-next 2/2] net: stmmac: add RX frame steering based on VLAN priority in tc flower

2021-03-18 Thread Ong Boon Leong
We extend tc flower to support configuration of VLAN priority-based RX frame steering hardware offloading. To map VLAN to Traffic Class : $ tc filter add dev parent : protocol 802.1Q flower \ vlan_prio hw_tc Note: < N whereby "tc qdisc ... num_tc N ..." To delete all tc

Re: [PATCH V2 2/2] arm64: dts: qcom: sc7180: Remove QUP-CORE ICC path

2021-03-18 Thread Matthias Kaehlcke
On Thu, Mar 18, 2021 at 04:40:09PM +0530, Roja Rani Yarubandi wrote: > We had introduced the QUP-CORE ICC path to put proxy votes from > QUP wrapper on behalf of earlycon, if other users of QUP-CORE turn > off this clock before the real console is probed, unclocked access > to HW was seen from

[PATCH net-next 1/2] net: stmmac: restructure tc implementation for RX VLAN Priority steering

2021-03-18 Thread Ong Boon Leong
The current tc_add_flow() and tc_del_flow() use hardware L3 & L4 filters as offloading. The number of L3/L4 filters is read from L3L4FNUM field from MAC_HW_Feature1 register and is used to alloc priv->tc_entries[]. For RX frame steering based on VLAN priority offloading, we use MAC_RXQ_CTRL2 &

[PATCH net-next 0/2] stmmac: add VLAN priority based RX steering

2021-03-18 Thread Ong Boon Leong
Hi, The current tc flower implementation in stmmac supports both L3 and L4 filter offloading. This patch adds the support of VLAN priority based RX frame steering into different Rx Queues. The patches have been tested on both configuration test (include L3/L4) and traffic test (multi VLAN ping

Re: [PATCH RFC] f2fs: fix to avoid selecting full segment w/ {AT,}SSR allocator

2021-03-18 Thread Jaegeuk Kim
On 02/20, Chao Yu wrote: > In cp disabling mode, there could be a condition > - target segment has 128 ckpt valid blocks > - GC migrates 128 valid blocks to other segment (segment is still in > dirty list) > - GC migrates 384 blocks to target segment (segment has 128 cp_vblocks > and 384 vblocks)

Re: [PATCH v2 1/3] perf-stat: introduce bperf, share hardware PMCs with BPF

2021-03-18 Thread Song Liu
> On Mar 18, 2021, at 6:49 AM, Namhyung Kim wrote: > > On Thu, Mar 18, 2021 at 4:22 PM Song Liu wrote: >> >> >> >>> On Mar 17, 2021, at 10:54 PM, Namhyung Kim wrote: >>> >> >> [...] >> + +static int bperf_reload_leader_program(struct evsel *evsel, int attr_map_fd,

Re: [drm/i915/dp] 4a8d79901d: WARNING:at_drivers/gpu/drm/i915/display/intel_display_power.c:#assert_can_disable_lcpll[i915]

2021-03-18 Thread Lyude Paul
Well this is surprising, because I had been pretty sure we had asked someone at Intel to test that this patch worked on samus and they had said that it did. Is there any way you can get me the kernel messages from this failure with drm.debug=0x16 log_buf_len=5M added to the kernel commandline?

Re: [PATCH V2 1/2] soc: qcom-geni-se: Cleanup the code to remove proxy votes

2021-03-18 Thread Matthias Kaehlcke
On Thu, Mar 18, 2021 at 04:40:08PM +0530, Roja Rani Yarubandi wrote: > ICC core and platforms drivers supports sync_state feature, which > ensures that the default ICC BW votes from the bootloader is not > removed until all it's consumers are probes. > > The proxy votes were needed in case other

Re: [PATCH 2/2] arm64: stacktrace: Add skip when task == current

2021-03-18 Thread Mark Rutland
On Thu, Mar 18, 2021 at 04:17:24PM +, Catalin Marinas wrote: > On Wed, Mar 17, 2021 at 07:34:16PM +, Mark Rutland wrote: > > On Wed, Mar 17, 2021 at 06:36:36PM +, Catalin Marinas wrote: > > > On Wed, Mar 17, 2021 at 02:20:50PM +, Chen Jun wrote: > > > > On ARM64, cat

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

2021-03-18 Thread Sami Tolvanen
Select ARCH_SUPPORTS_CFI_CLANG to allow CFI to be enabled. Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook --- arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 5656e7aacd69..2eefdbc3e3c9 100644 --- a/arch/arm64/Kconfig +++

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

2021-03-18 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

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

2021-03-18 Thread Sami Tolvanen
Disable CFI for the nVHE code to avoid address space confusion. Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook --- 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

[PATCH v2 10/17] lkdtm: use __va_function

2021-03-18 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

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

2021-03-18 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 Reviewed-by: Kees Cook ---

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

2021-03-18 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

[PATCH v2 13/17] arm64: use __pa_function

2021-03-18 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

[PATCH v2 12/17] arm64: implement __va_function

2021-03-18 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 Reviewed-by: Kees Cook ---

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

2021-03-18 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 v2 08/17] bpf: disable CFI in dispatcher functions

2021-03-18 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 Reviewed-by: Kees Cook --- include/linux/bpf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

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

2021-03-18 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 Reviewed-by:

[PATCH v2 06/17] kthread: use WARN_ON_FUNCTION_MISMATCH

2021-03-18 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 !=

[PATCH v2 05/17] workqueue: use WARN_ON_FUNCTION_MISMATCH

2021-03-18 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);

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

2021-03-18 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

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

2021-03-18 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

[PATCH v2 02/17] cfi: add __cficanonical

2021-03-18 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 v2 01/17] add support for Clang CFI

2021-03-18 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

[PATCH v2 00/17] Add support for Clang CFI

2021-03-18 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

Re: [PATCH v3 0/3] Binder: Enable App Freezing Capability

2021-03-18 Thread Li Li
On Thu, Mar 18, 2021 at 9:20 AM Todd Kjos wrote: > > On Wed, Mar 17, 2021 at 1:17 PM Jann Horn wrote: > > > > On Wed, Mar 17, 2021 at 7:00 PM Christian Brauner > > wrote: > > > On Mon, Mar 15, 2021 at 06:16:27PM -0700, Li Li wrote: > > > > To improve the user experience when switching between

Re: [PATCH tip/core/rcu 1/3] rcu: Provide polling interfaces for Tree RCU grace periods

2021-03-18 Thread Paul E. McKenney
On Thu, Mar 18, 2021 at 03:59:52PM +0100, Frederic Weisbecker wrote: > On Tue, Mar 16, 2021 at 09:51:01AM -0700, Paul E. McKenney wrote: > > On Tue, Mar 16, 2021 at 04:17:50PM +0100, Frederic Weisbecker wrote: > > > On Wed, Mar 03, 2021 at 04:26:30PM -0800, paul...@kernel.org wrote: > > > > +/** >

Re: [PATCH net-next] net: phy: at803x: remove at803x_aneg_done()

2021-03-18 Thread Heiner Kallweit
On 18.03.2021 18:04, Vladimir Oltean wrote: > On Thu, Mar 18, 2021 at 05:38:13PM +0100, Michael Walle wrote: >> Am 2021-03-18 17:21, schrieb Heiner Kallweit: >>> On 18.03.2021 16:17, Vladimir Oltean wrote: On Thu, Mar 18, 2021 at 03:54:00PM +0100, Heiner Kallweit wrote: > On 18.03.2021

Re: [PATCH] mm/slub: Add slub_debug option to panic on memory corruption

2021-03-18 Thread Kees Cook
On Thu, Mar 18, 2021 at 01:56:05PM +0100, Vlastimil Babka wrote: > I was going to suggest adding a panic_on_taint parameter... but turns out it > was > already added last year! And various memory corruption detections already use > TAINT_BAD_PAGE, including SLUB. > If anything's missing an

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

2021-03-18 Thread Bjorn Andersson
On Thu 18 Mar 11:56 CDT 2021, Jeffrey Hugo wrote: > form -> from in the subject? > Seems like I only failed in the cover letter, right? Regards, Bjorn > On Thu, Mar 11, 2021 at 5:34 PM Bjorn Andersson > wrote: > > > > The wireless subsystem found in Qualcomm MSM8974 and MSM8916 among others

Re: [PATCH] I2C: JZ4780: Fix bug for Ingenic X1000.

2021-03-18 Thread Wolfram Sang
On Fri, Mar 19, 2021 at 12:25:43AM +0800, 周琰杰 (Zhou Yanjie) wrote: > Only send "X1000_I2C_DC_STOP" when last byte, or it will cause > error when I2C write operation. Any write operation? I wonder then why nobody noticed before? > - while ((i2c_sta & JZ4780_I2C_STA_TFNF) && >

Re: s390: kernel/entry.o: in function `sys_call_table_emu': (.rodata+0x1bc0): undefined reference to `__s390_'

2021-03-18 Thread Nick Desaulniers
(Replying to https://lore.kernel.org/linux-s390/ca+g9fytbw0hav5ooayck2rz_m2sj73krxpj0idzt+o8qtc1...@mail.gmail.com/) Yeah, our CI is failing today, too with the same error on linux-next: https://github.com/ClangBuiltLinux/continuous-integration2/runs/2138006304?check_suite_focus=true

Re: [PATCH 5/9] objtool: Rework rebuild_reloc logic

2021-03-18 Thread Peter Zijlstra
On Thu, Mar 18, 2021 at 11:36:40AM -0500, Josh Poimboeuf wrote: > > I was thinking you could get a section changed without touching > > relocations, but while that is theoretically possible, it is exceedingly > > unlikely (and objtool doesn't do that). > > Hm? This is a *relocation* section, not

Re: [PATCH net-next] net: phy: at803x: remove at803x_aneg_done()

2021-03-18 Thread Vladimir Oltean
On Thu, Mar 18, 2021 at 05:38:13PM +0100, Michael Walle wrote: > Am 2021-03-18 17:21, schrieb Heiner Kallweit: > > On 18.03.2021 16:17, Vladimir Oltean wrote: > > > On Thu, Mar 18, 2021 at 03:54:00PM +0100, Heiner Kallweit wrote: > > > > On 18.03.2021 15:23, Michael Walle wrote: > > > > >

Re: [PATCH] selftests/kvm: add get_msr_index_features

2021-03-18 Thread Andrew Jones
On Thu, Mar 18, 2021 at 03:56:29PM +0100, Emanuele Giuseppe Esposito wrote: > Test the KVM_GET_MSR_FEATURE_INDEX_LIST > and KVM_GET_MSR_INDEX_LIST ioctls. > > Signed-off-by: Emanuele Giuseppe Esposito > --- > tools/testing/selftests/kvm/.gitignore| 1 + >

Re: Checkpatch still worries about include/asm/ ?

2021-03-18 Thread Lukas Bulwahn
On Thu, Mar 18, 2021 at 5:47 PM Dwaipayan Ray wrote: > > Hello, > include/asm/ got removed a long time back (probably v1.1.45). > Checkpatch still worries about that: > > if ($realfile =~ m@^include/asm/@) { > ERROR("MODIFIED_INCLUDE_ASM", > "do not modify files in include/asm, change

Re: [PATCH 3/3] mm/devmap: Remove pgmap accounting in the get_user_pages_fast() path

2021-03-18 Thread Dan Williams
On Thu, Mar 18, 2021 at 3:02 AM Joao Martins wrote: > > On 3/18/21 4:08 AM, Dan Williams wrote: > > Now that device-dax and filesystem-dax are guaranteed to unmap all user > > mappings of devmap / DAX pages before tearing down the 'struct page' > > array, get_user_pages_fast() can rely on its

Re: [PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism

2021-03-18 Thread Amey Narkhede
On 21/03/18 04:57PM, Leon Romanovsky wrote: > On Thu, Mar 18, 2021 at 07:52:52PM +0530, Amey Narkhede wrote: > > On 21/03/18 11:09AM, Leon Romanovsky wrote: > > > On Wed, Mar 17, 2021 at 11:31:40AM -0600, Alex Williamson wrote: > > > > On Wed, 17 Mar 2021 15:58:40 +0200 > > > > Leon Romanovsky

[PATCH] drm/i915/dpcd_bl: Don't try vesa interface unless specified by VBT

2021-03-18 Thread Lyude Paul
Looks like that there actually are another subset of laptops on the market that don't support the Intel HDR backlight interface, but do advertise support for the VESA DPCD backlight interface despite the fact it doesn't seem to work. Note though I'm not entirely clear on this - on one of the

Re: [PATCH] I2C: JZ4780: Fix bug for Ingenic X1000.

2021-03-18 Thread Greg KH
On Fri, Mar 19, 2021 at 12:25:43AM +0800, 周琰杰 (Zhou Yanjie) wrote: > Only send "X1000_I2C_DC_STOP" when last byte, or it will cause > error when I2C write operation. > > Fixes: 21575a7a8d4c ("I2C: JZ4780: Add support for the X1000.") > > Signed-off-by: 周琰杰 (Zhou Yanjie) > --- >

Re: [PATCH] mm: vmalloc: Prevent use after free in _vm_unmap_aliases

2021-03-18 Thread Uladzislau Rezki
On Thu, Mar 18, 2021 at 03:38:25PM +0530, vji...@codeaurora.org wrote: > From: Vijayanand Jitta > > A potential use after free can occur in _vm_unmap_aliases > where an already freed vmap_area could be accessed, Consider > the following scenario: > > Process 1

Re: [PATCH 3/3] static_call: Fix static_call_update() sanity check

2021-03-18 Thread Peter Zijlstra
On Thu, Mar 18, 2021 at 11:13:08AM -0500, Josh Poimboeuf wrote: > On Thu, Mar 18, 2021 at 12:31:59PM +0100, Peter Zijlstra wrote: > > if (!kernel_text_address((unsigned long)site_addr)) { > > - WARN_ONCE(1, "can't patch static call site at > > %pS", >

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