[PATCH] net: always include tcp.h in sock.c

2017-05-17 Thread Arnd Bergmann
is simply missing because the header is included conditionally. There is no real reason to leave out the header, so this just removes the #ifdef. Fixes: f6ba8d33cfbb ("netem: fix skb_orphan_partial()") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- net/core/sock.c | 3 --- 1 file chan

Re: [PATCH] rt2x00: improve calling conventions for register accessors

2017-05-16 Thread Arnd Bergmann
;> > Date: Mon, 15 May 2017 16:28:01 +0200 >> > >> > > On Mon, May 15, 2017 at 03:46:55PM +0200, Arnd Bergmann wrote: >> > >> With CONFIG_KASAN enabled and gcc-7, we get a warning about rather high >> > >> stack usage (with a private pa

Re: [PATCH] rt2x00: improve calling conventions for register accessors

2017-05-16 Thread Arnd Bergmann
On Tue, May 16, 2017 at 3:44 PM, Jes Sorensen wrote: > On 05/16/2017 07:55 AM, Stanislaw Gruszka wrote: >> >> On Mon, May 15, 2017 at 10:39:51AM -0400, David Miller wrote: >>> >>> Passing return values by reference is and always has been a really >>> poor way to achieve

[PATCH] [net, 4.12] mlx5e: add CONFIG_INET dependency

2017-05-16 Thread Arnd Bergmann
flow") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- Note: the mlxsw driver has referenced the same symbol for a while, but had an implicit dependency on CONFIG_INET since it also depends on SWITCHDEV. drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 2 +- 1 file changed, 1 insertio

Re: [PATCH] rt2x00: improve calling conventions for register accessors

2017-05-15 Thread Arnd Bergmann
On Mon, May 15, 2017 at 4:28 PM, Stanislaw Gruszka <sgrus...@redhat.com> wrote: > On Mon, May 15, 2017 at 03:46:55PM +0200, Arnd Bergmann wrote: >> With CONFIG_KASAN enabled and gcc-7, we get a warning about rather high >> stack usage (with a private patch set I have to

Re: [PATCH net v2] qed: Fix uninitialized data in aRFS infrastructure

2017-05-15 Thread Arnd Bergmann
ncs.c: In function > 'qed_set_rfs_mode_disable': > ethernet/qlogic/qed/qed_init_fw_funcs.c:993:3: error: '*((void > *)+4)' is used uninitialized in this function [-Werror=uninitialized] > > Fixes: d51e4af5c209 ("qed: aRFS infrastructure support") > Reported-by: Arnd Bergmann <a...

Re: stable/linux-4.10.y build: 203 builds: 3 failed, 200 passed, 3 errors, 5 warnings (v4.10.16)

2017-05-15 Thread Arnd Bergmann
On Mon, May 15, 2017 at 3:39 PM, Eric Dumazet <eduma...@google.com> wrote: > On Mon, May 15, 2017 at 5:57 AM, Arnd Bergmann <a...@arndb.de> wrote: >> On Sun, May 14, 2017 at 3:48 PM, kernelci.org bot <b...@kernelci.org> wrote: >> >> int sock_setsockopt

[PATCH] rt2x00: improve calling conventions for register accessors

2017-05-15 Thread Arnd Bergmann
by changing the calling convention to have the output as the return value of the function. This should also results in smaller object code, saving around 4KB in .text with KASAN, or 2KB without KASAN. Fixes: 41977e86c984 ("rt2x00: add support for MT7620") Signed-off-by: Arnd Bergmann <

Re: stable/linux-4.10.y build: 203 builds: 3 failed, 200 passed, 3 errors, 5 warnings (v4.10.16)

2017-05-15 Thread Arnd Bergmann
On Sun, May 14, 2017 at 3:48 PM, kernelci.org bot wrote: > > stable/linux-4.10.y build: 203 builds: 3 failed, 200 passed, 3 errors, 5 > warnings (v4.10.16) > Full Build Summary: > https://kernelci.org/build/stable/branch/linux-4.10.y/kernel/v4.10.16/ > Tree: stable > Branch:

Re: [PATCH] qed: fix uninitialized data in aRFS intrastructure

2017-05-11 Thread Arnd Bergmann
On Thu, May 11, 2017 at 4:37 PM, Mintz, Yuval wrote: >> > For the most part - I'm almost all in favor of this change. >> > But just to make it clear - the actual fix could have been a one-liner, >> > right? >> > The rest are style changes. > >> Correct. Having the correct

Re: [PATCH] qed: fix uninitialized data in aRFS intrastructure

2017-05-11 Thread Arnd Bergmann
On Thu, May 11, 2017 at 4:03 PM, Mintz, Yuval wrote: >> register, which went subtly wrong due to the wrong size in a memset(): >> >> ethernet/qlogic/qed/qed_init_fw_funcs.c: In function >> 'qed_set_rfs_mode_disable': >> ethernet/qlogic/qed/qed_init_fw_funcs.c:993:3: error:

[PATCH] qed: fix uninitialized data in aRFS intrastructure

2017-05-11 Thread Arnd Bergmann
)' is used uninitialized in this function [-Werror=uninitialized] This removes the silly loop and memset, and instead directly writes the correct value to the register. Fixes: d51e4af5c209 ("qed: aRFS infrastructure support") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- .../net/eth

[PATCH] wlcore: fix 64K page support

2017-05-11 Thread Arnd Bergmann
kernels no longer show the warning, but the bug is still there, as the allocation is based on the CPU page size rather than the actual capabilities of the hardware. This replaces the PAGE_SIZE macro with the SZ_4K macro, i.e. 4096 bytes per buffer. Cc: sta...@vger.kernel.org Signed-off-by: Arnd

Re: [PATCH] netfilter: conntrack: Force inlining of build check to prevent build failure

2017-05-03 Thread Arnd Bergmann
On Wed, May 3, 2017 at 2:47 PM, Geert Uytterhoeven <ge...@linux-m68k.org> wrote: > Hi Arnd, > > On Wed, May 3, 2017 at 2:32 PM, Arnd Bergmann <a...@arndb.de> wrote: >> On Wed, May 3, 2017 at 2:18 PM, Geert Uytterhoeven <ge...@linux-m68k.org> >> wrote: >&g

Re: [PATCH] netfilter: conntrack: Force inlining of build check to prevent build failure

2017-05-03 Thread Arnd Bergmann
extension sizes > again") > Signed-off-by: Geert Uytterhoeven <ge...@linux-m68k.org> I saw this as well when I tried building with "gcc-7 -Og", and came to the same conclusion. Acked-by: Arnd Bergmann <a...@arndb.de> With -Og, there were a couple of other instance

[PATCH] [4.11 regression] cpsw/netcp: refine cpts dependency

2017-04-28 Thread Arnd Bergmann
on POSIX_TIMERS' to hide the CPTS support when turning it on would be useless. Cc: sta...@vger.kernel.org # 4.11 needs this Fixes: 07fef3623407 ("cpsw/netcp: cpts depends on posix_timers") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- Adding the Cc: stable in case this doesn't make it in

[PATCH net-next] igb: mark PM functions as __maybe_unused

2017-04-27 Thread Arnd Bergmann
, instead using a __maybe_unused annotation simplifies the code and avoids the warning. Fixes: b90fa8763560 ("igb: Enable reading of wake up packet") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/net/ethernet/intel/igb/igb_main.c | 18 +- 1 file changed, 5 i

[PATCH net-next] can: fix build error without CONFIG_PROC_FS

2017-04-27 Thread Arnd Bergmann
'bcmproc_dir' This adds the same #ifdef around all users of the pointer. Alternatively we could move the pointer outside of the #ifdef. Fixes: 384317ef4187 ("can: network namespace support for CAN_BCM protocol") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- net/can/bcm.c | 14 ++

Re: [PATCH net-next] mlx5: work around unused function warning

2017-04-27 Thread Arnd Bergmann
On Thu, Apr 27, 2017 at 1:55 PM, Leon Romanovsky <leo...@mellanox.com> wrote: > On Thu, Apr 27, 2017 at 01:04:02PM +0200, Arnd Bergmann wrote: >> The previous patch addressed a sparse warning but replaced it with a >> compiler warning when CONFIG_MODULES is disabled: >&

[PATCH net-next] mlx5: work around unused function warning

2017-04-27 Thread Arnd Bergmann
/ipoib.c:423:27: error: 'mlx5_rdma_netdev_alloc' defined but not used [-Werror=unused-function] We should never export 'static' functions, so this makes them global again but hides them in another #ifdef like the change before. Fixes: a7082ef066f0 ("mlx5: hide unused functions") Signed-of

Re: cpsw regression in mainline with "cpsw/netcp: cpts depends on posix_timers"

2017-04-27 Thread Arnd Bergmann
On Mon, Apr 24, 2017 at 8:23 PM, Tony Lindgren <t...@atomide.com> wrote: > * Arnd Bergmann <a...@arndb.de> [170424 11:14]: >> On Mon, Apr 24, 2017 at 7:44 PM, Tony Lindgren <t...@atomide.com> wrote: >> > * Arnd Bergmann <a...@arndb.de> [170424 10:38]: &

Re: cpsw regression in mainline with "cpsw/netcp: cpts depends on posix_timers"

2017-04-24 Thread Arnd Bergmann
On Mon, Apr 24, 2017 at 7:44 PM, Tony Lindgren <t...@atomide.com> wrote: > * Arnd Bergmann <a...@arndb.de> [170424 10:38]: >> On Mon, Apr 24, 2017 at 6:51 PM, Tony Lindgren <t...@atomide.com> wrote: >> > Hi, >> > >> > Looks like commit 0

Re: cpsw regression in mainline with "cpsw/netcp: cpts depends on posix_timers"

2017-04-24 Thread Arnd Bergmann
On Mon, Apr 24, 2017 at 6:51 PM, Tony Lindgren wrote: > Hi, > > Looks like commit 07fef3623407 ("cpsw/netcp: cpts depends on posix_timers") > in mainline started triggering the following oops at least on j5eco-evm. > > Adding CONFIG_PTP_1588_CLOCK to .config solves it, but the

[PATCH net-next] net: dsa: LAN9303: add I2C dependency

2017-04-21 Thread Arnd Bergmann
': This adds a Kconfig dependency to avoid the broken configuration. Fixes: be4e119f9914 ("net: dsa: LAN9303: add I2C managed mode support") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/net/dsa/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/n

[PATCH net-next] brcmfmac: fix build without CONFIG_BRCMFMAC_PROTO_BCDC

2017-04-19 Thread Arnd Bergmann
hen CONFIG_BRCMFMAC_PROTO_BCDC is enabled, so we can simply change the Makefile to build it conditionally. Fixes: acf8ac41dd73 ("brcmfmac: remove reference to fwsignal data from struct brcmf_pub") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/Makefi

[PATCH] ieee802154: don't select COMMON_CLK

2017-04-19 Thread Arnd Bergmann
' into 'depends on', as all other similar drivers do. Fixes: d931acd575d6 ("ieee802154: Add CA8210 IEEE 802.15.4 device driver") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/net/ieee802154/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver

[PATCH net-next] liquidio: remove unnecessary variable assignment

2017-04-19 Thread Arnd Bergmann
-parameter] This is harmless but can clearly be remove to avoid the warning. Fixes: 50c0add534d2 ("liquidio: refactor interrupt moderation code") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/net/ethernet/cavium/liquidio/lio_ethtool.c | 2 -- 1 file changed, 2 deletion

[PATCH net-next] i40evf: hide unused variable

2017-04-19 Thread Arnd Bergmann
the declaration into the #ifdef to avoid the warning. Fixes: dab86afdbbd1 ("i40e/i40evf: Change the way we limit the maximum frame size for Rx") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 d

[PATCH] xen/9pfs: select CONFIG_XEN_XENBUS_FRONTEND

2017-04-19 Thread Arnd Bergmann
All Xen frontends need to select this symbol to avoid a link error: net/built-in.o: In function `p9_trans_xen_init': :(.text+0x149e9c): undefined reference to `__xenbus_register_frontend' Fixes: d4b40a02f837 ("xen/9pfs: build 9pfs Xen transport driver") Signed-off-by: Arn

Re: [PATCH 06/12] audit: Use timespec64 to represent audit timestamps

2017-04-15 Thread Arnd Bergmann
On Sat, Apr 8, 2017 at 5:58 PM, Deepa Dinamani wrote: >> I have no problem merging this patch into audit/next for v4.12, would >> you prefer me to do that so at least this patch is merged? > > This would be fine. > But, I think whoever takes the last 2 deletion patches

Re: [PATCH net-next] net: phy: Allow building mdio-boardinfo into the kernel

2017-03-29 Thread Arnd Bergmann
us/device support from > PHYs") > Fixes: 648ea0134069 ("net: phy: Allow pre-declaration of MDIO devices") > Signed-off-by: Florian Fainelli <f.faine...@gmail.com> It survived the overnight randconfig build, Tested-by: Arnd Bergmann <a...@arndb.de> On a related n

Re: [PATCH net-next] net: phy: Allow building mdio-boardinfo into the kernel

2017-03-28 Thread Arnd Bergmann
On Tue, Mar 28, 2017 at 9:57 PM, Florian Fainelli wrote: > mdio-boardinfo contains code that is helpful for platforms to register > specific MDIO bus devices independent of how CONFIG_MDIO_DEVICE or > CONFIG_PHYLIB will be selected (modular or built-in). In order to make >

[PATCH] rocker: fix Wmaybe-uninitialized false-positive

2017-03-28 Thread Arnd Bergmann
simplify the code and get rid of the warning by unconditionally saving the prev_state and prev_ctrls variables. The inlined memcpy is not particularly expensive here, as it just has to read five bytes from one or two cache lines. Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drive

[PATCH] 6lowpan: set peer_addr correctly again

2017-03-28 Thread Arnd Bergmann
of the variable is a subsequent printk(), and it is not otherwise initialized, so reverting the changed line looks like the right fix. Fixes: fb6f2f606ce8 ("6lowpan: Fix IID format for Bluetooth") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- net/bluetooth/6lowpan.c | 2 +- 1

[PATCH, net] isdn: kcapi: avoid uninitialized data

2017-03-28 Thread Arnd Bergmann
behavior. Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/isdn/capi/kcapi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/isdn/capi/kcapi.c b/drivers/isdn/capi/kcapi.c index 1dfd1085a04f..9ca691d6c13b 100644 --- a/drivers/isdn/capi/kcapi.c +++ b/drivers/isdn/capi/k

[PATCH] [net-next] stmmac: use netif_set_real_num_{rx,tx}_queues

2017-03-28 Thread Arnd Bergmann
no member named 'real_num_rx_queues'; did you mean 'real_num_tx_queues'? Fixes: a8f5102af2a7 ("net: stmmac: TX and RX queue priority configuration") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++-- 1 file changed, 2

Re: [PATCH net-next v3 3/3] net: phy: Allow splitting MDIO bus/device support from PHYs

2017-03-27 Thread Arnd Bergmann
On Thu, Mar 23, 2017 at 6:01 PM, Florian Fainelli wrote: > Introduce a new configuration symbol: MDIO_DEVICE which allows building > the MDIO devices and bus code, without pulling in the entire Ethernet > PHY library and devices code. > > PHYLIB nows select MDIO_DEVICE and

[RESEND PATCH 3/3] infiniband: hns: avoid gcc-7.0.1 warning for uninitialized data

2017-03-24 Thread Arnd Bergmann
data. This initializes the field to zero first before setting the individual bits. Fixes: 9a4435375cd1 ("IB/hns: Add driver files for hns RoCE driver") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 1 + 1 file changed, 1 insertio

[RESEND PATCH 2/3] net: hns: avoid gcc-7.0.1 warning for uninitialized data

2017-03-24 Thread Arnd Bergmann
does contain uninitialized data. This initializes the field to zero first before setting the individual bits. Fixes: 5483bfcb169c ("net: hns: modify tcam table and set mac key") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 1

[RESEND PATCH 0/3] hisilicon hns warning fixes for gcc-7.0.1

2017-03-24 Thread Arnd Bergmann
maintainers, as the first submission was a bit confusing when only part of the series arrived for a subset of maintainers, sorry about that. All three patches are address issues in released kernels and apply to v4.11-rc3 or linux-next. Arnd Arnd Bergmann net: hns: fix uninitialized data

[RESEND PATCH 1/3] net: hns: fix uninitialized data use

2017-03-24 Thread Arnd Bergmann
to just always initialize the tbl_tcam_data structure. Fixes: 1f5fa2dd1cfa ("net: hns: fix for promisc mode in HNS driver") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[PATCH] bna: avoid writing uninitialized data into hw registers

2017-03-23 Thread Arnd Bergmann
(which also avoids the signed-integer overflow in 2038 and extends the well-defined behavior until 2106). - zero-fill the reserved field Fixes: 8b230ed8ec96 ("bna: Brocade 10Gb Ethernet device driver") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/net/ethernet/broca

[PATCH 2/3] net: hns: fix uninitialized data use

2017-03-23 Thread Arnd Bergmann
to just always initialize the tbl_tcam_data structure. Fixes: 1f5fa2dd1cfa ("net: hns: fix for promisc mode in HNS driver") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[PATCH 1/3] net: hns: avoid gcc-7.0.1 warning for uninitialized data

2017-03-23 Thread Arnd Bergmann
does contain uninitialized data. This initializes the field to zero first before setting the individual bits. Fixes: 5483bfcb169c ("net: hns: modify tcam table and set mac key") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 1

[PATCH] [netfilter-next] netfilter: remove unused refcount variable

2017-03-20 Thread Arnd Bergmann
: b54ab92b84b6 ("netfilter: refcounter conversions") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- net/netfilter/nfnetlink_acct.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/netfilter/nfnetlink_acct.c b/net/netfilter/nfnetlink_acct.c index f44cbd35357f..c86da174a5fc 100644 ---

[PATCH] [v2, -net] cpsw/netcp: cpts depends on posix_timers

2017-03-20 Thread Arnd Bergmann
.org> Cc: sta...@vger.kernel.org Signed-off-by: Arnd Bergmann <a...@arndb.de> --- v2: use 'depends on' instead of 'select' as suggested by Nico. --- drivers/net/ethernet/ti/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/Kconfig b/drivers/net/eth

[PATCH] [v2, -net] cpsw/netcp: work around reverse cpts dependency

2017-03-20 Thread Arnd Bergmann
pport of cpts") Signed-off-by: Arnd Bergmann <a...@arndb.de> Reviewed-by: Grygorii Strashko <grygorii.stras...@ti.com> --- v1: Originally submitted on Dec 16, still needed for v4.10 and v4.11-rc2 v2: change the symbol names to keep existing defconfigs working --- drivers/net/et

[PATCH 1/2] [net-next] net: dwc-xlgmac: include dcbnl.h

2017-03-20 Thread Arnd Bergmann
(unsigned int, IEEE_8021QAZ_MAX_TCS, Fixes: 65e0ace2c5cd ("net: dwc-xlgmac: Initial driver for DesignWare Enterprise Ethernet") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/e

[PATCH 2/2] [net-next] net: dwc-xlgmac: add module license

2017-03-20 Thread Arnd Bergmann
tag in the PCI driver contains both GPL and BSD. I picked the license text as the more definite reference here and put a GPL tag in there. Fixes: 65e0ace2c5cd ("net: dwc-xlgmac: Initial driver for DesignWare Enterprise Ethernet") Signed-off-by: Arnd Bergmann <a...@arndb.de>

Re: [RESEND PATCH -net] cpsw/netcp: work around reverse cpts dependency

2017-03-17 Thread Arnd Bergmann
On Fri, Mar 17, 2017 at 4:13 AM, David Miller wrote: > > I'm fine with this change, but please keep the user visible Kconfig > symbol name the same, use the new name for the internal one. Yes, makes snese. > I know that this means you have to make more changes elsewhere in

Re: [RESEND PATCH -net] cpsw/netcp: cpts depends on posix_timers

2017-03-15 Thread Arnd Bergmann
On Mon, Mar 13, 2017 at 9:51 PM, Nicolas Pitre wrote: > On Mon, 13 Mar 2017, Nicolas Pitre wrote: > >> So unless I'm mistaken I don't see any problem using "depends on >> PTP_1588_CLOCK" here. > > Furthermore that wouldn't be a first. See for example >

Re: [RESEND PATCH -net] cpsw/netcp: cpts depends on posix_timers

2017-03-13 Thread Arnd Bergmann
On Mon, Mar 13, 2017 at 9:09 PM, Nicolas Pitre <nicolas.pi...@linaro.org> wrote: > On Mon, 13 Mar 2017, Arnd Bergmann wrote: > >> With posix timers having become optional, we get a build error with >> the cpts time sync option of the CPSW driver: >> >> drivers

[RESEND PATCH -net] cpsw/netcp: work around reverse cpts dependency

2017-03-13 Thread Arnd Bergmann
pport of cpts") Signed-off-by: Arnd Bergmann <a...@arndb.de> Reviewed-by: Grygorii Strashko <grygorii.stras...@ti.com> --- Originally submitted on Dec 16, still needed for v4.10 and v4.11-rc2 --- drivers/net/ethernet/ti/Kconfig | 10 -- 1 file changed, 8 insertions(+), 2 de

[RESEND PATCH -net] cpsw/netcp: cpts depends on posix_timers

2017-03-13 Thread Arnd Bergmann
dependencies when mixed with other drivers using 'imply'. Fixes: baa73d9e478f ("posix-timers: Make them configurable") Cc: Nicolas Pitre <nicolas.pi...@linaro.org> Cc: sta...@vger.kernel.org Signed-off-by: Arnd Bergmann <a...@arndb.de> --- Originally submitted on Dec 16, b

Re: [PATCH net 1/3] cpsw/netcp: cpts depends on posix_timers

2017-03-13 Thread Arnd Bergmann
On Fri, Dec 16, 2016 at 7:18 PM, Nicolas Pitre <nicolas.pi...@linaro.org> wrote: > On Fri, 16 Dec 2016, Arnd Bergmann wrote: > >> With posix timers having become optional, we get a build error with >> the cpts time sync option of the CPSW driver: >> >> drivers

Re: [PATCH 08/26] brcmsmac: make some local variables 'static const' to reduce stack size

2017-03-06 Thread Arnd Bergmann
On Mon, Mar 6, 2017 at 5:19 PM, Kalle Valo <kv...@codeaurora.org> wrote: > Arend Van Spriel <arend.vanspr...@broadcom.com> writes: > >> On 2-3-2017 17:38, Arnd Bergmann wrote: >>> With KASAN and a couple of other patches applied, this driver is one >>> o

Re: [PATCH 07/26] brcmsmac: reduce stack size with KASAN

2017-03-06 Thread Arnd Bergmann
On Mon, Mar 6, 2017 at 12:16 PM, Arnd Bergmann <a...@arndb.de> wrote: > On Mon, Mar 6, 2017 at 12:02 PM, Arend Van Spriel > <arend.vanspr...@broadcom.com> wrote: >> On 6-3-2017 11:38, Arnd Bergmann wrote: >>> On Mon, Mar 6, 2017 at 10:16 AM, Arend Van Spriel

Re: [PATCH 07/26] brcmsmac: reduce stack size with KASAN

2017-03-06 Thread Arnd Bergmann
On Mon, Mar 6, 2017 at 12:02 PM, Arend Van Spriel <arend.vanspr...@broadcom.com> wrote: > On 6-3-2017 11:38, Arnd Bergmann wrote: >> On Mon, Mar 6, 2017 at 10:16 AM, Arend Van Spriel >> <arend.vanspr...@broadcom.com> wrote: >>> On

Re: [PATCH 07/26] brcmsmac: reduce stack size with KASAN

2017-03-06 Thread Arnd Bergmann
On Mon, Mar 6, 2017 at 10:16 AM, Arend Van Spriel <arend.vanspr...@broadcom.com> wrote: > On 2-3-2017 17:38, Arnd Bergmann wrote: >> The wlc_phy_table_write_nphy/wlc_phy_table_read_nphy functions always put an >> object >> on the stack, which will each require a

Re: [PATCH 25/26] isdn: eicon: mark divascapi incompatible with kasan

2017-03-03 Thread Arnd Bergmann
On Fri, Mar 3, 2017 at 3:20 PM, Andrey Ryabinin <aryabi...@virtuozzo.com> wrote: > > > On 03/02/2017 07:38 PM, Arnd Bergmann wrote: >> When CONFIG_KASAN is enabled, we have several functions that use rather >> large kernel stacks, e.g. >> >> drivers/isd

Re: [PATCH 25/26] isdn: eicon: mark divascapi incompatible with kasan

2017-03-03 Thread Arnd Bergmann
On Fri, Mar 3, 2017 at 4:22 PM, Andrey Ryabinin <aryabi...@virtuozzo.com> wrote: > On 03/03/2017 05:54 PM, Arnd Bergmann wrote: >> On Fri, Mar 3, 2017 at 3:20 PM, Andrey Ryabinin <aryabi...@virtuozzo.com> >> wrote: >>> On 03/02/2017 07:38 PM, Arnd Bergmann

Re: [PATCH 01/26] compiler: introduce noinline_for_kasan annotation

2017-03-03 Thread Arnd Bergmann
On Fri, Mar 3, 2017 at 3:33 PM, Alexander Potapenko <gli...@google.com> wrote: > On Fri, Mar 3, 2017 at 3:30 PM, Arnd Bergmann <a...@arndb.de> wrote: >> On Fri, Mar 3, 2017 at 2:55 PM, Alexander Potapenko <gli...@google.com> >> wrote: >> >> Wou

Re: [PATCH 26/26] kasan: rework Kconfig settings

2017-03-03 Thread Arnd Bergmann
On Fri, Mar 3, 2017 at 3:51 PM, Andrey Ryabinin <aryabi...@virtuozzo.com> wrote: > > > On 03/02/2017 07:38 PM, Arnd Bergmann wrote: > >> >> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug >> index 97d62c2da6c2..27c838c40a36 100644 >> --- a/li

Re: [PATCH 00/26] bring back stack frame warning with KASAN

2017-03-03 Thread Arnd Bergmann
On Fri, Mar 3, 2017 at 1:25 PM, Alexander Potapenko <gli...@google.com> wrote: > On Thu, Mar 2, 2017 at 5:38 PM, Arnd Bergmann <a...@arndb.de> wrote: >> It took a long while to get this done, but I'm finally ready >> to send the first half of the KASAN stack size patche

Re: [PATCH 01/26] compiler: introduce noinline_for_kasan annotation

2017-03-03 Thread Arnd Bergmann
On Fri, Mar 3, 2017 at 2:55 PM, Alexander Potapenko wrote: > On Fri, Mar 3, 2017 at 2:50 PM, Andrey Ryabinin > wrote: >>> @@ -416,6 +416,17 @@ static __always_inline void __write_once_size(volatile >>> void *p, void *res, int s >>> */ >>> #define

Re: [PATCH 02/26] rewrite READ_ONCE/WRITE_ONCE

2017-03-03 Thread Arnd Bergmann
On Fri, Mar 3, 2017 at 9:26 AM, Christian Borntraeger <borntrae...@de.ibm.com> wrote: > On 03/02/2017 10:45 PM, Arnd Bergmann wrote: >> Ok, got it. So I guess the behavior of forcing aligned accesses on aligned >> data is accidental, and allowing non-power-of-two arguments is

Re: [PATCH 24/26] ocfs2: reduce stack size with KASAN

2017-03-02 Thread Arnd Bergmann
On Thu, Mar 2, 2017 at 11:40 PM, Joe Perches <j...@perches.com> wrote: > On Thu, 2017-03-02 at 23:22 +0100, Arnd Bergmann wrote: >> On Thu, Mar 2, 2017 at 6:46 PM, Joe Perches <j...@perches.com> wrote: >> > On Thu, 2017-03-02 at 17:38 +0100, Arnd Bergmann wrot

Re: [PATCH 24/26] ocfs2: reduce stack size with KASAN

2017-03-02 Thread Arnd Bergmann
On Thu, Mar 2, 2017 at 6:46 PM, Joe Perches <j...@perches.com> wrote: > On Thu, 2017-03-02 at 17:38 +0100, Arnd Bergmann wrote: >> The internal logging infrastructure in ocfs2 causes special warning code to >> be >> used with KASAN, which produces rather large stack fr

Re: [PATCH 02/26] rewrite READ_ONCE/WRITE_ONCE

2017-03-02 Thread Arnd Bergmann
On Thu, Mar 2, 2017 at 8:00 PM, Christian Borntraeger <borntrae...@de.ibm.com> wrote: > On 03/02/2017 06:55 PM, Arnd Bergmann wrote: >> On Thu, Mar 2, 2017 at 5:51 PM, Christian Borntraeger >> <borntrae...@de.ibm.com> wrote: >>> On 03/02/2017 05:38 PM, Arnd Ber

[PATCH 22/26] drm/i915/gvt: don't overflow the kernel stack with KASAN

2017-03-02 Thread Arnd Bergmann
use a local variable for each instance. Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/gpu/drm/i915/gvt/mmio.h | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/mmio.h b/drivers/gpu/drm/i915/gvt/mmio.h index 3bc620

[PATCH 24/26] ocfs2: reduce stack size with KASAN

2017-03-02 Thread Arnd Bergmann
it was before. The current version was introduced by Joe Perches as an optimization, maybe he can see if my change regresses compared to his. Cc: Joe Perches <j...@perches.com> Fixes: 7c2bd2f930ae ("ocfs2: reduce object size of mlog uses") Signed-off-by: Arnd Bergmann <a...@arnd

[PATCH 23/26] mtd: cfi: reduce stack size with KASAN

2017-03-02 Thread Arnd Bergmann
: the frame size of 1776 bytes is larger than 1536 bytes [-Werror=frame-larger-than=] This marks some functions as noinline_for_kasan to keep reduce the overall stack size. Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/mtd/chips/cfi_cmdset_0020.c | 8 include/linux/mtd

[PATCH 20/26] [media] em28xx: split up em28xx_dvb_init to reduce stack size

2017-03-02 Thread Arnd Bergmann
out each part of the switch/case statement that has its own local variables into a separate function, no single one of them uses more than 500 bytes, and with a noinline_for_kasan annotation we can ensure that they are not merged back together. Signed-off-by: Arnd Bergmann <a...@arndb

[PATCH 18/26] [media] i2c: cx25840: avoid stack overflow with KASAN

2017-03-02 Thread Arnd Bergmann
still large anough to risk a kernel stack overflow. Marking the two register access functions as noinline_for_kasan avoids the problem and brings the largest stack frame size down to 232 bytes. Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/media/i2c/cx25840/cx25840-core.c | 4 ++--

Re: [PATCH 02/26] rewrite READ_ONCE/WRITE_ONCE

2017-03-02 Thread Arnd Bergmann
On Thu, Mar 2, 2017 at 5:51 PM, Christian Borntraeger <borntrae...@de.ibm.com> wrote: > On 03/02/2017 05:38 PM, Arnd Bergmann wrote: >> >> This attempts a rewrite of the two macros, using a simpler implementation >> for the most common case of having a naturally aligne

[PATCH 16/26] [media] i2c: adv7604: mark register access as noinline_for_kasan

2017-03-02 Thread Arnd Bergmann
=frame-larger-than=] This is caused by adv76xx_read_check() being inlined repeatedly, and marking this function as noinline_for_kasan solves the problem completely. Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/media/i2c/adv7604.c | 4 ++-- 1 file changed, 2 insertions(+), 2 del

[PATCH 10/26] brcmsmac: reindent split functions

2017-03-02 Thread Arnd Bergmann
In the previous commit I left the indentation alone to help reviewing the patch, this one now runs the three new functions through 'indent -kr -8' with some manual fixups to avoid silliness. No changes other than whitespace are intended here. Signed-off-by: Arnd Bergmann <a...@arndb

[PATCH 11/26] rtlwifi: reduce stack usage for KASAN

2017-03-02 Thread Arnd Bergmann
functions as noinline_for_kasan until no function used more than a kilobyte. While I saw the warning only for three of the five files, I'm changing all five the same way for consistency. This should help in case gcc later makes different inlining decisions. Signed-off-by: Arnd Bergmann <a...@arndb

[PATCH 04/26] tty: kbd: reduce stack size with KASAN

2017-03-02 Thread Arnd Bergmann
than 2048 bytes [-Werror=frame-larger-than=] Annotating those functions as noinline_for_kasan prevents the inlining and reduces the overall stack usage in this driver. Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/tty/vt/keyboard.c | 6 +++--- 1 file changed, 3 insertions(+), 3 del

[PATCH 08/26] brcmsmac: make some local variables 'static const' to reduce stack size

2017-03-02 Thread Arnd Bergmann
=] Here, I'm reducing the stack size by marking as many local variables as 'static const' as I can without changing the actual code. Signed-off-by: Arnd Bergmann <a...@arndb.de> --- .../broadcom/brcm80211/brcmsmac/phy/phy_n.c| 197 ++--- 1 file changed, 97 insertions(+

[PATCH 00/26] bring back stack frame warning with KASAN

2017-03-02 Thread Arnd Bergmann
It took a long while to get this done, but I'm finally ready to send the first half of the KASAN stack size patches that I did in response to the kernelci.org warnings. As before, it's worth mentioning that things are generally worse with gcc-7.0.1 because of the addition of

[PATCH 07/26] brcmsmac: reduce stack size with KASAN

2017-03-02 Thread Arnd Bergmann
/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c:17135:1: warning: the frame size of 6312 bytes is larger than 1000 bytes [-Wframe-larger-than=] This marks the two functions as noinline_for_kasan, avoiding the problem entirely. Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drive

[PATCH 12/26] wl3501_cs: reduce stack size for KASAN

2017-03-02 Thread Arnd Bergmann
a few functions as noinline_for_kasan avoids the problem Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/net/wireless/wl3501_cs.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c

[PATCH 03/26] typecheck.h: avoid local variables in typecheck() macro

2017-03-02 Thread Arnd Bergmann
variables, this goes away and the stacks are comparable to building without KASAN. Signed-off-by: Arnd Bergmann <a...@arndb.de> --- include/linux/typecheck.h | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/include/linux/typecheck.h b/include/linux/typecheck.h

[PATCH 06/26] rocker: mark rocker_tlv_put_* functions as noinline_for_kasan

2017-03-02 Thread Arnd Bergmann
of 2752 bytes is larger than 1536 bytes [-Werror=frame-larger-than=] This marks all of them noinline_for_kasan, which solves the problem by keeping the redzone inside of the separate stack frames. Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/net/ethernet/rocker/rocker_tlv.

[PATCH 05/26] netlink: mark nla_put_{u8,u16,u32} noinline_for_kasan

2017-03-02 Thread Arnd Bergmann
y Vyukov <dvyu...@google.com> Cc: kasan-...@googlegroups.com Signed-off-by: Arnd Bergmann <a...@arndb.de> --- include/net/netlink.h | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/include/net/netlink.h b/include/net/netli

[PATCH 01/26] compiler: introduce noinline_for_kasan annotation

2017-03-02 Thread Arnd Bergmann
called. This introduces a new annotation for those functions to make them either 'inline' or 'noinline' dependning on the CONFIG_KASAN symbol. Signed-off-by: Arnd Bergmann <a...@arndb.de> --- include/linux/compiler.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include

[PATCH 09/26] brcmsmac: split up wlc_phy_workarounds_nphy

2017-03-02 Thread Arnd Bergmann
=] The affected function is actually a collection of three separate implementations, and each of them is fairly large by itself. Splitting them up is done easily and improves readability at the same time. I'm leaving the original indentation to make the review easier. Signed-off-by: Arnd

[PATCH 15/26] [media] tuners: i2c: reduce stack usage for tuner_i2c_xfer_*

2017-03-02 Thread Arnd Bergmann
/tda8290.c: In function 'tda829x_probe': drivers/media/tuners/tda8290.c:878:1: warning: the frame size of 1088 bytes is larger than 1024 bytes [-Wframe-larger-than=] By annotating the helpers as noinline_for_kasan, we can easily avoid this. Signed-off-by: Arnd Bergmann <a...@arndb

[PATCH 02/26] rewrite READ_ONCE/WRITE_ONCE

2017-03-02 Thread Arnd Bergmann
; Signed-off-by: Arnd Bergmann <a...@arndb.de> --- arch/x86/include/asm/switch_to.h | 2 +- fs/overlayfs/util.c | 6 ++--- include/linux/compiler.h | 47 3 files changed, 42 insertions(+), 13 deletions(-) diff --git a/arch/x86/inclu

[PATCH 13/26] rtl8180: reduce stack size for KASAN

2017-03-02 Thread Arnd Bergmann
bytes is larger than 3072 bytes [-Wframe-larger-than=] This marks them noinline_for_kasan. Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/net/wireless/realtek/rtl818x/rtl8180/rtl8225se.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/r

[PATCH 19/26] [media] r820t: mark register functions as noinline_for_kasan

2017-03-02 Thread Arnd Bergmann
=] An earlier patch I tried used an open-coded r820t_write_reg() implementation that may have been more efficent, while this version simply adds the annotation, which has a lower risk for regressions. Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/media/tuners/r820t.c | 4 ++-- 1 file chan

[PATCH 17/26] [media] i2c: ks0127: reduce stack frame size for KASAN

2017-03-02 Thread Arnd Bergmann
functions as noinline_for_kasan solves the problem in this driver. Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/media/i2c/ks0127.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/ks0127.c b/drivers/media/i2c/ks0127.c index ab536c

[PATCH 21/26] drm/bridge: ps8622: reduce stack size for KASAN

2017-03-02 Thread Arnd Bergmann
is larger than 3072 bytes [-Werror=frame-larger-than=] Marking this as noinline_for_kasan completely avoids the problem. Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/gpu/drm/bridge/parade-ps8622.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/g

[PATCH 25/26] isdn: eicon: mark divascapi incompatible with kasan

2017-03-02 Thread Arnd Bergmann
=] To be on the safe side, and to enable a lower frame size warning limit, let's just mark this driver as broken when KASAN is in use. I have tried to reduce the stack size as I did with dozens of other drivers, but failed to come up with a good solution for this one. Signed-off-by: Arnd Bergmann

[PATCH 14/26] [media] dvb-frontends: reduce stack size in i2c access

2017-03-02 Thread Arnd Bergmann
as noinline_for_kasan, we can completely avoid this problem. Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/media/dvb-frontends/ascot2e.c | 3 ++- drivers/media/dvb-frontends/cxd2841er.c | 4 ++-- drivers/media/dvb-frontends/drx39xyj/drxj.c | 14 +++--- drivers/med

[PATCH 26/26] kasan: rework Kconfig settings

2017-03-02 Thread Arnd Bergmann
s requires another ~25 patches to address the additional warnings. Signed-off-by: Arnd Bergmann <a...@arndb.de> --- lib/Kconfig.debug | 9 - lib/Kconfig.kasan | 11 ++- lib/Kconfig.kmemcheck | 1 + scripts/Makefile.kasan | 3 +++ 4 files changed, 18 insertions

[PATCH] net/mlx5e: add IPV6 dependency

2017-02-28 Thread Arnd Bergmann
MLX5_CORE to be a module when IPV6 is, including in configurations where we don't use the ethernet support at all. Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/mellanox/mlx5

[PATCH] vmxnet3: prevent building with 64K pages

2017-02-17 Thread Arnd Bergmann
res too, but presumably only for compatibility with x86 guests that also run on vmware. CONFIG_PAGE_SIZE_64KB is used on hexagon, mips, sh and tile, the other symbols are architecture-specific names for the same thing. Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/net/Kconfig |

Re: [PATCH] rt2500usb: don't mark register accesses as inline

2017-02-14 Thread Arnd Bergmann
On Wed, Feb 15, 2017 at 6:49 AM, Kalle Valo <kv...@codeaurora.org> wrote: > Arnd Bergmann <a...@arndb.de> writes: > >> When CONFIG_KASAN is set, we get a rather large stack here: >> >> drivers/net/wireless/ralink/rt2x00/rt2500usb.c: In function >> 'r

<    1   2   3   4   5   6   7   8   9   10   >