Re: [PATCH 24/35] arm64: mte: Switch GCR_EL1 in kernel entry and exit

2020-08-27 Thread Catalin Marinas
On Thu, Aug 27, 2020 at 11:56:49AM +0100, Vincenzo Frascino wrote: > On 8/27/20 11:38 AM, Catalin Marinas wrote: > > On Fri, Aug 14, 2020 at 07:27:06PM +0200, Andrey Konovalov wrote: > >> diff --git a/arch/arm64/kernel/mte.c b/arch/arm64/kernel/mte.c > >> index 7717ea9bc2a7..cfac7d02f032 100644 > >

Re: [PATCH] linux/kernel.h: add container_from()

2020-08-27 Thread Greg Kroah-Hartman
On Wed, Aug 26, 2020 at 07:31:40PM -0700, Kees Cook wrote: > On Thu, Aug 27, 2020 at 07:06:36AM +0530, Allen Pais wrote: > > Introduce container_from() as a generic helper instead of > > sub-systems defining a private from_* API > > (Eg: from_tasklets recently introduced in > > 12cc923f1ccc: Taskle

Re: [PATCH 12/30] wireless: ath: wil6210: wmi: Correct misnamed function parameter 'ptr_'

2020-08-27 Thread Lee Jones
o apply: > >> > > >> > error: patch failed: drivers/net/wireless/ath/wil6210/wmi.c:266 > >> > error: drivers/net/wireless/ath/wil6210/wmi.c: patch does not apply > >> > stg import: Diff does not apply cleanly > >> > > >> > Pat

Re: [PATCH 00/30] Set 3: Rid W=1 warnings in Wireless

2020-08-27 Thread Kalle Valo
Lee Jones writes: > This set is part of a larger effort attempting to clean-up W=1 > kernel builds, which are currently overwhelmingly riddled with > niggly little warnings. > > There are quite a few W=1 warnings in the Wireless. My plan > is to work through all of them over the next few weeks.

Re: [PATCH] deprecated.rst: Remove now removed uninitialized_var

2020-08-27 Thread Kees Cook
On Wed, Aug 26, 2020 at 08:12:01PM -0700, Joe Perches wrote: > It's now gone from the kernel so remove it from the deprecated API text. > > Signed-off-by: Joe Perches Oh! Right, thank you. I forgot to rewrite this. I'd like to keep the details about why "tricking the compiler to be quiet" should

Re: [patch V2 01/46] iommu/amd: Prevent NULL pointer dereference

2020-08-27 Thread Joerg Roedel
On Wed, Aug 26, 2020 at 01:16:29PM +0200, Thomas Gleixner wrote: > From: Thomas Gleixner > > Dereferencing irq_data before checking it for NULL is suboptimal. > > Signed-off-by: Thomas Gleixner Acked-by: Joerg Roedel Reviewed-by: Joerg Roedel

[PATCH v6 1/3] io_uring: use an enumeration for io_uring_register(2) opcodes

2020-08-27 Thread Stefano Garzarella
The enumeration allows us to keep track of the last io_uring_register(2) opcode available. Behaviour and opcodes names don't change. Reviewed-by: Kees Cook Signed-off-by: Stefano Garzarella --- v5: - explicitly assign enum values since this is UAPI [Kees] --- include/uapi/linux/io_uring.h | 2

[PATCH v6 0/3] io_uring: add restrictions to support untrusted applications and guests

2020-08-27 Thread Stefano Garzarella
v6: - moved restriction checks in a function [Jens] - changed ret value handling in io_register_restrictions() [Jens] v5: https://lore.kernel.org/io-uring/20200827134044.82821-1-sgarz...@redhat.com/ v4: https://lore.kernel.org/io-uring/20200813153254.93731-1-sgarz...@redhat.com/ v3: https://lore

[PATCH] mmc: sdhci-msm: Add retries when all tuning phases are found valid

2020-08-27 Thread Douglas Anderson
As the comments in this patch say, if we tune and find all phases are valid it's _almost_ as bad as no phases being found valid. Probably all phases are not really reliable but we didn't detect where the unreliable place is. That means we'll essentially be guessing and hoping we get a good phase.

[PATCH v6 3/3] io_uring: allow disabling rings during the creation

2020-08-27 Thread Stefano Garzarella
This patch adds a new IORING_SETUP_R_DISABLED flag to start the rings disabled, allowing the user to register restrictions, buffers, files, before to start processing SQEs. When IORING_SETUP_R_DISABLED is set, SQE are not processed and SQPOLL kthread is not started. The restrictions registration

[PATCH v6 2/3] io_uring: add IOURING_REGISTER_RESTRICTIONS opcode

2020-08-27 Thread Stefano Garzarella
The new io_uring_register(2) IOURING_REGISTER_RESTRICTIONS opcode permanently installs a feature allowlist on an io_ring_ctx. The io_ring_ctx can then be passed to untrusted code with the knowledge that only operations present in the allowlist can be executed. The allowlist approach ensures that n

RE: [PATCH V2] scsi: ufs-pci: Add LTR support for Intel controllers

2020-08-27 Thread Avri Altman
> > Intel host controllers support the setting of latency tolerance. > Accordingly, implement the PM QoS ->set_latency_tolerance() callback. The > raw register values are also exposed via debugfs. > > Signed-off-by: Adrian Hunter Reviewed-by: Avri Altman

[PATCH 04/10] test_bitmap: skip user bitmap tests for !CONFIG_SET_FS

2020-08-27 Thread Christoph Hellwig
We can't run the tests for userspace bitmap parsing if set_fs() doesn't exist. Signed-off-by: Christoph Hellwig Reviewed-by: Kees Cook --- lib/test_bitmap.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c index df903c53952bb9.

[PATCH 03/10] uaccess: add infrastructure for kernel builds with set_fs()

2020-08-27 Thread Christoph Hellwig
Add a CONFIG_SET_FS option that is selected by architecturess that implement set_fs, which is all of them initially. If the option is not set stubs for routines related to overriding the address space are provided so that architectures can start to opt out of providing set_fs. Signed-off-by: Chri

[PATCH 10/10] powerpc: remove address space overrides using set_fs()

2020-08-27 Thread Christoph Hellwig
Stop providing the possibility to override the address space using set_fs() now that there is no need for that any more. Signed-off-by: Christoph Hellwig --- arch/powerpc/Kconfig | 1 - arch/powerpc/include/asm/processor.h | 7 --- arch/powerpc/include/asm/thread_info.h |

[PATCH 09/10] powerpc: use non-set_fs based maccess routines

2020-08-27 Thread Christoph Hellwig
Provide __get_kernel_nofault and __put_kernel_nofault routines to implement the maccess routines without messing with set_fs and without opening up access to user space. Signed-off-by: Christoph Hellwig --- arch/powerpc/include/asm/uaccess.h | 16 1 file changed, 16 insertions(+

Re: [PATCH] net: Fix some comments

2020-08-27 Thread David Miller
From: Miaohe Lin Date: Thu, 27 Aug 2020 07:27:49 -0400 > Fix some comments, including wrong function name, duplicated word and so > on. > > Signed-off-by: Miaohe Lin Applied, thanks.

[PATCH 08/10] x86: remove address space overrides using set_fs()

2020-08-27 Thread Christoph Hellwig
Stop providing the possibility to override the address space using set_fs() now that there is no need for that any more. To properly handle the TASK_SIZE_MAX checking for 4 vs 5-level page tables on x86 a new alternative is introduced, which just like the one in entry_64.S has to use the hardcoded

[PATCH 07/10] x86: make TASK_SIZE_MAX usable from assembly code

2020-08-27 Thread Christoph Hellwig
For 64-bit the only thing missing was a strategic _AC, and for 32-bit we need to use __PAGE_OFFSET instead of PAGE_OFFSET in the TASK_SIZE definition to escape the explicit unsigned long cast. This just works because __PAGE_OFFSET is defined using _AC itself and thus never needs the cast anyway.

[PATCH net 7/7] afs: Fix error handling in VL server rotation

2020-08-27 Thread David Howells
The error handling in the VL server rotation in the case of there being no contactable servers is not correct. In such a case, the records of all the servers in the list are scanned and the errors and abort codes are mapped and prioritised and one error is chosen. This is then forgotten and the d

[PATCH net 6/7] afs: Don't use VL probe running state to make decisions outside probe code

2020-08-27 Thread David Howells
Don't use the running state for VL server probes to make decisions about which server to use as the state is cleared at the start of a probe and intermediate values might also be misleading. Instead, add a separate 'latest known' rtt in the afs_vlserver struct and a flag to indicate if the server

Re: [PATCH] Revert "usb: dwc3: meson-g12a: fix shared reset control use"

2020-08-27 Thread Philipp Zabel
On Thu, 2020-08-27 at 16:48 +0200, Amjad Ouled-Ameur wrote: > This reverts commit 7a410953d1fb4dbe91ffcfdee9cbbf889d19b0d7. > > This commit breaks USB on meson-gxl-s905x-libretech-cc. Reverting > the change solves the issue. > > In fact, according to the reset framework code, consumers must not u

Re: [PATCH] nvme-pci: cancel nvme device request before disabling

2020-08-27 Thread Keith Busch
On Fri, Aug 14, 2020 at 12:11:56PM -0400, Tong Zhang wrote: > On Fri, Aug 14, 2020 at 11:42 AM Keith Busch wrote: > > > > On Fri, Aug 14, 2020 at 03:14:31AM -0400, Tong Zhang wrote: > > > > > diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c > > > > > index ba725ae47305..c4f1ce0ee1e3

Re: [PATCH] Platform lockdown information in sysfs (v2)

2020-08-27 Thread Daniel Gutson
On Thu, Aug 27, 2020 at 7:15 AM Arnd Bergmann wrote: > > On Thu, Aug 20, 2020 at 4:51 PM Daniel Gutson > wrote: > > > > This patch exports information about the platform lockdown > > firmware configuration in the sysfs filesystem. > > In this initial patch, I include some configuration attributes

Re: [PATCH v2] null_blk: add support for max open/active zone limit for zoned devices

2020-08-27 Thread Damien Le Moal
On 2020/08/27 23:51, Randy Dunlap wrote: > On 8/27/20 6:50 AM, Niklas Cassel wrote: >> Add support for user space to set a max open zone and a max active zone >> limit via configfs. By default, the default values are 0 == no limit. > > Hi, > > How does a user find out about how to use/set these l

[PATCH net 3/7] rxrpc: Make rxrpc_kernel_get_srtt() indicate validity

2020-08-27 Thread David Howells
Fix rxrpc_kernel_get_srtt() to indicate the validity of the returned smoothed RTT. If we haven't had any valid samples yet, the SRTT isn't useful. Fixes: c410bf01933e ("rxrpc: Fix the excessive initial retransmission timeout") Signed-off-by: David Howells --- fs/afs/fs_probe.c |4 ++-

[PATCH net 4/7] afs: Remove afs_vlserver->probe.have_result

2020-08-27 Thread David Howells
Remove afs_vlserver->probe.have_result as it's neither read nor waited upon. Fixes: 3bf0fb6f33dd ("afs: Probe multiple fileservers simultaneously") Signed-off-by: David Howells --- fs/afs/internal.h |1 - fs/afs/vl_probe.c |5 + 2 files changed, 1 insertion(+), 5 deletions(-) diff

[PATCH net 2/7] rxrpc: Fix loss of RTT samples due to interposed ACK

2020-08-27 Thread David Howells
The Rx protocol has a mechanism to help generate RTT samples that works by a client transmitting a REQUESTED-type ACK when it receives a DATA packet that has the REQUEST_ACK flag set. The peer, however, may interpose other ACKs before transmitting the REQUESTED-ACK, as can be seen in the following

[PATCH net 5/7] afs: Expose information from afs_vlserver through /proc for debugging

2020-08-27 Thread David Howells
Convert various bitfields in afs_vlserver::probe to a mask and then expose this and some other bits of information through /proc/net/afs//vlservers to make it easier to debug VL server communication issues. Signed-off-by: David Howells --- fs/afs/internal.h |9 + fs/afs/proc.c

[PATCH net 1/7] rxrpc: Keep the ACK serial in a var in rxrpc_input_ack()

2020-08-27 Thread David Howells
Keep the ACK serial number in a variable in rxrpc_input_ack() as it's used frequently. Signed-off-by: David Howells --- net/rxrpc/input.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c index 767579328a06..a7699

[PATCH v7 4/9] x86/cpufeatures: Enumerate ENQCMD and ENQCMDS instructions

2020-08-27 Thread Fenghua Yu
Work submission instruction comes in two flavors. ENQCMD can be called both in ring 3 and ring 0 and always uses the contents of PASID MSR when shipping the command to the device. ENQCMDS allows a kernel driver to submit commands on behalf of a user process. The driver supplies the PASID value in E

[PATCH v7 9/9] x86/mmu: Allocate/free PASID

2020-08-27 Thread Fenghua Yu
A PASID is allocated for an "mm" the first time any thread binds to an SVM capable device and is freed from the "mm" when the SVM is unbound by the last thread. It's possible for the "mm" to have different PASID values in different binding/unbinding SVM cycles. The mm's PASID (non-zero for valid P

[PATCH v7 2/9] iommu/vt-d: Change flags type to unsigned int in binding mm

2020-08-27 Thread Fenghua Yu
"flags" passed to intel_svm_bind_mm() is a bit mask and should be defined as "unsigned int" instead of "int". Change its type to "unsigned int". Suggested-by: Thomas Gleixner Signed-off-by: Fenghua Yu Reviewed-by: Tony Luck Reviewed-by: Lu Baolu --- v5: - Reviewed by Lu Baolu v2: - Add this

[PATCH v7 5/9] x86/fpu/xstate: Add supervisor PASID state for ENQCMD feature

2020-08-27 Thread Fenghua Yu
From: Yu-cheng Yu ENQCMD instruction reads PASID from IA32_PASID MSR. The MSR is stored in the task's supervisor FPU PASID state and is context switched by XSAVES/XRSTORS. Signed-off-by: Yu-cheng Yu Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Reviewed-by: Tony Luck --- v2: - Modify

[PATCH v7 7/9] mm: Define pasid in mm

2020-08-27 Thread Fenghua Yu
PASID is shared by all threads in a process. So the logical place to keep track of it is in the "mm". Both ARM and X86 need to use the PASID in the "mm". Suggested-by: Christoph Hellwig Signed-off-by: Fenghua Yu Reviewed-by: Tony Luck --- v4: - Change PASID type to u32 (Christoph) v3: - Change

[PATCH v7 6/9] x86/msr-index: Define IA32_PASID MSR

2020-08-27 Thread Fenghua Yu
The IA32_PASID MSR (0xd93) contains the Process Address Space Identifier (PASID), a 20-bit value. Bit 31 must be set to indicate the value programmed in the MSR is valid. Hardware uses PASID to identify process address space and direct responses to the right address space. Signed-off-by: Fenghua Y

[PATCH v7 0/9] x86: tag application address space for devices

2020-08-27 Thread Fenghua Yu
Typical hardware devices require a driver stack to translate application buffers to hardware addresses, and a kernel-user transition to notify the hardware of new work. What if both the translation and transition overhead could be eliminated? This is what Shared Virtual Address (SVA) and ENQCMD ena

Re: [PATCH v4 3/3] io_uring: allow disabling rings during the creation

2020-08-27 Thread Kees Cook
On Thu, Aug 27, 2020 at 09:18:02AM +0200, Stefano Garzarella wrote: > On Wed, Aug 26, 2020 at 12:50:31PM -0700, Kees Cook wrote: > > On Thu, Aug 13, 2020 at 05:32:54PM +0200, Stefano Garzarella wrote: > > > This patch adds a new IORING_SETUP_R_DISABLED flag to start the > > > rings disabled, allowi

[PATCH v7 8/9] x86/cpufeatures: Mark ENQCMD as disabled when configured out

2020-08-27 Thread Fenghua Yu
Currently the ENQCMD feature cannot be used if CONFIG_INTEL_IOMMU_SVM is not set. Add X86_FEATURE_ENQCMD to the disabled features mask. Signed-off-by: Fenghua Yu Reviewed-by: Tony Luck --- v7: - Split this patch from a previous patch. arch/x86/include/asm/disabled-features.h | 9 - 1 f

Re: [PATCH v6 7/7] sdhci: tegra: Add missing TMCLK for data timeout

2020-08-27 Thread Sowjanya Komatineni
On 8/27/20 1:40 AM, Jon Hunter wrote: On 27/08/2020 04:50, Sowjanya Komatineni wrote: commit b5a84ecf025a ("mmc: tegra: Add Tegra210 support") Tegra210 and later has a separate sdmmc_legacy_tm (TMCLK) used by Tegra SDMMC hawdware for data timeout to achive better timeout than using SDCLK and

Re: [PATCH V3 2/3] arm64: dts: qcom: sc7180: Add sleep pin ctrl for BT uart

2020-08-27 Thread skakit
Hi Matthias, On 2020-08-26 22:10, Matthias Kaehlcke wrote: Hi Satya, On Wed, Aug 26, 2020 at 09:35:15PM +0530, ska...@codeaurora.org wrote: Hi Matthias, On 2020-08-25 22:08, Matthias Kaehlcke wrote: > On Tue, Aug 25, 2020 at 06:42:28PM +0530, ska...@codeaurora.org wrote: > > On 2020-08-21 22:

[PATCH net 0/7] rxrpc, afs: Fix probing issues

2020-08-27 Thread David Howells
Here are some fixes for rxrpc and afs to fix issues in the RTT measuring in rxrpc and thence the Volume Location server probing in afs: (1) Move the serial number of a received ACK into a local variable to simplify the next patch. (2) Fix the loss of RTT samples due to extra interposed A

[PATCH 01/10] fs: don't allow kernel reads and writes without iter ops

2020-08-27 Thread Christoph Hellwig
Don't allow calling ->read or ->write with set_fs as a preparation for killing off set_fs. All the instances that we use kernel_read/write on are using the iter ops already. If a file has both the regular ->read/->write methods and the iter variants those could have different semantics for messed

remove the last set_fs() in common code, and remove it for x86 and powerpc v2

2020-08-27 Thread Christoph Hellwig
Hi all, this series removes the last set_fs() used to force a kernel address space for the uaccess code in the kernel read/write/splice code, and then stops implementing the address space overrides entirely for x86 and powerpc. The file system part has been posted a few times, and the read/write

Re: [PATCH bpf-next 0/3] bpf: add MPTCP subflow support

2020-08-27 Thread Nicolas Rybowski
Hi Alexei, On Wed, Aug 26, 2020 at 9:13 PM Alexei Starovoitov wrote: > > On Tue, Aug 25, 2020 at 11:55 AM Nicolas Rybowski > wrote: > > > > Hi Alexei, > > > > Thanks for the feedback! > > > > On Tue, Aug 25, 2020 at 12:01 AM Alexei Starovoitov > > wrote: > > > > > > On Fri, Aug 21, 2020 at 05:1

[PATCH v7 3/9] docs: x86: Add documentation for SVA (Shared Virtual Addressing)

2020-08-27 Thread Fenghua Yu
From: Ashok Raj ENQCMD and Data Streaming Accelerator (DSA) and all of their associated features are a complicated stack with lots of interconnected pieces. This documentation provides a big picture overview for all of the features. Signed-off-by: Ashok Raj Co-developed-by: Fenghua Yu Signed-o

[PATCH 05/10] lkdtm: disable set_fs-based tests for !CONFIG_SET_FS

2020-08-27 Thread Christoph Hellwig
Once we can't manipulate the address limit, we also can't test what happens when the manipulation is abused. Signed-off-by: Christoph Hellwig --- drivers/misc/lkdtm/bugs.c | 4 drivers/misc/lkdtm/usercopy.c | 4 2 files changed, 8 insertions(+) diff --git a/drivers/misc/lkdtm/bugs

[PATCH 06/10] x86: move PAGE_OFFSET, TASK_SIZE & friends to page_{32,64}_types.h

2020-08-27 Thread Christoph Hellwig
At least for 64-bit this moves them closer to some of the defines they are based on, and it prepares for using the TASK_SIZE_MAX definition from assembly. Signed-off-by: Christoph Hellwig Reviewed-by: Kees Cook --- arch/x86/include/asm/page_32_types.h | 11 +++ arch/x86/include/asm/page_64_

[PATCH 02/10] fs: don't allow splice read/write without explicit ops

2020-08-27 Thread Christoph Hellwig
default_file_splice_write is the last piece of generic code that uses set_fs to make the uaccess routines operate on kernel pointers. It implements a "fallback loop" for splicing from files that do not actually provide a proper splice_read method. The usual file systems and other high bandwith in

Re: [PATCH 24/35] arm64: mte: Switch GCR_EL1 in kernel entry and exit

2020-08-27 Thread Vincenzo Frascino
On 8/27/20 11:38 AM, Catalin Marinas wrote: > On Fri, Aug 14, 2020 at 07:27:06PM +0200, Andrey Konovalov wrote: >> diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S >> index cde127508e38..a17fefb0571b 100644 >> --- a/arch/arm64/kernel/entry.S >> +++ b/arch/arm64/kernel/entry.S >> @

[PATCH v5 1/7] binfmt_elf_fdpic: Stop using dump_emit() on user pointers on !MMU

2020-08-27 Thread Jann Horn
dump_emit() is for kernel pointers, and VMAs describe userspace memory. Let's be tidy here and avoid accessing userspace pointers under KERNEL_DS, even if it probably doesn't matter much on !MMU systems - especially given that it looks like we can just use the same get_dump_page() as on MMU if we m

[PATCH v5 3/7] coredump: Refactor page range dumping into common helper

2020-08-27 Thread Jann Horn
Both fs/binfmt_elf.c and fs/binfmt_elf_fdpic.c need to dump ranges of pages into the coredump file. Extract that logic into a common helper. Signed-off-by: Jann Horn --- fs/binfmt_elf.c | 22 ++ fs/binfmt_elf_fdpic.c| 18 +++--- fs/coredump.c

[PATCH v5 0/7] Fix ELF / FDPIC ELF core dumping, and use mmap_lock properly in there

2020-08-27 Thread Jann Horn
new in v5: - patches 1-3 and 6 are unchanged - added patch 4: rework vma_dump_size() into a common helper (Linus) - added patch 7: actually do the mmget_still_valid() removal (Linus) - for now, let dump_vma_snapshot() take the mmap_lock in write mode instead of read mode to avoid the data ra

[PATCH v5 4/7] coredump: Rework elf/elf_fdpic vma_dump_size() into common helper

2020-08-27 Thread Jann Horn
At the moment, the binfmt_elf and binfmt_elf_fdpic code have slightly different code to figure out which VMAs should be dumped, and if so, whether the dump should contain the entire VMA or just its first page. Eliminate duplicate code by reworking the binfmt_elf version into a generic core dumping

Re: [PATCH] RDMA/rxe: Fix memleak in rxe_mem_init_user

2020-08-27 Thread Jason Gunthorpe
On Wed, Aug 19, 2020 at 03:56:32PM +0800, Dinghao Liu wrote: > When page_address() fails, umem should be freed just > like when rxe_mem_alloc() fails. > > Signed-off-by: Dinghao Liu > --- > drivers/infiniband/sw/rxe/rxe_mr.c | 1 + > 1 file changed, 1 insertion(+) Applied to for-rc, I added a f

Re: [PATCH v2 15/15] kprobes: Free kretprobe_instance with rcu callback

2020-08-27 Thread peterz
On Thu, Aug 27, 2020 at 08:37:49PM +0900, Masami Hiramatsu wrote: > Free kretprobe_instance with rcu callback instead of directly > freeing the object in the kretprobe handler context. > > This will make kretprobe run safer in NMI context. > > Signed-off-by: Masami Hiramatsu > --- > include/lin

[PATCH v1 7/8] rbtree_latch: Use seqcount_latch_t

2020-08-27 Thread Ahmed S. Darwish
Latch sequence counters have unique read and write APIs, and thus seqcount_latch_t was recently introduced at seqlock.h. Use that new data type instead of plain seqcount_t. This adds the necessary type-safety and ensures that only latching-safe seqcount APIs are to be used. Signed-off-by: Ahmed S

Re: [PATCH 31/35] kasan, arm64: implement HW_TAGS runtime

2020-08-27 Thread Vincenzo Frascino
On 8/27/20 11:45 AM, Catalin Marinas wrote: > On Fri, Aug 14, 2020 at 07:27:13PM +0200, Andrey Konovalov wrote: >> diff --git a/mm/kasan/mte.c b/mm/kasan/mte.c >> new file mode 100644 >> index ..43b7d74161e5 >> --- /dev/null >> +++ b/mm/kasan/mte.c > > Since this is an arm64-specific k

Re: [PATCH 1/5] Add manpage for open_tree(2)

2020-08-27 Thread Michael Kerrisk (man-pages)
Hello David, Can I ask that you please reply to each of my mails, rather than just sending out a new patch series (which of course I would also like you to do). Some things that I mentioned in the last mails got lost, and I end up having to repeat them. So, even where I say "please change this"

Re: [PATCH v2] opp: Power on (virtual) power domains managed by the OPP core

2020-08-27 Thread Stephan Gerhold
On Thu, Aug 27, 2020 at 03:31:04PM +0530, Viresh Kumar wrote: > On 26-08-20, 11:33, Stephan Gerhold wrote: > > diff --git a/drivers/opp/core.c b/drivers/opp/core.c > > index 8b3c3986f589..7e53a7b94c59 100644 > > --- a/drivers/opp/core.c > > +++ b/drivers/opp/core.c > > @@ -17,6 +17,7 @@ > > #inclu

Re: RFC: inet_timewait_sock->tw_timer list corruption

2020-08-27 Thread Eric Dumazet
On Thu, Aug 27, 2020 at 4:03 AM Wang Long wrote: > > Hi, > > we encountered a kernel panic as following: > > [4394470.273792] general protection fault: [#1] SMP NOPTI > [4394470.274038] CPU: 0 PID: 0 Comm: swapper/0 Kdump: loaded Tainted: G > W - - - 4.18.0-80.el8.x86_64 #1

[PATCH v1 5/8] timekeeping: Use seqcount_latch_t

2020-08-27 Thread Ahmed S. Darwish
Latch sequence counters are a multiversion concurrency control mechanism where the seqcount_t counter even/odd value is used to switch between two data storage copies. This allows the seqcount_t read path to safely interrupt its write side critical section (e.g. from NMIs). Initially, latch sequen

[PATCH v1 1/8] time/sched_clock: Use raw_read_seqcount_latch() during suspend

2020-08-27 Thread Ahmed S. Darwish
sched_clock uses seqcount_t latching to switch between two storage places protected by the sequence counter. This allows it to have interruptible, NMI-safe, seqcount_t write side critical sections. Since 7fc26327b756 ("seqlock: Introduce raw_read_seqcount_latch()"), raw_read_seqcount_latch() becam

Re: [PATCH 12/30] wireless: ath: wil6210: wmi: Correct misnamed function parameter 'ptr_'

2020-08-27 Thread Kalle Valo
c: patch does not apply >> > stg import: Diff does not apply cleanly >> > >> > Patch set to Changes Requested. >> >> Are you applying them in order? >> >> It may be affected by: >> >> wireless: ath: wil6210: wmi: Fix formatting and demot

[PATCH v1 6/8] x86/tsc: Use seqcount_latch_t

2020-08-27 Thread Ahmed S. Darwish
Latch sequence counters have unique read and write APIs, and thus seqcount_latch_t was recently introduced at seqlock.h. Use that new data type instead of plain seqcount_t. This adds the necessary type-safety and ensures that only latching-safe seqcount APIs are to be used. Signed-off-by: Ahmed S

[PATCH v1 3/8] seqlock: Introduce seqcount_latch_t

2020-08-27 Thread Ahmed S. Darwish
Latch sequence counters are a multiversion concurrency control mechanism where the seqcount_t counter even/odd value is used to switch between two copies of protected data. This allows the seqcount_t read path to safely interrupt its write side critical section (e.g. from NMIs). Initially, latch s

[PATCH v1 2/8] mm/swap: Do not abuse the seqcount_t latching API

2020-08-27 Thread Ahmed S. Darwish
Commit eef1a429f234 ("mm/swap.c: piggyback lru_add_drain_all() calls") implemented an optimization mechanism to exit the to-be-started LRU drain operation (name it A) if another drain operation *started and finished* while (A) was blocked on the LRU draining mutex. This was done through a seqcount

Re: [PATCH 0/3] ARM: dts: sun8i: r40: Enable IR on BananaPi M2U

2020-08-27 Thread Maxime Ripard
On Tue, Aug 25, 2020 at 07:13:55PM +0200, Jernej Skrabec wrote: > This series first adds nodes to R40 DTSI and then enable IR receiver > for BananaPi M2 Ultra board. Applied all three, thanks! Maxime signature.asc Description: PGP signature

Re: [PATCH v2] scsi: libcxgbi: use kvzalloc instead of opencoded kzalloc/vzalloc

2020-08-27 Thread Denis Efremov
Ping? On 8/1/20 4:31 PM, Denis Efremov wrote: > Remove cxgbi_alloc_big_mem(), cxgbi_free_big_mem() functions > and use kvzalloc/kvfree instead. __GFP_NOWARN added to kvzalloc() > call because we already print a warning in case of allocation fail. > > Signed-off-by: Denis Efremov > --- > drivers

Re: [PATCH rdma-next 00/14] Cleanup locking and events in ucma

2020-08-27 Thread Jason Gunthorpe
On Tue, Aug 18, 2020 at 03:05:12PM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > >From Jason: > > Rework how the uevents for new connections are handled so all the locking > ends up simpler and a work queue can be removed. This should also speed up > destruction of ucma_context's as

Re: [PATCH 26/35] kasan, arm64: Enable TBI EL1

2020-08-27 Thread Vincenzo Frascino
On 8/27/20 12:13 PM, Catalin Marinas wrote: > On Thu, Aug 27, 2020 at 12:05:55PM +0100, Vincenzo Frascino wrote: >> On 8/27/20 11:40 AM, Catalin Marinas wrote: >>> On Fri, Aug 14, 2020 at 07:27:08PM +0200, Andrey Konovalov wrote: diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S

Re: [RFC 0/3] cpufreq: cppc: Add support for frequency invariance

2020-08-27 Thread Ionela Voinescu
Hi Viresh, On Thursday 27 Aug 2020 at 13:21:49 (+0530), Viresh Kumar wrote: > On 25-08-20, 10:56, Ionela Voinescu wrote: > > I've been putting some more thought/code into this one and I believe > > something as follows might look nicer as well as cover a few corner cases > > (ignore implementation

Re: [RFC PATCH -rc] gcov: Protect from uninitialized number of functions provided by GCC

2020-08-27 Thread Leon Romanovsky
On Thu, Aug 27, 2020 at 04:39:32PM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > The kernel compiled with GCC 10.2.1 and KASAN together with GCOV enabled > produces the following splats while reloading modules. > > First splat [1] is generated due to the situation that gcov_info can be

[PATCH v2 15/15] kprobes: Free kretprobe_instance with rcu callback

2020-08-27 Thread Masami Hiramatsu
Free kretprobe_instance with rcu callback instead of directly freeing the object in the kretprobe handler context. This will make kretprobe run safer in NMI context. Signed-off-by: Masami Hiramatsu --- include/linux/kprobes.h |3 ++- kernel/kprobes.c| 25 ++---

Re: [PATCH] net: exit immediately when off = 0 in skb_headers_offset_update()

2020-08-27 Thread Eric Dumazet
On Thu, Aug 27, 2020 at 4:25 AM Miaohe Lin wrote: > > In the case of off = 0, skb_headers_offset_update() do nothing indeed. > > Signed-off-by: Miaohe Lin > --- > net/core/skbuff.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/net/core/skbuff.c b/net/core/skbuff.c > index 18ed56316e

[PATCH v2 13/15] sparc: kprobes: Use generic kretprobe trampoline handler

2020-08-27 Thread Masami Hiramatsu
Signed-off-by: Masami Hiramatsu --- arch/sparc/kernel/kprobes.c | 52 +++ 1 file changed, 4 insertions(+), 48 deletions(-) diff --git a/arch/sparc/kernel/kprobes.c b/arch/sparc/kernel/kprobes.c index dfbca2470536..cd34aeaa3ebb 100644 --- a/arch/sparc/ker

Re: [PATCH v6 7/7] sdhci: tegra: Add missing TMCLK for data timeout

2020-08-27 Thread Jon Hunter
On 27/08/2020 16:03, Sowjanya Komatineni wrote: > > On 8/27/20 1:40 AM, Jon Hunter wrote: >> On 27/08/2020 04:50, Sowjanya Komatineni wrote: >>> commit b5a84ecf025a ("mmc: tegra: Add Tegra210 support") >>> >>> Tegra210 and later has a separate sdmmc_legacy_tm (TMCLK) used by Tegra >>> SDMMC hawd

[PATCH v2 10/15] powerpc: kprobes: Use generic kretprobe trampoline handler

2020-08-27 Thread Masami Hiramatsu
Signed-off-by: Masami Hiramatsu --- Changes in v2: Fix to use correct trampoline_address. --- arch/powerpc/kernel/kprobes.c | 55 - 1 file changed, 5 insertions(+), 50 deletions(-) diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kpro

[PATCH v2 11/15] s390: kprobes: Use generic kretprobe trampoline handler

2020-08-27 Thread Masami Hiramatsu
Signed-off-by: Masami Hiramatsu --- arch/s390/kernel/kprobes.c | 81 ++-- 1 file changed, 4 insertions(+), 77 deletions(-) diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c index d2a71d872638..6009f08836f4 100644 --- a/arch/s390/kernel

[PATCH] ARM/dma-mapping: use kvzalloc() in __iommu_alloc_buffer()

2020-08-27 Thread Denis Efremov
Use kvzalloc() in __iommu_alloc_buffer() instead of open-coding it. Signed-off-by: Denis Efremov --- arch/arm/mm/dma-mapping.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 8a8949174b1c..9def10affa70 100644 ---

[PATCH v2 09/15] parisc: kprobes: Use generic kretprobe trampoline handler

2020-08-27 Thread Masami Hiramatsu
Signed-off-by: Masami Hiramatsu --- arch/parisc/kernel/kprobes.c | 78 +++--- 1 file changed, 6 insertions(+), 72 deletions(-) diff --git a/arch/parisc/kernel/kprobes.c b/arch/parisc/kernel/kprobes.c index 77ec51818916..2f9389ae91a3 100644 --- a/arch/parisc/

Re: [PATCH v2 5/7][next] printk: ringbuffer: add finalization/extension support

2020-08-27 Thread Petr Mladek
On Thu 2020-08-27 12:04:58, John Ogness wrote: > On 2020-08-26, Petr Mladek wrote: > >> This series makes a very naive assumption that the previous > >> descriptor is either in the reserved or committed queried states. The > >> fact is, it can be in any of the 4 queried states. Adding support for

Re: Kernel panic : Unable to handle kernel paging request at virtual address - dead address between user and kernel address ranges

2020-08-27 Thread Naresh Kamboju
On Thu, 27 Aug 2020 at 15:42, Viresh Kumar wrote: > > On 27-08-20, 11:48, Arnd Bergmann wrote: > > > > [3.680477] dev_pm_opp_put_clkname+0x30/0x58 > > > > [3.683431] sdhci_msm_probe+0x284/0x9a0 > > > > dev_pm_opp_put_clkname() is part of the error handling in the > > probe function, so I

[PATCH v2 08/15] mips: kprobes: Use generic kretprobe trampoline handler

2020-08-27 Thread Masami Hiramatsu
Signed-off-by: Masami Hiramatsu --- arch/mips/kernel/kprobes.c | 55 +++- 1 file changed, 4 insertions(+), 51 deletions(-) diff --git a/arch/mips/kernel/kprobes.c b/arch/mips/kernel/kprobes.c index d043c2f897fc..b58f49b7555e 100644 --- a/arch/mips/kernel

[PATCH] staging: android: ion: remove unnecessary intermediate variable 'objs'

2020-08-27 Thread Valery Ivanov
It is not necesssary to use 'objs' as an intermediate variable for assignment operation. Signed-off-by: Valery Ivanov --- drivers/staging/android/ion/ion.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion

[PATCH v2 07/15] ia64: kprobes: Use generic kretprobe trampoline handler

2020-08-27 Thread Masami Hiramatsu
Signed-off-by: Masami Hiramatsu --- arch/ia64/kernel/kprobes.c | 79 ++-- 1 file changed, 4 insertions(+), 75 deletions(-) diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c index 7a7df944d798..0e725ca9c60d 100644 --- a/arch/ia64/kernel

[PATCH] net: Call ip_hdrlen() when skbuff is not fragment

2020-08-27 Thread Miaohe Lin
When skbuff is fragment, we exit immediately and leave ip_hdrlen() as unused. And remove the unnecessary local variable fragment. Signed-off-by: Miaohe Lin --- net/core/skbuff.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.

[PATCH v2 06/15] csky: kprobes: Use generic kretprobe trampoline handler

2020-08-27 Thread Masami Hiramatsu
Signed-off-by: Masami Hiramatsu --- arch/csky/kernel/probes/kprobes.c | 78 + 1 file changed, 3 insertions(+), 75 deletions(-) diff --git a/arch/csky/kernel/probes/kprobes.c b/arch/csky/kernel/probes/kprobes.c index f0f733b7ac5a..a891fb422e76 100644 --- a/a

[PATCH v2 01/15] kprobes: Add generic kretprobe trampoline handler

2020-08-27 Thread Masami Hiramatsu
Add a generic kretprobe trampoline handler for unifying the all cloned /arch/* kretprobe trampoline handlers. The generic kretprobe trampoline handler is based on the x86 implementation, because it is the latest implementation. It has frame pointer checking, kprobe_busy_begin/end and return addres

Re: [ANNOUNCE] v5.9-rc2-rt1

2020-08-27 Thread Daniel Wagner
On Thu, Aug 27, 2020 at 12:28:40PM +0200, Sebastian Andrzej Siewior wrote: > On 2020-08-27 12:16:22 [+0200], Daniel Wagner wrote: > > The -rt kernel is roughly 6MB larger. Just need to check the memory > > ranges u-boot is using. > > so that 6MiB sounded bad but then it is ~36MiB in total so…. > I

Re: [PATCH] drm/radeon: Prefer lower feedback dividers

2020-08-27 Thread Christian König
Am 25.08.20 um 19:33 schrieb Kai-Heng Feng: Commit 2e26ccb119bd ("drm/radeon: prefer lower reference dividers") fixed screen flicker for HP Compaq nx9420 but breaks other laptops like Asus X50SL. Turns out we also need to favor lower feedback dividers. Mhm, let's hope that this works out for a

[PATCH] udf: Use kvzalloc() in udf_sb_alloc_bitmap()

2020-08-27 Thread Denis Efremov
Use kvzalloc() in udf_sb_alloc_bitmap() instead of open-coding it. Signed-off-by: Denis Efremov --- I'm not sure about TODO comment, through. fs/udf/super.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/udf/super.c b/fs/udf/super.c index 1c42f544096d..c7cd15219b7c

Re: RFC: inet_timewait_sock->tw_timer list corruption

2020-08-27 Thread Eric W. Biederman
Wang Long writes: > Hi, > > we encountered a kernel panic as following: > > [4394470.273792] general protection fault: [#1] SMP NOPTI > [4394470.274038] CPU: 0 PID: 0 Comm: swapper/0 Kdump: loaded Tainted: GW > - - - 4.18.0-80.el8.x86_64 #1 > [4394470.274477] Hardware name: Sugo

Re: [PATCH 0/5] ARM: dts: sun8i: r40: Enable video decoder

2020-08-27 Thread Maxime Ripard
On Tue, Aug 25, 2020 at 07:35:18PM +0200, Jernej Skrabec wrote: > Allwinner R40 SoC contains video engine very similar to that in A33. > > First two patches add system controller nodes and the rest of them > add support for Cedrus VPU. > > Please take a look. Applied all 5 patches, thanks Maxim

[PATCH] net: Add 'else' to split mutually exclusive case

2020-08-27 Thread Miaohe Lin
Add else to split mutually exclusive case and avoid unnecessary check. Signed-off-by: Miaohe Lin --- net/ipv4/ping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c index 19a947bf0faa..265676fd2bbd 100644 --- a/net/ipv4/ping.c +++ b/net/ipv4/

Re: [PATCH v2] scsi: libcxgbi: use kvzalloc instead of opencoded kzalloc/vzalloc

2020-08-27 Thread Martin K. Petersen
Denis, > Ping? It's in my staging branch. -- Martin K. Petersen Oracle Linux Engineering

[PATCH v2] lockdep: Allow tuning tracing capacity constants.

2020-08-27 Thread Tetsuo Handa
Since syzkaller continues various test cases until the kernel crashes, syzkaller tends to examine more locking dependencies than normal systems. As a result, syzbot is reporting that the fuzz testing was terminated due to hitting upper limits lockdep can track [1] [2] [3]. Let's allow individually

Re: [PATCH v36 22/24] selftests/x86: Add a selftest for SGX

2020-08-27 Thread Sean Christopherson
On Thu, Aug 27, 2020 at 12:47:04AM -0400, Nathaniel McCallum wrote: > > +int main(int argc, char *argv[], char *envp[]) > > +{ > > + struct sgx_enclave_exception exception; > > + struct vdso_symtab symtab; > > + Elf64_Sym *eenter_sym; > > + uint64_t result = 0; > > + s

Re: WARNING: ODEBUG bug in get_signal

2020-08-27 Thread Oleg Nesterov
On 08/27, syzbot wrote: > > __debug_check_no_obj_freed lib/debugobjects.c:967 [inline] > debug_check_no_obj_freed+0x301/0x41c lib/debugobjects.c:998 > kmem_cache_free.part.0+0x16d/0x1f0 mm/slab.c:3692 > task_work_run+0xdd/0x190 kernel/task_work.c:141 I don't understand this trace, work->func(w

Re: [PATCH v2 1/2] usb typec: mt6360: Add support for mt6360 Type-C driver

2020-08-27 Thread 啟原黃
Chunfeng Yun 於 2020年8月27日 週四 下午4:05寫道: > > On Thu, 2020-08-27 at 12:50 +0800, cy_huang wrote: > > From: ChiYuan Huang > > > > Mediatek MT6360 is a multi-functional IC that includes USB Type-C. > > It works with Type-C Port Controller Manager to provide USB PD > > and USB Type-C functionalities. >

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