[PATCH v2 40/41] media: atomisp: get rid of set_fs() dirty hacks

2020-05-29 Thread Mauro Carvalho Chehab
This file was based on an older version of the V4L2 compat32 code, which had this ugly hack. Change the code to remove the hack. Yet, the entire compat32 code is currently commented out. So, let's add a FIXME note at the code, as we may need to check if some of the atomisp specific ioctls would re

[PATCH v2 31/41] media: atomisp: get rid of an error abstraction layer

2020-05-29 Thread Mauro Carvalho Chehab
There is an abstraction layer there meant to convert to the Linux standard error codes. As the driver now use such errors everywhere. we can get rid of this. Signed-off-by: Mauro Carvalho Chehab --- .../staging/media/atomisp/pci/atomisp_cmd.c | 2 +- .../pci/camera/util/interface/ia_css_util.

[PATCH v2 19/41] media: atomisp: remove kvmalloc/kvcalloc abstractions

2020-05-29 Thread Mauro Carvalho Chehab
The sh_css layer adds an abstraction for kvmalloc/kvcalloc. Get rid of them. Most of the work here was done by this small coccinelle script: @@ expression size; @@ - sh_css_malloc(size) + kvmalloc(size, GFP_KERNEL) @@ expression n; expression size; @@ - sh_css_calloc(n, size) + kvcalloc(n, si

[PATCH v2 34/41] media: atomisp: get rid of system_types.h

2020-05-29 Thread Mauro Carvalho Chehab
This is just a wrapper for system_local.h. Signed-off-by: Mauro Carvalho Chehab --- .../base/refcount/interface/ia_css_refcount.h | 2 +- .../input_formatter_global.h | 2 +- .../pci/hive_isp_css_common/irq_global.h | 2 +- .../pci/hive_isp_css_common/isp_global.h |

[PATCH v2 26/41] media: atomisp: Remove binary_supports_input_format

2020-05-29 Thread Mauro Carvalho Chehab
From: Nathan Chancellor Clang warns: drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c:1707:64: warning: implicit conversion from enumeration type 'const enum ia_css_frame_format' to different enumeration type 'enum atomisp_input_format' [-Wenum-conversion] binary_supports_in

[PATCH v2 38/41] media: atomisp: add a debug message at hmm free

2020-05-29 Thread Mauro Carvalho Chehab
In order to check if aren't there any memory leaks, let's add a debug print for hmm_free(). Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/hmm/hmm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/media/atomisp/pci/hmm/hmm.c b/drivers/staging/me

[PATCH v2 05/41] media: atomisp: get rid of mmgr_load and mmgr_store

2020-05-29 Thread Mauro Carvalho Chehab
Those functions are just wrappers for hmm_load/hmm_store. Signed-off-by: Mauro Carvalho Chehab --- .../pci/hive_isp_css_common/host/debug.c | 8 +++--- .../hive_isp_css_common/host/debug_private.h | 8 +++--- .../memory_access/memory_access.h | 20 - drivers/stagi

[PATCH v2 21/41] media: atomisp: Clean up if block in sh_css_sp_init_stage

2020-05-29 Thread Mauro Carvalho Chehab
From: Nathan Chancellor Clang warns: ../drivers/staging/media/atomisp/pci/sh_css_sp.c:1039:23: warning: address of 'binary->in_frame_info' will always evaluate to 'true' [-Wpointer-bool-conversion] } else if (&binary->in_frame_info) { ~~ ^

[PATCH v2 27/41] media: atomisp: avoid an extra memset() when alloc memory

2020-05-29 Thread Mauro Carvalho Chehab
Use the variant which zeroes the memory when allocating, instead of having an explicit memset. Signed-off-by: Mauro Carvalho Chehab --- .../staging/media/atomisp/pci/runtime/pipeline/src/pipeline.c | 3 +-- drivers/staging/media/atomisp/pci/sh_css.c | 3 +-- 2 files changed,

[PATCH v2 36/41] media: atomisp: print firmware data during load

2020-05-29 Thread Mauro Carvalho Chehab
While there's a way to list the firmware binaries in runtime, it is worth to also print it during firmware load. One advantage is that this code also introduces additional checks with regards to invalid firmware types, which can be useful to identify problems. Signed-off-by: Mauro Carvalho Chehab

[PATCH v2 28/41] media: atomisp: remove some trivial wrappers from compat css20

2020-05-29 Thread Mauro Carvalho Chehab
There are tons of code inside atomisp_compat_css20.c, but several of them are just trivial wrappers to other functions. Getting rid of all of them will take some time, but let's start getting rid of some of the trivial ones. Signed-off-by: Mauro Carvalho Chehab --- .../staging/media/atomisp/pci

[PATCH v2 37/41] media: atomisp: allow passing firmware name at modprobe time

2020-05-29 Thread Mauro Carvalho Chehab
It can be useful to be able to test different firmware files at modprobe time, in order to be able to test different variants without much efforts. Signed-off-by: Mauro Carvalho Chehab --- .../staging/media/atomisp/pci/atomisp_v4l2.c | 30 --- 1 file changed, 19 insertions(+), 1

[PATCH v2 39/41] media: atomisp: add some debug messages when binaries are used

2020-05-29 Thread Mauro Carvalho Chehab
The ISP firmware logic is complex, as several binaries are contained into a single file. Print debug messages: - with a stack dump if binary not found; - when a firmware is selected. Signed-off-by: Mauro Carvalho Chehab --- .../atomisp/pci/runtime/binary/src/binary.c | 31

[PATCH v2 00/41] More atomisp fixes and cleanups

2020-05-29 Thread Mauro Carvalho Chehab
The first 20 patches on this series were already submitted, but I forgot to c/c linux-media. So, I'm just resending, without any changes. Most of them are working at the memory management abstraction, cleaning it, removing abstraction layers and getting rid of legacy stuff. Patch 20 contains an im

[PATCH v2 35/41] media: atomisp: provide more details about the firmware binaries

2020-05-29 Thread Mauro Carvalho Chehab
In order to make easier to identify what a firmware file contains, add more info at the firmware dump log facility. Signed-off-by: Mauro Carvalho Chehab --- .../media/atomisp/pci/atomisp_compat_css20.c | 39 +-- .../media/atomisp/pci/ia_css_acc_types.h | 4 +- .../media/at

[PATCH v2 17/41] media: atomisp: add debug functions for received events

2020-05-29 Thread Mauro Carvalho Chehab
For debugging purposes, it helps to know what event was actually received. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/atomisp_compat_css20.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c b/dr

[PATCH v2 25/41] media: atomisp: Avoid overflow in compute_blending

2020-05-29 Thread Mauro Carvalho Chehab
From: Nathan Chancellor Clang warns: drivers/staging/media/atomisp/pci/isp/kernels/xnr/xnr_3.0/ia_css_xnr3.host.c:129:35: warning: implicit conversion from 'unsigned long' to 'int32_t' (aka 'int') changes value from 18446744073709543424 to -8192 [-Wconstant-conversion] return MAX(MIN(isp

[PATCH v2 23/41] media: atomisp: Remove unnecessary NULL checks in ia_css_pipe_load_extension

2020-05-29 Thread Mauro Carvalho Chehab
From: Nathan Chancellor Clang warns: ../drivers/staging/media/atomisp/pci/sh_css.c:8537:14: warning: address of 'pipe->output_stage' will always evaluate to 'true' [-Wpointer-bool-conversion] if (&pipe->output_stage) ~~ ~~^~~~ ../drivers/staging/medi

[PATCH v2 03/41] media: atomisp: reduce abstraction at ia_css_memory_access

2020-05-29 Thread Mauro Carvalho Chehab
Yet another memory abstraction layer. Getting rid of this may be a little trickier, but let's reduce it to a minimal. Signed-off-by: Mauro Carvalho Chehab --- .../staging/media/atomisp/include/hmm/hmm.h | 3 - .../memory_access/memory_access.h | 61 +-- drivers/sta

[PATCH v2 15/41] media: atomisp: add debug for hmm alloc

2020-05-29 Thread Mauro Carvalho Chehab
The hmm code is still complex and has bugs. Add a debug print when memory gets allocated, in order to help identifying what's happening out there. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/hmm/hmm.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff

[PATCH v2 09/41] media: atomisp: hmm_bo: untag user pointers

2020-05-29 Thread Mauro Carvalho Chehab
The kernel ABI was extended to allow pass tagged user pointers. Untag the pointers in this function. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/hmm/hmm_bo.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/media/atomisp/pci/hmm/hmm_bo.c b/d

[PATCH v2 13/41] media: atomisp: fix driver caps

2020-05-29 Thread Mauro Carvalho Chehab
This device driver is not MC-centric. So, remove the wrong caps from it. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/atomisp_subdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp_subdev.c b/drivers

[PATCH v2 04/41] media: atomisp: go one step further to drop ia_css_memory_access.c

2020-05-29 Thread Mauro Carvalho Chehab
Move the attrs handling into hmm, simplifying even further what the ia_css_memory_access.c file does. Yet, the returned type for ia_css_memory_access.c is an integer, instead of a pointer. Signed-off-by: Mauro Carvalho Chehab --- .../staging/media/atomisp/include/hmm/hmm.h | 3 ++- .../media

[PATCH v2 32/41] media: atomisp: don't cause a warn if probe failed

2020-05-29 Thread Mauro Carvalho Chehab
When probe fails, it is possible that hmm_init() to not be called. On such case, hmm_cleanup() will cause a WARN_ON(). Avoid it by adding an explicit check at hmm_cleanup() to ensure that the hmm code was properly initialized. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomi

[PATCH 2/4] workqueue: don't check wq->rescuer in rescuer

2020-05-29 Thread Lai Jiangshan
Now rescuer checks pwq->nr_active before requeues the pwq, it is a more robust check and the rescuer must be still valid. Signed-off-by: Lai Jiangshan --- kernel/workqueue.c | 23 +-- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/kernel/workqueue.c b/kernel/w

[PATCH 3/4] workqueue: free wq->unbound_attrs earlier

2020-05-29 Thread Lai Jiangshan
wq->unbound_attrs is never accessed in rcu read site, so that it can be freed earlier and relieves memory pressure earlier, although slightly. Signed-off-by: Lai Jiangshan --- kernel/workqueue.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/workqueue.c b/kernel/wor

linux-next: manual merge of the kvm-arm tree with the arm64 tree

2020-05-29 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the kvm-arm tree got a conflict in: arch/arm64/include/asm/ptrace.h between commit: 8ef8f360cf30 ("arm64: Basic Branch Target Identification support") from the arm64 tree and commit: d9d7d84d9906 ("KVM: arm64: Parametrize exception entry with a target

Re: [PATCH v4 1/4] sysctl: Add register_sysctl_init() interface

2020-05-29 Thread Luis Chamberlain
On Tue, May 19, 2020 at 11:31:08AM +0800, Xiaoming Ni wrote: > --- a/kernel/sysctl.c > +++ b/kernel/sysctl.c > @@ -3358,6 +3358,25 @@ int __init sysctl_init(void) > kmemleak_not_leak(hdr); > return 0; > } > + > +/* > + * The sysctl interface is used to modify the interface value, > + *

[PATCH] venus: move platform specific data to platform file

2020-05-29 Thread Dikshita Agarwal
Move all data specific to platform into a separate file. Signed-off-by: Dikshita Agarwal --- drivers/media/platform/qcom/venus/Makefile | 3 +- drivers/media/platform/qcom/venus/core.c | 20 ++--- drivers/media/platform/qcom/venus/core.h | 10 +-- drivers

[PATCH v2 1/1] drivers: mtd: spi-nor: update read capabilities for w25q64 and s25fl064k

2020-05-29 Thread Rayagonda Kokatanur
Both w25q64 and s25fl064k nor flash support QUAD and DUAL read command, hence update the same in flash_info table. This is tested on Broadcom Stingray SoC (bcm958742t). Signed-off-by: Rayagonda Kokatanur --- Changes from v1: -Address review comments from Vignesh Raghavendra Update commit mess

[PATCH] venus: Add platform specific capabilities

2020-05-29 Thread Dikshita Agarwal
Add platform specific capabilities and use them in place of firmware capabilities. Signed-off-by: Dikshita Agarwal --- drivers/media/platform/qcom/venus/core.c | 3 + drivers/media/platform/qcom/venus/hfi_helper.h | 3 +- drivers/media/platform/qcom/venus/hfi_parser.c | 21

Re: [PATCH] usb/phy-generic: Add support for OTG VBUS supply control

2020-05-29 Thread Peter Chen
On 20-05-29 07:47:37, Mike Looijmans wrote: > > Met vriendelijke groet / kind regards, > > Mike Looijmans > System Expert > > > TOPIC Embedded Products B.V. > Materiaalweg 4, 5681 RJ Best > The Netherlands > > T: +31 (0) 499 33 69 69 > E: mike.looijm...@topicproducts.com > W: > https://eur01.

Re: [PATCH] mm, memcg: reclaim more aggressively before high allocator throttling

2020-05-29 Thread Michal Hocko
On Thu 28-05-20 16:29:44, Johannes Weiner wrote: [...] > How about this: > > Reclaim memcg_nr_pages_over_high in the first iteration, then switch > to SWAP_CLUSTER_MAX in the retries. Yes, that makes much more sense to me. -- Michal Hocko SUSE Labs

Re: [PATCH][next] RDMA/hns: remove duplicate assignment to pointer raq

2020-05-29 Thread oulijun
在 2020/5/28 23:04, Colin King 写道: From: Colin Ian King The pointer raq is being assigned twice. Fix this by removing one of the redundant assignments. Fixes: 14ba87304bf9 ("RDMA/hns: Remove redundant type cast for general pointers") Addressses-Coverity: ("Evaluation order violation") Signe

Re: [PATCH v4 1/4] sysctl: Add register_sysctl_init() interface

2020-05-29 Thread Xiaoming Ni
On 2020/5/29 15:09, Luis Chamberlain wrote: On Tue, May 19, 2020 at 11:31:08AM +0800, Xiaoming Ni wrote: --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -3358,6 +3358,25 @@ int __init sysctl_init(void) kmemleak_not_leak(hdr); return 0; } + +/* + * The sysctl interface is used to

Re: [PATCH] drm/radeon: Convert get_user_pages() --> pin_user_pages()

2020-05-29 Thread John Hubbard
On 2020-05-28 23:49, Souptick Joarder wrote: ... This is what case 3 was *intended* to cover, but it looks like case 3 needs to be written a little better. I'll attempt that, and Cc you on the actual patch to -mm. (I think we also need a case 5 for an unrelated scenario, too, so it's time.) The

Re: [PATCH] mm, memcg: reclaim more aggressively before high allocator throttling

2020-05-29 Thread Michal Hocko
On Thu 28-05-20 17:48:48, Chris Down wrote: > Michal Hocko writes: > > > We send a simple bug fix: bring this instance of reclaim in line with > > > how everybody else is using the reclaim API, to meet the semantics as > > > they are intendend and documented. > > > > Here is where we are not on th

Re: [PATCH v2 2/3] seccomp: Introduce addfd ioctl to seccomp user notifier

2020-05-29 Thread Kees Cook
On Thu, May 28, 2020 at 04:08:57AM -0700, Sargun Dhillon wrote: > This adds a seccomp notifier ioctl which allows for the listener to "add" > file descriptors to a process which originated a seccomp user > notification. This allows calls like mount, and mknod to be "implemented", > as the return va

Re: [RFC] METADATA design using V4l2 Request API

2020-05-29 Thread Hans Verkuil
On 29/05/2020 04:18, Nicolas Dufresne wrote: > Le jeudi 28 mai 2020 à 16:18 +0530, diksh...@codeaurora.org a écrit : >>> not allowed. So I need to know more about this. >>> Regards, >>>Hans >> >> we need this for use cases like HDR10+ where metadata info is part of >> the bitstream. >> >> T

Re: linux-next: Fixes tag needs some work in the spi-nor tree

2020-05-29 Thread Tudor.Ambarus
On Friday, May 29, 2020 12:06:47 AM EEST Stephen Rothwell wrote: > Hi all, Hi, Stephen, > > In commit > > 5587fa489747 ("mtd: spi-nor: spansion: fix writes on S25FS512S") > > Fixes tag > > Fixes: dfd2b74530e ("mtd: spi-nor: add Spansion S25FS512S ID") > > has these problem(s): > > - S

RE: Oops at boot with linux-next kernel with IMA boot options

2020-05-29 Thread Roberto Sassu
> From: Takashi Iwai [mailto:ti...@suse.de] > On Thu, 28 May 2020 19:36:55 +0200, > Roberto Sassu wrote: > > > > > From: linux-integrity-ow...@vger.kernel.org [mailto:linux-integrity- > > > ow...@vger.kernel.org] On Behalf Of Takashi Iwai > > > On Thu, 28 May 2020 17:35:16 +0200, > > > Takashi Iwai

[PATCH v4 3/7] mtd: spi-nor: sfdp: parse command sequences to change octal DTR mode

2020-05-29 Thread Mason Yang
A set of simple command sequences is provided which can be executed directly by the host controller to enable octal DTR mode. Each command sequence is 8 per byte for single SPI mode. Signed-off-by: Mason Yang --- drivers/mtd/spi-nor/core.h | 20 + drivers/mtd/spi-nor/sfdp.c | 104 +

[PATCH v4 1/7] mtd: spi-nor: sfdp: get octal mode maximum speed from BFPT

2020-05-29 Thread Mason Yang
Get maximum operation speed of device in octal mode from BFPT 20th DWORD. Signed-off-by: Mason Yang --- drivers/mtd/spi-nor/core.h | 2 ++ drivers/mtd/spi-nor/sfdp.c | 36 drivers/mtd/spi-nor/sfdp.h | 4 3 files changed, 42 insertions(+) diff --git a/

[PATCH v4 6/7] spi: mxic: patch for octal DTR mode support

2020-05-29 Thread Mason Yang
Driver patch for octal 8D-8D-8D mode support. Signed-off-by: Mason Yang --- drivers/spi/spi-mxic.c | 98 +- 1 file changed, 66 insertions(+), 32 deletions(-) diff --git a/drivers/spi/spi-mxic.c b/drivers/spi/spi-mxic.c index 69491f3..a9b3817 10064

[PATCH v4 2/7] mtd: spi-nor: sfdp: parse xSPI Profile 1.0 table

2020-05-29 Thread Mason Yang
JESD251, xSPI profile 1.0 table supports octal DTR mode. Extract information like the fast read opcode, dummy cycles for various frequencies, the number of dummy cycles needed for a Read Status Register command, the number of address bytes needed for a Read Status Register command, read volatile re

[PATCH v4 7/7] mtd: spi-nor: macronix: Add Octal 8D-8D-8D supports for Macronix mx25uw51245g

2020-05-29 Thread Mason Yang
Macronix mx25uw51245g is a SPI NOR that supports 1-1-1/8-8-8 mode. Correct the dummy cycles to device for various frequencies after xSPI profile 1.0 table parsed. Enable mx25uw51245g to Octal DTR mode by executing the command sequences to change to octal DTR mode. Signed-off-by: Mason Yang ---

[PATCH v4 5/7] mtd: spi-nor: core: execute command sequences to change octal DTR mode

2020-05-29 Thread Mason Yang
Execute command sequences to change octal DTR mode. Signed-off-by: Mason Yang --- drivers/mtd/spi-nor/core.c | 71 ++ drivers/mtd/spi-nor/core.h | 1 + 2 files changed, 72 insertions(+) diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/co

[PATCH v4 0/7] mtd: spi-nor: add xSPI Octal DTR support

2020-05-29 Thread Mason Yang
Hello, JESD216C has defined specification for Octal 8S-8S-8S and 8D-8D-8D. Based on JEDEC216C Basic Flash Parameter Table (BFPT) driver extract DWORD-18: command and command extension type. DWORD-20: Maximum operation speed of device in Octal mode. xSPI profile 1.0 table: DWORD-1: Read Fast comma

Re: [PATCH v4 1/4] sysctl: Add register_sysctl_init() interface

2020-05-29 Thread Luis Chamberlain
On Fri, May 29, 2020 at 03:27:22PM +0800, Xiaoming Ni wrote: > On 2020/5/29 15:09, Luis Chamberlain wrote: > > On Tue, May 19, 2020 at 11:31:08AM +0800, Xiaoming Ni wrote: > > > --- a/kernel/sysctl.c > > > +++ b/kernel/sysctl.c > > > @@ -3358,6 +3358,25 @@ int __init sysctl_init(void) > > >

[PATCH v4 4/7] mtd: spi-nor: core: add configuration register 2 read & write support

2020-05-29 Thread Mason Yang
Configuration register 2 is to set the device operation condition like STR or DTR mode at address offset 0 and DQS mode at address offset 0x200. Each device has various address offset for it's specific operatoin setting. Signed-off-by: Mason Yang --- drivers/mtd/spi-nor/core.c | 78

Re: [PATCH v2 2/3] seccomp: Introduce addfd ioctl to seccomp user notifier

2020-05-29 Thread Christian Brauner
On Fri, May 29, 2020 at 12:31:37AM -0700, Kees Cook wrote: > On Thu, May 28, 2020 at 04:08:57AM -0700, Sargun Dhillon wrote: > > This adds a seccomp notifier ioctl which allows for the listener to "add" > > file descriptors to a process which originated a seccomp user > > notification. This allows

Re: [PATCH] staging: gasket: Convert get_user_pages*() --> pin_user_pages*()

2020-05-29 Thread John Hubbard
On 2020-05-28 23:27, Souptick Joarder wrote: On Fri, May 29, 2020 at 11:46 AM Souptick Joarder wrote: On Thu, May 28, 2020 at 4:34 PM Dan Carpenter wrote: On Thu, May 28, 2020 at 02:32:42AM +0530, Souptick Joarder wrote: This code was using get_user_pages_fast(), in a "Case 2" scenario (DM

[PATCH] dt-bindings: thermal: Convert qoriq to json-schema

2020-05-29 Thread Anson Huang
Convert the qoriq thermal binding to DT schema format using json-schema Signed-off-by: Anson Huang --- .../devicetree/bindings/thermal/qoriq-thermal.txt | 71 - .../devicetree/bindings/thermal/qoriq-thermal.yaml | 111 + 2 files changed, 111 insertions(+), 71 de

[PATCH 07/13] test_sysctl: use new sysctl subdir helper register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
This simplifies the code considerably. The following coccinelle SmPL grammar rule was used to transform this code. // pycocci sysctl-subdir.cocci lib/test_sysctl.c @c1@ expression E1; identifier subdir, sysctls; @@ static struct ctl_table subdir[] = { { .procname = E1,

[PATCH 10/13] eventpoll: simplify sysctl declaration with register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
From: Xiaoming Ni Move epoll_table sysctl to fs/eventpoll.c and remove the clutter out of kernel/sysctl.c by using register_sysctl_subdir().. Signed-off-by: Xiaoming Ni Signed-off-by: Luis Chamberlain --- fs/eventpoll.c | 10 +- include/linux/poll.h | 2 -- include/linux/sy

[PATCH 11/13] random: simplify sysctl declaration with register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
From: Xiaoming Ni Move random_table sysctl from kernel/sysctl.c to drivers/char/random.c and use register_sysctl_subdir() to help remove the clutter out of kernel/sysctl.c. Signed-off-by: Xiaoming Ni Signed-off-by: Luis Chamberlain --- drivers/char/random.c | 14 -- include/linux

[PATCH 01/13] sysctl: add new register_sysctl_subdir() helper

2020-05-29 Thread Luis Chamberlain
Often enough all we need to do is create a subdirectory so that we can stuff sysctls underneath it. However, *if* that directory was already created early on the boot sequence we really have no need to use the full boiler plate code for it, we can just use local variables to help us guide sysctl to

[PATCH 09/13] firmware_loader: simplify sysctl declaration with register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
From: Xiaoming Ni Move the firmware config sysctl table to fallback_table.c and use the new register_sysctl_subdir() helper. This removes the clutter from kernel/sysctl.c. Signed-off-by: Xiaoming Ni Signed-off-by: Luis Chamberlain --- drivers/base/firmware_loader/fallback.c | 4 d

[PATCH 08/13] inotify: simplify sysctl declaration with register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
From: Xiaoming Ni move inotify_user sysctl to inotify_user.c and use the new register_sysctl_subdir() helper. Signed-off-by: Xiaoming Ni Signed-off-by: Luis Chamberlain --- fs/notify/inotify/inotify_user.c | 11 ++- include/linux/inotify.h | 3 --- kernel/sysctl.c

[PATCH 06/13] ocfs2: use new sysctl subdir helper register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
This simplifies the code considerably. The following coccinelle SmPL grammar rule was used to transform this code. // pycocci sysctl-subdir.cocci fs/ocfs2/stackglue.c @c1@ expression E1; identifier subdir, sysctls; @@ static struct ctl_table subdir[] = { { .procname = E1,

[PATCH 04/13] i915: use new sysctl subdir helper register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
This simplifies the code considerably. The following coccinelle SmPL grammar rule was used to transform this code. // pycocci sysctl-subdir.cocci drivers/gpu/drm/i915/i915_perf.c @c1@ expression E1; identifier subdir, sysctls; @@ static struct ctl_table subdir[] = { { .pr

[PATCH 12/13] sysctl: add helper to register empty subdir

2020-05-29 Thread Luis Chamberlain
The way to create a subdirectory from the base set of directories is a bit obscure, so provide a helper which makes this clear, and also helps remove boiler plate code required to do this work. Signed-off-by: Luis Chamberlain --- include/linux/sysctl.h | 7 +++ kernel/sysctl.c| 16 +

[PATCH 03/13] hpet: use new sysctl subdir helper register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
This simplifies the code considerably. The following coccinelle SmPL grammar rule was used to transform this code. // pycocci sysctl-subdir.cocci drivers/char/hpet.c @c1@ expression E1; identifier subdir, sysctls; @@ static struct ctl_table subdir[] = { { .procname = E1,

[PATCH 13/13] fs: move binfmt_misc sysctl to its own file

2020-05-29 Thread Luis Chamberlain
This moves the binfmt_misc sysctl to its own file to help remove clutter from kernel/sysctl.c. Signed-off-by: Luis Chamberlain --- fs/binfmt_misc.c | 1 + kernel/sysctl.c | 7 --- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c index f69a043

[PATCH 02/13] cdrom: use new sysctl subdir helper register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
This simplifies the code considerably. The following coccinelle SmPL grammar rule was used to transform this code. // pycocci sysctl-subdir.cocci drivers/cdrom/cdrom.c @c1@ expression E1; identifier subdir, sysctls; @@ static struct ctl_table subdir[] = { { .procname = E1

[PATCH 05/13] macintosh/mac_hid.c: use new sysctl subdir helper register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
This simplifies the code considerably. The following coccinelle SmPL grammar rule was used to transform this code. // pycocci sysctl-subdir.cocci drivers/macintosh/mac_hid.c @c1@ expression E1; identifier subdir, sysctls; @@ static struct ctl_table subdir[] = { { .procnam

[PATCH 00/13] sysctl: spring cleaning

2020-05-29 Thread Luis Chamberlain
Me and Xiaoming are working on some kernel/sysctl.c spring cleaning. During a recent linux-next merge conflict it became clear that the kitchen sink on kernel/sysctl.c creates too many conflicts, and so we need to do away with stuffing everyone's knobs on this one file. This is part of that work.

Re: [PATCH v2 3/3] selftests/seccomp: Test SECCOMP_IOCTL_NOTIF_ADDFD

2020-05-29 Thread Kees Cook
On Thu, May 28, 2020 at 04:08:58AM -0700, Sargun Dhillon wrote: > + EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_SEND, &resp), 0); > + > + nextid = req.id + 1; > + > + /* Wait for getppid to be called for the second time */ > + sleep(1); I always rebel at finding "sleep" in tests.

[PATCH RESEND] Enable full width counting for KVM: x86/pmu

2020-05-29 Thread Like Xu
Hi Paolo, As you said, you will queue the v3 of KVM patch, but it looks like we are missing that part at the top of the kvm/queue tree. For your convenience, let me resend v4 so that we can upstream this feature in the next merged window. Also this patch series includes patches for qemu and kvm-u

[PATCH RESEND v4 1/2] KVM: x86/pmu: Tweak kvm_pmu_get_msr to pass 'struct msr_data' in

2020-05-29 Thread Like Xu
From: Wei Wang Change kvm_pmu_get_msr() to get the msr_data struct, as the host_initiated field from the struct could be used by get_msr. This also makes this API consistent with kvm_pmu_set_msr. No functional changes. Signed-off-by: Wei Wang --- arch/x86/kvm/pmu.c | 4 ++-- arch/x8

[PATCH RESEND v4 2/2] KVM: x86/pmu: Support full width counting

2020-05-29 Thread Like Xu
Intel CPUs have a new alternative MSR range (starting from MSR_IA32_PMC0) for GP counters that allows writing the full counter width. Enable this range from a new capability bit (IA32_PERF_CAPABILITIES.FW_WRITE[bit 13]). The guest would query CPUID to get the counter width, and sign extends the co

[kvm-unit-tests PATCH] x86: pmu: Test full-width counter writes support

2020-05-29 Thread Like Xu
When the full-width writes capability is set, use the alternative MSR range to write larger sign counter values (up to GP counter width). Signed-off-by: Like Xu --- lib/x86/msr.h | 1 + x86/pmu.c | 125 -- 2 files changed, 102 insertions(+),

[Qemu-devel PATCH] target/i386: define a new MSR based feature word - FEAT_PERF_CAPABILITIES

2020-05-29 Thread Like Xu
The Perfmon and Debug Capability MSR named IA32_PERF_CAPABILITIES is a feature-enumerating MSR, which only enumerates the feature full-width write (via bit 13) by now which indicates the processor supports IA32_A_PMCx interface for updating bits 32 and above of IA32_PMCx. The existence of MSR IA32

Re: [PATCH v2 2/3] seccomp: Introduce addfd ioctl to seccomp user notifier

2020-05-29 Thread Kees Cook
On Fri, May 29, 2020 at 09:38:28AM +0200, Christian Brauner wrote: > On Fri, May 29, 2020 at 12:31:37AM -0700, Kees Cook wrote: > > Nit: please use BIT() > > Fwiw, I don't think we can use BIT() in uapi headers, see: Argh. How many times do I get to trip over this? :P Thank you; yes, please ignor

Re: Oops at boot with linux-next kernel with IMA boot options

2020-05-29 Thread Takashi Iwai
On Fri, 29 May 2020 09:33:34 +0200, Roberto Sassu wrote: > > > From: Takashi Iwai [mailto:ti...@suse.de] > > On Thu, 28 May 2020 19:36:55 +0200, > > Roberto Sassu wrote: > > > > > > > From: linux-integrity-ow...@vger.kernel.org [mailto:linux-integrity- > > > > ow...@vger.kernel.org] On Behalf Of T

Re: [PATCH] staging: gasket: Convert get_user_pages*() --> pin_user_pages*()

2020-05-29 Thread Dan Carpenter
On Fri, May 29, 2020 at 12:38:20AM -0700, John Hubbard wrote: > On 2020-05-28 23:27, Souptick Joarder wrote: > > On Fri, May 29, 2020 at 11:46 AM Souptick Joarder > > wrote: > > > > > > On Thu, May 28, 2020 at 4:34 PM Dan Carpenter > > > wrote: > > > > > > > > On Thu, May 28, 2020 at 02:32:42

Re: [PATCH] KVM: x86: Initialize tdp_level during vCPU creation

2020-05-29 Thread Vitaly Kuznetsov
Sean Christopherson writes: > I'll looking into writing a script to run all selftests with a single > command, unless someone already has one laying around? Is 'make run_tests' in tools/testing/selftests/kvm/ what you're looking for? -- Vitaly

Re: [PATCH] staging: gasket: Convert get_user_pages*() --> pin_user_pages*()

2020-05-29 Thread Dan Carpenter
On Fri, May 29, 2020 at 11:57:09AM +0530, Souptick Joarder wrote: > On Fri, May 29, 2020 at 11:46 AM Souptick Joarder > wrote: > > > > On Thu, May 28, 2020 at 4:34 PM Dan Carpenter > > wrote: > > > > > > On Thu, May 28, 2020 at 02:32:42AM +0530, Souptick Joarder wrote: > > > > This code was usi

Re: [PATCH v2 1/2] seccomp: notify user trap about unused filter

2020-05-29 Thread Christian Brauner
On Thu, May 28, 2020 at 04:11:00PM -0700, Kees Cook wrote: > On Thu, May 28, 2020 at 05:14:11PM +0200, Christian Brauner wrote: > > * @usage: reference count to manage the object lifetime. > > * get/put helpers should be used when accessing an instance > > * outside of a lifet

[GIT PULL] GNSS updates for 5.8-rc1

2020-05-29 Thread Johan Hovold
The following changes since commit 2ef96a5bb12be62ef75b5828c0aab838ebb29cb8: Linux 5.7-rc5 (2020-05-10 15:16:58 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/johan/gnss.git tags/gnss-5.8-rc1 for you to fetch changes up to 9b5816b56af6a424619

Re: [PATCH v2 1/2] seccomp: notify user trap about unused filter

2020-05-29 Thread Christian Brauner
On Fri, May 29, 2020 at 01:32:03AM +0200, Jann Horn wrote: > On Fri, May 29, 2020 at 1:11 AM Kees Cook wrote: > > On Thu, May 28, 2020 at 05:14:11PM +0200, Christian Brauner wrote: > > > * @usage: reference count to manage the object lifetime. > > > * get/put helpers should be used whe

Re: [PATCH v5 03/16] spi: dw: Locally wait for the DMA transactions completion

2020-05-29 Thread Andy Shevchenko
On Fri, May 29, 2020 at 7:02 AM Serge Semin wrote: > > Even if DMA transactions are finished it doesn't mean that the SPI > transfers are also completed. It's specifically concerns the Tx-only > SPI transfers, since there might be data left in the SPI Tx FIFO after > the DMA engine notifies that t

Re: [PATCH v2 1/2] seccomp: notify user trap about unused filter

2020-05-29 Thread Kees Cook
On Fri, May 29, 2020 at 09:51:37AM +0200, Christian Brauner wrote: > Aside from this being not an issue now, can we please not dump seccomp > filter contents in proc. That sounds terrible and what's the rationale, > libseccomp already let's you dump filter contents while loading and you > could ptr

Re: [PATCH v5 5/7] blktrace: fix debugfs use after free

2020-05-29 Thread Luis Chamberlain
On Wed, May 27, 2020 at 06:15:10PM -0700, Bart Van Assche wrote: > On 2020-05-26 20:12, Luis Chamberlain wrote: > > + /* > > +* Blktrace needs a debugsfs name even for queues that don't register > > +* a gendisk, so it lazily registers the debugfs directory. But that > > +* can get u

Re: [PATCH v2 1/2] seccomp: notify user trap about unused filter

2020-05-29 Thread Christian Brauner
On Thu, May 28, 2020 at 04:11:00PM -0700, Kees Cook wrote: > On Thu, May 28, 2020 at 05:14:11PM +0200, Christian Brauner wrote: > > * @usage: reference count to manage the object lifetime. > > * get/put helpers should be used when accessing an instance > > * outside of a lifet

Re: [PATCH] staging: gasket: Convert get_user_pages*() --> pin_user_pages*()

2020-05-29 Thread John Hubbard
On 2020-05-29 00:46, Dan Carpenter wrote: On Fri, May 29, 2020 at 11:57:09AM +0530, Souptick Joarder wrote: On Fri, May 29, 2020 at 11:46 AM Souptick Joarder wrote: On Thu, May 28, 2020 at 4:34 PM Dan Carpenter wrote: On Thu, May 28, 2020 at 02:32:42AM +0530, Souptick Joarder wrote: This

Re: [PATCH v2 2/2] tests: test seccomp filter notifications

2020-05-29 Thread Christian Brauner
On Thu, May 28, 2020 at 10:41:45PM -0700, Kees Cook wrote: > On Thu, May 28, 2020 at 05:14:12PM +0200, Christian Brauner wrote: > > This verifies we're correctly notified when a seccomp filter becomes > > unused when a notifier is in use. > > While you're adding this, can you adjust the other user

Re: [PATCH v2 1/2] seccomp: notify user trap about unused filter

2020-05-29 Thread Christian Brauner
On Fri, May 29, 2020 at 12:56:50AM -0700, Kees Cook wrote: > On Fri, May 29, 2020 at 09:51:37AM +0200, Christian Brauner wrote: > > Aside from this being not an issue now, can we please not dump seccomp > > filter contents in proc. That sounds terrible and what's the rationale, > > libseccomp alrea

Re: [PATCH 0/6] x86/entry: disallow #DB more

2020-05-29 Thread Peter Zijlstra
On Fri, May 29, 2020 at 07:05:54AM +0800, Lai Jiangshan wrote: > On Fri, May 29, 2020 at 6:48 AM Peter Zijlstra wrote: > > > > On Fri, May 29, 2020 at 06:42:46AM +0800, Lai Jiangshan wrote: > > > On Fri, May 29, 2020 at 4:25 AM Peter Zijlstra > > > wrote: > > > > > > > > These patches disallow #

Re: [PATCH v2 1/2] seccomp: notify user trap about unused filter

2020-05-29 Thread Kees Cook
On Fri, May 29, 2020 at 09:47:44AM +0200, Christian Brauner wrote: > Well the correct way would probably be: > "usage" -> "refs" > "live" -> "users" Yeah, I like it! :) > So we'd need a first patch to convert "usage" to "refs" and then > introduce "users". Yup, sounds right. > > signal_struct

[PATCH 1/6] vhost: allow device that does not depend on vhost worker

2020-05-29 Thread Jason Wang
vDPA device currently relays the eventfd via vhost worker. This is inefficient due the latency of wakeup and scheduling, so this patch tries to introduce a use_worker attribute for the vhost device. When use_worker is not set with vhost_dev_init(), vhost won't try to allocate a worker thread and th

[PATCH 2/6] vhost: use mmgrab() instead of mmget() for non worker device

2020-05-29 Thread Jason Wang
For the device that doesn't use vhost worker and use_mm(), mmget() is too heavy weight and it may brings troubles for implementing mmap() support for vDPA device. This is because, an reference to the address space was held via mm_get() in vhost_dev_set_owner() and an reference to the file was held

[PATCH 0/6] vDPA: doorbell mapping

2020-05-29 Thread Jason Wang
Hi all: This series introduce basic functionality of doorbell mapping support for vhost-vDPA. Userspace program may use mmap() to map a the doorbell of a specific virtqueue into its address space. This is help to reudce the syscall or vmexit overhead. A new vdpa_config_ops was introduced to repor

[PATCH 4/6] vhost_vdpa: support doorbell mapping via mmap

2020-05-29 Thread Jason Wang
Currently the doorbell is relayed via eventfd which may have significant overhead because of the cost of vmexits or syscall. This patch introduces mmap() based doorbell mapping which can eliminate the overhead caused by vmexit or syscall. To ease the userspace modeling of the doorbell layout (usua

Re: [GIT PULL] extcon next for v5.8

2020-05-29 Thread Greg KH
On Fri, May 29, 2020 at 12:11:03PM +0900, Chanwoo Choi wrote: > Dear Greg, > > This is extcon-next pull request for v5.8. I add detailed description of > this pull request on below. Please pull extcon with following updates. > > Best Regards, > Chanwoo Choi > > > The following changes since com

[PATCH 3/6] vdpa: introduce get_vq_notification method

2020-05-29 Thread Jason Wang
This patch introduces a new method in the vdpa_config_ops which reports the physical address and the size of the doorbell for a specific virtqueue. This will be used by the future patches that maps doorbell to userspace. Signed-off-by: Jason Wang --- include/linux/vdpa.h | 16

[PATCH 6/6] vdpa: vp_vdpa: report doorbell location

2020-05-29 Thread Jason Wang
This patch adds support for reporting doorbell location in vp_vdpa driver. The doorbell mapping could be then enabled by e.g launching qemu's virtio-net-pci device with page-per-vq enabled. Signed-off-by: Jason Wang --- drivers/vdpa/vp_vdpa/vp_vdpa.c | 29 + 1 file ch

[PATCH 5/6] vdpa: introduce virtio pci driver

2020-05-29 Thread Jason Wang
This patch introduce a vDPA driver for virtio-pci device. It bridges the virtio-pci control command to the vDPA bus. This will be used for developing new features for both software vDPA framework and hardware vDPA feature. Compared to vdpa_sim, it has several advantages: - it's a real device driv

Re: [V6 PATCH 2/2] ASoC: max98390: Added Amplifier Driver

2020-05-29 Thread Steve Lee
On Thu, May 28, 2020 at 8:54 PM Mark Brown wrote: > > On Thu, May 28, 2020 at 07:39:42PM +0900, Steve Lee wrote: > > This is the initial amplifier driver for max98390. > > Please do not submit new versions of already applied patches, please > submit incremental updates to the existing code. Modif

[PATCH net-next 2/2] bridge: mrp: Add support for role MRA

2020-05-29 Thread Horatiu Vultur
A node that has the MRA role, it can behave as MRM or MRC. Initially it starts as MRM and sends MRP_Test frames on both ring ports. If it detects that there are MRP_Test send by another MRM, then it checks if these frames have a lower priority than itself. In this case it would send MRP_Nack frame

  1   2   3   4   5   6   7   8   9   10   >