Re: [PATCH 4/4] ipvs: reduce kernel stack usage

2019-06-28 Thread Willem de Bruijn
On Fri, Jun 28, 2019 at 8:40 AM Arnd Bergmann wrote: > > With the new CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL option, the stack > usage in the ipvs debug output grows because each instance of > IP_VS_DBG_BUF() now has its own buffer of 160 bytes that add up > rather than reusing the stack slots: >

Re: [PATCH 3/4] staging: rtl8712: reduce stack usage, again

2019-06-28 Thread Willem de Bruijn
On Fri, Jun 28, 2019 at 8:41 AM Arnd Bergmann wrote: > > An earlier patch I sent reduced the stack usage enough to get > below the warning limit, and I could show this was safe, but with > GCC_PLUGIN_STRUCTLEAK_BYREF_ALL, it gets worse again because large stack > variables in the same function no

[PATCH v2] staging: iio: ad7192: create of_device_id array

2019-06-28 Thread Bárbara Fernandes
Create list of compatible device ids to be matched with those stated in the device tree. Signed-off-by: Bárbara Fernandes Signed-off-by: Wilson Sales Co-developed by: Wilson Sales --- drivers/staging/iio/adc/ad7192.c | 12 1 file changed, 12 insertions(+) diff --git

Re: [PATCH 2/4] lpfc: reduce stack size with CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE

2019-06-28 Thread James Smart
On 6/28/2019 5:37 AM, Arnd Bergmann wrote: The lpfc_debug_dump_all_queues() function repeatedly calls into lpfc_debug_dump_qe(), which has a temporary 128 byte buffer. This was fine before the introduction of CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE because each instance could occupy the same

Re: [PATCH 24/39] docs: driver-model: move it to the driver-api book

2019-06-28 Thread Jeff Kirsher
On Fri, 2019-06-28 at 09:30 -0300, Mauro Carvalho Chehab wrote: > The audience for the Kernel driver-model is clearly Kernel hackers. > > Signed-off-by: Mauro Carvalho Chehab Acked-by: Jeff Kirsher For the 'ice' driver changes. > --- > Documentation/{ => driver-api}/driver-model/binding.rst

Re: [PATCH 00/31] staging: bcm2835-camera: Improvements

2019-06-28 Thread Dave Stevenson
Hi Stefan On Fri, 28 Jun 2019 at 17:57, Stefan Wahren wrote: > > Hi Hans, > > Am 28.06.19 um 10:06 schrieb Hans Verkuil: > > Hi Stefan, > > > > On 6/27/19 8:55 PM, Stefan Wahren wrote: > >> This is an attempt to help Dave Stevenson to get all the fixes and > >> improvements of the bcm2835-camera

[PATCH 2/2] staging:kpc2000:Fix integer as null pointer warning

2019-06-28 Thread Harsh Jain
It fixes "Using plain integer as NULL pointer" sparse warning. Signed-off-by: Harsh Jain --- drivers/staging/kpc2000/kpc_i2c/i2c_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c

[PATCH 1/2] staging:kpc2000:Fix symbol not declared warning

2019-06-28 Thread Harsh Jain
It fixes "symbol was not declared. Should it be static?" sparse warning. Signed-off-by: Harsh Jain --- drivers/staging/kpc2000/kpc_i2c/i2c_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c

[PATCH 0/2] staging:kpc2000:Fix integer as null pointer warning

2019-06-28 Thread Harsh Jain
It fixes sparse warning in kpc2000 driver. Harsh Jain (2): staging:kpc2000:Fix symbol not declared warning staging:kpc2000:Fix integer as null pointer warning drivers/staging/kpc2000/kpc_i2c/i2c_driver.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.17.1

Re: [PATCH 0/2] staging:kpc2000:Fix integer as null pointer warning

2019-06-28 Thread harsh jain
On Fri, Jun 28, 2019 at 10:31 PM Harsh Jain wrote: > > From: root Again sent with wrong user. Please ignore this series. Will send the updated one. > > It fixes sparse warning in kpc2000 driver. > > Harsh Jain (2): > staging:kpc2000:Fix symbol not declared warning > staging:kpc2000:Fix

[PATCH] binder: return errors from buffer copy functions

2019-06-28 Thread Todd Kjos
The buffer copy functions assumed the caller would ensure correct alignment and that the memory to be copied was completely within the binder buffer. There have been a few cases discovered by syzkallar where a malformed transaction created by a user could violated the assumptions and resulted in a

[PATCH 2/2] staging:kpc2000:Fix integer as null pointer warning

2019-06-28 Thread Harsh Jain
From: root It fixes "Using plain integer as NULL pointer" sparse warning. Signed-off-by: Harsh Jain --- drivers/staging/kpc2000/kpc_i2c/i2c_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c

[PATCH 1/2] staging:kpc2000:Fix symbol not declared warning

2019-06-28 Thread Harsh Jain
From: root It fixes "symbol was not declared. Should it be static?" sparse warning. Signed-off-by: Harsh Jain --- drivers/staging/kpc2000/kpc_i2c/i2c_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c

[PATCH 0/2] staging:kpc2000:Fix integer as null pointer warning

2019-06-28 Thread Harsh Jain
From: root It fixes sparse warning in kpc2000 driver. Harsh Jain (2): staging:kpc2000:Fix symbol not declared warning staging:kpc2000:Fix integer as null pointer warning drivers/staging/kpc2000/kpc_i2c/i2c_driver.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.17.1

Re: [PATCH 00/31] staging: bcm2835-camera: Improvements

2019-06-28 Thread Stefan Wahren
Hi Hans, Am 28.06.19 um 10:06 schrieb Hans Verkuil: > Hi Stefan, > > On 6/27/19 8:55 PM, Stefan Wahren wrote: >> This is an attempt to help Dave Stevenson to get all the fixes and >> improvements of the bcm2835-camera driver into mainline. >> >> Mostly i only polished the commit logs for

Re: [PATCH 1/4] [v2] structleak: disable STRUCTLEAK_BYREF in combination with KASAN_STACK

2019-06-28 Thread Kees Cook
On Fri, Jun 28, 2019 at 02:37:46PM +0200, Arnd Bergmann wrote: > The combination of KASAN_STACK and GCC_PLUGIN_STRUCTLEAK_BYREF > leads to much larger kernel stack usage, as seen from the warnings > about functions that now exceed the 2048 byte limit: > > drivers/media/i2c/tvp5150.c:253:1: error:

Re: [PATCH 01/31] staging: bcm2835-camera: Ensure H264 header bytes get a sensible timestamp

2019-06-28 Thread Nicolas Dufresne
Le vendredi 28 juin 2019 à 16:08 +0200, Hans Verkuil a écrit : > On 6/28/19 4:00 PM, Nicolas Dufresne wrote: > > Le vendredi 28 juin 2019 à 11:10 +0100, Dave Stevenson a écrit : > > > Hi Nicolas > > > > > > On Thu, 27 Jun 2019 at 20:55, Nicolas Dufresne > > > wrote: > > > > Hi Dave, > > > > >

Re: [PATCH 01/31] staging: bcm2835-camera: Ensure H264 header bytes get a sensible timestamp

2019-06-28 Thread Hans Verkuil
On 6/28/19 4:00 PM, Nicolas Dufresne wrote: > Le vendredi 28 juin 2019 à 11:10 +0100, Dave Stevenson a écrit : >> Hi Nicolas >> >> On Thu, 27 Jun 2019 at 20:55, Nicolas Dufresne wrote: >>> Hi Dave, >>> >>> Le jeudi 27 juin 2019 à 20:55 +0200, Stefan Wahren a écrit : From: Dave Stevenson

Re: [PATCH 01/31] staging: bcm2835-camera: Ensure H264 header bytes get a sensible timestamp

2019-06-28 Thread Nicolas Dufresne
Le vendredi 28 juin 2019 à 11:10 +0100, Dave Stevenson a écrit : > Hi Nicolas > > On Thu, 27 Jun 2019 at 20:55, Nicolas Dufresne wrote: > > Hi Dave, > > > > Le jeudi 27 juin 2019 à 20:55 +0200, Stefan Wahren a écrit : > > > From: Dave Stevenson > > > > > > H264 header come from VC with 0

Re: [PATCH 00/31] staging: bcm2835-camera: Improvements

2019-06-28 Thread Mauro Carvalho Chehab
Em Fri, 28 Jun 2019 15:13:03 +0200 Hans Verkuil escreveu: > On 6/27/19 8:55 PM, Stefan Wahren wrote: > > This is an attempt to help Dave Stevenson to get all the fixes and > > improvements of the bcm2835-camera driver into mainline. > > > > Mostly i only polished the commit logs for upstream. >

Re: [PATCH v2] Adjust analogix chip driver location

2019-06-28 Thread Laurent Pinchart
Hello Xin Ji, Thank you for the patch. On Fri, Jun 28, 2019 at 03:00:05AM +, Xin Ji wrote: > Move analogix chip ANX78XX bridge driver into "analogix" directory. > > Signed-off-by: Xin Ji Reviewed-by: Laurent Pinchart > --- > drivers/gpu/drm/bridge/Kconfig | 10

Re: [PATCH 00/31] staging: bcm2835-camera: Improvements

2019-06-28 Thread Hans Verkuil
On 6/27/19 8:55 PM, Stefan Wahren wrote: > This is an attempt to help Dave Stevenson to get all the fixes and > improvements of the bcm2835-camera driver into mainline. > > Mostly i only polished the commit logs for upstream. > > The series based on the latest bugfix V2 of staging:

[PATCH 3/4] staging: rtl8712: reduce stack usage, again

2019-06-28 Thread Arnd Bergmann
An earlier patch I sent reduced the stack usage enough to get below the warning limit, and I could show this was safe, but with GCC_PLUGIN_STRUCTLEAK_BYREF_ALL, it gets worse again because large stack variables in the same function no longer overlap: drivers/staging/rtl8712/rtl871x_ioctl_linux.c:

[PATCH 1/4] [v2] structleak: disable STRUCTLEAK_BYREF in combination with KASAN_STACK

2019-06-28 Thread Arnd Bergmann
The combination of KASAN_STACK and GCC_PLUGIN_STRUCTLEAK_BYREF leads to much larger kernel stack usage, as seen from the warnings about functions that now exceed the 2048 byte limit: drivers/media/i2c/tvp5150.c:253:1: error: the frame size of 3936 bytes is larger than 2048 bytes

[PATCH 2/4] lpfc: reduce stack size with CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE

2019-06-28 Thread Arnd Bergmann
The lpfc_debug_dump_all_queues() function repeatedly calls into lpfc_debug_dump_qe(), which has a temporary 128 byte buffer. This was fine before the introduction of CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE because each instance could occupy the same stack slot. However, now they each get their own

[PATCH 4/4] ipvs: reduce kernel stack usage

2019-06-28 Thread Arnd Bergmann
With the new CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL option, the stack usage in the ipvs debug output grows because each instance of IP_VS_DBG_BUF() now has its own buffer of 160 bytes that add up rather than reusing the stack slots: net/netfilter/ipvs/ip_vs_core.c: In function

[PATCH 24/39] docs: driver-model: move it to the driver-api book

2019-06-28 Thread Mauro Carvalho Chehab
The audience for the Kernel driver-model is clearly Kernel hackers. Signed-off-by: Mauro Carvalho Chehab --- Documentation/{ => driver-api}/driver-model/binding.rst | 0 Documentation/{ => driver-api}/driver-model/bus.rst | 0 Documentation/{ =>

[PATCH 10/10] staging: rtl8723bs: Replace function odm_SignalScaleMapping()

2019-06-28 Thread Nishka Dasgupta
Remove function odm_SignalScaleMapping as all it does is call odm_SignalScaleMapping_92CSeries. Rename odm_SignalScaleMapping_92CSeries to odm_SignalScaleMapping and change its type from static to non-static to maintain compatibility with call sites of odm_SignalScaleMapping. Issue found with

[PATCH 01/10] staging: rtl8723bs: hal: Replace function rtl8723b_set_rssi_cmd()

2019-06-28 Thread Nishka Dasgupta
Remove function rtl8723b_set_rssi_cmd as all it does is call rtl8723b_set_FwRssiSetting_cmd. Rename rtl8723b_set_FwRssiSetting_cmd to rtl8723b_set_rssi_cmd and change its type from static to non-static to maintain compatibility with call sites. Issue found with Coccinelle. Signed-off-by: Nishka

[PATCH 09/10] staging: rtl8723bs: Remove rtw_hal_networktype_to_raid()

2019-06-28 Thread Nishka Dasgupta
Change call sites of rtw_hal_networktype_to_raid to instead call networktype_to_raid_ex as rtw_hal_networktype_to_raid does nothing except call networktype_to_raid_ex. Remove now-unused function rtw_hal_networktype_to_raid. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta ---

[PATCH 03/10] staging: rtl8723bs: hal: Remove PHY_RFShadowRecorverFlagSetAll()

2019-06-28 Thread Nishka Dasgupta
Remove unused function PHY_RFShadowRecorverFlagSetAll. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta --- drivers/staging/rtl8723bs/hal/hal_phy.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_phy.c

[PATCH 05/10] staging: rtl8723bs: core: Remove function wait_eeprom_cmd_done()

2019-06-28 Thread Nishka Dasgupta
Remove unused function wait_eeprom_cmd_done. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta --- drivers/staging/rtl8723bs/core/rtw_eeprom.c | 19 --- 1 file changed, 19 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_eeprom.c

[PATCH 06/10] staging: rtl8723bs: hal: Remove function clearinterrupt8723bsdio()

2019-06-28 Thread Nishka Dasgupta
Remove unused function clearinterrupt8723bsdio and associated ifdef. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta --- drivers/staging/rtl8723bs/hal/sdio_ops.c | 35 1 file changed, 35 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c

[PATCH 07/10] staging: rtl8723bs: Remove rtw_hal_c2h_evt_read()

2019-06-28 Thread Nishka Dasgupta
Modify call sites of rtw_hal_c2h_evt_read to call c2h_evt_read_88xx instead, as rtw_hal_c2h_evt_read does nothing except call c2h_evt_read_88xx. Remove function rtw_hal_c2h_evt_read as it is now not necessary. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta ---

[PATCH 08/10] staging: rtl8723bs: Change return type of networktype_to_raid_ex()

2019-06-28 Thread Nishka Dasgupta
Change return type of header file prototype of networktype_to_raid_ex from unsigned char to u8 to match its actual definition and call site. Signed-off-by: Nishka Dasgupta --- drivers/staging/rtl8723bs/include/rtw_mlme_ext.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 02/10] staging: rtl8723bs: hal: Remove PHY_RFShadowRefresh()

2019-06-28 Thread Nishka Dasgupta
Remove unused function PHY_RFShadowRefresh. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta --- drivers/staging/rtl8723bs/hal/hal_phy.c | 17 - 1 file changed, 17 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_phy.c

[PATCH 04/10] staging: rtl8723bs: hal: Remove function PHY_CalculateBitShift()

2019-06-28 Thread Nishka Dasgupta
Remove unused function PHY_CalculateBitShift. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta --- drivers/staging/rtl8723bs/hal/hal_phy.c | 24 1 file changed, 24 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_phy.c

Re: [PATCH 00/31] staging: bcm2835-camera: Improvements

2019-06-28 Thread Hans Verkuil
On 6/28/19 12:39 PM, Dave Stevenson wrote: > Hi Stefan > > Firstly a huge thank you for picking this up - it's been on my to-do > list for ages, and just hasn't made it to the top. > > On Fri, 28 Jun 2019 at 09:06, Hans Verkuil wrote: >> >> Hi Stefan, >> >> On 6/27/19 8:55 PM, Stefan Wahren

Re: [PATCH 00/31] staging: bcm2835-camera: Improvements

2019-06-28 Thread Dave Stevenson
Hi Stefan Firstly a huge thank you for picking this up - it's been on my to-do list for ages, and just hasn't made it to the top. On Fri, 28 Jun 2019 at 09:06, Hans Verkuil wrote: > > Hi Stefan, > > On 6/27/19 8:55 PM, Stefan Wahren wrote: > > This is an attempt to help Dave Stevenson to get

Re: [PATCH 01/31] staging: bcm2835-camera: Ensure H264 header bytes get a sensible timestamp

2019-06-28 Thread Dave Stevenson
Hi Nicolas On Thu, 27 Jun 2019 at 20:55, Nicolas Dufresne wrote: > > Hi Dave, > > Le jeudi 27 juin 2019 à 20:55 +0200, Stefan Wahren a écrit : > > From: Dave Stevenson > > > > H264 header come from VC with 0 timestamps, which means they get a > > strange timestamp when processed with VC/kernel

Re: [PATCH 29/31] staging: bcm2835-camera: Add sanity checks for queue_setup/CREATE_BUFS

2019-06-28 Thread Dan Carpenter
On Thu, Jun 27, 2019 at 11:09:27PM +0200, Stefan Wahren wrote: > From: Dave Stevenson > > Fixes a v4l2-compliance failure when passed a buffer that is > too small. > queue_setup wasn't handling the case where !(*nplanes), as ^^^ This is

Re: [PATCH 00/31] staging: bcm2835-camera: Improvements

2019-06-28 Thread Hans Verkuil
Hi Stefan, On 6/27/19 8:55 PM, Stefan Wahren wrote: > This is an attempt to help Dave Stevenson to get all the fixes and > improvements of the bcm2835-camera driver into mainline. > > Mostly i only polished the commit logs for upstream. > > The series based on the latest bugfix V2 of staging:

Re: [PATCH 06/31] staging: bcm2835-camera: Return early on errors

2019-06-28 Thread Dan Carpenter
On Thu, Jun 27, 2019 at 08:56:03PM +0200, Stefan Wahren wrote: > v4l2_dbg(1, bcm2835_v4l2_debug, >v4l2_dev, "connecting %p to %p\n", >src, dst); > ret = vchiq_mmal_port_connect_tunnel(dev->instance, src, dst); > if (!ret) > ret =

Re: [PATCH 01/31] staging: bcm2835-camera: Ensure H264 header bytes get a sensible timestamp

2019-06-28 Thread Dan Carpenter
On Thu, Jun 27, 2019 at 08:55:58PM +0200, Stefan Wahren wrote: > diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h > b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h > index 2b5679e..09273b0 100644 > ---

Re: [PATCH] staging:kpc2000:Fix sparse warnings

2019-06-28 Thread Greg KH
On Fri, Jun 28, 2019 at 12:21:38AM +0530, Harsh Jain wrote: > From: root Interesting user name :) > Fix following sparse warning > symbol was not declared. Should it be static? > Using plain integer as NULL pointer Don't do multiple things in the same patch. Please break thsi up into two