[PATCH v2 02/17] compat_ioctl: move drivers to generic_compat_ioctl_ptrarg

2018-09-12 Thread Arnd Bergmann
Each of these drivers has a copy of the same trivial helper function to convert the pointer argument and then call the native ioctl handler. We now have a generic implementation of that, so use it. Signed-off-by: Arnd Bergmann --- drivers/char/ppdev.c | 12 +- drivers/char

[PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-12 Thread Arnd Bergmann
e not interpreted as integer values. Signed-off-by: Arnd Bergmann --- drivers/android/binder.c| 2 +- drivers/crypto/qat/qat_common/adf_ctl_drv.c | 2 +- drivers/dma-buf/dma-buf.c | 4 +--- drivers/dma-buf/sw_sync.c | 2 +- drivers/dm

Re: [PATCH v2 02/17] compat_ioctl: move drivers to generic_compat_ioctl_ptrarg

2018-09-12 Thread Arnd Bergmann
On Wed, Sep 12, 2018 at 5:33 PM Jason Gunthorpe wrote: > > On Wed, Sep 12, 2018 at 05:01:03PM +0200, Arnd Bergmann wrote: > > Each of these drivers has a copy of the same trivial helper function to > > convert the pointer argument and then call the native ioctl handler. >

Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-09-14 Thread Arnd Bergmann
On Fri, Sep 14, 2018 at 2:52 PM Thomas Gleixner wrote: > > Matt attempted to add CLOCK_TAI support to the VDSO clock_gettime() > implementation, which extended the clockid switch case and added yet > another slightly different copy of the same code. > > Especially the extended switch case is probl

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-24 Thread Arnd Bergmann
On Tue, Sep 18, 2018 at 7:59 PM Jason Gunthorpe wrote: > > On Tue, Sep 18, 2018 at 10:51:08AM -0700, Darren Hart wrote: > > On Fri, Sep 14, 2018 at 09:57:48PM +0100, Al Viro wrote: > > > On Fri, Sep 14, 2018 at 01:35:06PM -0700, Darren Hart wrote: > > > > > > > Acked-by: Darren Hart (VMware) > >

Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-09-24 Thread Arnd Bergmann
On Mon, Sep 17, 2018 at 3:00 PM Thomas Gleixner wrote: > > On Fri, 14 Sep 2018, Arnd Bergmann wrote: > > On Fri, Sep 14, 2018 at 2:52 PM Thomas Gleixner wrote: > > A couple of architectures (s390, ia64, riscv, powerpc, arm64) > > implement the vdso as assembler cod

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-24 Thread Arnd Bergmann
On Mon, Sep 24, 2018 at 10:35 PM Jason Gunthorpe wrote: > On Mon, Sep 24, 2018 at 10:18:52PM +0200, Arnd Bergmann wrote: > > On Tue, Sep 18, 2018 at 7:59 PM Jason Gunthorpe wrote: > > > On Tue, Sep 18, 2018 at 10:51:08AM -0700, Darren Hart wrote: > > > > On Fri, Se

[PATCH] staging: vchiq: rework remove_event handling

2018-12-10 Thread Arnd Bergmann
the subtle down_interruptible() macro override in vchiq_killable.h. Fixes: f27e47bc6b8b ("staging: vchiq: use completions instead of semaphores") Signed-off-by: Arnd Bergmann --- .../interface/vchiq_arm/vchiq_core.c | 63 +++ .../interface/vchiq_arm/vchiq_core.h

[PATCH 3/3] staging: rtl8723bs: remove semaphore remnants

2018-12-10 Thread Arnd Bergmann
Nothing uses the semaphores any more in this driver, so remove all references to that type. Signed-off-by: Arnd Bergmann --- drivers/staging/rtl8723bs/core/rtw_pwrctrl.c| 1 - drivers/staging/rtl8723bs/include/osdep_service_linux.h | 2 -- drivers/staging/rtl8723bs/include/rtw_io.h

[PATCH 1/3] staging: rtl8723bs: change semaphores to completions

2018-12-10 Thread Arnd Bergmann
This driver uses many semaphores, most of them are equivalent to completions. The other copies of this driver got moved over to completions a while ago, so do the same here. In this usage scenario, the two are equivalent, so the behavior should not change. Signed-off-by: Arnd Bergmann

[PATCH 2/3] staging: rtl8723bs: change pwrctrl lock to a mutex

2018-12-10 Thread Arnd Bergmann
This semaphore is used like a mutex, so it should use the regular mutex API, as we do in the other copies of this driver. Signed-off-by: Arnd Bergmann --- drivers/staging/rtl8723bs/core/rtw_cmd.c | 4 +- drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 73 +-- .../staging

[PATCH] staging: speakup: change semaphore to completion

2018-12-10 Thread Arnd Bergmann
In this driver, both function the same way, but we want to eventually kill off semaphores, so a completion is the better choice here. Signed-off-by: Arnd Bergmann --- drivers/staging/speakup/spk_ttyio.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/staging

Re: [PATCH] staging: vchiq: rework remove_event handling

2018-12-11 Thread Arnd Bergmann
On Tue, Dec 11, 2018 at 1:31 PM Nicolas Saenz Julienne wrote: > > On Tue, 2018-12-11 at 13:07 +0300, Dan Carpenter wrote: > > On Mon, Dec 10, 2018 at 10:11:58PM +0100, Arnd Bergmann wrote: > > > Note that I'm changing it back to 'killable' after the previous

Re: [PATCH] staging: vchiq: rework remove_event handling

2018-12-11 Thread Arnd Bergmann
On Tue, Dec 11, 2018 at 1:36 PM Nicolas Saenz Julienne wrote: > On Mon, 2018-12-10 at 22:11 +0100, Arnd Bergmann wrote: > > @@ -447,26 +444,26 @@ remote_event_wait(VCHIQ_STATE_T *state, > > REMOTE_EVENT_T *event) > > } > > > > static inline void > > -

[PATCH] staging: vt665x: fix alignment constraints

2021-02-04 Thread Arnd Bergmann
From: Arnd Bergmann multiple structures contains a ieee80211_rts structure, which is required to have at least two byte alignment, but are annotated with a __packed attribute to force single-byte alignment: staging/vt6656/rxtx.h:98:1: warning: alignment 1 of 'struct vnt_rts_g' is le

[PATCH] staging: rtl8723bs: remove unused structures

2021-02-04 Thread Arnd Bergmann
From: Arnd Bergmann Building this with 'make W=1' produces a couple of warnings: rtl8723bs/include/ieee80211.h:730:1: warning: alignment 1 of 'struct ieee80211_assoc_request_frame' is less than 2 [-Wpacked-not-aligned] rtl8723bs/include/ieee80211.h:737:1: warning: al

Re: [PATCH] staging: vc04_services: Fixed address type mismatch in vchiq_arm.c

2021-02-18 Thread Arnd Bergmann
On Thu, Feb 18, 2021 at 10:39 AM Greg KH wrote: > > On Thu, Feb 18, 2021 at 02:40:15PM +0530, Pritthijit Nath wrote: > > This change fixes a sparse address type mismatch warning "incorrect type > > in assignment (different address spaces)". > > > > Signed-off-by: Pritthijit Nath > > --- > > .../

Re: [PATCH] staging: wimax/i2400m: don't change the endianness of one byte variable

2021-02-18 Thread Arnd Bergmann
On Thu, Feb 18, 2021 at 10:54 AM Muhammad Usama Anjum wrote: > > On Thu, 2021-02-18 at 10:40 +0100, Greg KH wrote: > > On Thu, Feb 18, 2021 at 02:21:54PM +0500, Muhammad Usama Anjum wrote: > > > It is wrong to change the endianness of a variable which has just one > > > byte size. > > > > > > Spar

[PATCH] staging: atomisp: reduce kernel stack usage

2021-02-26 Thread Arnd Bergmann
From: Arnd Bergmann The atomisp_set_fmt() function has multiple copies of the large v4l2_format structure on its stack, resulting in a warning about excessive stack usage in some rare randconfig builds. drivers/staging/media/atomisp/pci/atomisp_cmd.c:5600:5: error: stack frame size of 1084

Re: [PATCH] staging: vt665x: fix alignment constraints

2021-03-16 Thread Arnd Bergmann
t;staging: vt665x: fix alignment constraints") > Signed-off-by: Edmundo Carmona Antoranz Reviewed-by: Arnd Bergmann ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH 1/2] staging/rtl8192u: avoid Wempty-body warning

2021-03-22 Thread Arnd Bergmann
From: Arnd Bergmann This driver has a few disabled diagnostics, which can probably just get removed, or might still be helpful: drivers/staging/rtl8192u/r8192U_core.c: In function 'rtl8192_set_rxconf': drivers/staging/rtl8192u/r8192U_core.c:767:45: error: suggest braces around empty

[PATCH 2/2] staging/nvec:: avoid Wempty-body warning

2021-03-22 Thread Arnd Bergmann
From: Arnd Bergmann This driver has a few disabled diagnostics, which can probably just get removed, or might still be helpful: drivers/staging/nvec/nvec_ps2.c: In function 'nvec_ps2_notifier': drivers/staging/nvec/nvec_ps2.c:94:77: error: suggest braces around empty body in an 

[PATCH 4/5] staging: vchiq: convert compat bulk transfer

2020-09-18 Thread Arnd Bergmann
vchiq_queue_bulk_transfer->mode word that is compatible. Signed-off-by: Arnd Bergmann --- .../interface/vchiq_arm/vchiq_arm.c | 220 +- 1 file changed, 109 insertions(+), 111 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/stag

[PATCH 1/5] staging: vchiq: rework compat handling

2020-09-18 Thread Arnd Bergmann
update to the calling conventions to simplify the compat version by directly returning a normal errno value. Signed-off-by: Arnd Bergmann --- .../interface/vchiq_arm/vchiq_arm.c | 109 +- 1 file changed, 56 insertions(+), 53 deletions(-) diff --git a/drivers/staging

[PATCH 3/5] staging: vchiq: convert compat dequeue_message

2020-09-18 Thread Arnd Bergmann
Split out the ioctl implementation for VCHIQ_IOC_DEQUEUE_MESSAGE into a separate function so it can be shared with the compat implementation. Signed-off-by: Arnd Bergmann --- .../interface/vchiq_arm/vchiq_arm.c | 180 +- 1 file changed, 92 insertions(+), 88 deletions

[PATCH 2/5] staging: vchiq: convert compat create_service

2020-09-18 Thread Arnd Bergmann
Split out the ioctl implementation for VCHIQ_IOC_CREATE_SERVICE into a separate function so it can be shared with the compat implementation. Signed-off-by: Arnd Bergmann --- .../interface/vchiq_arm/vchiq_arm.c | 189 +- 1 file changed, 89 insertions(+), 100 deletions

[PATCH 0/5] staging: vchiq: stop using compat_alloc_user_space

2020-09-18 Thread Arnd Bergmann
build tested so far. Arnd Arnd Bergmann (5): staging: vchiq: rework compat handling staging: vchiq: convert compat create_service staging: vchiq: convert compat dequeue_message staging: vchiq: convert compat bulk transfer staging: vchiq: convert compat await_completion .../interface

[PATCH 5/5] staging: vchiq: convert compat await_completion

2020-09-18 Thread Arnd Bergmann
behavior is changed to be the same again: The indirect __user pointer accesses are now handled through helper functions that check for compat mode internally. Signed-off-by: Arnd Bergmann --- .../interface/vchiq_arm/vchiq_arm.c | 496 -- 1 file changed, 205 insertions(+), 291

[PATCH 1/2] staging: vchiq: fix __user annotations

2020-09-22 Thread Arnd Bergmann
a user pointer. Adding comments in the code there, and leaving the warnings in place that seem to correspond to actual bugs. Signed-off-by: Arnd Bergmann --- .../include/linux/raspberrypi/vchiq.h | 11 ++- .../interface/vchiq_arm/vchiq_2835_arm.c | 2 +- .../interface/vchiq_

[PATCH 2/2] staging: vchiq: avoid mixing kernel and user pointers

2020-09-22 Thread Arnd Bergmann
this problem by adding another function argument and passing kernel pointers separately from user pointers. This makes it possible to rely on sparse to point out invalid conversions, and it prevents user space from faking a kernel pointer. Signed-off-by: Arnd Bergmann --- .../interface/vchiq_arm

Re: [PATCH 1/2] staging: vchiq: fix __user annotations

2020-09-25 Thread Arnd Bergmann
On Wed, Sep 23, 2020 at 7:44 AM Greg Kroah-Hartman wrote: > and so on... > > Care to try a v2? I had a look now and found the problem, as there are two drivers that I did not have enabled but that need a trivial change to match my other modifications. I'll send the new version in a bit, changes

[PATCH v2 1/2] staging: vchiq: fix __user annotations

2020-09-25 Thread Arnd Bergmann
a user pointer. Adding comments in the code there, and leaving the warnings in place that seem to correspond to actual bugs. Signed-off-by: Arnd Bergmann --- .../bcm2835-audio/bcm2835-vchiq.c | 2 +- .../include/linux/raspberrypi/vchiq.h | 11 ++- .../interface/vchiq_arm/v

[PATCH v2 2/2] staging: vchiq: avoid mixing kernel and user pointers

2020-09-25 Thread Arnd Bergmann
this problem by adding another function argument and passing kernel pointers separately from user pointers. This makes it possible to rely on sparse to point out invalid conversions, and it prevents user space from faking a kernel pointer. Signed-off-by: Arnd Bergmann --- .../interface/vchiq_arm

Re: [PATCH] staging: vchiq: silence an uninitialized variable warning

2020-09-30 Thread Arnd Bergmann
penter The change looks fine, but I wonder if it's actually worse and the uninitialized pointer can end up getting copied back to user space in the completion. In either case, thanks for the fix! Acked-by: Arnd Bergmann ___ devel mailing list de...@linuxdriv

[PATCH] media: atomisp: stop compiling compat_ioctl32 code

2020-10-07 Thread Arnd Bergmann
in the git history if needed. Cc: Christoph Hellwig Cc: Sakari Ailus Cc: Hans Verkuil Signed-off-by: Arnd Bergmann --- .../staging/media/atomisp/pci/atomisp_compat_ioctl32.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/staging/media/a

[PATCH v2] media: atomisp: remove compat_ioctl32 code

2020-10-07 Thread Arnd Bergmann
e has been stubbed out. Remove the entire file -- anyone willing to restore the functionality can equally well just look up the contents in the git history if needed. Cc: Sakari Ailus Cc: Hans Verkuil Suggested-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- This is the alternative approa

Re: [PATCH] media: atomisp: stop compiling compat_ioctl32 code

2020-10-07 Thread Arnd Bergmann
On Wed, Oct 7, 2020 at 4:18 PM Christoph Hellwig wrote: > > On Wed, Oct 07, 2020 at 04:16:39PM +0200, Arnd Bergmann wrote: > > Alternatively, the entire file could just be removed, since anyone > > willing to restore the functionality can equally well just look up > >

[PATCH] staging: wfx: avoid uninitialized variable use

2020-10-26 Thread Arnd Bergmann
From: Arnd Bergmann Move the added check of the 'band' variable after the initialization. Pointed out by clang with drivers/staging/wfx/data_tx.c:34:19: warning: variable 'band' is uninitialized when used here [-Wuninitialized] if (rate->idx >= band->n_bit

[RFC] wimax: move out to staging

2020-10-27 Thread Arnd Bergmann
From: Arnd Bergmann There are no known users of this driver as of October 2020, and it will be removed unless someone turns out to still need it in future releases. According to https://en.wikipedia.org/wiki/List_of_WiMAX_networks, there have been many public wimax networks, but it appears that

Re: [RFC] wimax: move out to staging

2020-10-28 Thread Arnd Bergmann
On Wed, Oct 28, 2020 at 11:34 AM Dan Carpenter wrote: > On Tue, Oct 27, 2020 at 10:20:13PM +0100, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > There are no known users of this driver as of October 2020, and it will > > be removed unless someone turns out

[PATCH, net -> staging, v2] wimax: move out to staging

2020-10-29 Thread Arnd Bergmann
From: Arnd Bergmann There are no known users of this driver as of October 2020, and it will be removed unless someone turns out to still need it in future releases. According to https://en.wikipedia.org/wiki/List_of_WiMAX_networks, there have been many public wimax networks, but it appears that

Re: [RFC] wimax: move out to staging

2020-10-29 Thread Arnd Bergmann
n Thu, Oct 29, 2020 at 4:56 PM Jakub Kicinski wrote: > On Wed, 28 Oct 2020 06:56:28 +0100 Greg Kroah-Hartman wrote: > > On Tue, Oct 27, 2020 at 10:20:13PM +0100, Arnd Bergmann wrote: > > > > Is this ok for me to take through the staging tree? If so, I need an > &

[GIT PULL, staging, net-next] wimax: move to staging

2020-10-29 Thread Arnd Bergmann
against it. ---- Arnd Bergmann (2): wimax: fix duplicate initializer warning wimax: move out to staging Documentation/admin-guide/index.rst| 1 - Documentation/networking/kapi.rst

Re: [PATCH v2] staging: trivial: hikey9xx: fix be32<->u32 casting warnings

2020-11-24 Thread Arnd Bergmann
On Thu, Nov 19, 2020 at 1:31 PM Juan Antonio Aldea-Armenteros wrote: > > This patch fixes the following warnings reported by sparse, by adding > missing __force annotations. > > drivers/staging/hikey9xx/hisi-spmi-controller.c:164:24: warning: cast to > restricted __be32 > drivers/staging/hikey9xx

[PATCH] staging: bcm2835: fix vchiq_mmal dependencies

2020-12-03 Thread Arnd Bergmann
From: Arnd Bergmann When the MMAL code is built-in but the vchiq core config is set to =m, the mmal code never gets built, which in turn can lead to link errors: ERROR: modpost: "vchiq_mmal_port_set_format" [drivers/staging/vc04_services/bcm2835-camera/bcm2835-v4l2.ko] undefi

Re: [PATCH] staging: bcm2835: fix vchiq_mmal dependencies

2020-12-04 Thread Arnd Bergmann
On Fri, Dec 4, 2020 at 11:44 AM Jacopo Mondi wrote: > > Hi Arnd, > > On Thu, Dec 03, 2020 at 11:38:30PM +0100, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > When the MMAL code is built-in but the vchiq core config is > > set to =m, the mmal code

[PATCH] staging: rtl819x: select CONFIG_CRC32

2021-01-03 Thread Arnd Bergmann
From: Arnd Bergmann Without crc32 support, the drivers fail to link: ERROR: modpost: "crc32_le" [drivers/staging/rtl8192e/rtllib_crypt_wep.ko] undefined! ERROR: modpost: "crc32_le" [drivers/staging/rtl8192e/rtllib_crypt_tkip.ko] undefined! ERROR: modpost: "crc32_le&q

[PATCH] staging: greybus: fix stack size warning with UBSAN

2021-01-03 Thread Arnd Bergmann
From: Arnd Bergmann clang warns about excessive stack usage in this driver when UBSAN is enabled: drivers/staging/greybus/audio_topology.c:977:12: error: stack frame size of 1836 bytes in function 'gbaudio_tplg_create_widget' [-Werror,-Wframe-larger-than=] Rework this code to no

[PATCH] staging: vchiq: fix uninitialized variable copy

2021-01-05 Thread Arnd Bergmann
From: Arnd Bergmann Smatch found a local variable that can get copied to another local variable without an initializion in the error case: drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1056 vchiq_get_user_ptr() error: uninitialized symbol 'ptr'. This seems harmle

Re: [PATCH] staging: vchiq: delete obselete comment

2021-01-05 Thread Arnd Bergmann
Dan Carpenter Reviewed-by: Arnd Bergmann There is still another sparse warning for a remaining __user address space mismatch in the driver, but this one seems to be fixed as you say. Thanks for the fix! Arnd ___ devel mailing list de...

Re: [PATCH 1/2] staging: vchiq: Fix bulk userdata handling

2021-01-05 Thread Arnd Bergmann
On Tue, Jan 5, 2021 at 12:53 PM Phil Elwell wrote: > On Tue, 5 Jan 2021 at 11:04, Dan Carpenter wrote: > > > > Mixing __user pointers and regular pointers is dangerous and has lead to > > security problems in this driver in the past. But also mixing mixing > > tokens with pointers just makes th

Re: [PATCH v2 2/3] staging: vchiq: Fix bulk transfers on 64-bit builds

2021-01-05 Thread Arnd Bergmann
ould have shown. > > Fixes: a4367cd2b231 ("staging: vchiq: convert compat bulk transfer") > > Signed-off-by: Phil Elwell Acked-by: Arnd Bergmann ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH] media: atomisp: fix Wvisiblity warning

2021-01-08 Thread Arnd Bergmann
From: Arnd Bergmann Some randconfig builds include ia_css_firmware.h without first including linux/device.h: In file included from atomisp/pci/mmu/sh_mmu_mrfld.c:23: In file included from atomisp/pci/atomisp_compat.h:22: In file included from atomisp/pci/atomisp_compat_css20.h:24: In file

Re: [PATCH 0/3] staging: vchiq: fix completion routines & semaphores

2018-12-12 Thread Arnd Bergmann
wn_interruptible()'s meaning. > > This patch changes all completions so they use the proper APIs and gets > rid of vchiq_killable.h. I took into account Arnd's commit to avoid > merge conflicts. > Reviewed-by: Arnd Bergmann Thanks for the follow-up! Arnd

[PATCH 3/7] staging: olpc_dcon: add a missing dependency

2018-12-14 Thread Arnd Bergmann
From: Lubomir Rintel Commit 33f49571d75024b1044cd02689ad2bdb4924cc80 upstream. WARNING: unmet direct dependencies detected for BACKLIGHT_CLASS_DEVICE Depends on [n]: HAS_IOMEM [=y] && BACKLIGHT_LCD_SUPPORT [=n] Selected by [y]: - FB_OLPC_DCON [=y] && STAGING [=y] && X86 [=y] && OLP

[PATCH] staging: axis-fifo: add CONFIG_OF dependency

2019-03-04 Thread Arnd Bergmann
is-fifo.c:919:5: error: 'has_tid' may be used uninitialized in this function [-Werror=maybe-uninitialized] When CONFIG_OF is set, this does not happen, and since the driver cannot work without it, just add that option as a Kconfig dependency. Signed-off-by: Arnd Bergmann --- drivers/

[PATCH] staging: olpc_dcon_xo_1: add missing 'const' qualifier

2019-03-04 Thread Arnd Bergmann
[-Werror=discarded-qualifiers] Add the 'const' keyword that should have been there all along. Fixes: 2159fb372929 ("staging: olpc_dcon: olpc_dcon_xo_1.c: Switch to the gpio descriptor interface") Signed-off-by: Arnd Bergmann --- drivers/staging/olpc_dcon/olpc_dcon_xo_1.c |

[PATCH] media: staging/intel-ipu3: reduce kernel stack usage

2019-03-04 Thread Arnd Bergmann
s [-Werror=frame-larger-than=] By dynamically allocating this array, the stack usage goes down to an acceptable 140 bytes for the same x86-32 configuration. Fixes: f5f2e4273518 ("media: staging/intel-ipu3: Add css pipeline programming") Signed-off-by: Arnd Bergmann --- drivers/staging/m

[PATCH] media: staging/intel-ipu3-v4l: reduce kernel stack usage

2019-03-04 Thread Arnd Bergmann
s [-Werror=frame-larger-than=] By dynamically allocating this array, the stack usage goes down to an acceptable 272 bytes for the same x86-32 configuration. Fixes: a0ca1627b450 ("media: staging/intel-ipu3: Add v4l2 driver based on media framework") Signed-off-by: Arnd Bergmann --- driver

[PATCH] media: staging/intel-ipu3: mark PM function as __maybe_unused

2019-03-04 Thread Arnd Bergmann
d-function] The warning is at least easy to fix by marking the function as __maybe_unused. Fixes: 7fc7af649ca7 ("media: staging/intel-ipu3: Add imgu top level pci device driver") Signed-off-by: Arnd Bergmann --- drivers/staging/media/ipu3/ipu3.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH] media: staging: davinci_vpfe: disallow building with COMPILE_TEST

2019-03-04 Thread Arnd Bergmann
_YIN0_3_EN' davinci_cfg_reg(DM365_VIN_YIN0_3_EN); ^ 7 errors generated. Fixes: 4907c73deefe ("media: staging: davinci_vpfe: allow building with COMPILE_TEST") Signed-off-by: Arnd Bergmann --- drivers/staging/media/davinci_vpfe/Kconfig | 2 +- 1 file chan

Re: [PATCH] media: staging/intel-ipu3: reduce kernel stack usage

2019-03-05 Thread Arnd Bergmann
On Tue, Mar 5, 2019 at 8:53 AM Sakari Ailus wrote: > On Tue, Mar 05, 2019 at 12:25:18AM +, Cao, Bingbu wrote: > > > struct v4l2_pix_format_mplane *const in = > > > &q[IPU3_CSS_QUEUE_IN].fmt.mpix; > > > struct v4l2_pix_format_mplane *const out = @@ -

Re: [PATCH] media: staging: davinci_vpfe: disallow building with COMPILE_TEST

2019-03-05 Thread Arnd Bergmann
On Tue, Mar 5, 2019 at 9:05 AM Geert Uytterhoeven wrote: > On Mon, Mar 4, 2019 at 9:30 PM Arnd Bergmann wrote: > > The driver should really call dm365_isif_setup_pinmux() through a callback, > > but it runs platform specific code by itself, which never actually compiled: >

Re: [PATCH] media: staging/intel-ipu3: reduce kernel stack usage

2019-03-05 Thread Arnd Bergmann
On Tue, Mar 5, 2019 at 9:47 AM Sakari Ailus wrote: > On Tue, Mar 05, 2019 at 09:40:24AM +0100, Arnd Bergmann wrote: > > On Tue, Mar 5, 2019 at 8:53 AM Sakari Ailus > > wrote: > > > On Tue, Mar 05, 2019 at 12:25:18AM +, Cao, Bingbu wrote: > > > > >

[PATCH] [v2] media: staging/intel-ipu3: reduce kernel stack usage

2019-03-05 Thread Arnd Bergmann
s [-Werror=frame-larger-than=] By dynamically allocating this array, the stack usage goes down to an acceptable 140 bytes for the same x86-32 configuration. Fixes: f5f2e4273518 ("media: staging/intel-ipu3: Add css pipeline programming") Signed-off-by: Arnd Bergmann --- v2: restructure to

[PATCH] [v2] media: staging: davinci_vpfe: disallow building with COMPILE_TEST

2019-03-05 Thread Arnd Bergmann
: davinci_vpfe: allow building with COMPILE_TEST") Signed-off-by: Arnd Bergmann --- drivers/staging/media/davinci_vpfe/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/davinci_vpfe/Kconfig b/drivers/staging/media/davinci_vpfe/Kconfig index aea4

[PATCH] staging: media: davinci_vpfe: fix large stack usage with clang

2019-03-13 Thread Arnd Bergmann
#x27;isif_ioctl' [-Werror,-Wframe-larger-than=] Marking it as 'const' while passing the data down clearly shows us that the copy is never modified, and we can skip copying it entirely, which reduces the stack usage to just eight bytes. Signed-off-by: Arnd Bergmann ---

[PATCH] staging: media: imx7-mipi-csis: fix debugfs compilation

2019-03-13 Thread Arnd Bergmann
problem, but behaves the same way otherwise (it does nothing when debugfs is disabled). Consolidate the two versions, using the correct section from one version, and the implementation from the other. Signed-off-by: Arnd Bergmann --- drivers/staging/media/imx/imx7-mipi-csis.c | 16

[PATCH 1/2] exfat stopusing CONFIG_FAT_DEFAULT_IOCHARSET

2019-09-06 Thread Arnd Bergmann
could not figure out why the correct code is commented out, but using that fixes the problem. Signed-off-by: Arnd Bergmann --- drivers/staging/exfat/exfat_super.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/staging/exfat/exfat_super.c b/drivers/sta

[PATCH 2/2] exfat: stop using 32-bit time_t

2019-09-06 Thread Arnd Bergmann
time_t suffers from overflow problems and should not be used. In exfat, it is currently used in two open-coded time64_to_tm() implementations. Changes those to use the existing function instead. Signed-off-by: Arnd Bergmann --- drivers/staging/exfat/exfat_super.c | 164

Re: [PATCH] media: staging: tegra-vde: Fix build error

2019-09-20 Thread Arnd Bergmann
On Thu, Jul 25, 2019 at 2:24 PM Dmitry Osipenko wrote: > > 25.07.2019 5:41, YueHaibing пишет: > > If IOMMU_SUPPORT is not set, and COMPILE_TEST is y, > > IOMMU_IOVA may be set to m. So building will fails: > > > > drivers/staging/media/tegra-vde/iommu.o: In function `tegra_vde_iommu_map': > > iomm

[PATCH 00/16] drivers: y2038 updates

2019-11-08 Thread Arnd Bergmann
ailable at https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/log/?h=y2038-endgame Arnd Arnd Bergmann (16): staging: exfat: use prandom_u32() for i_generation fat: use prandom_u32() for i_generation net: sock: use __kernel_old_timespec instead of timespec dlm: use SO_SN

[PATCH 01/16] staging: exfat: use prandom_u32() for i_generation

2019-11-08 Thread Arnd Bergmann
Similar to commit 46c9a946d766 ("shmem: use monotonic time for i_generation") we should not use the deprecated get_seconds() interface for i_generation. prandom_u32() is the replacement used in other file systems. Signed-off-by: Arnd Bergmann --- drivers/staging/exfat/exfat_super.c |

Re: [PATCH v5 0/4] Correct vendor-prefix and document device isl29028

2014-11-20 Thread Arnd Bergmann
On Saturday 08 November 2014, Darshana Padmadas wrote: > Patchset documents correct and the deprecated vendor-prefix found by > checkpatch > warning and also documents information of device isl29028 for compatibility. > Patchset also includes corrected vendor-prefix and device name in compatible >

Re: [PATCH] staging: android: fix coding style error

2015-01-14 Thread Arnd Bergmann
On Wednesday 14 January 2015 09:20:42 Patrick Boettcher wrote: > diff --git a/drivers/staging/android/sync_debug.c > b/drivers/staging/android/sync_debug.c > index 1532a86..9a2aaf8 100644 > --- a/drivers/staging/android/sync_debug.c > +++ b/drivers/staging/android/sync_debug.c > @@ -96,7 +96,8 @@

[PATCH v3 00/26] compat_ioctl: cleanups

2019-04-16 Thread Arnd Bergmann
aintainers. I hope you can still take these for the coming merge window, unless new problems come up. Arnd Arnd Bergmann (26): compat_ioctl: pppoe: fix PPPOEIOCSFWD handling compat_ioctl: move simple ppp command handling into driver compat_ioctl: avoid unused function warning fo

[PATCH v3 09/26] compat_ioctl: move drivers to compat_ptr_ioctl

2019-04-16 Thread Arnd Bergmann
-off-by: Arnd Bergmann --- drivers/char/ppdev.c | 12 +- drivers/char/tpm/tpm_vtpm_proxy.c | 12 +- drivers/firewire/core-cdev.c | 12 +- drivers/hid/usbhid/hiddev.c | 11 + drivers/hwtracing/stm/core.c | 12 +- drivers/misc/mei

[PATCH v3 12/26] compat_ioctl: move more drivers to compat_ptr_ioctl

2019-04-16 Thread Arnd Bergmann
e not interpreted as integer values. Acked-by: Jason Gunthorpe Acked-by: Daniel Vetter Acked-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Acked-by: David Sterba Acked-by: Darren Hart (VMware) Acked-by: Jonathan Cameron Acked-by: Bjorn Andersson Signed-off-by: Arnd Bergmann --- dr

Re: [PATCH v3 00/26] compat_ioctl: cleanups

2019-04-17 Thread Arnd Bergmann
On Wed, Apr 17, 2019 at 12:33 AM Douglas Gilbert wrote: > > On 2019-04-16 4:19 p.m., Arnd Bergmann wrote: > > Hi Al, > > > > It took me way longer than I had hoped to revisit this series, see > > https://lore.kernel.org/lkml/20180912150142.157913-1-a...@arndb.de/

Re: [PATCH v3 12/26] compat_ioctl: move more drivers to compat_ptr_ioctl

2019-04-25 Thread Arnd Bergmann
On Thu, Apr 25, 2019 at 5:22 PM Mauro Carvalho Chehab wrote: > Em Tue, 16 Apr 2019 22:25:33 +0200 Arnd Bergmann escreveu: > > If I understand your patch description well, using compat_ptr_ioctl > only works if the driver is not for s390, right? No, the purpose of compat_ptr_ioctl(

Re: [PATCH v3 12/26] compat_ioctl: move more drivers to compat_ptr_ioctl

2019-04-25 Thread Arnd Bergmann
On Thu, Apr 25, 2019 at 5:35 PM Al Viro wrote: > > On Thu, Apr 25, 2019 at 12:21:53PM -0300, Mauro Carvalho Chehab wrote: > > > If I understand your patch description well, using compat_ptr_ioctl > > only works if the driver is not for s390, right? > > No; s390 is where "oh, just set ->compat_ioct

Re: [PATCH v3 12/26] compat_ioctl: move more drivers to compat_ptr_ioctl

2019-04-26 Thread Arnd Bergmann
On Thu, Apr 25, 2019 at 11:25 PM Johannes Berg wrote: > On Thu, 2019-04-25 at 17:55 +0200, Arnd Bergmann wrote: > > On Thu, Apr 25, 2019 at 5:35 PM Al Viro wrote: > > > > > > On Thu, Apr 25, 2019 at 12:21:53PM -0300, Mauro Carvalho Chehab wrote: > > >

[GIT PULL net-next, resend] isdn: deprecate non-mISDN drivers

2019-05-31 Thread Arnd Bergmann
el.org/patch/8484861/#17900371 [2] https://listserv.isdn4linux.de/pipermail/isdn4linux/2019-April/thread.html ---- Arnd Bergmann (5): isdn: gigaset: remove i4l support isdn: remove hisax driver isdn: remove isdn4linux

Re: [net-next:master 391/455] drivers/staging/isdn/avm/b1.c:163:49: sparse: sparse: incorrect type in argument 2 (different address spaces)

2019-06-03 Thread Arnd Bergmann
On Mon, Jun 3, 2019 at 1:40 PM kbuild test robot wrote: > > Hi Arnd, > > First bad commit (maybe != root cause): Yep: > >> drivers/staging/isdn/avm/b1.c:163:49: sparse: sparse: incorrect type in > >> argument 2 (different address spaces) @@expected void const [noderef] > >> *from @@go

[PATCH] Staging: iio: adt7316: use correct headers for gpio

2019-06-17 Thread Arnd Bergmann
mplicit-function-declaration] irq_type = irqd_get_trigger_type(irq_get_irq_data(chip->bus.irq)); Include the correct headers that contain the declarations for these functions. Fixes: c63460c4298f ("Staging: iio: adt7316: Use device tree data to set ldac_pin") Signed-off-by: Arnd Bergmann --- dri

[PATCH 1/3] media: meson: include linux/kthread.h

2019-06-17 Thread Arnd Bergmann
function-declaration] Fixes: 3e7f51bd9607 ("media: meson: add v4l2 m2m video decoder driver") Signed-off-by: Arnd Bergmann --- drivers/staging/media/meson/vdec/vdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/media/meson/vdec/vdec.c b/drivers/staging

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

2019-06-28 Thread Arnd Bergmann
functions into lpfc_debugfs.c and not mark them inline as a later cleanup. Fixes: 81a56f6dcd20 ("gcc-plugins: structleak: Generalize to all variable types") Signed-off-by: Arnd Bergmann --- drivers/scsi/lpfc/lpfc_debugfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

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

2019-06-28 Thread Arnd Bergmann
a local sockaddr structure on the stack. These will still add up, but the stack frames are now under 200 bytes. Signed-off-by: Arnd Bergmann --- I'm not sure this actually does what I think it does. Someone needs to verify that we correctly print the addresses here. I've also only add

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

2019-06-28 Thread Arnd Bergmann
quot;) Signed-off-by: Arnd Bergmann --- [v2] do it for both GCC_PLUGIN_STRUCTLEAK_BYREF and GCC_PLUGIN_STRUCTLEAK_BYREF_ALL. --- security/Kconfig.hardening | 7 +++ 1 file changed, 7 insertions(+) diff --git a/security/Kconfig.hardening b/security/Kconfig.hardening index a1ffe2eb4d5f..af4c9

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

2019-06-28 Thread Arnd Bergmann
mark those noinline_for_stack. Fixes: 8c5af16f7953 ("staging: rtl8712: reduce stack usage") Fixes: 81a56f6dcd20 ("gcc-plugins: structleak: Generalize to all variable types") Signed-off-by: Arnd Bergmann --- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 157 ++ 1 file

[PATCH] staging: media/davinci_vpfe: fix pinmux setup compilation

2019-07-22 Thread Arnd Bergmann
i/, some clarification on that would be helpful to decide what the long-term plan on this should be to either remove the staging driver as obsolete or integrate it with the rest in a way that actually works. Signed-off-by: Arnd Bergmann --- drivers/staging/media/davinci_vpfe/Makefile | 5

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

2019-07-22 Thread Arnd Bergmann
On Sun, Jun 30, 2019 at 10:37 PM Julian Anastasov wrote: > On Fri, 28 Jun 2019, Arnd Bergmann wrote: > > struct ip_vs_conn *ctl_cp = cp->control; > > if (!ctl_cp) { > > - IP_VS_ERR_BUF("request control DEL for uncontrolled: " > >

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

2019-07-22 Thread Arnd Bergmann
On Fri, Jun 28, 2019 at 9:59 PM Willem de Bruijn wrote: > 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_V

[PATCH v5 12/29] compat_ioctl: move drivers to compat_ptr_ioctl

2019-07-30 Thread Arnd Bergmann
-by: Jason Gunthorpe Reviewed-by: Jiri Kosina Reviewed-by: Stefan Hajnoczi Signed-off-by: Arnd Bergmann --- drivers/char/ppdev.c | 12 +- drivers/char/tpm/tpm_vtpm_proxy.c | 12 +- drivers/firewire/core-cdev.c | 12 +- drivers/hid/usbhid/hiddev.c

[PATCH] staging: unisys/visorbus: add __init/__exit annotations

2017-09-15 Thread Arnd Bergmann
warning and slightly reduces the runtime code size. Signed-off-by: Arnd Bergmann --- drivers/staging/unisys/visorbus/visorchipset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c

Re: [PATCH] android: binder: fix type mismatch warning

2017-09-18 Thread Arnd Bergmann
On Mon, Sep 18, 2017 at 4:02 PM, Greg Kroah-Hartman wrote: >> However, there is another problem with the Kconfig option: turning >> it on or off creates two incompatible ABI versions, a kernel that >> has this enabled cannot run user space that was built without it >> or vice versa. A better solut

Re: [PATCH] android: binder: fix type mismatch warning

2017-09-18 Thread Arnd Bergmann
On Mon, Sep 18, 2017 at 6:23 PM, Christoph Hellwig wrote: > On Mon, Sep 18, 2017 at 05:53:47PM +0200, Greg Kroah-Hartman wrote: >> > It seems like a legitimate use case of the binder modules, but >> > now there is a kernel Kconfig option that has to match a user >> > space binary. >> >> So, should

Re: [PATCH] android: binder: fix type mismatch warning

2017-09-20 Thread Arnd Bergmann
On Wed, Sep 20, 2017 at 11:08 AM, Martijn Coenen wrote: > On Mon, Sep 18, 2017 at 9:49 PM, Arnd Bergmann wrote: >> The current Kconfig comment says that v7 of the ABI is also >> incompatible with Android 4.5 and later user space. Can someone >> confirm that? > > Tha

Re: [PATCH] android: binder: fix type mismatch warning

2017-09-20 Thread Arnd Bergmann
On Wed, Sep 20, 2017 at 12:24 PM, Martijn Coenen wrote: > On Wed, Sep 20, 2017 at 11:58 AM, Arnd Bergmann wrote: >> >> - Since you say there are existing users of recent 32-bit Android >> including Oreo, I also think that removing support for the v7 ABI >> is no lo

Re: [PATCH] android: binder: fix type mismatch warning

2017-09-22 Thread Arnd Bergmann
On Fri, Sep 22, 2017 at 9:00 AM, Martijn Coenen wrote: >> The case that gets interesting is a any kind of user that wants to >> run an Android application on a regular Linux box without >> using virtual machines or emulation, e.g. a an app developer, >> or a user that wants to run some Android ap

  1   2   3   4   5   6   7   >