Re: [PATCH v4 1/2] memremap: rename MEMORY_DEVICE_DEVDAX to MEMORY_DEVICE_GENERIC

2020-08-31 Thread Andrew Morton
On Tue, 11 Aug 2020 11:44:46 +0200 Roger Pau Monne wrote: > This is in preparation for the logic behind MEMORY_DEVICE_DEVDAX also > being used by non DAX devices. Acked-by: Andrew Morton . Please add it to the Xen tree when appropriate. (I'm not sure what David means by "separate type", but we

Re: [PATCH net-next v2 0/3] hinic: add debugfs support

2020-08-31 Thread David Miller
From: Luo bin Date: Fri, 28 Aug 2020 11:37:45 +0800 > add debugfs node for querying sq/rq info and function table Series applied, thanks.

Re: [PATCH v6 2/2] drm: panel: Add novatek nt36672a panel driver

2020-08-31 Thread Bjorn Andersson
On Mon 31 Aug 13:02 UTC 2020, Sumit Semwal wrote: > Novatek NT36672a is a generic DSI IC that drives command and video mode > panels. Add the driver for it. > > Right now adding support for some Poco F1 phones that have an LCD panel > from Tianma connected with this IC, with a resolution of 1080x

Re: [RFC PATCH 0/2] mm/gup: fix gup_fast with dynamic page table folding

2020-08-31 Thread Andrew Morton
On Mon, 31 Aug 2020 13:53:36 +0200 Christian Borntraeger wrote: > > > On 28.08.20 16:03, Gerald Schaefer wrote: > have some feedback soon if option 1 or option 2 would be acceptable > from a common code perspective. Andrew, who of the mm people would > be the right one to decide? Jason and

Re: KASAN: use-after-free Write in rtl_fw_do_work

2020-08-31 Thread Brooke Basile
On 8/31/20 9:30 AM, Hillf Danton wrote: Mon, 31 Aug 2020 04:48:15 -0700 syzbot found the following issue on: HEAD commit:3ed8e1c2 usb: typec: tcpm: Migrate workqueue to RT priorit.. git tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing console output:

Re: [PATCH v2 0/4] qla2xxx: A couple crash fixes

2020-08-31 Thread Martin Wilck
On Mon, 2020-08-31 at 18:18 +0200, Daniel Wagner wrote: > changes since v1: > > - added dummy warn function to patch#1 > - added log entry to patch#4 > > as suggested by Martin > > > > Initial cover letter: > > The first crash we observed is due memory corruption in the srb > memory > pool.

[GIT PULL] Documentation fixes

2020-08-31 Thread Jonathan Corbet
The following changes since commit 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5: Linux 5.9-rc1 (2020-08-16 13:04:57 -0700) are available in the Git repository at: git://git.lwn.net/linux.git tags/docs-5.9-3 for you to fetch changes up to 92001bc0365a144783f8f3108be94e74baf61011: Documentatio

Re: [PATCH v3 3/3] bio: convert get_user_pages_fast() --> pin_user_pages_fast()

2020-08-31 Thread John Hubbard
On 8/31/20 9:52 AM, Ira Weiny wrote: On Mon, Aug 31, 2020 at 12:14:39AM -0700, John Hubbard wrote: @@ -1113,8 +1113,8 @@ int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter) } else { if (is_bvec) ret = __bio_i

Re: linux-next: build failure after upgrading sphinx

2020-08-31 Thread Jonathan Corbet
On Thu, 27 Aug 2020 14:50:17 +1000 Stephen Rothwell wrote: > Today I upgraded ot sphinx v3.2.1 and got the following error from > "make htmldocs": > > Running Sphinx v3.2.1 > enabling CJK for LaTeX builder > > Extension error: > Could not import extension cdomain (exception: cannot import name

Re: [PATCH] netlink: policy: correct validation type check

2020-08-31 Thread David Miller
From: Johannes Berg Date: Mon, 31 Aug 2020 20:28:05 +0200 > From: Johannes Berg > > In the policy export for binary attributes I erroneously used > a != NLA_VALIDATE_NONE comparison instead of checking for the > two possible values, which meant that if a validation function > pointer ended up a

Re: [PATCH] iio: sx9310: Prefer async probe

2020-08-31 Thread Doug Anderson
Hi, On Sat, Aug 29, 2020 at 10:18 AM Jonathan Cameron wrote: > > On Sat, 29 Aug 2020 09:56:41 -0700 > Doug Anderson wrote: > > > Hi, > > > > On Sat, Aug 29, 2020 at 8:12 AM Jonathan Cameron wrote: > > > > > > On Fri, 28 Aug 2020 17:01:18 -0700 > > > Douglas Anderson wrote: > > > > > > > On one

Re: [PATCH net-next v3 2/3] hinic: add support to query rq info

2020-08-31 Thread Jakub Kicinski
On Sat, 29 Aug 2020 08:55:19 +0800 Luo bin wrote: > add debugfs node for querying rq info, for example: > cat /sys/kernel/debug/hinic/:15:00.0/RQs/0x0/rq_hw_pi > > Signed-off-by: Luo bin Acked-by: Jakub Kicinski

Re: [PATCH v3 0/3] add fault injection to user memory access

2020-08-31 Thread Andrey Konovalov
On Mon, Aug 31, 2020 at 8:32 PM Andrew Morton wrote: > > On Mon, 31 Aug 2020 17:17:30 + albert.li...@gmail.com wrote: > > > The goal of this series is to improve testing of fault-tolerance in > > usages of user memory access functions, by adding support for fault > > injection. > > Does anyone

Re: [PATCH net-next v3 1/3] hinic: add support to query sq info

2020-08-31 Thread Jakub Kicinski
On Sat, 29 Aug 2020 08:55:18 +0800 Luo bin wrote: > add debugfs node for querying sq info, for example: > cat /sys/kernel/debug/hinic/:15:00.0/SQs/0x0/sq_pi > > Signed-off-by: Luo bin Acked-by: Jakub Kicinski

Re: [PATCH] soundwire: fix error handling

2020-08-31 Thread Tom Rix
On 8/31/20 11:39 AM, Nick Desaulniers wrote: > On Mon, Aug 31, 2020 at 11:20 AM Tom Rix wrote: >> >> On 8/31/20 10:48 AM, Nick Desaulniers wrote: >>> On Mon, Aug 31, 2020 at 10:47 AM Nick Desaulniers >>> wrote: On Sat, Aug 29, 2020 at 8:35 AM wrote: > From: Tom Rix > > clang

[PATCH v3] Documentation/x86: Add documentation for /proc/cpuinfo feature flags

2020-08-31 Thread Kyung Min Park
/proc/cpuinfo shows features which the kernel supports. Some of these flags are derived from CPUID, and others are derived from other sources, including some that are entirely software-based. Currently, there is not any documentation in the kernel about how /proc/cpuinfo flags are generated and wha

Re: Broadcom WiFi SDIO performance regression after commit "mmc: sdhci: Remove finish_tasklet"

2020-08-31 Thread Dmitry Osipenko
31.08.2020 18:08, Adrian Hunter пишет: > On 27/08/20 12:36 pm, Dmitry Osipenko wrote: >> 27.08.2020 09:45, Adrian Hunter пишет: >>> On 27/08/20 9:07 am, Dmitry Osipenko wrote: Hello! I was debugging WiFi performance problems on Acer A500 tablet device that has BCM4329 WiFi chip

Re: [PATCH 5/6] Documentation: tracing: Add %return suffix description

2020-08-31 Thread Randy Dunlap
On 8/31/20 5:46 AM, Masami Hiramatsu wrote: > Add a description of the %return suffix option for kprobe tracer. > > Signed-off-by: Masami Hiramatsu > --- > Documentation/trace/kprobetrace.rst |2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/Documentation/trace/kprobetrace.rst > b/

[RFC PATCH 1/2] dma-direction: Add DMA_DIR_COMPAT() macro to test direction compability

2020-08-31 Thread Leonardo Bras
Given a existing mapping with 'current' direction, and a 'wanted' direction for using that mapping, check if 'wanted' is satisfied by 'current'. current accepts DMA_BIDIRECTIONAL DMA_BIDIRECTIONAL, DMA_TO_DEVICE, DMA_FROM_DEVICE, DMA_NONE DMA_TO_DEVICE

[RFC PATCH 0/2] DMA pagecache

2020-08-31 Thread Leonardo Bras
This RFC improves the performance of indirect mapping on all tested DMA usages, based on a mlx5 device, ranging from 64k packages to 1-byte packages, from 1 thread to 64 threads. In all workloads tested, the performance of indirect mapping gets very near to direct mapping case. The whole thing is

[RFC PATCH 2/2] powerpc/kernel/iommu: Introduce IOMMU DMA pagecache

2020-08-31 Thread Leonardo Bras
In pseries, mapping a DMA page for a cpu memory range requires a H_PUT_TCE* hypercall, and unmapping requires a H_STUFF_TCE hypercall. When doing a lot of I/O, a thread can spend a lot of time doing such hcalls, specially when a DMA mapping don't get reused. The purpose of this change is to introd

Re: [PATCH v2 28/47] staging: vchi: Get rid of vchiq_shim's message callback

2020-08-31 Thread Nicolas Saenz Julienne
Hi Jacopo, sorry if I'm a little late with my replies but I'm on vacation. I'll be back Sept 7th, but wanted to reply since I don't want to stop your work. On Fri, 2020-08-28 at 16:31 +0200, Jacopo Mondi wrote: > Hi Nicolas, > >I'm working on a v2 of the bcm2835-isp support which was sent alo

Re: Warning on Kernel 5.9.0-rc1 on PowerBook G4 (ppc32), bisected to a5c3b9ffb0f4

2020-08-31 Thread Larry Finger
On 8/31/20 5:46 AM, Anshuman Khandual wrote: On 08/29/2020 06:40 AM, Larry Finger wrote: In kernel 5.9.0-rc1 on a PowerBook G4 (ppc32), several warnings of the following type are logged:  [ cut here ]  WARNING: CPU: 0 PID: 1 at arch/powerpc/mm/pgtable.c:185 set_pte_

Re: [PATCH] soundwire: fix error handling

2020-08-31 Thread Nick Desaulniers
On Mon, Aug 31, 2020 at 11:20 AM Tom Rix wrote: > > > On 8/31/20 10:48 AM, Nick Desaulniers wrote: > > On Mon, Aug 31, 2020 at 10:47 AM Nick Desaulniers > > wrote: > >> On Sat, Aug 29, 2020 at 8:35 AM wrote: > >>> From: Tom Rix > >>> > >>> clang static analysis flags this problem > > Also, Tom,

Re: [PATCH 0/5] qspi binding and DTS fixes

2020-08-31 Thread Florian Fainelli
On 8/27/2020 11:18 AM, Florian Fainelli wrote: Hi all, This patch series fixes incorrectly defined compatible strings for the Broadcom QSPI controller which resulted in the strings not being ordered from most to least compatible. We will need to apply some changes to the spi-bcm-qspi.c drive

Re: [PATCH next v2 0/3] soc: ti: k3: ringacc: add am65x sr2.0 support

2020-08-31 Thread santosh . shilimkar
On 8/29/20 11:41 AM, Grygorii Strashko wrote: Hi Santosh, I've rebased on top of linux-next and identified merge conflict of patch 3 with commit 6da45875fa17 ("arm64: dts: k3-am65: Update the RM resource types") in -next. --- This series adds support for the TI AM65x SR2.0 SoC Ringacc which ha

[PATCH] clk: renesas: cpg-mssr: Rename vsp1-(sy|rt) clocks to vsp(s|r)

2020-08-31 Thread Lad Prabhakar
VSP1 instances VSPS (which stands for "VSP Standard") and VSPR (which stands for "VSP for Resizing") were wrongly named as "vsp1-sy" and "vsp1-rt". The clock section in the SoC datasheets misunderstood the abbreviations as meaning VSP System and VSP Realtime, and named the corresponding clocks VSP1

Re: [GIT PULL] MMC fixes for v5.9-rc4

2020-08-31 Thread pr-tracker-bot
The pull request you sent on Mon, 31 Aug 2020 13:11:41 +0200: > git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git tags/mmc-v5.9-rc1 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/59815d6d1c773f3609ef9da50881a47e9cba9c25 Thank you! -- Deet-doot-dot, I am a b

[PATCHv2] arm64: dts: diamonmesa: add device tree for Intel Diamond Mesa

2020-08-31 Thread richard . gong
From: Richard Gong Add the device tree files for Intel Diamond Mesa SoC Signed-off-by: Richard Gong --- v2: use socfpga_agilex.dtsi rather than socfpga_diamondmesa.dtsi --- arch/arm64/Kconfig.platforms | 5 ++ arch/arm64/boot/dts/intel/Makefile| 1 + arch

Re: [PATCH] mmc: meson-gx: use wrapper to avoid accessing internal vars

2020-08-31 Thread Kevin Hilman
Wolfram Sang writes: > Signed-off-by: Wolfram Sang Reviewed-by: Kevin Hilman > --- > > Only buildtested. Found while analyzing retune-handling in the core. > > drivers/mmc/host/meson-gx-mmc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/meson-gx-m

Re: [PATCH v10 16/16] s390/vfio-ap: update docs to include dynamic config support

2020-08-31 Thread Tony Krowiak
On 8/25/20 6:45 AM, Cornelia Huck wrote: On Fri, 21 Aug 2020 15:56:16 -0400 Tony Krowiak wrote: Update the documentation in vfio-ap.rst to include information about the AP dynamic configuration support (i.e., hot plug of adapters, domains and control domains via the matrix mediated device's

Re: [PATCH v5 1/6] pinctrl: qcom: Set IRQCHIP_SET_TYPE_MASKED and IRQCHIP_MASK_ON_SUSPEND flags

2020-08-31 Thread Bjorn Andersson
On Sat 22 Aug 16:16 UTC 2020, Maulik Shah wrote: > Add irqchip specific flags for msmgpio irqchip to mask non wakeirqs during > suspend and mask before setting irq type. > > Masking before changing type should make sure any spurious interrupt is not > detected during this operation. > This seem

Re: [PATCH v2 0/3] add fault injection to user memory access

2020-08-31 Thread Alexander Potapenko
Hi Andrew, On Mon, Aug 31, 2020 at 6:27 PM Akinobu Mita wrote: > > Andrew, > > Could you take a look at this series, and consider taking in -mm tree? Please consider picking v3 patches that address Peter's comments instead. > > 2020年9月1日(火) 0:49 Alexander Potapenko : > > > > > This series looks

Re: [PATCH v3 0/3] add fault injection to user memory access

2020-08-31 Thread Andrew Morton
On Mon, 31 Aug 2020 17:17:30 + albert.li...@gmail.com wrote: > The goal of this series is to improve testing of fault-tolerance in > usages of user memory access functions, by adding support for fault > injection. Does anyone actually plan to use this feature, on an ongoing basis? It's the s

Re: [PATCH v2 8/9] frame: Make unwind hints definitions available to other architectures

2020-08-31 Thread Josh Poimboeuf
On Tue, Aug 25, 2020 at 01:12:04PM +0100, Julien Thierry wrote: > > > On 7/30/20 3:56 PM, Josh Poimboeuf wrote: > > On Thu, Jul 30, 2020 at 10:46:51AM +0100, Julien Thierry wrote: > > > Unwind hints are useful to provide objtool with information about stack > > > states in non-standard functions/

[PATCH] netlink: policy: correct validation type check

2020-08-31 Thread Johannes Berg
From: Johannes Berg In the policy export for binary attributes I erroneously used a != NLA_VALIDATE_NONE comparison instead of checking for the two possible values, which meant that if a validation function pointer ended up aliasing the min/max as negatives, we'd hit a warning in nla_get_range_un

[PATCH v4] iomap: fix WARN_ON_ONCE() from unprivileged users

2020-08-31 Thread Qian Cai
It is trivial to trigger a WARN_ON_ONCE(1) in iomap_dio_actor() by unprivileged users which would taint the kernel, or worse - panic if panic_on_warn or panic_on_taint is set. Hence, just convert it to pr_warn_ratelimited() to let users know their workloads are racing. Thank Dave Chinner for the in

[PATCH] arch: vdso: add vdso linker script to 'targets' instead of extra-y

2020-08-31 Thread Masahiro Yamada
The vdso linker script is preprocessed on demand. Adding it to 'targets' is enough to include the .cmd file. Signed-off-by: Masahiro Yamada --- arch/arm64/kernel/vdso/Makefile | 2 +- arch/arm64/kernel/vdso32/Makefile | 2 +- arch/nds32/kernel/vdso/Makefile | 2 +- arch/powerpc/kernel

Re: [PATCH v3 5/6] IMA: add hook to measure critical data from kernel components

2020-08-31 Thread Mimi Zohar
> diff --git a/security/integrity/ima/ima_main.c > b/security/integrity/ima/ima_main.c > index 52cbbc1f7ea2..a889bf40cb7e 100644 > --- a/security/integrity/ima/ima_main.c > +++ b/security/integrity/ima/ima_main.c > @@ -869,6 +869,30 @@ void ima_kexec_cmdline(int kernel_fd, const void *buf, > int

[PATCH v3 1/3] dyndbg: give %3u width in pr-format, cosmetic only

2020-08-31 Thread Jim Cromie
Specify the print-width so log entries line up nicely. no functional changes. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 1d012e597cc3..01b7d0210412 100644 --- a/lib/dynamic

[PATCH v3 0/3] dyndbg: cleanups for 5.9

2020-08-31 Thread Jim Cromie
3 items for v5.9-rc fixed width format %3u in debug output - cosmetic fix export: ddebug_exec_queries -> dynamic_debug_exec_queries fix format="foo bar" parsing Jim Cromie (3): dyndbg: give %3u width in pr-format, cosmetic only dyndbg: refine export, rename to dynamic_debug_exec_queries(

[PATCH v3 2/3] dyndbg: refine export, rename to dynamic_debug_exec_queries()

2020-08-31 Thread Jim Cromie
commit 4c0d77828d4f ("dyndbg: export ddebug_exec_queries") had a few problems: - broken non DYNAMIC_DEBUG_CORE configs, sparse warning - the exported function modifies query string, breaks on RO strings. - func name follows internal convention, shouldn't be exposed as is. 1st is fixed in heade

[PATCH v3 3/3] dyndbg: fix problem parsing format="foo bar"

2020-08-31 Thread Jim Cromie
commit 14775b049642 ("dyndbg: accept query terms like file=bar and module=foo") added the combined keyword=value parsing poorly; revert most of it, keeping the keyword & arg change. Instead, fix the tokenizer for the new input, by terminating the keyword (an unquoted word) on '=' as well as space

Re: kernel BUG at fs/ext4/inode.c:LINE!

2020-08-31 Thread Linus Torvalds
On Mon, Aug 31, 2020 at 3:03 AM Jan Kara wrote: > > On Fri 28-08-20 12:07:55, Jan Kara wrote: > > > > Doh, so this is: > > > > wait_on_page_writeback(page); > > >>> BUG_ON(PageWriteback(page)); > > > > in mpage_prepare_extent_to_map(). So we have PageWri

Re: [PATCH v8 2/3] Teach SELinux about anonymous inodes

2020-08-31 Thread Lokesh Gidra
On Mon, Aug 31, 2020 at 11:05 AM Stephen Smalley wrote: > > On Thu, Aug 27, 2020 at 2:35 AM Lokesh Gidra wrote: > > > > From: Daniel Colascione > > > > This change uses the anon_inodes and LSM infrastructure introduced in > > the previous patch to give SELinux the ability to control > > anonymou

[PATCH kcsan 7/9] tools/memory-model: Move Documentation description to Documentation/README

2020-08-31 Thread paulmck
From: "Paul E. McKenney" This commit moves the descriptions of the files residing in tools/memory-model/Documentation to a README file in that directory, leaving behind the description of tools/memory-model/Documentation/README itself. After this change, tools/memory-model/Documentation/README p

[PATCH kcsan 6/9] tools/memory-model: Expand the cheatsheet.txt notion of relaxed

2020-08-31 Thread paulmck
From: "Paul E. McKenney" This commit adds a key entry enumerating the various types of relaxed operations. Signed-off-by: Paul E. McKenney --- tools/memory-model/Documentation/cheatsheet.txt | 27 ++--- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/tools/m

Re: [PATCH] soundwire: fix error handling

2020-08-31 Thread Tom Rix
On 8/31/20 10:48 AM, Nick Desaulniers wrote: > On Mon, Aug 31, 2020 at 10:47 AM Nick Desaulniers > wrote: >> On Sat, Aug 29, 2020 at 8:35 AM wrote: >>> From: Tom Rix >>> >>> clang static analysis flags this problem > Also, Tom, please use ./scripts/get_maintainer.pl on your patches to > CC our

[PATCH kcsan 4/9] tools/memory-model: Improve litmus-test documentation

2020-08-31 Thread paulmck
From: "Paul E. McKenney" The current LKMM documentation says very little about litmus tests, and worse yet directs people to the herd7 documentation for more information. Now, the herd7 documentation is quite voluminous and educational, but it is intended for people creating and modifying memory

[PATCH kcsan 8/9] tools/memory-model: Document categories of ordering primitives

2020-08-31 Thread paulmck
From: "Paul E. McKenney" The Linux kernel has a number of categories of ordering primitives, which are recorded in the LKMM implementation and hinted at by cheatsheet.txt. But there is no overview of these categories, and such an overview is needed in order to understand multithreaded LKMM litmus

[PATCH kcsan 5/9] tools/memory-model: Add a simple entry point document

2020-08-31 Thread paulmck
From: "Paul E. McKenney" Current LKMM documentation assumes that the reader already understands concurrency in the Linux kernel, which won't necessarily always be the case. This commit supplies a simple.txt file that provides a starting point for someone who is new to concurrency in the Linux ke

[PATCH kcsan 9/9] tools/memory-model: Document locking corner cases

2020-08-31 Thread paulmck
From: "Paul E. McKenney" Most Linux-kernel uses of locking are straightforward, but there are corner-case uses that rely on less well-known aspects of the lock and unlock primitives. This commit therefore adds a locking.txt and litmus tests in Documentation/litmus-tests/locking to explain these

[PATCH kcsan 1/9] docs: fix references for DMA*.txt files

2020-08-31 Thread paulmck
From: Mauro Carvalho Chehab As we moved those files to core-api, fix references to point to their newer locations. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paul E. McKenney --- Documentation/memory-barriers.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH kcsan 3/9] tools/memory-model: Update recipes.txt prime_numbers.c path

2020-08-31 Thread paulmck
From: "Paul E. McKenney" The expand_to_next_prime() and next_prime_number() functions have moved from lib/prime_numbers.c to lib/math/prime_numbers.c, so this commit updates recipes.txt to reflect this change. Signed-off-by: Paul E. McKenney --- tools/memory-model/Documentation/recipes.txt | 4

[PATCH kcsan 2/9] Replace HTTP links with HTTPS ones: LKMM

2020-08-31 Thread paulmck
From: "Alexander A. Klimov" Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://

[PATCH memory-model 0/9] LKMM updates for v5.10

2020-08-31 Thread Paul E. McKenney
Hello! This series provides LKMM updates: 1. fix references for DMA*.txt files. 2. Replace HTTP links with HTTPS ones: LKMM. 3. tools/memory-model: Update recipes.txt prime_numbers.c path. 4. tools/memory-model: Improve litmus-test documentation. 5. tools/memory-model

[PATCH kcsan 10/19] asm-generic/bitops: Use instrument_read_write() where appropriate

2020-08-31 Thread paulmck
From: Marco Elver Use the new instrument_read_write() where appropriate. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney --- include/asm-generic/bitops/instrumented-atomic.h | 6 +++--- include/asm-generic/bitops/instrumented-lock.h | 2 +

[PATCH kcsan 15/19] kcsan: Show message if enabled early

2020-08-31 Thread paulmck
From: Marco Elver Show a message in the kernel log if KCSAN was enabled early. Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney --- kernel/kcsan/core.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/kernel/kcsan/core.c b/kernel/kcsan/core.c index 99e5044

[PATCH kcsan 02/19] objtool: Add atomic builtin TSAN instrumentation to uaccess whitelist

2020-08-31 Thread paulmck
From: Marco Elver Adds the new TSAN functions that may be emitted for atomic builtins to objtool's uaccess whitelist. Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney Cc: Josh Poimboeuf Cc: Peter Zijlstra --- tools/objtool/check.c | 50 +

[PATCH kcsan 04/19] kcsan: Support compounded read-write instrumentation

2020-08-31 Thread paulmck
From: Marco Elver Add support for compounded read-write instrumentation if supported by the compiler. Adds the necessary instrumentation functions, and a new type which is used to generate a more descriptive report. Furthermore, such compounded memory access instrumentation is excluded from the

[PATCH kcsan 12/19] kcsan: Simplify debugfs counter to name mapping

2020-08-31 Thread paulmck
From: Marco Elver Simplify counter ID to name mapping by using an array with designated inits. This way, we can turn a run-time BUG() into a compile-time static assertion failure if a counter name is missing. No functional change intended. Signed-off-by: Marco Elver Signed-off-by: Paul E. McKe

[PATCH v8 0/7] IOMMU user API enhancement

2020-08-31 Thread Jacob Pan
IOMMU user API header was introduced to support nested DMA translation and related fault handling. The current UAPI data structures consist of three areas that cover the interactions between host kernel and guest: - fault handling - cache invalidation - bind guest page tables, i.e. guest PASID

[PATCH kcsan 13/19] kcsan: Simplify constant string handling

2020-08-31 Thread paulmck
From: Marco Elver Simplify checking prefixes and length calculation of constant strings. For the former, the kernel provides str_has_prefix(), and the latter we should just use strlen("..") because GCC and Clang have optimizations that optimize these into constants. No functional change intended

[PATCH kcsan 14/19] kcsan: Remove debugfs test command

2020-08-31 Thread paulmck
From: Marco Elver Remove the debugfs test command, as it is no longer needed now that we have the KUnit+Torture based kcsan-test module. This is to avoid confusion around how KCSAN should be tested, as only the kcsan-test module is maintained. Signed-off-by: Marco Elver Signed-off-by: Paul E. M

[PATCH kcsan 16/19] kcsan: Use pr_fmt for consistency

2020-08-31 Thread paulmck
From: Marco Elver Use the same pr_fmt throughout for consistency. [ The only exception is report.c, where the format must be kept precisely as-is. ] Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney --- kernel/kcsan/debugfs.c | 8 +--- kernel/kcsan/selftest.c | 8 +--- 2 fil

[PATCH kcsan 19/19] kcsan: Use tracing-safe version of prandom

2020-08-31 Thread paulmck
From: Marco Elver In the core runtime, we must minimize any calls to external library functions to avoid any kind of recursion. This can happen even though instrumentation is disabled for called functions, but tracing is enabled. Most recently, prandom_u32() added a tracepoint, which can cause p

[PATCH kcsan 17/19] kcsan: Optimize debugfs stats counters

2020-08-31 Thread paulmck
From: Marco Elver Remove kcsan_counter_inc/dec() functions, as they perform no other logic, and are no longer needed. This avoids several calls in kcsan_setup_watchpoint() and kcsan_found_watchpoint(), as well as lets the compiler warn us about potential out-of-bounds accesses as the array's siz

Re: [PATCH v5 2/6] pinctrl: qcom: Use return value from irq_set_wake() call

2020-08-31 Thread Bjorn Andersson
On Sat 22 Aug 16:16 UTC 2020, Maulik Shah wrote: > msmgpio irqchip was not using return value of irq_set_irq_wake() callback > since previously GIC-v3 irqchip neither had IRQCHIP_SKIP_SET_WAKE flag nor > it implemented .irq_set_wake callback. This lead to irq_set_irq_wake() > return error -ENXIO.

[PATCH kcsan 18/19] bitops, kcsan: Partially revert instrumentation for non-atomic bitops

2020-08-31 Thread paulmck
From: Marco Elver Previous to the change to distinguish read-write accesses, when CONFIG_KCSAN_ASSUME_PLAIN_WRITES_ATOMIC=y is set, KCSAN would consider the non-atomic bitops as atomic. We want to partially revert to this behaviour, but with one important distinction: report racing modifications,

[PATCH v8 1/7] docs: IOMMU user API

2020-08-31 Thread Jacob Pan
IOMMU UAPI is newly introduced to support communications between guest virtual IOMMU and host IOMMU. There has been lots of discussions on how it should work with VFIO UAPI and userspace in general. This document is intended to clarify the UAPI design and usage. The mechanics of how future extensi

[PATCH v8 3/7] iommu/uapi: Introduce enum type for PASID data format

2020-08-31 Thread Jacob Pan
There can be multiple vendor-specific PASID data formats used in UAPI structures. This patch adds enum type with a last entry which makes range checking much easier. Suggested-by: Alex Williamson Reviewed-by: Eric Auger Signed-off-by: Jacob Pan --- include/uapi/linux/iommu.h | 8 ++-- 1 fi

[PATCH v8 5/7] iommu/uapi: Rename uapi functions

2020-08-31 Thread Jacob Pan
User APIs such as iommu_sva_unbind_gpasid() may also be used by the kernel. Since we introduced user pointer to the UAPI functions, in-kernel callers cannot share the same APIs. In-kernel callers are also trusted, there is no need to validate the data. We plan to have two flavors of the same API f

[PATCH v8 6/7] iommu/uapi: Handle data and argsz filled by users

2020-08-31 Thread Jacob Pan
IOMMU user APIs are responsible for processing user data. This patch changes the interface such that user pointers can be passed into IOMMU code directly. Separate kernel APIs without user pointers are introduced for in-kernel users of the UAPI functionality. IOMMU UAPI data has a user filled args

[PATCH v8 4/7] iommu/uapi: Use named union for user data

2020-08-31 Thread Jacob Pan
IOMMU UAPI data size is filled by the user space which must be validated by the kernel. To ensure backward compatibility, user data can only be extended by either re-purpose padding bytes or extend the variable sized union at the end. No size change is allowed before the union. Therefore, the minim

[PATCH v8 2/7] iommu/uapi: Add argsz for user filled data

2020-08-31 Thread Jacob Pan
As IOMMU UAPI gets extended, user data size may increase. To support backward compatibiliy, this patch introduces a size field to each UAPI data structures. It is *always* the responsibility for the user to fill in the correct size. Padding fields are adjusted to ensure 8 byte alignment. Specific

[PATCH kcsan 11/19] locking/atomics: Use read-write instrumentation for atomic RMWs

2020-08-31 Thread paulmck
From: Marco Elver Use instrument_atomic_read_write() for atomic RMW ops. Cc: Will Deacon Cc: Boqun Feng Cc: Arnd Bergmann Cc: Acked-by: Peter Zijlstra (Intel) Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney --- include/asm-generic/atomic-instrumented.h | 330 +++---

[PATCH v8 7/7] iommu/vt-d: Check UAPI data processed by IOMMU core

2020-08-31 Thread Jacob Pan
IOMMU generic layer already does sanity checks on UAPI data for version match and argsz range based on generic information. This patch adjusts the following data checking responsibilities: - removes the redundant version check from VT-d driver - removes the check for vendor specific data size - ad

[PATCH kcsan 07/19] kcsan: Add missing CONFIG_KCSAN_IGNORE_ATOMICS checks

2020-08-31 Thread paulmck
From: Marco Elver Add missing CONFIG_KCSAN_IGNORE_ATOMICS checks for the builtin atomics instrumentation. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney --- kernel/kcsan/core.c | 30 ++ 1 file changed, 22 insertions(+),

[PATCH kcsan 06/19] kcsan: Skew delay to be longer for certain access types

2020-08-31 Thread paulmck
From: Marco Elver For compound instrumentation and assert accesses, skew the watchpoint delay to be longer if randomized. This is useful to improve race detection for such accesses. For compound accesses we should increase the delay as we've aggregated both read and write instrumentation. By giv

[PATCH kcsan 09/19] instrumented.h: Introduce read-write instrumentation hooks

2020-08-31 Thread paulmck
From: Marco Elver Introduce read-write instrumentation hooks, to more precisely denote an operation's behaviour. KCSAN is able to distinguish compound instrumentation, and with the new instrumentation we then benefit from improved reporting. More importantly, read-write compound operations shoul

[PATCH kcsan 08/19] kcsan: Test support for compound instrumentation

2020-08-31 Thread paulmck
From: Marco Elver Changes kcsan-test module to support checking reports that include compound instrumentation. Since we should not fail the test if this support is unavailable, we have to add a config variable that the test can use to decide what to check for. Acked-by: Peter Zijlstra (Intel) S

[PATCH kcsan 05/19] objtool, kcsan: Add __tsan_read_write to uaccess whitelist

2020-08-31 Thread paulmck
From: Marco Elver Adds the new __tsan_read_write compound instrumentation to objtool's uaccess whitelist. Acked-by: Peter Zijlstra (Intel) Cc: Josh Poimboeuf Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney --- tools/objtool/check.c | 5 + 1 file changed, 5 insertions(+) diff

[PATCH kcsan 03/19] kcsan: Add atomic builtin test case

2020-08-31 Thread paulmck
From: Marco Elver Adds test case to kcsan-test module, to test atomic builtin instrumentation works. Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney --- kernel/kcsan/kcsan-test.c | 63 +++ 1 file changed, 63 insertions(+) diff --git a/ke

[PATCH kcsan 01/19] kcsan: Add support for atomic builtins

2020-08-31 Thread paulmck
From: Marco Elver Some architectures (currently e.g. s390 partially) implement atomics using the compiler's atomic builtins (__atomic_*, __sync_*). To support enabling KCSAN on such architectures in future, or support experimental use of these builtins, implement support for them. We should also

[PATCH kcsan 0/19] KCSAN updates for v5.10

2020-08-31 Thread Paul E. McKenney
Hello! This series provides KCSAN updates: 1. Add support for atomic builtins. 2. Add atomic builtin TSAN instrumentation to uaccess whitelist. 3. Add atomic builtin test case. 4. Support compounded read-write instrumentation. 5. objtool, kcsan: Add __tsan_read_write

Re: [PATCH v3 4/5] cpufreq: intel_pstate: Add ->offline and ->online callbacks

2020-08-31 Thread Rafael J. Wysocki
On Thu, Aug 27, 2020 at 5:28 PM Rafael J. Wysocki wrote: > > From: "Rafael J. Wysocki" > > Add ->offline and ->online driver callbacks to prepare for taking a > CPU offline and to restore its working configuration when it goes > back online, respectively, to avoid invoking the ->init callback on

Re: [PATCH v3 4/6] IMA: add policy to measure critical data from kernel components

2020-08-31 Thread Mimi Zohar
On Thu, 2020-08-27 at 18:57 -0700, Tushar Sugandhi wrote: > There would be several candidate kernel components suitable for IMA > measurement. Not all of them would have support for IMA measurement. > Also, system administrators may not want to measure data for all of > them, even when they support

[PATCH tip/core/rcu 2/4] smp: Add source and destination CPUs to __call_single_data

2020-08-31 Thread paulmck
From: "Paul E. McKenney" This commit adds a destination CPU to __call_single_data, and is inspired by an earlier commit by Peter Zijlstra. This version adds #ifdef to permit use by 32-bit systems and supplying the destination CPU for all smp_call_function*() requests, not just smp_call_function_

Re: [Question] About SECCOMP issue for ILP32

2020-08-31 Thread Yury Norov
On Mon, Aug 31, 2020 at 5:48 AM Xiongfeng Wang wrote: > > Hi Yury, > Hi Xiongfeng, [restore CC list] Haven't seen this before. What kernel / glibc / ltp do you use? > We were testing the ILP32 feature and came accross a problem. Very apperaciate > it if you could give us some help ! > > We com

[PATCH tip/core/rcu 3/4] kernel/smp: Provide CSD lock timeout diagnostics

2020-08-31 Thread paulmck
From: "Paul E. McKenney" This commit causes csd_lock_wait() to emit diagnostics when a CPU fails to respond quickly enough to one of the smp_call_function() family of function calls. These diagnostics are enabled by a new CSD_LOCK_WAIT_DEBUG Kconfig option that depends on DEBUG_KERNEL. This com

[PATCH tip/core/rcu 4/4] smp: Make symbol 'csd_bug_count' static

2020-08-31 Thread paulmck
From: Wei Yongjun The sparse tool complains as follows: kernel/smp.c:107:10: warning: symbol 'csd_bug_count' was not declared. Should it be static? Because variable is not used outside of smp.c, this commit marks it static. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: P

[PATCH tip/core/rcu 1/4] lib: Add backtrace_idle parameter to force backtrace of idle CPUs

2020-08-31 Thread paulmck
From: "Paul E. McKenney" Currently, the nmi_cpu_backtrace() declines to produce backtraces for idle CPUs. This is a good choice in the common case in which problems are caused only by non-idle CPUs. However, there are occasionally situations in which idle CPUs are helping to cause problems. Th

[PATCH tip/core/rcu 0/4] Add smp_call_function() debugging for v5.10

2020-08-31 Thread Paul E. McKenney
Hello! This series adds debugging code for stalled smp_call_function() handlers: 1. Add backtrace_idle parameter to force backtrace of idle CPUs. 2. Add source and destination CPUs to __call_single_data. 3. kernel/smp: Provide CSD lock timeout diagnostics. 4. Make symbol 'c

[PATCH tip/core/rcu 06/13] rcu: Do full report for .need_qs for strict GPs

2020-08-31 Thread paulmck
From: "Paul E. McKenney" The rcu_preempt_deferred_qs_irqrestore() function is invoked at the end of an RCU read-side critical section (for example, directly from rcu_read_unlock()) and, if .need_qs is set, invokes rcu_qs() to report the new quiescent state. This works, except that rcu_qs() only

[PATCH tip/core/rcu 07/13] rcu: Attempt QS when CPU discovers GP for strict GPs

2020-08-31 Thread paulmck
From: "Paul E. McKenney" A given CPU normally notes a new grace period during one RCU_SOFTIRQ, but avoids reporting the corresponding quiescent state until some later RCU_SOFTIRQ. This leisurly approach improves efficiency by increasing the number of update requests served by each grace period,

Re: [PATCH] media: tc358743: initialize variable

2020-08-31 Thread Tom Rix
On 8/31/20 10:31 AM, Nick Desaulniers wrote: > On Sun, Aug 30, 2020 at 9:30 AM wrote: >> From: Tom Rix >> >> clang static analysis flags this error >> >> tc358743.c:1468:9: warning: Branch condition evaluates >> to a garbage value >> return handled ? IRQ_HANDLED : IRQ_NONE; >>

[PATCH tip/core/rcu 05/13] rcu: Always set .need_qs from __rcu_read_lock() for strict GPs

2020-08-31 Thread paulmck
From: "Paul E. McKenney" The ->rcu_read_unlock_special.b.need_qs field in the task_struct structure indicates that the RCU core needs a quiscent state from the corresponding task. The __rcu_read_unlock() function checks this (via an eventual call to rcu_preempt_deferred_qs_irqrestore()), and if

[PATCH tip/core/rcu 09/13] rcu: IPI all CPUs at GP end for strict GPs

2020-08-31 Thread paulmck
From: "Paul E. McKenney" Currently, each CPU discovers the end of a given grace period on its own time, which is again good for efficiency but bad for fast grace periods, given that it is things like kfree() within the RCU callbacks that will cause trouble for pointers leaked from RCU read-side c

[PATCH tip/core/rcu 03/13] rcu: Restrict default jiffies_till_first_fqs for strict RCU GPs

2020-08-31 Thread paulmck
From: "Paul E. McKenney" If there are idle CPUs, RCU's grace-period kthread will wait several jiffies before even thinking about polling them. This promotes efficiency, which is normally a good thing, but when the kernel has been built with CONFIG_RCU_STRICT_GRACE_PERIOD=y, we care more about sh

[PATCH tip/core/rcu 01/13] rcu: Add Kconfig option for strict RCU grace periods

2020-08-31 Thread paulmck
From: "Paul E. McKenney" People running automated tests have asked for a way to make RCU minimize grace-period duration in order to increase the probability of KASAN detecting a pointer being improperly leaked from an RCU read-side critical section, for example, like this: rcu_read_lock(

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