[PATCH v7 08/19] mm: memcg/slab: save obj_cgroup for non-root slab objects

2020-06-23 Thread Roman Gushchin
Store the obj_cgroup pointer in the corresponding place of page->obj_cgroups for each allocated non-root slab object. Make sure that each allocated object holds a reference to obj_cgroup. Objcg pointer is obtained from the memcg->objcg dereferencing in memcg_kmem_get_cache() and passed from pre_a

[PATCH AUTOSEL 5.4 08/24] net: alx: fix race condition in alx_remove

2020-06-23 Thread Sasha Levin
From: Zekun Shen [ Upstream commit e89df5c4322c1bf495f62d74745895b5fd2a4393 ] There is a race condition exist during termination. The path is alx_stop and then alx_remove. An alx_schedule_link_check could be called before alx_stop by interrupt handler and invoke alx_link_check later. Alx_stop fr

[PATCH v7 00/19] The new cgroup slab memory controller

2020-06-23 Thread Roman Gushchin
This is v7 of the slab cgroup controller rework. The patchset moves the accounting from the page level to the object level. It allows to share slab pages between memory cgroups. This leads to a significant win in the slab utilization (up to 45%) and the corresponding drop in the total kernel memor

[PATCH v7 03/19] mm: memcg: convert vmstat slab counters to bytes

2020-06-23 Thread Roman Gushchin
In order to prepare for per-object slab memory accounting, convert NR_SLAB_RECLAIMABLE and NR_SLAB_UNRECLAIMABLE vmstat items to bytes. To make it obvious, rename them to NR_SLAB_RECLAIMABLE_B and NR_SLAB_UNRECLAIMABLE_B (similar to NR_KERNEL_STACK_KB). Internally global and per-node counters are

[PATCH v7 13/19] mm: memcg/slab: simplify memcg cache creation

2020-06-23 Thread Roman Gushchin
Because the number of non-root kmem_caches doesn't depend on the number of memory cgroups anymore and is generally not very big, there is no more need for a dedicated workqueue. Also, as there is no more need to pass any arguments to the memcg_create_kmem_cache() except the root kmem_cache, it's p

[PATCH v7 10/19] mm: memcg/slab: deprecate memory.kmem.slabinfo

2020-06-23 Thread Roman Gushchin
Deprecate memory.kmem.slabinfo. An empty file will be presented if corresponding config options are enabled. The interface is implementation dependent, isn't present in cgroup v2, and is generally useful only for core mm debugging purposes. In other words, it doesn't provide any value for the ab

[PATCH v7 05/19] mm: memcontrol: decouple reference counting from page accounting

2020-06-23 Thread Roman Gushchin
From: Johannes Weiner The reference counting of a memcg is currently coupled directly to how many 4k pages are charged to it. This doesn't work well with Roman's new slab controller, which maintains pools of objects and doesn't want to keep an extra balance sheet for the pages backing those obje

[PATCH AUTOSEL 5.4 04/24] riscv/atomic: Fix sign extension for RV64I

2020-06-23 Thread Sasha Levin
From: Nathan Huckleberry [ Upstream commit 6c58f25e6938c073198af8b1e1832f83f8f0df33 ] The argument passed to cmpxchg is not guaranteed to be sign extended, but lr.w sign extends on RV64I. This makes cmpxchg fail on clang built kernels when __old is negative. To fix this, we just cast __old to l

[PATCH v7 09/19] mm: memcg/slab: charge individual slab objects instead of pages

2020-06-23 Thread Roman Gushchin
Switch to per-object accounting of non-root slab objects. Charging is performed using obj_cgroup API in the pre_alloc hook. Obj_cgroup is charged with the size of the object and the size of metadata: as now it's the size of an obj_cgroup pointer. If the amount of memory has been charged successfu

[PATCH v7 16/19] mm: memcg/slab: remove redundant check in memcg_accumulate_slabinfo()

2020-06-23 Thread Roman Gushchin
memcg_accumulate_slabinfo() is never called with a non-root kmem_cache as a first argument, so the is_root_cache(s) check is redundant and can be removed without any functional change. Signed-off-by: Roman Gushchin Reviewed-by: Vlastimil Babka Reviewed-by: Shakeel Butt --- mm/slab_common.c | 3

[PATCH v7 02/19] mm: memcg: prepare for byte-sized vmstat items

2020-06-23 Thread Roman Gushchin
To implement per-object slab memory accounting, we need to convert slab vmstat counters to bytes. Actually, out of 4 levels of counters: global, per-node, per-memcg and per-lruvec only two last levels will require byte-sized counters. It's because global and per-node counters will be counting the

[PATCH v7 17/19] mm: memcg/slab: use a single set of kmem_caches for all allocations

2020-06-23 Thread Roman Gushchin
Instead of having two sets of kmem_caches: one for system-wide and non-accounted allocations and the second one shared by all accounted allocations, we can use just one. The idea is simple: space for obj_cgroup metadata can be allocated on demand and filled only for accounted allocations. It allo

Re: [RFC PATCH v2] xen/privcmd: Convert get_user_pages*() to pin_user_pages*()

2020-06-23 Thread Boris Ostrovsky
On 6/23/20 7:58 AM, Souptick Joarder wrote: > In 2019, we introduced pin_user_pages*() and now we are converting > get_user_pages*() to the new API as appropriate. [1] & [2] could > be referred for more information. This is case 5 as per document [1]. > > As discussed, pages need to be marked as di

[PATCH v7 11/19] mm: memcg/slab: move memcg_kmem_bypass() to memcontrol.h

2020-06-23 Thread Roman Gushchin
To make the memcg_kmem_bypass() function available outside of the memcontrol.c, let's move it to memcontrol.h. The function is small and nicely fits into static inline sort of functions. It will be used from the slab code. Signed-off-by: Roman Gushchin Reviewed-by: Vlastimil Babka Reviewed-by:

[PATCH v7 14/19] mm: memcg/slab: remove memcg_kmem_get_cache()

2020-06-23 Thread Roman Gushchin
The memcg_kmem_get_cache() function became really trivial, so let's just inline it into the single call point: memcg_slab_pre_alloc_hook(). It will make the code less bulky and can also help the compiler to generate a better code. Signed-off-by: Roman Gushchin Reviewed-by: Vlastimil Babka Revie

[PATCH v7 18/19] kselftests: cgroup: add kernel memory accounting tests

2020-06-23 Thread Roman Gushchin
Add some tests to cover the kernel memory accounting functionality. These are covering some issues (and changes) we had recently. 1) A test which allocates a lot of negative dentries, checks memcg slab statistics, creates memory pressure by setting memory.max to some low value and checks th

[PATCH v7 15/19] mm: memcg/slab: deprecate slab_root_caches

2020-06-23 Thread Roman Gushchin
Currently there are two lists of kmem_caches: 1) slab_caches, which contains all kmem_caches, 2) slab_root_caches, which contains only root kmem_caches. And there is some preprocessor magic to have a single list if CONFIG_MEMCG_KMEM isn't enabled. It was required earlier because the number of non

[PATCH v7 04/19] mm: slub: implement SLUB version of obj_to_index()

2020-06-23 Thread Roman Gushchin
This commit implements SLUB version of the obj_to_index() function, which will be required to calculate the offset of obj_cgroup in the obj_cgroups vector to store/obtain the objcg ownership data. To make it faster, let's repeat the SLAB's trick introduced by commit 6a2d7a955d8d ("SLAB: use a mult

[PATCH v7 01/19] mm: memcg: factor out memcg- and lruvec-level changes out of __mod_lruvec_state()

2020-06-23 Thread Roman Gushchin
To convert memcg and lruvec slab counters to bytes there must be a way to change these counters without touching node counters. Factor out __mod_memcg_lruvec_state() out of __mod_lruvec_state(). Signed-off-by: Roman Gushchin Acked-by: Johannes Weiner Reviewed-by: Vlastimil Babka Reviewed-by: S

[PATCH v7 06/19] mm: memcg/slab: obj_cgroup API

2020-06-23 Thread Roman Gushchin
Obj_cgroup API provides an ability to account sub-page sized kernel objects, which potentially outlive the original memory cgroup. The top-level API consists of the following functions: bool obj_cgroup_tryget(struct obj_cgroup *objcg); void obj_cgroup_get(struct obj_cgroup *objcg); void obj_

[PATCH AUTOSEL 5.7 28/28] RISC-V: Don't allow write+exec only page mapping request in mmap

2020-06-23 Thread Sasha Levin
From: Yash Shah [ Upstream commit e0d17c842c0f824fd4df9f4688709fc6907201e1 ] As per the table 4.4 of version "20190608-Priv-MSU-Ratified" of the RISC-V instruction set manual[0], the PTE permission bit combination of "write+exec only" is reserved for future use. Hence, don't allow such mapping r

[PATCH AUTOSEL 5.4 02/24] ata/libata: Fix usage of page address by page_address in ata_scsi_mode_select_xlat function

2020-06-23 Thread Sasha Levin
From: Ye Bin [ Upstream commit f650ef61e040bcb175dd8762164b00a5d627f20e ] BUG: KASAN: use-after-free in ata_scsi_mode_select_xlat+0x10bd/0x10f0 drivers/ata/libata-scsi.c:4045 Read of size 1 at addr 88803b8cd003 by task syz-executor.6/12621 CPU: 1 PID: 12621 Comm: syz-executor.6 Not tainted

[PATCH v7 12/19] mm: memcg/slab: use a single set of kmem_caches for all accounted allocations

2020-06-23 Thread Roman Gushchin
This is fairly big but mostly red patch, which makes all accounted slab allocations use a single set of kmem_caches instead of creating a separate set for each memory cgroup. Because the number of non-root kmem_caches is now capped by the number of root kmem_caches, there is no need to shrink or d

[PATCH v7 07/19] mm: memcg/slab: allocate obj_cgroups for non-root slab pages

2020-06-23 Thread Roman Gushchin
Allocate and release memory to store obj_cgroup pointers for each non-root slab page. Reuse page->mem_cgroup pointer to store a pointer to the allocated space. This commit temporarily increases the memory footprint of the kernel memory accounting. To store obj_cgroup pointers we'll need a place fo

[PATCH AUTOSEL 5.7 16/28] s390/ptrace: return -ENOSYS when invalid syscall is supplied

2020-06-23 Thread Sasha Levin
From: Sven Schnelle [ Upstream commit cd29fa798001075a554b978df3a64e6656c25794 ] The current code returns the syscall number which an invalid syscall number is supplied and tracing is enabled. This makes the strace testsuite fail. Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik Sign

[PATCH AUTOSEL 5.7 25/28] blktrace: break out of blktrace setup on concurrent calls

2020-06-23 Thread Sasha Levin
From: Luis Chamberlain [ Upstream commit 1b0b283648163dae2a214ca28ed5a99f62a77319 ] We use one blktrace per request_queue, that means one per the entire disk. So we cannot run one blktrace on say /dev/vda and then /dev/vda1, or just two calls on /dev/vda. We check for concurrent setup only at

[PATCH AUTOSEL 5.7 21/28] arm64: sve: Fix build failure when ARM64_SVE=y and SYSCTL=n

2020-06-23 Thread Sasha Levin
From: Will Deacon [ Upstream commit e575fb9e76c8e33440fb859572a8b7d430f053d6 ] When I squashed the 'allnoconfig' compiler warning about the set_sve_default_vl() function being defined but not used in commit 1e570f512cbd ("arm64/sve: Eliminate data races on sve_default_vl"), I accidentally broke

[PATCH AUTOSEL 5.7 14/28] pinctrl: tegra: Use noirq suspend/resume callbacks

2020-06-23 Thread Sasha Levin
From: Vidya Sagar [ Upstream commit 782b6b69847f34dda330530493ea62b7de3fd06a ] Use noirq suspend/resume callbacks as other drivers which implement noirq suspend/resume callbacks (Ex:- PCIe) depend on pinctrl driver to configure the signals used by their respective devices in the noirq phase. Si

[PATCH AUTOSEL 5.7 27/28] block: update hctx map when use multiple maps

2020-06-23 Thread Sasha Levin
From: Weiping Zhang [ Upstream commit fe35ec58f0d339221643287bbb7cee15c93a5389 ] There is an issue when tune the number for read and write queues, if the total queue count was not changed. The hctx->type cannot be updated, since __blk_mq_update_nr_hw_queues will return directly if the total queu

[PATCH AUTOSEL 5.7 13/28] pinctrl: qcom: spmi-gpio: fix warning about irq chip reusage

2020-06-23 Thread Sasha Levin
From: Dmitry Baryshkov [ Upstream commit 5e50311556c9f409a85740e3cb4c4511e7e27da0 ] Fix the following warnings caused by reusage of the same irq_chip instance for all spmi-gpio gpio_irq_chip instances. Instead embed irq_chip into pmic_gpio_state struct. gpio gpiochip2: (c44.qcom,spmi:pmic@2

[PATCH AUTOSEL 5.7 10/28] test_objagg: Fix potential memory leak in error handling

2020-06-23 Thread Sasha Levin
From: Aditya Pakki [ Upstream commit a6379f0ad6375a707e915518ecd5c2270afcd395 ] In case of failure of check_expect_hints_stats(), the resources allocated by objagg_hints_get should be freed. The patch fixes this issue. Signed-off-by: Aditya Pakki Signed-off-by: David S. Miller Signed-off-by:

[PATCH AUTOSEL 5.7 22/28] kbuild: improve cc-option to clean up all temporary files

2020-06-23 Thread Sasha Levin
From: Masahiro Yamada [ Upstream commit f2f02ebd8f3833626642688b2d2c6a7b3c141fa9 ] When cc-option and friends evaluate compiler flags, the temporary file $$TMP is created as an output object, and automatically cleaned up. The actual file path of $$TMP is ..tmp, here is the process ID of $(shell

[PATCH AUTOSEL 5.7 09/28] net: alx: fix race condition in alx_remove

2020-06-23 Thread Sasha Levin
From: Zekun Shen [ Upstream commit e89df5c4322c1bf495f62d74745895b5fd2a4393 ] There is a race condition exist during termination. The path is alx_stop and then alx_remove. An alx_schedule_link_check could be called before alx_stop by interrupt handler and invoke alx_link_check later. Alx_stop fr

[PATCH AUTOSEL 5.7 23/28] recordmcount: support >64k sections

2020-06-23 Thread Sasha Levin
From: Sami Tolvanen [ Upstream commit 4ef57b21d6fb49d2b25c47e4cff467a0c2c8b6b7 ] When compiling a kernel with Clang and LTO, we need to run recordmcount on vmlinux.o with a large number of sections, which currently fails as the program doesn't understand extended section indexes. This change add

[PATCH AUTOSEL 5.7 17/28] s390/ptrace: pass invalid syscall numbers to tracing

2020-06-23 Thread Sasha Levin
From: Sven Schnelle [ Upstream commit 00332c16b1604242a56289ff2b26e283dbad0812 ] tracing expects to see invalid syscalls, so pass it through. The syscall path in entry.S checks the syscall number before looking up the handler, so it is still safe. Signed-off-by: Sven Schnelle Signed-off-by: Va

[PATCH AUTOSEL 5.7 15/28] s390/seccomp: pass syscall arguments via seccomp_data

2020-06-23 Thread Sasha Levin
From: Sven Schnelle [ Upstream commit 664f5f8de825648d1d31f6f5652e3cd117c77b50 ] Use __secure_computing() and pass the register data via seccomp_data so secure computing doesn't have to fetch it again. Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 5.7 11/28] rocker: fix incorrect error handling in dma_rings_init

2020-06-23 Thread Sasha Levin
From: Aditya Pakki [ Upstream commit 58d0c864e1a759a15c9df78f50ea5a5c32b3989e ] In rocker_dma_rings_init, the goto blocks in case of errors caused by the functions rocker_dma_cmd_ring_waits_alloc() and rocker_dma_ring_create() are incorrect. The patch fixes the order consistent with cleanup in r

Re: [mm, slab/slub] 7b39adbb1b: WARNING:at_mm/slab.h:#kmem_cache_free

2020-06-23 Thread Roman Gushchin
On Tue, Jun 23, 2020 at 01:35:21PM +0200, Vlastimil Babka wrote: > On 6/23/20 11:02 AM, kernel test robot wrote: > > Greeting, > > > > FYI, we noticed the following commit (built with gcc-6): > > > > commit: 7b39adbb1b1d3e73df9066a8d1e93a83c18d7730 ("mm, slab/slub: improve > > error reporting an

[PATCH AUTOSEL 5.7 06/28] hwrng: ks-sa - Fix runtime PM imbalance on error

2020-06-23 Thread Sasha Levin
From: Dinghao Liu [ Upstream commit 95459261c99f1621d90bc628c2a48e60b7cf9a88 ] pm_runtime_get_sync() increments the runtime PM usage counter even the call returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Li

[PATCH AUTOSEL 5.7 04/28] riscv/atomic: Fix sign extension for RV64I

2020-06-23 Thread Sasha Levin
From: Nathan Huckleberry [ Upstream commit 6c58f25e6938c073198af8b1e1832f83f8f0df33 ] The argument passed to cmpxchg is not guaranteed to be sign extended, but lr.w sign extends on RV64I. This makes cmpxchg fail on clang built kernels when __old is negative. To fix this, we just cast __old to l

[PATCH AUTOSEL 5.7 05/28] bcache: check and adjust logical block size for backing devices

2020-06-23 Thread Sasha Levin
From: Mauricio Faria de Oliveira [ Upstream commit dcacbc1242c71e18fa9d2eadc5647e115c9c627d ] It's possible for a block driver to set logical block size to a value greater than page size incorrectly; e.g. bcache takes the value from the superblock, set by the user w/ make-bcache. This causes a

[PATCH v4 3/7] hwmon: pmbus: adm1266: Add support for GPIOs

2020-06-23 Thread alexandru.tachici
From: Alexandru Tachici Adm1266 exposes 9 GPIOs and 16 PDIOs which are currently read-only. They are controlled by the internal sequencing engine. This patch makes adm1266 driver expose GPIOs and PDIOs to user-space using GPIO provider kernel api. Signed-off-by: Alexandru Tachici --- drivers/

[PATCH v4 4/7] hwmon: pmbus: adm1266: Add ioctl commands

2020-06-23 Thread alexandru.tachici
From: Alexandru Tachici Add two ioctl commands for reading the current state of the adm1266 sequencer and sending commands. Signed-off-by: Alexandru Tachici --- Documentation/hwmon/adm1266.rst | 15 +++ .../userspace-api/ioctl/ioctl-number.rst | 1 + drivers/hwmon/pmbus/adm

[PATCH v4 1/7] hwmon: pmbus: adm1266: add support

2020-06-23 Thread alexandru.tachici
From: Alexandru Tachici Add pmbus probing driver for the adm1266 Cascadable Super Sequencer with Margin Control and Fault Recording. Driver is using the pmbus_core, creating sysfs files under hwmon for inputs: vh1->vh4 and vp1->vp13. Signed-off-by: Alexandru Tachici --- Documentation/hwmon/adm

[PATCH AUTOSEL 5.7 07/28] arm64/sve: Eliminate data races on sve_default_vl

2020-06-23 Thread Sasha Levin
From: Dave Martin [ Upstream commit 1e570f512cbdc5e9e401ba640d9827985c1bea1e ] sve_default_vl can be modified via the /proc/sys/abi/sve_default_vl sysctl concurrently with use, and modified concurrently by multiple threads. Adding a lock for this seems overkill, and I don't want to think any mo

[PATCH AUTOSEL 5.7 02/28] ata/libata: Fix usage of page address by page_address in ata_scsi_mode_select_xlat function

2020-06-23 Thread Sasha Levin
From: Ye Bin [ Upstream commit f650ef61e040bcb175dd8762164b00a5d627f20e ] BUG: KASAN: use-after-free in ata_scsi_mode_select_xlat+0x10bd/0x10f0 drivers/ata/libata-scsi.c:4045 Read of size 1 at addr 88803b8cd003 by task syz-executor.6/12621 CPU: 1 PID: 12621 Comm: syz-executor.6 Not tainted

[PATCH AUTOSEL 5.7 01/28] sata_rcar: handle pm_runtime_get_sync failure cases

2020-06-23 Thread Sasha Levin
From: Navid Emamdoost [ Upstream commit eea1238867205b9e48a67c1a63219529a73c46fd ] Calling pm_runtime_get_sync increments the counter even in case of failure, causing incorrect ref count. Call pm_runtime_put if pm_runtime_get_sync fails. Signed-off-by: Navid Emamdoost Signed-off-by: Jens Axboe

Re: [PATCH][V3] arm64: perf: Get the wrong PC value in REGS_ABI_32 mode

2020-06-23 Thread Will Deacon
On Tue, Jun 23, 2020 at 06:19:10PM +0100, Will Deacon wrote: > So, I think we should take this patch (which puts the PC where you'd expect > to find it for compat tasks) and then we could consider removing the current > lr/sp fudging as a separate patch, which we could revert if it causes a > probl

Re: [PATCH 16/22] gpiolib: cdev: add V2 uAPI implementation to parity with V1

2020-06-23 Thread Dan Carpenter
the time of use then it can read beyond the end of the buffer. -- dan ] Hi Kent, Thank you for the patch! Perhaps something to improve: url: https://github.com/0day-ci/linux/commits/Kent-Gibson/gpio-cdev-add-uAPI-V2/20200623-120634 base: https://git.kernel.org/pub/scm/linux/kernel/git

Re: [RFC PATCH 0/2] MTE support for KVM guest

2020-06-23 Thread Catalin Marinas
Hi Steven, On Wed, Jun 17, 2020 at 01:38:42PM +0100, Steven Price wrote: > These patches add support to KVM to enable MTE within a guest. It is > based on Catalin's v4 MTE user space series[1]. > > [1] http://lkml.kernel.org/r/20200515171612.1020-1-catalin.marinas%40arm.com > > Posting as an RFC

Re: [PATCH] scsi: target: tcmu: Call flush_dcache_page() with proper page struct

2020-06-23 Thread Henry Willard
On 6/19/20 6:31 PM, kernel test robot wrote: Hi Henry, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on mkp-scsi/for-next] [also build test WARNING on scsi/for-next v5.8-rc1 next-20200618] [If your patch is applied to the wrong git tree, kindly drop us a note.

Re: [PATCH v2] kvm: Fix false positive RCU usage warning

2020-06-23 Thread Madhuparna Bhowmik
On Tue, Jun 23, 2020 at 08:39:01AM -0700, Paul E. McKenney wrote: > On Tue, Jun 23, 2020 at 09:00:36PM +0530, Madhuparna Bhowmik wrote: > > On Tue, Jun 23, 2020 at 11:02:36AM -0400, Joel Fernandes wrote: > > > On Tue, Jun 23, 2020 at 09:39:53AM +0200, Paolo Bonzini wrote: > > > > On 16/05/20 10:22,

Re: [PATCH v2 net-next 1/2] indirect_call_wrapper: extend indirect wrapper to support up to 4 calls

2020-06-23 Thread Paolo Abeni
On Tue, 2020-06-23 at 09:42 -0700, Brian Vazquez wrote: > There are many places where 2 annotations are not enough. This patch > adds INDIRECT_CALL_3 and INDIRECT_CALL_4 to cover such cases. > > Signed-off-by: Brian Vazquez > --- > include/linux/indirect_call_wrapper.h | 12 > 1 fil

Re: [PATCH tip/core/rcu 16/26] rcu: Mark rcu_nmi_enter() call to rcu_cleanup_after_idle() noinstr

2020-06-23 Thread Paul E. McKenney
On Tue, Jun 23, 2020 at 07:04:25PM +0200, Peter Zijlstra wrote: > On Mon, Jun 22, 2020 at 05:21:37PM -0700, paul...@kernel.org wrote: > > From: "Paul E. McKenney" > > > > The objtool complains about the call to rcu_cleanup_after_idle() from > > rcu_nmi_enter(), so this commit adds instrumentation

Re: [PATCH v2 net-next 2/2] ipv6: fib6: avoid indirect calls from fib6_rule_lookup

2020-06-23 Thread Paolo Abeni
On Tue, 2020-06-23 at 09:42 -0700, Brian Vazquez wrote: > It was reported that a considerable amount of cycles were spent on the > expensive indirect calls on fib6_rule_lookup. This patch introduces an > inline helper called pol_route_func that uses the indirect_call_wrappers > to avoid the indirec

RE: [PATCH v2 0/2] cpufreq: Specify the default governor on command line

2020-06-23 Thread Doug Smythies
On 2020.06.23 07:22 Quentin Perret wrote: > > This series enables users of prebuilt kernels (e.g. distro kernels) to > specify their CPUfreq governor of choice using the kernel command line, > instead of having to wait for the system to fully boot to userspace to > switch using the sysfs interface

Re: [PATCH v2 1/3] mfd: core: Make a best effort attempt to match devices with the correct of_nodes

2020-06-23 Thread Frank Rowand
On 2020-06-23 01:47, Lee Jones wrote: > On Mon, 22 Jun 2020, Frank Rowand wrote: > >> On 2020-06-22 14:11, Lee Jones wrote: >>> On Mon, 22 Jun 2020, Frank Rowand wrote: >>> On 2020-06-22 10:10, Lee Jones wrote: > On Mon, 22 Jun 2020, Frank Rowand wrote: > >> On 2020-06-22 03:50, L

Re: [PATCH 2/2][v3] PM / s2idle: Code cleanup to make s2idle consistent with normal idle path

2020-06-23 Thread Rafael J. Wysocki
On Tuesday, June 23, 2020 8:31:52 AM CEST Chen Yu wrote: > Currently s2idle is a little different from the normal idle path. This > patch makes call_s2idle() consistent with call_cpuidle(), and also > s2idle_enter() is analogous to cpuidle_enter(). > > No functional change. > > Suggested-by: Pete

Re: [PATCH v4 7/8] lockdep: Change hardirq{s_enabled,_context} to per-cpu variables

2020-06-23 Thread Marco Elver
On Tue, Jun 23, 2020 at 06:37PM +0200, Peter Zijlstra wrote: > On Tue, Jun 23, 2020 at 06:13:21PM +0200, Ahmed S. Darwish wrote: > > Well, freshly merged code is using it. For example, KCSAN: > > > > => f1bc96210c6a ("kcsan: Make KCSAN compatible with lockdep") > > => kernel/kcsan/report.c

Re: [PATCH 1/3] nvme: Add Arbitration Burst support

2020-06-23 Thread Keith Busch
On Tue, Jun 23, 2020 at 10:39:01AM -0700, Sagi Grimberg wrote: > > > > From the NVMe spec, "In order to make efficient use of the non-volatile > > > memory, it is often advantageous to execute multiple commands from a > > > Submission Queue in parallel. For Submission Queues that are using > > >

[PATCH v2] ima_evm_utils: extended calc_bootaggr to PCRs 8 - 9

2020-06-23 Thread Maurizio Drocco
From: Maurizio If PCRs 8 - 9 are set (i.e. not all-zeros), cal_bootaggr should include them into the digest. Signed-off-by: Maurizio Drocco --- Changelog: v2: - Always include PCRs 8 & 9 to non-sha1 hashes v1: - Include non-zero PCRs 8 & 9 to boot aggregates src/evmctl.c | 15 +--

Re: [PATCH v2 0/2] cpufreq: Specify the default governor on command line

2020-06-23 Thread Quentin Perret
Hi Doug, On Tuesday 23 Jun 2020 at 10:54:33 (-0700), Doug Smythies wrote: > Hi Quentin, > > Because I am lazy and sometimes do not want to recompile > the distro source, I have a need/desire for this. Good to know I'm not the only one ;-) > Tested these two grub command lines: > > GRUB_CMDLINE

Re: [RFC PATCH 0/2] MTE support for KVM guest

2020-06-23 Thread Peter Maydell
On Wed, 17 Jun 2020 at 13:39, Steven Price wrote: > > These patches add support to KVM to enable MTE within a guest. It is > based on Catalin's v4 MTE user space series[1]. > > [1] http://lkml.kernel.org/r/20200515171612.1020-1-catalin.marinas%40arm.com > > Posting as an RFC as I'd like feedback o

[PATCH 4/8] arm64: dts: qcom: sdm630: nile: Enable BLSP1_UART2

2020-06-23 Thread Konrad Dybcio
Enable the second UART interface used on this board. Also convert the DT to use phandles instead of addresses to make it coherent with other device trees. Signed-off-by: Konrad Dybcio --- .../dts/qcom/sdm630-sony-xperia-nile.dtsi | 50 ++- 1 file changed, 26 insertions(+), 24

[PATCH 5/8] arm64: dts: qcom: sdm630: Fix the pinctrl node

2020-06-23 Thread Konrad Dybcio
Previously present pinctrl node didn't show problems, but I have in fact misconfigured it. Fix it to actually enable the use of GPIOs. Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sdm630.dtsi | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/arm6

[PATCH 7/8] arm64: dts: qcom: sdm630: nile: Remove Volume Down gpio-key

2020-06-23 Thread Konrad Dybcio
Currently, the driver crashes with tons of gpiochip_irq_unmask+0x30/0x40. Removing the key for now will prevent the kernel from panicking, so that the development can go on. Signed-off-by: Konrad Dybcio --- .../boot/dts/qcom/sdm630-sony-xperia-nile.dtsi | 13 + 1 file changed,

[PATCH 0/8] SDM630 and Ninges fixes

2020-06-23 Thread Konrad Dybcio
Disclaimer: Ninges = Nile&Ganges This series brings support for RPMPD on 630/660, initial tsens support (thermal-zones are WIP so dont' want to send them yet), an urgent fix for pinctrl (I have made a mistake that only showed itself when I tried to add more GPIO-dependent stuff...) and some stuff

[PATCH 1/8] soc: qcom: rpmpd: Add SDM660 power-domains

2020-06-23 Thread Konrad Dybcio
Add the shared cx/mx and sensor sub-system's cx and mx power-domains found on SDM660. Signed-off-by: Konrad Dybcio --- .../devicetree/bindings/power/qcom,rpmpd.yaml | 1 + drivers/soc/qcom/rpmpd.c | 33 +++ include/dt-bindings/power/qcom-rpmpd.h| 12

[PATCH 3/8] arm64: dts: qcom: sdm630: Add tsens node

2020-06-23 Thread Konrad Dybcio
Enable tsens on this SoC using tsens-v2 driver. Signed-off-by: Konrad Dybcio --- .../devicetree/bindings/thermal/qcom-tsens.yaml | 1 + arch/arm64/boot/dts/qcom/sdm630.dtsi | 11 +++ 2 files changed, 12 insertions(+) diff --git a/Documentation/devicetree/bindings

[PATCH 6/8] arm64: dts: qcom: sdm630: nile: Reserve disabled GPIOs

2020-06-23 Thread Konrad Dybcio
Both Nile and Ganges platforms have gpios 8-11 disabled. Without this, the kernel will not boot when the pinctrl driver is present. Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile.dtsi | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/q

[PATCH 2/8] arm64: dts: qcom: sdm630: Add RPM power domains support

2020-06-23 Thread Konrad Dybcio
Add the rpmpd node on the sdm630 and define the available levels. Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sdm630.dtsi | 46 1 file changed, 46 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm630.dtsi b/arch/arm64/boot/dts/qcom/sdm630.dtsi i

[PATCH 8/8] arm64: dts: qcom: sdm630: ganges: Change addresses to phandles

2020-06-23 Thread Konrad Dybcio
This brings the DT in line with the style used in other device trees. Signed-off-by: Konrad Dybcio --- .../dts/qcom/sdm630-sony-xperia-ganges.dtsi | 22 +++ 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sdm630-sony-xperia-ganges.dtsi b

Re: [PATCH] crypto: sun8i-ce - Fix runtime PM imbalance in sun8i_ce_cipher_init

2020-06-23 Thread Markus Elfring
> Fix this by … Please replace the beginning of this sentence with the tag “Fixes”. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=625d3449788f85569096780592549d0340e9c0c7#n183 >>> >>> No, not really. The co

Re: [PATCH v4 7/8] lockdep: Change hardirq{s_enabled,_context} to per-cpu variables

2020-06-23 Thread Peter Zijlstra
On Tue, Jun 23, 2020 at 07:59:57PM +0200, Marco Elver wrote: > On Tue, Jun 23, 2020 at 06:37PM +0200, Peter Zijlstra wrote: > > On Tue, Jun 23, 2020 at 06:13:21PM +0200, Ahmed S. Darwish wrote: > > > Well, freshly merged code is using it. For example, KCSAN: > > > > > > => f1bc96210c6a ("kcsan

Re: [PATCH v2] ima_evm_utils: extended calc_bootaggr to PCRs 8 - 9

2020-06-23 Thread Bruno Meneguele
On Tue, Jun 23, 2020 at 02:01:22PM -0400, Maurizio Drocco wrote: > From: Maurizio > > If PCRs 8 - 9 are set (i.e. not all-zeros), cal_bootaggr should include > them into the digest. > > Signed-off-by: Maurizio Drocco > --- > Changelog: > v2: > - Always include PCRs 8 & 9 to non-sha1 hashes > v1

Re: [PATCH v3 bpf-next 8/8] bpf/selftests: add tests for %pT format specifier

2020-06-23 Thread Andrii Nakryiko
On Tue, Jun 23, 2020 at 5:12 AM Alan Maguire wrote: > > tests verify we get 0 return value from bpf_trace_print() > using %pT format specifier with various modifiers/pointer > values. > > Signed-off-by: Alan Maguire > --- Acked-by: Andrii Nakryiko > .../selftests/bpf/prog_tests/trace_printk_b

Re: [PATCH v2 1/7] KVM: X86: Reset vcpu->arch.cpuid_nent to 0 if SET_CPUID fails

2020-06-23 Thread Jim Mattson
On Tue, Jun 23, 2020 at 4:58 AM Xiaoyao Li wrote: > > It needs to invalidate CPUID configruations if usersapce provides Nits: configurations, userspace > illegal input. > > Signed-off-by: Xiaoyao Li > --- > arch/x86/kvm/cpuid.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/arch/

Re: [PATCH 2/2] selftests/fpu: Add an FPU selftest

2020-06-23 Thread Andy Lutomirski
On Tue, Jun 23, 2020 at 3:28 AM Borislav Petkov wrote: > > On Mon, Jun 22, 2020 at 12:37:12PM -0700, Andy Lutomirski wrote: > > It’s this whole mess: > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 > > It really is a mess because our option detection doesn't really work. I did: > > ifde

[PATCH 1/7] dt-bindings: vendor-prefixes: Add YLM

2020-06-23 Thread Paul Cercueil
Shenzhen Yangliming Electronic Technology Co., Ltd., abbreviated YLM or YLMChina, and known as Anbernic in the rest of the world, is a Chinese manufacturer of handheld game consoles, some of which are known to be running Linux. Signed-off-by: Paul Cercueil --- Documentation/devicetree/bindings/v

[PATCH 2/7] dt-bindings: MIPS: Add entry for the YLM RetroMini

2020-06-23 Thread Paul Cercueil
Add an entry to ingenic/devices.yaml for the JZ4725B-based YLM "RetroMini" RS-90. Signed-off-by: Paul Cercueil --- Documentation/devicetree/bindings/mips/ingenic/devices.yaml | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/mips/ingenic/devices.yaml b/D

[PATCH 6/7] MIPS: ingenic: Add support for the RS90 board

2020-06-23 Thread Paul Cercueil
The RS-90, better known as RetroMini, is a small and pocketable handheld gaming console from YLMChina. It has little more than a JZ4725B SoC, a NAND, a screen, some buttons and a speaker. Signed-off-by: Paul Cercueil --- arch/mips/boot/dts/ingenic/Makefile | 1 + arch/mips/boot/dts/ingenic/rs9

[PATCH 5/7] MIPS: ingenic: Add support for the JZ4725B SoC

2020-06-23 Thread Paul Cercueil
Add preliminary support for boards based on the JZ4725B SoC from Ingenic. The JZ4725B SoC is supposed to be older than the JZ4740 SoC, but its internals are much closer to what can be found on the JZ4750 and newer SoCs. It is low-power SoC with a MIPS32r1 SoC running at ~360 MHz, and no FPU. Sig

[PATCH 4/7] MIPS: ingenic: Use enum instead of macros for Ingenic SoCs

2020-06-23 Thread Paul Cercueil
Use an enum instead of macros to represent the various versions of the Ingenic SoCs, and add some of the SoC versions that were previously missing. Signed-off-by: Paul Cercueil --- arch/mips/include/asm/bootinfo.h | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) dif

[PATCH 3/7] dt-bindings: timer/ingenic,tcu: Add compatible strings for JZ4725B SoC

2020-06-23 Thread Paul Cercueil
Add compatible strings for the PWM and watchdog IPs on the Ingenic JZ4725B SoC. Signed-off-by: Paul Cercueil --- Documentation/devicetree/bindings/timer/ingenic,tcu.yaml | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/timer/ingenic,tcu.ya

[PATCH 7/7] MIPS: ingenic: RS90: Added defconfig

2020-06-23 Thread Paul Cercueil
Add a basic default config for the RS-90 RetroMini board. Signed-off-by: Paul Cercueil --- arch/mips/configs/rs90_defconfig | 182 +++ 1 file changed, 182 insertions(+) create mode 100644 arch/mips/configs/rs90_defconfig diff --git a/arch/mips/configs/rs90_defconfig

Re: Should SEV-ES #VC use IST? (Re: [PATCH] Allow RDTSC and RDTSCP from userspace)

2020-06-23 Thread Andy Lutomirski
On Tue, Jun 23, 2020 at 8:23 AM Andrew Cooper wrote: > > On 23/06/2020 14:03, Peter Zijlstra wrote: > > On Tue, Jun 23, 2020 at 02:12:37PM +0200, Joerg Roedel wrote: > >> On Tue, Jun 23, 2020 at 01:50:14PM +0200, Peter Zijlstra wrote: > >>> If SNP is the sole reason #VC needs to be IST, then I'd s

Re: ld.lld: warning: drivers/built-in.a(misc/ds1682.o):(.data..compoundliteral) is being placed in '.data..compoundliteral'

2020-06-23 Thread Nick Desaulniers
On Fri, Jun 19, 2020 at 9:32 AM Nick Desaulniers wrote: > > On Fri, Jun 19, 2020 at 6:24 AM Christophe Leroy > wrote: > > > > > > > > Le 18/06/2020 à 03:12, kernel test robot a écrit : > > > tree: > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > > > head: 1b5

[PATCH v2 1/2] cpufreq: intel_pstate: Allow enable/disable energy efficiency

2020-06-23 Thread Srinivas Pandruvada
By default intel_pstate driver disables energy efficiency by setting MSR_IA32_POWER_CTL bit 19 for Kaby Lake desktop CPU model in HWP mode. This CPU model is also shared by Coffee Lake desktop CPUs. This allows these systems to reach maximum possible frequency. But this adds power penalty, which so

cpufreq: intel_pstate: Support raw epp and energy_efficiency

2020-06-23 Thread Srinivas Pandruvada
v2 Remove raw value support for EPB Srinivas Pandruvada (2): cpufreq: intel_pstate: Allow enable/disable energy efficiency cpufreq: intel_pstate: Allow raw energy performance preference value Documentation/admin-guide/pm/intel_pstate.rst | 13 ++- drivers/cpufreq/intel_pstate.c

[PATCH v2 2/2] cpufreq: intel_pstate: Allow raw energy performance preference value

2020-06-23 Thread Srinivas Pandruvada
Currently using attribute "energy_performance_preference", user space can write one of the four per-defined preference string. These preference strings gets mapped to a hard-coded Energy-Performance Preference (EPP) or Energy-Performance Bias (EPB) knob. These four values supposed to cover broad s

[RFC 2/7] fixup! media: uapi: h264: update reference lists

2020-06-23 Thread Ezequiel Garcia
Align v4l2_h264_reference to 32-bits, giving some room for future extensions. Signed-off-by: Ezequiel Garcia --- .../userspace-api/media/v4l/ext-ctrls-codec.rst | 3 +++ drivers/media/v4l2-core/v4l2-ctrls.c | 16 include/media/h264-ctrls.h |

[RFC 5/7] media: uapi: h264: pad v4l2_ctrl_h264_pps to 64-bit

2020-06-23 Thread Ezequiel Garcia
The struct does not contain 64-bit types, and therefore doesn't suffer from compatibility issues. However, having it aligned to 64-bits is cleaner and has the advantage of allowing future extensions. Signed-off-by: Ezequiel Garcia --- Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst |

[RFC 4/7] media: uapi: h264: increase size of fields

2020-06-23 Thread Ezequiel Garcia
Slice header syntax element 'first_mb_in_slice' can point to the last macroblock, currently the field can only reference 65536 macroblocks which is insufficient for 8K videos. DPB entry PicNum maximum value is 2*MaxFrameNum for interlaced content (field_pic_flag=1). Therefore, increase 'first_mb_

Re: [PATCH AUTOSEL 4.14 090/108] ovl: verify permissions in ovl_path_open()

2020-06-23 Thread Naresh Kamboju
On Tue, 23 Jun 2020 at 22:46, Sasha Levin wrote: > > On Tue, Jun 23, 2020 at 08:55:38PM +0530, Naresh Kamboju wrote: > >On Thu, 18 Jun 2020 at 07:18, Sasha Levin wrote: > >> > >> From: Miklos Szeredi > >> > >> [ Upstream commit 56230d956739b9cb1cbde439d76227d77979a04d ] > >> > >> Check permissio

[RFC 1/7] media: uapi: h264: update reference lists

2020-06-23 Thread Ezequiel Garcia
From: Jernej Skrabec When dealing with with interlaced frames, reference lists must tell if each particular reference is meant for top or bottom field. This info is currently not provided at all in the H264 related controls. Make reference lists hold a structure which will also hold flags along

[RFC 3/7] media: uapi: h264: clarify pic_order_cnt_bit_size field

2020-06-23 Thread Ezequiel Garcia
From: Philipp Zabel Since pic_order_cnt_bit_size is not a syntax element itself, explicitly state that it is the total size in bits of the pic_order_cnt_lsb, delta_pic_order_cnt_bottom, delta_pic_order_cnt[0], and delta_pic_order_cnt[1] syntax elements contained in the slice. Signed-off-by: Phil

[RFC 0/7] media: Clean and make H264 stateless uAPI public

2020-06-23 Thread Ezequiel Garcia
The recent patch posted by Jernej (which I'm including for context), encouraged me to address all the known issues in the uAPI. I hope we can finally make this uAPI interface public; it would be nice to address the other codec interfaces so we can move the codec drivers out of staging. It should

[RFC 6/7] media: uapi: h264: Clean slice invariants syntax elements

2020-06-23 Thread Ezequiel Garcia
The H.264 specification requires in its "Slice header semantics" section that the following values shall be the same in all slice headers: pic_parameter_set_id frame_num field_pic_flag bottom_field_flag idr_pic_id pic_order_cnt_lsb delta_pic_order_cnt_bottom delta_pic_order_cnt[ 0

Re: [PATCH v2 04/16] b43: Remove uninitialized_var() usage

2020-06-23 Thread Nick Desaulniers
On Mon, Jun 22, 2020 at 2:04 PM Kees Cook wrote: > > On Mon, Jun 22, 2020 at 10:04:18AM -0700, Nick Desaulniers wrote: > > On Fri, Jun 19, 2020 at 8:30 PM Kees Cook wrote: > > > > > > Using uninitialized_var() is dangerous as it papers over real bugs[1] > > > (or can in the future), and suppresse

[RFC 7/7] media: uapi: make H264 stateless codec interface public

2020-06-23 Thread Ezequiel Garcia
The H264 interface is now ready to be part of the official public API. In addition, sanitize header includes. Signed-off-by: Ezequiel Garcia --- drivers/staging/media/hantro/hantro_hw.h | 5 ++--- include/media/v4l2-ctrls.h| 3 ++- include/media/

<    5   6   7   8   9   10   11   12   13   14   >