Re: [PATCH v2 1/8] kcsan: Add Kernel Concurrency Sanitizer infrastructure

2019-10-22 Thread Marco Elver
Hi Mark, Thanks for you comments; see inline comments below. On Tue, 22 Oct 2019 at 16:11, Mark Rutland wrote: > > Hi Marco, > > On Thu, Oct 17, 2019 at 04:12:58PM +0200, Marco Elver wrote: > > Kernel Concurrency Sanitizer (KCSAN) is a dynamic data-race detector for > > kernel space. KCSAN is a

Re: [RFC] docs: add a reset controller chapter to the driver API docs

2019-10-22 Thread Jonathan Corbet
On Tue, 22 Oct 2019 18:45:47 +0200 Philipp Zabel wrote: > Add initial reset controller API documentation. This is mostly indented > to describe the concepts to users of the consumer API, and to tie the > kerneldoc comments we already have into the driver API documentation. > > Signed-off-by: Phi

Re: [PATCH v2 1/8] kcsan: Add Kernel Concurrency Sanitizer infrastructure

2019-10-22 Thread Marco Elver
On Tue, 22 Oct 2019 at 17:49, Oleg Nesterov wrote: > > On 10/17, Marco Elver wrote: > > > > + /* > > + * Delay this thread, to increase probability of observing a racy > > + * conflicting access. > > + */ > > + udelay(get_delay()); > > + > > + /* > > + * Re-read val

Re: [PATCH 05/12] infiniband: fix ulp/opa_vnic/opa_vnic_encap.h kernel-doc notation

2019-10-22 Thread Jason Gunthorpe
On Wed, Oct 09, 2019 at 08:52:44PM -0700, rd.dun...@gmail.com wrote: > Make reserved struct fields "private:" so that they don't need to > be added to the kernel-doc notation. This removes 24 warnings. > +++ linux-next-20191009/drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h > @@ -129,21 +129,31

Re: [PATCH v2 7/8] locking/atomics, kcsan: Add KCSAN instrumentation

2019-10-22 Thread Marco Elver
On Tue, 22 Oct 2019 at 14:33, Mark Rutland wrote: > > On Thu, Oct 17, 2019 at 04:13:04PM +0200, Marco Elver wrote: > > This adds KCSAN instrumentation to atomic-instrumented.h. > > > > Signed-off-by: Marco Elver > > --- > > v2: > > * Use kcsan_check{,_atomic}_{read,write} instead of > > kcsan_c

Re: [PATCH 00/12] infiniband kernel-doc fixes & driver-api/ chapter

2019-10-22 Thread Jason Gunthorpe
On Wed, Oct 09, 2019 at 08:52:39PM -0700, rd.dun...@gmail.com wrote: > > This patch series cleans up lots of kernel-doc in drivers/infiniband/ > and then adds an infiniband.rst file. > > It also changes a few instances of non-exported functions from kernel-doc > notation back to non-kernel-doc co

Re: [PATCH 05/12] infiniband: fix ulp/opa_vnic/opa_vnic_encap.h kernel-doc notation

2019-10-22 Thread Randy Dunlap
On 10/22/19 10:52 AM, Jason Gunthorpe wrote: > On Wed, Oct 09, 2019 at 08:52:44PM -0700, rd.dun...@gmail.com wrote: >> Make reserved struct fields "private:" so that they don't need to >> be added to the kernel-doc notation. This removes 24 warnings. > >> +++ linux-next-20191009/drivers/infiniband

[PATCH] docs: driver-api: Remove reference to sgi-ioc4

2019-10-22 Thread Harald Seiler
Commit f7bc6e42bf12 ("drivers: remove the SGI SN2 IOC4 base support") removed support for SGI SN2 IOC4 and the relevant documentation files. Remove a leftover reference in the toctree of the driver-api documentation to fix this sphinx error: Documentation/driver-api/index.rst:14: WARNING: toct

Re: [PATCH] docs/core-api: memory-allocation: mention size helpers

2019-10-22 Thread Chris Packham
Hi Jon, On Tue, 2019-10-22 at 07:19 -0600, Jonathan Corbet wrote: > On Tue, 22 Oct 2019 10:27:47 +1300 > Chris Packham wrote: > > > Mention struct_size(), array_size() and array3_size() in the same place > > as kmalloc() and friends. > > > > Signed-off-by: Chris Packham > > --- > > Documentat

Re: [PATCH] docs/core-api: memory-allocation: mention size helpers

2019-10-22 Thread Jonathan Corbet
On Tue, 22 Oct 2019 20:05:38 + Chris Packham wrote: > > Quick comment: we don't need :c:func: anymore; the markup happens anyway. > > So rather than adding more of them, could I ask you to please take out the > > ones that are there now? > > So just with backquotes i.e. :c:func:`kmalloc` b

[PATCH v14 0/5] overlayfs override_creds=off & nested get xattr fix

2019-10-22 Thread Mark Salyzyn
Patch series: Mark Salyzyn (5): Add flags option to get xattr method paired to __vfs_getxattr overlayfs: check CAP_DAC_READ_SEARCH before issuing exportfs_decode_fh overlayfs: handle XATTR_NOSECURITY flag for get xattr method overlayfs: internal getxattr operations without sepolicy checkin

[PATCH v14 4/5] overlayfs: internal getxattr operations without sepolicy checking

2019-10-22 Thread Mark Salyzyn
Check impure, opaque, origin & meta xattr with no sepolicy audit (using __vfs_getxattr) since these operations are internal to overlayfs operations and do not disclose any data. This became an issue for credential override off since sys_admin would have been required by the caller; whereas would h

[PATCH v14 2/5] overlayfs: check CAP_DAC_READ_SEARCH before issuing exportfs_decode_fh

2019-10-22 Thread Mark Salyzyn
Assumption never checked, should fail if the mounter creds are not sufficient. Signed-off-by: Mark Salyzyn Cc: Miklos Szeredi Cc: Jonathan Corbet Cc: Vivek Goyal Cc: Eric W. Biederman Cc: Amir Goldstein Cc: Randy Dunlap Cc: Stephen Smalley Cc: linux-unio...@vger.kernel.org Cc: linux-doc@vg

[PATCH v14 5/5] overlayfs: override_creds=off option bypass creator_cred

2019-10-22 Thread Mark Salyzyn
By default, all access to the upper, lower and work directories is the recorded mounter's MAC and DAC credentials. The incoming accesses are checked against the caller's credentials. If the principles of least privilege are applied, the mounter's credentials might not overlap the credentials of t

[PATCH v14 3/5] overlayfs: handle XATTR_NOSECURITY flag for get xattr method

2019-10-22 Thread Mark Salyzyn
Because of the overlayfs getxattr recursion, the incoming inode fails to update the selinux sid resulting in avc denials being reported against a target context of u:object_r:unlabeled:s0. Solution is to respond to the XATTR_NOSECURITY flag in get xattr method that calls the __vfs_getxattr handler

[PATCH v2 0/2] docs/core-api: memory-allocation: minor cleanups

2019-10-22 Thread Chris Packham
Clean up some formatting and add references to helpers for calculating sizes safely. Chris Packham (2): docs/core-api: memory-allocation: remove uses of c:func: docs/core-api: memory-allocation: mention size helpers Documentation/core-api/memory-allocation.rst | 50 ++-- 1 fi

[PATCH v2 2/2] docs/core-api: memory-allocation: mention size helpers

2019-10-22 Thread Chris Packham
Mention struct_size(), array_size() and array3_size() in the same place as kmalloc() and friends. Signed-off-by: Chris Packham --- Notes: Changes in v2: - Drop use of c:func: Documentation/core-api/memory-allocation.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --gi

[PATCH v2 1/2] docs/core-api: memory-allocation: remove uses of c:func:

2019-10-22 Thread Chris Packham
These are no longer needed as the documentation build will automatically add the cross references. Signed-off-by: Chris Packham --- Notes: It should be noted that kvmalloc() and kmem_cache_destroy() lack a kerneldoc header, a side-effect of this change is that the :c:func: fallback o

Re: [PATCH 00/12] infiniband kernel-doc fixes & driver-api/ chapter

2019-10-22 Thread Max Gurtovoy
On 10/22/2019 9:41 PM, Jason Gunthorpe wrote: On Wed, Oct 09, 2019 at 08:52:39PM -0700, rd.dun...@gmail.com wrote: This patch series cleans up lots of kernel-doc in drivers/infiniband/ and then adds an infiniband.rst file. It also changes a few instances of non-exported functions from kernel-

RE: [PATCH V15 1/5] dt-bindings: fsl: scu: add thermal binding

2019-10-22 Thread Anson Huang
Ping again, it has been 3 months passed. > Subject: RE: [PATCH V15 1/5] dt-bindings: fsl: scu: add thermal binding > > Ping... > > > Hi, Daniel/Rui/Eduardo > > Could you please take a look at this patch series? > > > > Anson > > > > > From: Anson Huang > > > > > > NXP i.MX8QXP is an ARMv8 S

Re: [RFC] docs: add a reset controller chapter to the driver API docs

2019-10-22 Thread Randy Dunlap
On 10/22/19 9:45 AM, Philipp Zabel wrote: > Add initial reset controller API documentation. This is mostly indented intended > to describe the concepts to users of the consumer API, and to tie the > kerneldoc comments we already hav

[PATCH] reset: fix kernel-doc warnings

2019-10-22 Thread Randy Dunlap
reset_control_get_count - Count number of resets available with a device Signed-off-by: Randy Dunlap Cc: Philipp Zabel --- drivers/reset/core.c |4 ++-- include/linux/reset-controller.h |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) --- linux-next-20191022.orig/

Re: [PATCH v14 2/5] overlayfs: check CAP_DAC_READ_SEARCH before issuing exportfs_decode_fh

2019-10-22 Thread Amir Goldstein
On Tue, Oct 22, 2019 at 11:46 PM Mark Salyzyn wrote: > > Assumption never checked, should fail if the mounter creds are not > sufficient. > > Signed-off-by: Mark Salyzyn > Cc: Miklos Szeredi > Cc: Jonathan Corbet > Cc: Vivek Goyal > Cc: Eric W. Biederman > Cc: Amir Goldstein > Cc: Randy Dunl

Re: [PATCH v14 4/5] overlayfs: internal getxattr operations without sepolicy checking

2019-10-22 Thread Amir Goldstein
On Tue, Oct 22, 2019 at 11:46 PM Mark Salyzyn wrote: > > Check impure, opaque, origin & meta xattr with no sepolicy audit > (using __vfs_getxattr) since these operations are internal to > overlayfs operations and do not disclose any data. This became > an issue for credential override off since s

Re: [PATCH v14 0/5] overlayfs override_creds=off & nested get xattr fix

2019-10-22 Thread Amir Goldstein
On Tue, Oct 22, 2019 at 11:45 PM Mark Salyzyn wrote: > > Patch series: > > Mark Salyzyn (5): > Add flags option to get xattr method paired to __vfs_getxattr > overlayfs: check CAP_DAC_READ_SEARCH before issuing exportfs_decode_fh > overlayfs: handle XATTR_NOSECURITY flag for get xattr method

[RESEND PATCH v3 0/8] drivers: add new variants of devm_platform_ioremap_resource()

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Note: resending with Arnd's review tags and rebased on top of char-misc-next The new devm_platform_ioremap_resource() helper has now been widely adopted and used in many drivers. Users of the write-combined ioremap() variants could benefit from the same code shrinkage.

[RESEND PATCH v3 2/8] lib: devres: prepare devm_ioremap_resource() for more variants

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski We want to add the write-combined variant of devm_ioremap_resource(). Let's first implement __devm_ioremap_resource() which takes an additional argument type. The types are the same as for __devm_ioremap(). The existing devm_ioremap_resource() now simply calls __devm_ior

[RESEND PATCH v3 1/8] Documentation: devres: add missing entry for devm_platform_ioremap_resource()

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski devm_platform_ioremap_resource() should be documented in devres.rst. Add the missing entry. Signed-off-by: Bartosz Golaszewski Reviewed-by: Arnd Bergmann --- Documentation/driver-api/driver-model/devres.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Document

[RESEND PATCH v3 6/8] drivers: provide devm_platform_ioremap_resource_byname()

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Provide a variant of devm_platform_ioremap_resource() that allows to lookup resources from platform devices by name rather than by index. Signed-off-by: Bartosz Golaszewski Reviewed-by: Arnd Bergmann --- .../driver-api/driver-model/devres.rst| 1 + drivers/b

[RESEND PATCH v3 4/8] drivers: platform: provide devm_platform_ioremap_resource_wc()

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Provide a write-combined variant of devm_platform_ioremap_resource(). Signed-off-by: Bartosz Golaszewski Reviewed-by: Arnd Bergmann --- .../driver-api/driver-model/devres.rst| 1 + drivers/base/platform.c | 19 ++- inclu

[RESEND PATCH v3 8/8] gpio: tegra186: use devm_platform_ioremap_resource_byname()

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Bartosz Golaszewski Reviewed-by: Arnd Bergmann --- drivers/gpio/gpio-tegra186.c | 4 +--- 1 file changed, 1

[RESEND PATCH v3 7/8] gpio: mvebu: use devm_platform_ioremap_resource_byname()

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use devm_platform_ioremap_resource_byname() instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Bartosz Golaszewski Reviewed-by: Arnd Bergmann --- drivers/gpio/gpio-mvebu.c | 19 +++ 1 file changed,

[RESEND PATCH v3 3/8] lib: devres: provide devm_ioremap_resource_wc()

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Provide a variant of devm_ioremap_resource() for write-combined ioremap. Signed-off-by: Bartosz Golaszewski Reviewed-by: Arnd Bergmann --- Documentation/driver-api/driver-model/devres.rst | 1 + include/linux/device.h | 2 ++ lib/devres.c

[RESEND PATCH v3 5/8] misc: sram: use devm_platform_ioremap_resource_wc()

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the new devm_platform_ioremap_resource_wc() helper instead of devm_ioremap_wc() combinded with a call to platform_get_resource(). Also use devm_platform_ioremap_resource() where applicable. Signed-off-by: Bartosz Golaszewski Reviewed-by: Arnd Bergmann --- drivers

Re: [PATCH v2 7/8] locking/atomics, kcsan: Add KCSAN instrumentation

2019-10-22 Thread Mark Rutland
On Thu, Oct 17, 2019 at 04:13:04PM +0200, Marco Elver wrote: > This adds KCSAN instrumentation to atomic-instrumented.h. > > Signed-off-by: Marco Elver > --- > v2: > * Use kcsan_check{,_atomic}_{read,write} instead of > kcsan_check_{access,atomic}. > * Introduce __atomic_check_{read,write} [Sug

Re: [PATCH v2 8/8] x86, kcsan: Enable KCSAN for x86

2019-10-22 Thread Mark Rutland
On Thu, Oct 17, 2019 at 04:13:05PM +0200, Marco Elver wrote: > This patch enables KCSAN for x86, with updates to build rules to not use > KCSAN for several incompatible compilation units. > > Signed-off-by: Marco Elver > --- > v2: > * Document build exceptions where no previous above comment expl

Re: [PATCH v2 8/8] x86, kcsan: Enable KCSAN for x86

2019-10-22 Thread Marco Elver
On Tue, 22 Oct 2019 at 14:59, Mark Rutland wrote: > > On Thu, Oct 17, 2019 at 04:13:05PM +0200, Marco Elver wrote: > > This patch enables KCSAN for x86, with updates to build rules to not use > > KCSAN for several incompatible compilation units. > > > > Signed-off-by: Marco Elver > > --- > > v2:

Re: [PATCH] docs/core-api: memory-allocation: mention size helpers

2019-10-22 Thread Jonathan Corbet
On Tue, 22 Oct 2019 10:27:47 +1300 Chris Packham wrote: > Mention struct_size(), array_size() and array3_size() in the same place > as kmalloc() and friends. > > Signed-off-by: Chris Packham > --- > Documentation/core-api/memory-allocation.rst | 4 +++- > 1 file changed, 3 insertions(+), 1 del

[PATCH v5 2/2] hwmon: Add driver for Texas Instruments TMP512/513 sensor chips

2019-10-22 Thread Tremblay, Eric
hwmon: Add driver for Texas Instruments TMP512/513 sensor chips. TI's TMP512/513 are I2C/SMBus system monitor chips. These chips monitor the supply voltage, supply current, power consumption and provide one local and up to three (TMP513) remote temperature sensors. It has been tested using a TI T

[PATCH v5 1/2] hwmon: Add driver for Texas Instruments TMP512/513 sensor chips

2019-10-22 Thread Tremblay, Eric
dt-bindings: hwmon: Add TMP512/513 Add dt-binding for TMP512/513 sensor chips Signed-off-by: Eric Tremblay --- .../devicetree/bindings/hwmon/ti,tmp513.yaml | 90 +++ 1 file changed, 90 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/ti,tmp513.yaml dif

[PATCH v5 0/2] hwmon: Add driver for Texas Instruments TMP512/513 sensor chips

2019-10-22 Thread Tremblay, Eric
Version five of the driver for Texas Instruments TMP512/513 sensors. Thanks again for the review. Main changes from version 4: - Remove config_lock mutex - Rewrite dt-bindings in yaml Main changes from version 3: - Remove tmp51x_config structure, there was no useful stati

Re: [PATCH v2 1/8] kcsan: Add Kernel Concurrency Sanitizer infrastructure

2019-10-22 Thread Mark Rutland
Hi Marco, On Thu, Oct 17, 2019 at 04:12:58PM +0200, Marco Elver wrote: > Kernel Concurrency Sanitizer (KCSAN) is a dynamic data-race detector for > kernel space. KCSAN is a sampling watchpoint-based data-race detector. > See the included Documentation/dev-tools/kcsan.rst for more details. > > Thi

Re: [PATCH v2 1/8] kcsan: Add Kernel Concurrency Sanitizer infrastructure

2019-10-22 Thread Oleg Nesterov
On 10/17, Marco Elver wrote: > > + /* > + * Delay this thread, to increase probability of observing a racy > + * conflicting access. > + */ > + udelay(get_delay()); > + > + /* > + * Re-read value, and check if it is as expected; if not, we infer a > + * racy acc

[RFC] docs: add a reset controller chapter to the driver API docs

2019-10-22 Thread Philipp Zabel
Add initial reset controller API documentation. This is mostly indented to describe the concepts to users of the consumer API, and to tie the kerneldoc comments we already have into the driver API documentation. Signed-off-by: Philipp Zabel --- Documentation/driver-api/index.rst | 1 + Documen