Re: [PATCH] RFC: selinux avc trace

2020-07-30 Thread peter enderborg
On 7/30/20 9:29 PM, Steven Rostedt wrote: > On Thu, 30 Jul 2020 21:12:39 +0200 > peter enderborg wrote: > avc:  denied  { find } for interface=vendor.qti.hardware.perf::IPerf sid=u:r:permissioncontroller_app:s0:c230,c256,c512,c768 pid=9164 scontext=u:r:permissioncontroller_app:s0:

Re: linux-next: Signed-off-by missing for commit in the vhost tree

2020-07-30 Thread Michael S. Tsirkin
On Tue, Jul 28, 2020 at 08:05:56AM +1000, Stephen Rothwell wrote: > Hi all, > > ommit > > ed944d574cc7 ("ack! virtio: VIRTIO_F_IOMMU_PLATFORM -> > VIRTIO_F_ACCESS_PLATFORM") > > is missing a Signed-off-by from its author and committer. > > I have never seen an empty commit like this before -

Re: [RFC PATCH 06/14] coresight: Convert claim and lock operations to use access wrappers

2020-07-30 Thread Mathieu Poirier
On Wed, Jul 22, 2020 at 06:20:32PM +0100, Suzuki K Poulose wrote: > Convert the CoreSight CLAIM set/clear, LOCK/UNLOCK operations to > use the coresight device access abstraction. > > Mostly a mechanical change. > > Cc: Mathieu Poirier > Cc: Mike Leach > Signed-off-by: Suzuki K Poulose > --- >

Re: [RFC PATCH 07/14] coresight: etm4x: Always read the registers on the host CPU

2020-07-30 Thread Mathieu Poirier
On Wed, Jul 22, 2020 at 06:20:33PM +0100, Suzuki K Poulose wrote: > As we are about to add support for sysreg access to ETM4.4+ components, > make sure that we read the registers only on the host CPU. > > Cc: Mathieu Poirier > Cc: Mike Leach > Signed-off-by: Suzuki K Poulose > --- Reviewed-by:

Re: [PATCH] mm/hugetlb: Fix calculation of adjust_range_if_pmd_sharing_possible

2020-07-30 Thread Matthew Wilcox
On Thu, Jul 30, 2020 at 03:50:30PM -0400, Peter Xu wrote: > +#define MAX(a,b) (((a)>(b))?(a):(b)) > +#define MIN(a,b) (((a)<(b))?(a):(b)) What's wrong with max() and min() defined in kernel.h?

Re: [PATCH v5 4/4] IMA: Handle early boot data measurement

2020-07-30 Thread Tyler Hicks
On 2020-07-30 11:02:50, Lakshmi Ramasubramanian wrote: > On 7/29/20 8:47 PM, Lakshmi Ramasubramanian wrote: > > Hi Tyler, > > > diff --git a/security/integrity/ima/Kconfig b/security/integrity/ima/Kconfig > > index 080c53545ff0..86cba844f73c 100644 > > --- a/security/integrity/ima/Kconfig > > +++

Re: [PATCH] mm/hugetlb: Fix calculation of adjust_range_if_pmd_sharing_possible

2020-07-30 Thread Peter Xu
On Thu, Jul 30, 2020 at 08:57:22PM +0100, Matthew Wilcox wrote: > On Thu, Jul 30, 2020 at 03:50:30PM -0400, Peter Xu wrote: > > +#define MAX(a,b) (((a)>(b))?(a):(b)) > > +#define MIN(a,b) (((a)<(b))?(a):(b)) > > What's wrong with max() and min() defined in kernel.h? Oops.. Posting another one..

Re: [PATCH v4] coccinelle: api: add kvfree script

2020-07-30 Thread Julia Lawall
Actually, the message looks fine. Sorry for the noise about that. However there is a problem in the kfree case: > +@kfree depends on !patch@ > +expression E; > +position v != choice.vok; > +position p; > +@@ > + > +* E = > \(vmalloc@v\|vzalloc@v\|vmalloc_user@v\|vmalloc_node@v\|vzalloc_node@v\|

Re: [PATCH v3 3/4] iommu: Add iommu_aux_get_domain_for_dev()

2020-07-30 Thread Alex Williamson
On Wed, 29 Jul 2020 23:49:20 + "Tian, Kevin" wrote: > > From: Alex Williamson > > Sent: Thursday, July 30, 2020 4:25 AM > > > > On Tue, 14 Jul 2020 13:57:02 +0800 > > Lu Baolu wrote: > > > > > The device driver needs an API to get its aux-domain. A typical usage > > > scenario is: > > >

[PATCH v2] mm/hugetlb: Fix calculation of adjust_range_if_pmd_sharing_possible

2020-07-30 Thread Peter Xu
This is found by code observation only. Firstly, the worst case scenario should assume the whole range was covered by pmd sharing. The old algorithm might not work as expected for ranges like (1g-2m, 1g+2m), where the adjusted range should be (0, 1g+2m) but the expected range should be (0, 2g).

Re: [RFC PATCH 08/14] coresight: etm4x: Convert all register accesses

2020-07-30 Thread Mathieu Poirier
On Wed, Jul 22, 2020 at 06:20:34PM +0100, Suzuki K Poulose wrote: > Convert all register accesses from etm4x driver to use a wrapper > to allow switching the access at runtime with little overhead. > > co-developed by sed tool ;-), mostly equivalent to : > > s/readl\(_relaxed\)\?(drvdata->base +

[PATCH] drm/vkms: fix xrgb on compute crc

2020-07-30 Thread Melissa Wen
The previous memset operation was not correctly zeroing the alpha channel to compute the crc, and as a result, the IGT subtest kms_cursor_crc/pipe-A-cursor-alpha-transparent fails. Fixes: db7f419c06d7c ("drm/vkms: Compute CRC with Cursor Plane") Signed-off-by: Melissa Wen --- drivers/gpu/drm/vk

[PATCH v2: [linux-4.14.y] ] dm cache: submit writethrough writes in parallel to origin and cache

2020-07-30 Thread John Donnelly
From: Mike Snitzer Discontinue issuing writethrough write IO in series to the origin and then cache. Use bio_clone_fast() to create a new origin clone bio that will be mapped to the origin device and then bio_chain() it to the bio that gets remapped to the cache device. The origin clone bio do

Re: [PATCH v4] coccinelle: api: add kvfree script

2020-07-30 Thread Julia Lawall
On Thu, 30 Jul 2020, Denis Efremov wrote: > Check that alloc and free types of functions match each other. Do the checks for the opportunities for kvmalloc really belong in this rule? That issue is not mentioned in the commit log or the description of the semantic patch. With the current pat

Re: [PATCH 1/2] habanalabs: Replace dma-fence mechanism with completions

2020-07-30 Thread Daniel Vetter
On Thu, Jul 30, 2020 at 3:13 PM Oded Gabbay wrote: > > From: Ofir Bitton > > habanalabs driver uses dma-fence mechanism for synchronization. > dma-fence mechanism was designed solely for GPUs, hence we purpose > a simpler mechanism based on completions to replace current > dma-fence objects. > >

Re: [PATCH v2 3/7] mm: introduce memfd_secret system call to create "secret" memory areas

2020-07-30 Thread Mike Rapoport
On Thu, Jul 30, 2020 at 05:22:10PM +0100, Catalin Marinas wrote: > Hi Mike, > > On Mon, Jul 27, 2020 at 07:29:31PM +0300, Mike Rapoport wrote: > > For instance, the following example will create an uncached mapping (error > > handling is omitted): > > > > fd = memfd_secret(SECRETMEM_UNCACHED)

Re: [Linux-kernel-mentees] [PATCH v2] block/floppy: Prevent kernel-infoleak in raw_cmd_copyout()

2020-07-30 Thread Arnd Bergmann
On Thu, Jul 30, 2020 at 8:10 PM Kees Cook wrote: > On Thu, Jul 30, 2020 at 10:11:07AM +0200, Arnd Bergmann wrote: > > test_stackinit.c intended to use six cases (where "full" is in the sense > of "all members are named", this is intentionally testing the behavior > of padding hole initialization):

Re: [PATCH bpf-next v2 29/35] bpf: libbpf: cleanup RLIMIT_MEMLOCK usage

2020-07-30 Thread Roman Gushchin
On Thu, Jul 30, 2020 at 12:39:40PM -0700, Andrii Nakryiko wrote: > On Wed, Jul 29, 2020 at 6:38 PM Roman Gushchin wrote: > > > > On Mon, Jul 27, 2020 at 10:59:33PM -0700, Andrii Nakryiko wrote: > > > On Mon, Jul 27, 2020 at 4:15 PM Roman Gushchin wrote: > > > > > > > > On Mon, Jul 27, 2020 at 03:

Re: [PATCH 2/2] mm, util: account_locked_vm() does not hold mmap_lock

2020-07-30 Thread Daniel Jordan
On Wed, Jul 29, 2020 at 12:21:11PM -0700, Hugh Dickins wrote: > On Sun, 26 Jul 2020, Pengfei Li wrote: > > > Since mm->locked_vm is already an atomic counter, account_locked_vm() > > does not need to hold mmap_lock. > > I am worried that this patch, already added to mmotm, along with its > 1/2 ma

[PATCH 2/4] ARM: backtrace-clang: add fixup for lr dereference

2020-07-30 Thread Nick Desaulniers
If the value of the link register is not correct (tail call from asm that didn't set it, stack corruption, memory no longer mapped), then using it for an address calculation may trigger an exception. Without a fixup handler, this will lead to a panic, which will unwind, which will trigger the faul

[PATCH 1/4] ARM: backtrace-clang: check for NULL lr

2020-07-30 Thread Nick Desaulniers
If the link register was zeroed out, do not attempt to use it for address calculations for which there are currently no fixup handlers, which can lead to a panic during unwind. Since panicking triggers another unwind, this can lead to an infinite loop. If this occurs during start_kernel(), this ca

[PATCH 0/4] CONFIG_UNWINDER_FRAME_POINTER fixes+cleanups

2020-07-30 Thread Nick Desaulniers
We received a report of boot failure on stable/4.14.y using Clang with CONFIG_UNWINDER_FRAME_POINTER. Turns out, this was a cascaded failure with at least 4 different things going wrong. Working backwards from the failure: 4) There was no fixup handler in backtrace-clang.S for a specific address c

[PATCH 3/4] ARM: backtrace-clang: give labels more descriptive names

2020-07-30 Thread Nick Desaulniers
Removes the 1004 label; it was neither a control flow target, nor an instruction we expect to produce a fault. Gives the labels slightly more readable names. The `b` suffixes are handy to disambiguate between labels of the same identifier when there's more than one. Since these labels are unique,

[PATCH 4/4] ARM: backtrace: use more descriptive labels

2020-07-30 Thread Nick Desaulniers
We don't necessarily need the `b` suffixes used to disambiguate between non-unique local labels. Give these labels more descriptive names. Signed-off-by: Nick Desaulniers --- arch/arm/lib/backtrace.S | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --g

Re: [v1] drm/msm/dpu: Fix scale params in plane validation

2020-07-30 Thread Kristian Kristensen
On Thu, Jul 30, 2020 at 6:39 AM Kalyan Thota wrote: > > Plane validation uses an API drm_calc_scale which will > return src/dst value as a scale ratio. > > when viewing the range on a scale the values should fall in as > > Upscale ratio < Unity scale < Downscale ratio for src/dst formula > > Fix t

Re: [PATCH v1 0/4] [RFC] Implement Trampoline File Descriptor

2020-07-30 Thread Andy Lutomirski
On Thu, Jul 30, 2020 at 7:24 AM Madhavan T. Venkataraman wrote: > > Sorry for the delay. I just wanted to think about this a little. > In this email, I will respond to your first suggestion. I will > respond to the rest in separate emails if that is alright with > you. > > On 7/28/20 12:31 PM, And

Re: [PATCH 11/23] fs: Add /proc/namespaces/ directory

2020-07-30 Thread kernel test robot
es-lineary/20200730-200346 base:04b4571786305a76ad81757bbec78eb16a5de582 config: m68k-defconfig (attached as .config) compiler: m68k-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/

Re: 回复: INFO: rcu detected stall in tc_modify_qdisc

2020-07-30 Thread Vinicius Costa Gomes
Hi Eric, Eric Dumazet writes: >> I admit that I am on the fence on that argument: do not let even root >> crash the system (the point that my code is crashing the system gives >> weight to this side) vs. root has great powers, they need to know what >> they are doing. >> >> The argument that I

[PATCH net] tcp: Export tcp_write_queue_purge()

2020-07-30 Thread Florian Fainelli
After tcp_write_queue_purge() got uninlined with commit ac3f09ba3e49 ("tcp: uninline tcp_write_queue_purge()"), it became no longer possible to reference this symbol from kernel modules. Fixes: ac3f09ba3e49 ("tcp: uninline tcp_write_queue_purge()") Signed-off-by: Florian Fainelli --- net/ipv4/tc

Re: [Linux-kernel-mentees] [PATCH] drm/amdgpu: Prevent kernel-infoleak in amdgpu_info_ioctl()

2020-07-30 Thread Luben Tuikov
On 2020-07-29 9:49 a.m., Alex Deucher wrote: > On Wed, Jul 29, 2020 at 4:11 AM Christian König > wrote: >> >> Am 28.07.20 um 21:29 schrieb Peilin Ye: >>> Compiler leaves a 4-byte hole near the end of `dev_info`, causing >>> amdgpu_info_ioctl() to copy uninitialized kernel stack memory to userspace

Re: [PATCH net-next v2] net: dsa: qca8k: Add 802.1q VLAN support

2020-07-30 Thread Vladimir Oltean
On Thu, Jul 30, 2020 at 11:40:29AM +0100, Jonathan McDowell wrote: > > > + > > > + for (vid = vlan->vid_begin; vid <= vlan->vid_end && !ret; ++vid) > > > + ret = qca8k_vlan_add(priv, port, vid, !untagged); > > > + > > > + if (ret) > > > + dev_err(priv->dev, "Failed to add VLAN to po

Re: [PATCH bpf-next 1/1] arm64: bpf: Add BPF exception tables

2020-07-30 Thread Jean-Philippe Brucker
On Thu, Jul 30, 2020 at 09:47:39PM +0200, Daniel Borkmann wrote: > On 7/30/20 4:22 PM, Jean-Philippe Brucker wrote: > > On Thu, Jul 30, 2020 at 08:28:56AM -0400, Qian Cai wrote: > > > On Tue, Jul 28, 2020 at 05:21:26PM +0200, Jean-Philippe Brucker wrote: > > > > When a tracing BPF program attempts

Re: [PATCH net] tcp: Export tcp_write_queue_purge()

2020-07-30 Thread Eric Dumazet
On Thu, Jul 30, 2020 at 2:07 PM Florian Fainelli wrote: > > After tcp_write_queue_purge() got uninlined with commit ac3f09ba3e49 > ("tcp: uninline tcp_write_queue_purge()"), it became no longer possible > to reference this symbol from kernel modules. > > Fixes: ac3f09ba3e49 ("tcp: uninline tcp_wri

Re: [PATCH v3 4/4] vfio/type1: Use iommu_aux_at(de)tach_group() APIs

2020-07-30 Thread Alex Williamson
On Thu, 30 Jul 2020 10:41:32 +0800 Lu Baolu wrote: > Hi Alex, > > On 7/30/20 4:32 AM, Alex Williamson wrote: > > On Tue, 14 Jul 2020 13:57:03 +0800 > > Lu Baolu wrote: > > > >> Replace iommu_aux_at(de)tach_device() with iommu_aux_at(de)tach_group(). > >> It also saves the IOMMU_DEV_FEAT_AUX-

Re: [PATCH 17/24] riscv: use asm-generic/mmu_context.h for no-op implementations

2020-07-30 Thread Palmer Dabbelt
On Mon, 27 Jul 2020 20:33:58 PDT (-0700), npig...@gmail.com wrote: Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Cc: linux-ri...@lists.infradead.org Signed-off-by: Nicholas Piggin --- arch/riscv/include/asm/mmu_context.h | 22 ++ 1 file changed, 2 insertions(+), 20 d

Re: [char-misc-next V3] mei: hdcp: fix mei_hdcp_verify_mprime() input paramter

2020-07-30 Thread Gustavo A. R. Silva
Tomas, The subject line has a typo: s/paramter/parameter Please, see more comments below... On 7/30/20 13:54, Tomas Winkler wrote: > wired_cmd_repeater_auth_stream_req_in has a variable > length array at the end. we use struct_size() overflow > macro to determine the size for the allocation and

[PATCH bpf-next v3 19/29] bpf: eliminate rlimit-based memory accounting for lpm_trie maps

2020-07-30 Thread Roman Gushchin
Do not use rlimit-based memory accounting for lpm_trie maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/lpm_trie.c | 13 - 1 file changed, 13 deletions(-) diff --git a/kernel/bpf/lpm_trie.c b/kernel/b

[PATCH bpf-next v3 07/29] bpf: refine memcg-based memory accounting for hashtab maps

2020-07-30 Thread Roman Gushchin
Include percpu objects and the size of map metadata into the accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/hashtab.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/kernel/bpf/hashtab.c b/kernel/bpf/hashtab.c index 024276787055..9

[PATCH bpf-next v3 15/29] bpf: eliminate rlimit-based memory accounting for cpumap maps

2020-07-30 Thread Roman Gushchin
Do not use rlimit-based memory accounting for cpumap maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/cpumap.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/kernel/bpf/cpumap

[PATCH bpf-next v3 09/29] bpf: memcg-based memory accounting for bpf ringbuffer

2020-07-30 Thread Roman Gushchin
Enable the memcg-based memory accounting for the memory used by the bpf ringbuffer. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/ringbuf.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/kernel/bpf/ringbuf.c b/kernel/bpf/ringbuf.c index 002f8a5c9e

[PATCH bpf-next v3 17/29] bpf: eliminate rlimit-based memory accounting for devmap maps

2020-07-30 Thread Roman Gushchin
Do not use rlimit-based memory accounting for devmap maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/devmap.c | 18 ++ 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/kernel/bpf/dev

[PATCH bpf-next v3 28/29] bpf: eliminate rlimit-based memory accounting for bpf progs

2020-07-30 Thread Roman Gushchin
Do not use rlimit-based memory accounting for bpf progs. It has been replaced with memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- include/linux/bpf.h | 11 -- kernel/bpf/core.c| 12 ++- kernel/bpf/syscall.c | 86 ++---

[PATCH bpf-next v3 21/29] bpf: eliminate rlimit-based memory accounting for reuseport_array maps

2020-07-30 Thread Roman Gushchin
Do not use rlimit-based memory accounting for reuseport_array maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/reuseport_array.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/ke

[PATCH bpf-next v3 26/29] bpf: eliminate rlimit-based memory accounting for xskmap maps

2020-07-30 Thread Roman Gushchin
Do not use rlimit-based memory accounting for xskmap maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- net/xdp/xskmap.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/net/xdp/xskmap.c b/net/xdp/

[PATCH bpf-next v3 13/29] bpf: eliminate rlimit-based memory accounting for arraymap maps

2020-07-30 Thread Roman Gushchin
Do not use rlimit-based memory accounting for arraymap maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/arraymap.c | 24 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/kern

[PATCH bpf-next v3 18/29] bpf: eliminate rlimit-based memory accounting for hashtab maps

2020-07-30 Thread Roman Gushchin
Do not use rlimit-based memory accounting for hashtab maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/hashtab.c | 19 +-- 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/kernel/bpf/h

Re: [PATCH net] tcp: Export tcp_write_queue_purge()

2020-07-30 Thread Florian Fainelli
On 7/30/20 2:16 PM, Eric Dumazet wrote: > On Thu, Jul 30, 2020 at 2:07 PM Florian Fainelli wrote: >> >> After tcp_write_queue_purge() got uninlined with commit ac3f09ba3e49 >> ("tcp: uninline tcp_write_queue_purge()"), it became no longer possible >> to reference this symbol from kernel modules. >

[PATCH bpf-next v3 10/29] bpf: memcg-based memory accounting for socket storage maps

2020-07-30 Thread Roman Gushchin
Account memory used by the socket storage. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- net/core/bpf_sk_storage.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/net/core/bpf_sk_storage.c b/net/core/bpf_sk_storage.c index d3377c90a291..c9b9cd2d11c5 10064

[PATCH bpf-next v3 23/29] bpf: eliminate rlimit-based memory accounting for sockmap and sockhash maps

2020-07-30 Thread Roman Gushchin
Do not use rlimit-based memory accounting for sockmap and sockhash maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- net/core/sock_map.c | 33 ++--- 1 file changed, 6 insertions(+), 27 deletions(-)

[PATCH bpf-next v3 16/29] bpf: eliminate rlimit-based memory accounting for cgroup storage maps

2020-07-30 Thread Roman Gushchin
Do not use rlimit-based memory accounting for cgroup storage maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/local_storage.c | 21 + 1 file changed, 1 insertion(+), 20 deletions(-) diff --git

[PATCH bpf-next v3 29/29] bpf: samples: do not touch RLIMIT_MEMLOCK

2020-07-30 Thread Roman Gushchin
Since bpf is not using rlimit memlock for the memory accounting and control, do not change the limit in sample applications. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- samples/bpf/map_perf_test_user.c| 11 --- samples/bpf/offwaketime_user.c | 2 -- samples/bpf/sockex

[PATCH bpf-next v3 11/29] bpf: refine memcg-based memory accounting for sockmap and sockhash maps

2020-07-30 Thread Roman Gushchin
Include internal metadata into the memcg-based memory accounting. Also include the memory allocated on updating an element. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- net/core/sock_map.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/net/core/sock_map.c b/n

[PATCH bpf-next v3 02/29] bpf: memcg-based memory accounting for bpf maps

2020-07-30 Thread Roman Gushchin
This patch enables memcg-based memory accounting for memory allocated by __bpf_map_area_alloc(), which is used by most map types for large allocations. Following patches in the series will refine the accounting for some map types. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf

[PATCH bpf-next v3 25/29] bpf: eliminate rlimit-based memory accounting for socket storage maps

2020-07-30 Thread Roman Gushchin
Do not use rlimit-based memory accounting for socket storage maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- net/core/bpf_sk_storage.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/net/core/bpf_sk_storage.

[PATCH bpf-next v3 22/29] bpf: eliminate rlimit-based memory accounting for bpf ringbuffer

2020-07-30 Thread Roman Gushchin
Do not use rlimit-based memory accounting for bpf ringbuffer. It has been replaced with the memcg-based memory accounting. bpf_ringbuf_alloc() can't return anything except ERR_PTR(-ENOMEM) and a valid pointer, so to simplify the code make it return NULL in the first case. This allows to drop a cou

[PATCH bpf-next v3 01/29] bpf: memcg-based memory accounting for bpf progs

2020-07-30 Thread Roman Gushchin
Include memory used by bpf programs into the memcg-based accounting. This includes the memory used by programs itself, auxiliary data and statistics. Signed-off-by: Roman Gushchin --- kernel/bpf/core.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/bpf/core.c

[PATCH bpf-next v3 20/29] bpf: eliminate rlimit-based memory accounting for queue_stack_maps maps

2020-07-30 Thread Roman Gushchin
Do not use rlimit-based memory accounting for queue_stack maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/queue_stack_maps.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/k

[PATCH bpf-next v3 24/29] bpf: eliminate rlimit-based memory accounting for stackmap maps

2020-07-30 Thread Roman Gushchin
Do not use rlimit-based memory accounting for stackmap maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/stackmap.c | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/kernel/bpf/s

Re: [PATCH v5 0/6] Add support for GPU DDR BW scaling

2020-07-30 Thread Rob Clark
On Thu, Jul 30, 2020 at 8:37 AM Viresh Kumar wrote: > > On 30-07-20, 08:27, Rob Clark wrote: > > Hmm, I've already sent my pull request to Dave, dropping the patch > > would require force-push and sending a new PR. Which I can do if Dave > > prefers. OTOH I guess it isn't the end of the world if

[PATCH bpf-next v3 04/29] bpf: refine memcg-based memory accounting for cpumap maps

2020-07-30 Thread Roman Gushchin
Include metadata and percpu data into the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/cpumap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/bpf/cpumap.c b/kernel/bpf/cpumap.c index f1c46529929b..74ae9fcbe82e 10

[PATCH bpf-next v3 14/29] bpf: eliminate rlimit-based memory accounting for bpf_struct_ops maps

2020-07-30 Thread Roman Gushchin
Do not use rlimit-based memory accounting for bpf_struct_ops maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/bpf_struct_ops.c | 19 +++ 1 file changed, 3 insertions(+), 16 deletions(-) diff --git

[PATCH bpf-next v3 06/29] bpf: refine memcg-based memory accounting for devmap maps

2020-07-30 Thread Roman Gushchin
Include map metadata and the node size (struct bpf_dtab_netdev) on element update into the accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/devmap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/bpf/devmap.c b/kernel/bpf/devmap.c inde

[PATCH bpf-next v3 27/29] bpf: eliminate rlimit-based memory accounting infra for bpf maps

2020-07-30 Thread Roman Gushchin
Remove rlimit-based accounting infrastructure code, which is not used anymore. Signed-off-by: Roman Gushchin --- include/linux/bpf.h | 12 kernel/bpf/syscall.c | 64 +-- .../selftests/bpf/progs/map_ptr_kern.c| 5 --

[PATCH bpf-next v3 08/29] bpf: memcg-based memory accounting for lpm_trie maps

2020-07-30 Thread Roman Gushchin
Include lpm trie and lpm trie node objects into the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/lpm_trie.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/bpf/lpm_trie.c b/kernel/bpf/lpm_trie.c index 44474bf3ab7a.

[PATCH bpf-next v3 05/29] bpf: memcg-based memory accounting for cgroup storage maps

2020-07-30 Thread Roman Gushchin
Account memory used by cgroup storage maps including the percpu memory for the percpu flavor of cgroup storage and map metadata. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/local_storage.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/

[PATCH bpf-next v3 12/29] bpf: refine memcg-based memory accounting for xskmap maps

2020-07-30 Thread Roman Gushchin
Extend xskmap memory accounting to include the memory taken by the xsk_map_node structure. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- net/xdp/xskmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/xdp/xskmap.c b/net/xdp/xskmap.c index 8367adbbe9df..e574b22d

[PATCH bpf-next v3 00/29] bpf: switch to memcg-based memory accounting

2020-07-30 Thread Roman Gushchin
Currently bpf is using the memlock rlimit for the memory accounting. This approach has its downsides and over time has created a significant amount of problems: 1) The limit is per-user, but because most bpf operations are performed as root, the limit has a little value. 2) It's hard to come u

[PATCH bpf-next v3 03/29] bpf: refine memcg-based memory accounting for arraymap maps

2020-07-30 Thread Roman Gushchin
Include percpu arrays and auxiliary data into the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/arraymap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c index 8ff419b632a6.

Re: [PATCH] tools lib traceevent: Fix memory leak in process_dynamic_array_len

2020-07-30 Thread Steven Rostedt
Arnaldo, Can you pull this into your tree under urgent? https://lore.kernel.org/linux-trace-devel/20200730150236.5392-1-pduples...@efficios.com/ Reviewed-by: Steven Rostedt (VMware) -- Steve On Thu, 30 Jul 2020 11:02:36 -0400 Philippe Duplessis-Guindon wrote: > I compiled with AddressS

Re: [PATCH net] tcp: Export tcp_write_queue_purge()

2020-07-30 Thread David Miller
From: Florian Fainelli Date: Thu, 30 Jul 2020 14:23:50 -0700 > On 7/30/20 2:16 PM, Eric Dumazet wrote: >> On Thu, Jul 30, 2020 at 2:07 PM Florian Fainelli >> wrote: >> Hmmm which module would need this exactly ? > > None in tree unfortunately, and I doubt it would be published one day. > F

Re: [PATCH net] tcp: Export tcp_write_queue_purge()

2020-07-30 Thread Eric Dumazet
On Thu, Jul 30, 2020 at 2:24 PM Florian Fainelli wrote: > > On 7/30/20 2:16 PM, Eric Dumazet wrote: > > On Thu, Jul 30, 2020 at 2:07 PM Florian Fainelli > > wrote: > >> > >> After tcp_write_queue_purge() got uninlined with commit ac3f09ba3e49 > >> ("tcp: uninline tcp_write_queue_purge()"), it be

[PATCH 0/6] perf tools: Add wallclock time conversion support

2020-07-30 Thread Jiri Olsa
hi, this patchset is based on changes made by David Ahern long time ago. The perf code moved a lot since then, but the idea is the same. The patchset is adding the ability to display TOD/wallclock timestamp in 'perf script' output and in 'perf data convert --to-ctf' subcommand, so the converted CT

[PATCH 2/6] perf tools: Store clock references for -k/--clockid option

2020-07-30 Thread Jiri Olsa
Adding new CLOCK_DATA feature that stores reference times when -k/--clockid option is specified. It contains clock id and its reference time together with wall clock time taken at the 'same time', both values are in nanoseconds. The format of data is as below: struct { u32 version; /*

[PATCH 1/6] perf tools: Add clockid_name function

2020-07-30 Thread Jiri Olsa
Adding clockid_name function to get the clock name based on its clockid. It will be used in following changes. Signed-off-by: Jiri Olsa --- tools/perf/builtin-record.c | 11 +++ tools/perf/util/util.h | 2 ++ 2 files changed, 13 insertions(+) diff --git a/tools/perf/builtin-record

[PATCH 3/6] perf tools: Move clockid_res_ns under clock struct

2020-07-30 Thread Jiri Olsa
Moving clockid_res_ns under clock struct, so we have clock related stuff in one place. Signed-off-by: Jiri Olsa --- tools/perf/builtin-record.c | 6 +++--- tools/perf/util/env.h | 2 +- tools/perf/util/header.c| 8 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a

Re: [RFC PATCH 09/14] coresight: etm4x: Add sysreg access helpers

2020-07-30 Thread Mathieu Poirier
On Wed, Jul 22, 2020 at 06:20:35PM +0100, Suzuki K Poulose wrote: > ETMv4.4 architecture defines the system instructions for accessing > ETM via register accesses. Add basic support for accessing a given > register via system instructions. > > Cc: Mathieu Poirier > Cc: Mike Leach > Signed-off-by

[PATCH 5/6] perf script: Change enum perf_output_field values to be 64 bits

2020-07-30 Thread Jiri Olsa
So it's possible to add new values. I did not find any place where the enum values are passed through some number type, so it's safe to make this change. Signed-off-by: Jiri Olsa --- tools/perf/builtin-script.c | 64 ++--- 1 file changed, 32 insertions(+), 32 dele

[PATCH 6/6] perf script: Add tod field to display time of day

2020-07-30 Thread Jiri Olsa
Adding tod field to display time of day column with time of date (wallclock) time. # perf record -k CLOCK_MONOTONIC kill kill: not enough arguments [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.033 MB perf.data (8 samples) ] # perf script

[PATCH 4/6] perf tools: Add support to store time of day in CTF data conversion

2020-07-30 Thread Jiri Olsa
Adding support to convert and store time of day in CTF data conversion for 'perf data convert' subcommand. The perf.data used for conversion needs to have clock data information - must be recorded with -k/--clockid option). New --tod option is added to 'perf data convert' subcommand to convert da

[PATCH] Platform lockdown information in SYSFS

2020-07-30 Thread Daniel Gutson
This patch exports information about the platform lockdown firmware configuration in the sysfs filesystem. In this initial patch, I include some configuration attributes for the system SPI chip. This initial version exports the BIOS Write Enable (bioswe), BIOS Lock Enable (ble), and the SMM Bios W

Re: [PATCH] LICENSES: Replace HTTP links with HTTPS ones

2020-07-30 Thread Philippe Ombredanne
Hi Alexander: On Tue, Jul 21, 2020 at 4:50 PM Greg KH wrote: > > On Mon, Jul 13, 2020 at 10:42:31AM +0200, Alexander A. Klimov wrote: > > Rationale: > > Reduces attack surface on kernel devs opening the links for MITM > > as HTTPS traffic is much harder to manipulate. > > > > Deterministic algori

Re: [PATCH v2] mm/hugetlb: Fix calculation of adjust_range_if_pmd_sharing_possible

2020-07-30 Thread Mike Kravetz
On 7/30/20 1:16 PM, Peter Xu wrote: > This is found by code observation only. > > Firstly, the worst case scenario should assume the whole range was covered by > pmd sharing. The old algorithm might not work as expected for ranges > like (1g-2m, 1g+2m), where the adjusted range should be (0, 1g+2

Re: [PATCH] remoteproc: virtio: support sharing vdev buffer

2020-07-30 Thread Mathieu Poirier
On Thu, 30 Jul 2020 at 00:22, Peng Fan wrote: > > Hi Mathieu, > > > Subject: Re: [PATCH] remoteproc: virtio: support sharing vdev buffer > > > > Hi Peng, > > > > On Wed, Jul 22, 2020 at 09:15:43PM +0800, Peng Fan wrote: > > > Support sharing vdev buffer between multiple vdevs by using name > > > "

[char-misc-next] mei: hdcp: fix mei_hdcp_verify_mprime() input parameter

2020-07-30 Thread Tomas Winkler
wired_cmd_repeater_auth_stream_req_in has a variable length array at the end. we use struct_size() overflow macro to determine the size for the allocation and sending size. This also fixes bug in case number of streams is > 0 in the original submission. This bug was not triggered as the number of s

Re: 回复: INFO: rcu detected stall in tc_modify_qdisc

2020-07-30 Thread Vinicius Costa Gomes
Dmitry Vyukov writes: >> > >> > Also are we talking about CAP_NET_ADMIN in a user ns as well >> > (effectively nobody)? >> >> Just checked, we are talking about CAP_NET_ADMIN in user namespace as >> well. > > OK, so this is not root/admin, this is just any user. Yeah, will fix this. Thanks, --

[char-misc-next V4] mei: hdcp: fix mei_hdcp_verify_mprime() input parameter

2020-07-30 Thread Tomas Winkler
wired_cmd_repeater_auth_stream_req_in has a variable length array at the end. we use struct_size() overflow macro to determine the size for the allocation and sending size. This also fixes bug in case number of streams is > 0 in the original submission. This bug was not triggered as the number of s

Re: [RFC PATCH 0/5] madvise MADV_DOEXEC

2020-07-30 Thread Eric W. Biederman
Steven Sistare writes: > On 7/30/2020 1:49 PM, Matthew Wilcox wrote: >> On Thu, Jul 30, 2020 at 01:35:51PM -0400, Steven Sistare wrote: >>> mshare + VA reservation is another possible solution. >>> >>> Or MADV_DOEXEC alone, which is ready now. I hope we can get back to >>> reviewing that. >> >

Re: [PATCH net] tcp: Export tcp_write_queue_purge()

2020-07-30 Thread Florian Fainelli
On 7/30/20 2:32 PM, Eric Dumazet wrote: > On Thu, Jul 30, 2020 at 2:24 PM Florian Fainelli wrote: >> >> On 7/30/20 2:16 PM, Eric Dumazet wrote: >>> On Thu, Jul 30, 2020 at 2:07 PM Florian Fainelli >>> wrote: After tcp_write_queue_purge() got uninlined with commit ac3f09ba3e49 ("tc

[PATCH v2] scsi: 3w-9xxx: Fix endianness issues found by sparse

2020-07-30 Thread Samuel Holland
The main issue observed was at the call to scsi_set_resid, where the byteswapped parameter would eventually trigger the alignment check at drivers/scsi/sd.c:2009. At that point, the kernel would continuously complain about an "Unaligned partial completion", and no further I/O could occur. This get

Re: [PATCH 0/6] perf tools: Add wallclock time conversion support

2020-07-30 Thread peterz
On Thu, Jul 30, 2020 at 11:39:44PM +0200, Jiri Olsa wrote: > The patchset is adding the ability to display TOD/wallclock timestamp > in 'perf script' output and in 'perf data convert --to-ctf' subcommand, > so the converted CTF data contain TOD/wallclock timestamps. But why? Wallclock is a horrib

Re: [PATCH 00/23] proc: Introduce /proc/namespaces/ directory to expose namespaces lineary

2020-07-30 Thread Eric W. Biederman
Kirill Tkhai writes: > On 30.07.2020 17:34, Eric W. Biederman wrote: >> Kirill Tkhai writes: >> >>> Currently, there is no a way to list or iterate all or subset of namespaces >>> in the system. Some namespaces are exposed in /proc/[pid]/ns/ directories, >>> but some also may be as open files,

Re: [PATCH 0/9] KVM: x86: TDP level cleanups and shadow NPT fix

2020-07-30 Thread Paolo Bonzini
On 16/07/20 05:41, Sean Christopherson wrote: > The primary purpose of this series is to implement a suggestion from Paolo > to have the MMU make the decision between 4 and 5 level EPT/TDP (when > 5-level page tables are supported). Having the MMU "own" the decision of > whether or not to use 5-le

[PATCH v2] staging: atomisp: move null check to earlier point

2020-07-30 Thread Cengiz Can
`find_gmin_subdev` function that returns a pointer to `struct gmin_subdev` can return NULL. In `gmin_v2p8_ctrl` there's a call to this function but the possibility of a NULL was not checked before its being dereferenced. ie: ``` /* Acquired here v */ struct gmin_subdev *gs = find_gmin_sub

Re: [GIT PULL tip/core/rcu] RCU commits for v5.9

2020-07-30 Thread Ingo Molnar
* Paul E. McKenney wrote: > Hello, Ingo! > > This pull request contains the following changes: > > 1.Documentation updates. > > https://lore.kernel.org/lkml/20200623000923.GA25047@paulmck-ThinkPad-P72 > > 2.Miscellaneous fixes. > > https://lore.kernel.org/lkml/202006230

linux-next: Fixes tag needs some work in the mac80211-next tree

2020-07-30 Thread Stephen Rothwell
Hi all, In commit 5fa4ab3cf34e ("mac80211: avoid bss color setting in non-HE modes") Fixes tag Fixes: eb024f1abca3("mac80211: avoid bss color setting in non-he mode") has these problem(s): - Target SHA1 does not exist I can't find which commit is meant. -- Cheers, Stephen Rothwell

Re: [PATCH v2 0/3] media: vimc: Allow multiple capture devices to use the same sensor

2020-07-30 Thread Laurent Pinchart
Hi Kaaira, On Thu, Jul 30, 2020 at 11:39:49PM +0530, Kaaira Gupta wrote: > On Thu, Jul 30, 2020 at 01:51:12PM +0300, Laurent Pinchart wrote: > > On Fri, Jul 24, 2020 at 05:32:10PM +0530, Kaaira Gupta wrote: > > > This is version 2 of the patch series posted by Niklas for allowing > > > multiple st

Re: [PATCH] sched: Provide USF for the portable equipment.

2020-07-30 Thread Steven Rostedt
On Thu, 30 Jul 2020 21:35:43 +0800 Dongdong Yang wrote: I'll let others decide the value of this, but I have some comments. > > Signed-off-by: Dongdong Yang > Signed-off-by: Jun Tao > Signed-off-by: Qiwu Huang > Signed-off-by: Geliang Tang > Signed-off-by: Peng Wang Why all the signed-off

Re: [PATCH 11/23] fs: Add /proc/namespaces/ directory

2020-07-30 Thread kernel test robot
es-lineary/20200730-200346 base:04b4571786305a76ad81757bbec78eb16a5de582 config: csky-defconfig (attached as .config) compiler: csky-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/

Re: [PATCH] ASoC: rk3399_gru_sound: Add DAPM pins, kcontrols for jack detection

2020-07-30 Thread Mark Brown
On Tue, 21 Jul 2020 21:27:10 +0300, Alper Nebi Yasak wrote: > PulseAudio (and perhaps other userspace utilities) can not detect any > jack for rk3399_gru_sound as the driver doesn't expose related Jack > kcontrols. > > This patch adds two DAPM pins to the headset jack, where the > snd_soc_card_jac

Re: [PATCH v2 1/5] ASoC: amd: Renaming snd-soc-card structure and fields

2020-07-30 Thread Mark Brown
On Tue, 28 Jul 2020 21:32:51 +0530, Ravulapati Vishnu vardhan rao wrote: > As in future our machine driver supports multiple codecs > So changing naming convention of snd_soc_card struct and its fields. Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Than

<    5   6   7   8   9   10   11   12   13   >