Re: [PATCH] RDS: Fix rds-ping inducing kernel panic

2018-01-22 Thread Kees Cook
On Tue, Jan 23, 2018 at 4:01 AM, Santosh Shilimkar wrote: > On 1/22/2018 3:24 AM, Kees Cook wrote: >> >> As described in: https://bugzilla.redhat.com/show_bug.cgi?id=822754 >> >> Attempting an RDS connection from the IP address of an IPoIB interface >> to itse

[PATCH] socket: Provide bounce buffer for constant sized put_cmsg()

2018-02-01 Thread Kees Cook
60 net/socket.c:2352 entry_SYSCALL_64_fastpath+0x29/0xa0 Reported-by: syzbot+e2d6cfb305e9f3911...@syzkaller.appspotmail.com Fixes: 6d07d1cd300f ("usercopy: Restrict non-usercopy caches to size 0") Signed-off-by: Kees Cook --- include/linux/socket.h | 18 +- net/core/scm.c

[PATCH v2] socket: Provide put_cmsg_whitelist() for constant size copies

2018-02-02 Thread Kees Cook
2287 SYSC_recvmmsg net/socket.c:2368 [inline] SyS_recvmmsg+0xc4/0x160 net/socket.c:2352 entry_SYSCALL_64_fastpath+0x29/0xa0 Reported-by: syzbot+e2d6cfb305e9f3911...@syzkaller.appspotmail.com Fixes: 6d07d1cd300f ("usercopy: Restrict non-usercopy caches to size 0") Signed-off-by: Kees Cook ---

Re: [PATCH v2] socket: Provide put_cmsg_whitelist() for constant size copies

2018-02-05 Thread Kees Cook
On Tue, Feb 6, 2018 at 2:03 AM, David Miller wrote: > From: Kees Cook > Date: Fri, 2 Feb 2018 02:27:49 -0800 > >> @@ -343,6 +343,14 @@ struct ucred { >> >> extern int move_addr_to_kernel(void __user *uaddr, int ulen, struct >> sockaddr_storage *kaddr); >

Re: [PATCH v2] socket: Provide put_cmsg_whitelist() for constant size copies

2018-02-06 Thread Kees Cook
On Wed, Feb 7, 2018 at 3:19 AM, David Miller wrote: > From: Kees Cook > Date: Tue, 6 Feb 2018 04:31:50 +1100 > >> On Tue, Feb 6, 2018 at 2:03 AM, David Miller wrote: >>> From: Kees Cook >>> Date: Fri, 2 Feb 2018 02:27:49 -0800 >>> >>>> @@

[PATCH] net: Whitelist the skbuff_head_cache "cb" field

2018-02-07 Thread Kees Cook
YSC_recvmmsg net/socket.c:2368 [inline] SyS_recvmmsg+0xc4/0x160 net/socket.c:2352 entry_SYSCALL_64_fastpath+0x29/0xa0 Reported-by: syzbot+e2d6cfb305e9f3911...@syzkaller.appspotmail.com Fixes: 6d07d1cd300f ("usercopy: Restrict non-usercopy caches to size 0") Signed-off-by: Kees Cook

Re: [PATCH] net: Whitelist the skbuff_head_cache "cb" field

2018-02-08 Thread Kees Cook
On Fri, Feb 9, 2018 at 7:16 AM, David Miller wrote: > From: Kees Cook > Date: Wed, 7 Feb 2018 17:44:38 -0800 > >> Most callers of put_cmsg() use a "sizeof(foo)" for the length argument. >> Within put_cmsg(), a copy_to_user() call is made with a dynamic size, as

[PATCH] net: stmmac: Avoid VLA usage

2018-05-01 Thread Kees Cook
ons. [1] http://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

Re: [PATCH] net: stmmac: Avoid VLA usage

2018-05-02 Thread Kees Cook
On Wed, May 2, 2018 at 1:54 AM, Jose Abreu wrote: > Hi Kees, > > On 01-05-2018 22:01, Kees Cook wrote: >> In the quest to remove all stack VLAs from the kernel[1], this switches >> the "status" stack buffer to use the existing small (8) upper bound on >> h

Re: [PATCH] net: dsa: drop some VLAs in switch.c

2018-05-05 Thread Kees Cook
don't particularly > like arbitrary limits on how many ports a switch can have, or how many > switches a board can have. > > So i would prefer to not use DSA_MAX_PORTS here. > > You could make the bitmap part of the dsa_switch structure. This is > allocated by dsa_switch_alloc() and is passed the number of ports. > Doing the allocation there means you don't need to worry about it > failing in dsa_switch_mdb_add() or dsa_switch_vlan_add(). Are dsa_switch_mdb_add() and dsa_switch_vlan_add() guaranteed to be single-threaded? -Kees -- Kees Cook Pixel Security

Re: [PATCH v6 05/13] firmware_loader: enhance Kconfig documentation over FW_LOADER

2018-05-08 Thread Kees Cook
er required unless you have a special firmware file that > - resides in a non-standard path. Moreover, the udev support has > - been deprecated upstream. > + Enabling this option forces a sysfs userspace fallback mechanism > + to be used for all firmware requests which explicitly do not > disable a > + a fallback mechanism. Firmware calls which do prohibit a fallback > + mechanism is request_firmware_direct(). This option is kept for > + backward compatibility purposes given this precise mechanism can > also > + be enabled by setting the proc sysctl value to true: > + > + /proc/sys/kernel/firmware_config/force_sysfs_fallback > > If you are unsure about this, say N here. > > +endif # FW_LOADER > +endmenu > + > config WANT_DEV_COREDUMP > bool > help > -- > 2.17.0 > -Kees -- Kees Cook Pixel Security

Re: [PATCH v6 00/13] firmware_loader changes for v4.18

2018-05-08 Thread Kees Cook
gt; As for the rename that you wanted, perhaps we can do this late in the > merge window considering we're at rc4 now. I can prep something up for > that later. > > Question, and specially rants are warmly welcomed. I sent some typo catches, but with those fixed, please consider the whole series: Reviewed-by: Kees Cook Thanks! -Kees -- Kees Cook Pixel Security

Re: [PATCH v6 05/13] firmware_loader: enhance Kconfig documentation over FW_LOADER

2018-05-09 Thread Kees Cook
On Wed, May 9, 2018 at 1:55 PM, Luis R. Rodriguez wrote: > On Tue, May 08, 2018 at 03:42:33PM -0700, Kees Cook wrote: >> On Tue, May 8, 2018 at 11:12 AM, Luis R. Rodriguez wrote: >> > + This used to be the default firmware loading facility, and udev >> > us

Re: [PATCH v2 net-next 1/4] umh: introduce fork_usermode_blob() helper

2018-05-10 Thread Kees Cook
erfaces with file interfaces, I'm cautious to add a new blob interface. Maybe just pull all the blob-finding/loading into the interface, and just make it something like fork_usermode_kmod(struct module *mod, struct umh_info *info) ? -Kees -- Kees Cook Pixel Security

Re: [PATCH bpf 3/3] bpf: undo prog rejection on read-only lock failure

2018-06-29 Thread Kees Cook
e that happened, the transition from RW -> RO could > be made more robust that way, while subsequent RO -> RW transition /must/ > continue guaranteeing to always succeed the undo part. Does this mean we can have BPF filters that aren't read-only then? What's the situation where

Re: [PATCH bpf 3/3] bpf: undo prog rejection on read-only lock failure

2018-07-02 Thread Kees Cook
On Fri, Jun 29, 2018 at 4:47 PM, Daniel Borkmann wrote: > On 06/29/2018 08:42 PM, Kees Cook wrote: >> On Thu, Jun 28, 2018 at 2:34 PM, Daniel Borkmann >> wrote: >>> Kees suggested that if set_memory_*() can fail, we should annotate it with >>> __must_check, and

Re: Freeze when using ipheth+IPsec+IPv6

2018-11-29 Thread Kees Cook
0 R15: > > [ 1563.658318] Code: 8b 44 24 78 41 39 d8 77 57 41 f6 44 24 34 01 0f 85 24 01 > 00 00 45 85 ff 0f 84 40 04 00 00 49 8b 04 24 49 39 c2 0f 84 1d 02 00 00 <8b> > 50 28 41 8b 1e 39 d3 0f 88 f4 03 00 00 49 89 c4 29 d3 41 f6 > [ 1563.658365] RIP: tcp_recvmsg+0x1eb/0xb40 RSP: b77e010f7cf8 >

Re: Freeze when using ipheth+IPsec+IPv6

2018-11-29 Thread Kees Cook
On Thu, Nov 29, 2018 at 3:52 PM David Miller wrote: > > From: Kees Cook > Date: Thu, 29 Nov 2018 15:31:25 -0800 > > > Did you ever solve this? > > I think it was fixed by: > > commit 45611c61dd503454b2edae00aabe1e429ec49ebe > Author: Bernd Eckstein <3erndecks

Re: [PATCH RFC 00/15] Zero ****s, hugload of hugs <3

2018-11-30 Thread Kees Cook
vers/net/ethernet/sun/sunhme.c | 4 ++-- > drivers/scsi/qlogicpti.h | 2 +- > fs/notify/inotify/inotify_user.c | 2 +- > kernel/irq/timings.c | 2 +- > lib/vsprintf.c| 2 +- > net/core/skbuff.c | 2 +- > 17 files changed, 33 insertions(+), 31 deletions(-) > > -- > 2.19.1 > -- Kees Cook

Re: [PATCH v4 1/2] bpf: add __weak hook for allocating executable memory

2018-12-05 Thread Kees Cook
c directly in their > bpf_jit_compile implementations as well. Ew, good catch. :P -- Kees Cook

Re: [PATCH] net/bluetooth: Change to use DEFINE_SHOW_ATTRIBUTE macro

2018-12-10 Thread Kees Cook
On Mon, Nov 5, 2018 at 6:56 AM Yangtao Li wrote: > > Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. > > Signed-off-by: Yangtao Li Reviewed-by: Kees Cook -Kees > --- > net/bluetooth/l2cap_core.c | 12 +--- > net/bluetooth/rfcomm/core.c | 12 +---

Re: [net-next:master 375/376] net/core/rtnetlink.c:3099:1: warning: the frame size of 1280 bytes is larger than 1024 bytes

2018-06-01 Thread Kees Cook
UGIN_LATENT_ENTROPY default 1280 if (!64BIT && PARISC) default 1024 if (!64BIT && !PARISC) default 2048 if 64BIT Just dropping the defconfig there should fix it. (And I think it was just a mistake to port that value when splitting the um defconfig in commit e40f04d040c6 ("arch/um: make it work with defconfig and x86_64"). -Kees -- Kees Cook Pixel Security

Re: [PATCH net-next] rtnetlink: Fix null-ptr-deref in rtnl_newlink

2018-06-01 Thread Kees Cook
-2936,7 +2936,7 @@ static int rtnl_newlink(struct sk_buff *skb, struct >> nlmsghdr *nlh, >> } >> >> if (m_ops) { >> - if (ops->slave_maxtype > RTNL_SLAVE_MAX_TYPE) >> + if (m_ops->slave_maxtype > RTNL_SLAVE_MAX_TYPE) >> return -EINVAL; > > > Oh nice > > CC Kees Cook. Argh. Thank you, yes. Acked-by: Kees Cook -Kees -- Kees Cook Pixel Security

Re: [PATCH v6 10/18] x86/power/64: Remove VLA usage

2018-07-25 Thread Kees Cook
On Wed, Jul 25, 2018 at 4:32 AM, Rafael J. Wysocki wrote: > On Tue, Jul 24, 2018 at 6:49 PM, Kees Cook wrote: >> In the quest to remove all stack VLA usage from the kernel[1], this >> removes the discouraged use of AHASH_REQUEST_ON_STACK by switching to >> shash direct

Re: [PATCH v2 00/10] userns: sysctl limits for namespaces

2016-07-22 Thread Kees Cook
e of "let user foobar open 1 userns, but everyone else is 0", which is likely the middle ground between "just turn it off" and "everyone gets to create usernamespaces". I'm personally not interested in that level of granularity, but in earlier discussions it sounded like this was something you wanted? -Kees -- Kees Cook Chrome OS & Brillo Security

Re: [PATCH v2 00/10] userns: sysctl limits for namespaces

2016-07-26 Thread Kees Cook
be needing a kernel feature having an > easy way to disable the feature is useful for making the kernel > marginally more secure, as certain attack vectors are no longer > possible. -Kees -- Kees Cook Chrome OS & Brillo Security

Re: [PATCH v2 00/10] userns: sysctl limits for namespaces

2016-07-26 Thread Kees Cook
On Tue, Jul 26, 2016 at 10:29 AM, Michael Kerrisk (man-pages) wrote: > On 26 July 2016 at 18:52, Kees Cook wrote: >> On Tue, Jul 26, 2016 at 8:06 AM, Eric W. Biederman >> wrote: >>> "Michael Kerrisk (man-pages)" writes: >>> >>>> Hello Eri

Re: [RFC v2 00/10] Landlock LSM: Unprivileged sandboxing

2016-10-03 Thread Kees Cook
ues that slow me down when reading this, so when it does move into Documentation/, I'll have some English nit-picks. :) While reading I found myself wanting an explicit list of "guiding principles" for anyone implementing new hooks. It is touched on in several places (don't expose things, don't allow for privilege changes, etc). Having that spelled out somewhere would be nice. -Kees -- Kees Cook Nexus Security

Re: [RFC v3 07/22] landlock: Handle file comparisons

2016-10-03 Thread Kees Cook
* replace struct file* with struct path* in map_landlock_handle > * add BPF protos > * fix bpf_landlock_cmp_fs_prop_with_struct_file() > > Signed-off-by: Mickaël Salaün > Cc: Alexei Starovoitov > Cc: Andy Lutomirski > Cc: Daniel Borkmann > Cc: David S. Miller > Cc:

Re: [RFC v3 16/22] bpf/cgroup,landlock: Handle Landlock hooks per cgroup

2016-10-03 Thread Kees Cook
anges since v2: > * new design based on BPF_PROG_ATTACH (suggested by Alexei Starovoitov) > > Signed-off-by: Mickaël Salaün > Cc: Alexei Starovoitov > Cc: Andy Lutomirski > Cc: Daniel Borkmann > Cc: Daniel Mack > Cc: David S. Miller > Cc: Kees Cook > Cc: T

Re: [RFC v3 19/22] landlock: Add interrupted origin

2016-10-03 Thread Kees Cook
ll should cover all possible trigger paths >>>> (e.g. page fault). Landlock eBPF programs can then take decisions >>>> accordingly. >>>> >>>> Signed-off-by: Mickaël Salaün >>>> Cc: Alexei Starovoitov >>>> Cc: Andy Lutomirski

Re: [RFC v3 11/22] seccomp,landlock: Handle Landlock hooks per process hierarchy

2016-10-03 Thread Kees Cook
just leave the low 16 bits unused entirely. Then all state management is handled by the landlock eBPF maps, not a value coming from seccomp that can get stomped on by new filters, etc. -Kees -- Kees Cook Nexus Security

Re: [RFC v3 03/22] bpf,landlock: Add a new arraymap type to deal with (Landlock) handles

2016-10-03 Thread Kees Cook
checker groups > * simpler userland API > > Signed-off-by: Mickaël Salaün > Cc: Alexei Starovoitov > Cc: Andy Lutomirski > Cc: Daniel Borkmann > Cc: David S. Miller > Cc: Kees Cook > Link: > https://lkml.kernel.org/r/calcetrwwtiz3kztkegow24-dvhqq6lftwexh77fd2g5

Re: [RFC v3 16/22] bpf/cgroup,landlock: Handle Landlock hooks per cgroup

2016-10-05 Thread Kees Cook
On Wed, Oct 5, 2016 at 1:58 PM, Mickaël Salaün wrote: > > > On 04/10/2016 01:43, Kees Cook wrote: >> On Wed, Sep 14, 2016 at 12:24 AM, Mickaël Salaün wrote: >>> This allows to add new eBPF programs to Landlock hooks dedicated to a >>> cgroup thanks to the BPF_PRO

[PATCH] net: ping: check minimum size on ICMP header length

2016-12-02 Thread Kees Cook
.c:643 [< inline >] SYSC_sendto net/socket.c:1797 [] SyS_sendto+0x178/0x1d8 net/socket.c:1761 CVE-2016-8399 Reported-by: Qidan He Fixes: c319b4d76b9e ("net: ipv4: add IPPROTO_ICMP socket kind") Cc: sta...@vger.kernel.org Signed-off-by: Kees Cook --- net/ipv4/ping.c | 2

[PATCH v2] net: ping: check minimum size on ICMP header length

2016-12-05 Thread Kees Cook
et/socket.c:643 [< inline >] SYSC_sendto net/socket.c:1797 [] SyS_sendto+0x178/0x1d8 net/socket.c:1761 CVE-2016-8399 Reported-by: Qidan He Fixes: c319b4d76b9e ("net: ipv4: add IPPROTO_ICMP socket kind") Cc: sta...@vger.kernel.org Signed-off-by: Kees Cook --- v2: retur

[PATCH] isdn: Constify some function parameters

2016-12-16 Thread Kees Cook
From: Emese Revfy The coming initify gcc plugin expects const pointer types, and caught some __printf arguments that weren't const yet. This fixes those. Signed-off-by: Emese Revfy [kees: expanded commit message] Signed-off-by: Kees Cook --- drivers/isdn/hisax/config.c

[PATCH] isdn/gigaset: use designated initializers

2016-12-16 Thread Kees Cook
Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook --- drivers/isdn/gi

[PATCH] ATM: use designated initializers

2016-12-16 Thread Kees Cook
Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook --- net/atm/

[PATCH] net: use designated initializers

2016-12-16 Thread Kees Cook
Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook --- net/decnet/dn_

[PATCH] WAN: use designated initializers

2016-12-16 Thread Kees Cook
Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook --- drivers/net/wa

[PATCH] bna: use designated initializers

2016-12-16 Thread Kees Cook
Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook --- drivers/net/eth

[PATCH] isdn: use designated initializers

2016-12-16 Thread Kees Cook
Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook --- drivers/isd

[PATCH] net/x25: use designated initializers

2016-12-16 Thread Kees Cook
Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook --- net/x25/sysctl_ne

Re: [PATCH] net: use designated initializers

2016-12-17 Thread Kees Cook
On Sat, Dec 17, 2016 at 8:57 AM, David Miller wrote: > From: Kees Cook > Date: Fri, 16 Dec 2016 16:58:58 -0800 > >> Prepare to mark sensitive kernel structures for randomization by making >> sure they're using designated initializers. These were identified during >

Re: [RFC 0/4] RFC: Add Checmate, BPF-driven minor LSM

2016-08-08 Thread Kees Cook
checmate_lsm.c | 304 > +++ > 19 files changed, 622 insertions(+), 37 deletions(-) > create mode 100644 include/linux/checmate.h > create mode 100644 include/uapi/linux/checmate.h > create mode 100644 samples/bpf/checmate1_kern.c > create mode 100644 samples/bpf/checmate1_user.c > create mode 100644 security/checmate/Kconfig > create mode 100644 security/checmate/Makefile > create mode 100644 security/checmate/checmate_bpf.c > create mode 100644 security/checmate/checmate_lsm.c > > -- > 2.7.4 > -- Kees Cook Nexus Security

Re: [RFC 0/4] RFC: Add Checmate, BPF-driven minor LSM

2016-08-08 Thread Kees Cook
On Mon, Aug 8, 2016 at 5:00 PM, Sargun Dhillon wrote: > On Mon, Aug 08, 2016 at 04:44:02PM -0700, Kees Cook wrote: >> On Thu, Aug 4, 2016 at 12:11 AM, Sargun Dhillon wrote: >> > I distributed this patchset to linux-security-mod...@vger.kernel.org >> > earlier, >

[PATCH 06/13] timer: Remove users of TIMER_DEFERRED_INITIALIZER

2017-10-04 Thread Kees Cook
...@vger.kernel.org Signed-off-by: Kees Cook --- arch/s390/kernel/lgr.c | 6 +++--- arch/s390/kernel/topology.c | 6 +++--- kernel/workqueue.c | 8 +++- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/arch/s390/kernel/lgr.c b/arch/s390/kernel/lgr.c index ae7dff110054

[PATCH 07/13] timer: Remove last user of TIMER_INITIALIZER

2017-10-04 Thread Kees Cook
Drops the last user of TIMER_INITIALIZER and adapts timer.h to use the internal version. Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Mark Gross Cc: Thomas Gleixner Signed-off-by: Kees Cook --- drivers/char/tlclk.c | 12 +--- include/linux/timer.h | 2 +- 2 files changed, 6

[PATCH 09/13] timer: Remove users of expire and data arguments to DEFINE_TIMER

2017-10-04 Thread Kees Cook
Cc: Geert Uytterhoeven Cc: linux-m...@linux-mips.org Cc: linux-watch...@vger.kernel.org Signed-off-by: Kees Cook --- arch/mips/mti-malta/malta-display.c | 6 +++--- drivers/watchdog/alim7101_wdt.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/mips/mti-malta

[PATCH 11/13] timer: Remove expires argument from __TIMER_INITIALIZER()

2017-10-04 Thread Kees Cook
The expires field is normally initialized during the first mod_timer() call. It was unused by all callers, so remove it from the macro. Signed-off-by: Kees Cook --- include/linux/kthread.h | 2 +- include/linux/timer.h | 5 ++--- include/linux/workqueue.h | 2 +- 3 files changed, 4

[PATCH 13/13] workqueue: Convert callback to use from_timer()

2017-10-04 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch workqueue to use from_timer() and pass the timer pointer explicitly. Cc: Tejun Heo Cc: Lai Jiangshan Signed-off-by: Kees Cook --- include/linux/workqueue.h | 15 --- kernel

[PATCH 12/13] kthread: Convert callback to use from_timer()

2017-10-04 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch kthread to use from_timer() and pass the timer pointer explicitly. Cc: Andrew Morton Cc: Petr Mladek Cc: Tejun Heo Cc: Thomas Gleixner Cc: Oleg Nesterov Signed-off-by: Kees Cook

[PATCH 02/13] timer: Remove init_timer_pinned_deferrable() in favor of timer_setup()

2017-10-04 Thread Kees Cook
Mackerras Cc: Michael Ellerman Cc: Thomas Gleixner Cc: linux...@vger.kernel.org Cc: linuxppc-...@lists.ozlabs.org Signed-off-by: Kees Cook --- drivers/cpufreq/powernv-cpufreq.c | 13 +++-- include/linux/timer.h | 2 -- 2 files changed, 7 insertions(+), 8 deletions(-) di

[PATCH 10/13] timer: Remove expires and data arguments from DEFINE_TIMER

2017-10-04 Thread Kees Cook
Drop the arguments from the macro and adjust all callers with the following script: perl -pi -e 's/DEFINE_TIMER\((.*), 0, 0\);/DEFINE_TIMER($1);/g;' \ $(git grep DEFINE_TIMER | cut -d: -f1 | sort -u | grep -v timer.h) Signed-off-by: Kees Cook Acked-by: Geert Uytterhoeven # for

[PATCH 05/13] timer: Remove init_timer_deferrable() in favor of timer_setup()

2017-10-04 Thread Kees Cook
-...@lists.ozlabs.org Cc: netdev@vger.kernel.org Cc: linux-wirel...@vger.kernel.org Signed-off-by: Kees Cook --- arch/powerpc/mm/numa.c | 12 +-- drivers/hsi/clients/ssi_protocol.c | 32 drivers/net/ethernet/qlogic/qlge/qlge_main.c | 11

[PATCH 01/13] timer: Convert schedule_timeout() to use from_timer()

2017-10-04 Thread Kees Cook
eliminated. Cc: John Stultz Cc: Thomas Gleixner Cc: Stephen Boyd Signed-off-by: Kees Cook --- include/linux/timer.h | 8 kernel/time/timer.c | 26 +++--- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/include/linux/timer.h b/include/linux/timer.h index

[PATCH 08/13] timer: Remove unused static initializer macros

2017-10-04 Thread Kees Cook
This removes the now unused TIMER_*INITIALIZER macros: TIMER_INITIALIZER TIMER_PINNED_INITIALIZER TIMER_DEFERRED_INITIALIZER TIMER_PINNED_DEFERRED_INITIALIZER Signed-off-by: Kees Cook --- include/linux/timer.h | 12 1 file changed, 12 deletions(-) diff --git a/include/linux

[PATCH 03/13] timer: Remove init_timer_on_stack() in favor of timer_setup_on_stack()

2017-10-04 Thread Kees Cook
"James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Thomas Gleixner Cc: linux...@vger.kernel.org Cc: linux1394-de...@lists.sourceforge.net Cc: linux-s...@vger.kernel.org Cc: linux-s...@vger.kernel.org Signed-off-by: Kees Cook --- drivers/base/power/main.c | 8 +

[PATCH 04/13] timer: Remove init_timer_pinned() in favor of timer_setup()

2017-10-04 Thread Kees Cook
This refactors the only users of init_timer_pinned() to use the new timer_setup() and from_timer(). Drops the definition of init_timer_pinned(). Cc: Chris Metcalf Cc: Thomas Gleixner Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook --- drivers/net/ethernet/tile/tilepro.c | 9

[PATCH 00/13] timer: Start conversion to timer_setup()

2017-10-04 Thread Kees Cook
Hi, This is the first of many timer infrastructure cleanups to simplify the timer API[1]. All of these patches are expected to land via the timer tree, so Acks (or corrections) appreciated. These patches refactor various users of timer API that are NOT just using init_timer() or setup_timer() (wh

[PATCH] net/irda/bfin_sir: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Samuel Ortiz Cc: netdev@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This

[PATCH] net: vxge: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
c: stephen hemminger Cc: netdev@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- drivers/net/ethernet/neterion/v

[PATCH] bna: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- drivers/net/ethernet/brocade/bna/bnad.c | 43 +++-- 1 file c

[PATCH] forcedeth: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
s Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- drivers/net/ethernet/nvidia/forcedeth.c | 28 ++-- 1 file changed, 14 inserti

[PATCH] net/core: Collapse redundant sk_timer callback data

2017-10-04 Thread Kees Cook
Cc: netdev@vger.kernel.org Cc: linux-h...@vger.kernel.org Cc: linux-...@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- net/c

[PATCH] inet: frags: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
YOSHIFUJI Cc: Pablo Neira Ayuso Cc: Jozsef Kadlecsik Cc: Florian Westphal Cc: linux-w...@vger.kernel.org Cc: netdev@vger.kernel.org Cc: netfilter-de...@vger.kernel.org Cc: coret...@netfilter.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("ti

[PATCH] netfilter: ipset: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
h = from_timer(h, t, gc); + struct ip_set *set = h->set; pr_debug("called\n"); spin_lock_bh(&set->lock); @@ -1314,6 +1315,7 @@ IPSET_TOKEN(HTYPE, _create)(struct net *net, struct ip_set *set, t->htable_bits = hbits; RCU_INIT_POINTER(h->table, t); + h->set = set; set->data = h; #ifndef IP_SET_PROTO_UNDEF if (set->family == NFPROTO_IPV4) { -- 2.7.4 -- Kees Cook Pixel Security

[PATCH] inet/connection_sock: Convert timers to use

2017-10-04 Thread Kees Cook
Cc: netdev@vger.kernel.org Cc: d...@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- include/net/inet_connection_sock.h | 6 +++-

[PATCH] net: sched: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
" Cc: netdev@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- net/sched/sch_pie.c | 10 ++ net/sched/sch_red.c

[PATCH] isdn/gigaset: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
Keil Cc: "David S. Miller" Cc: Johan Hovold Cc: gigaset307x-com...@lists.sourceforge.net Cc: netdev@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but

[PATCH] net: ksz884x: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
Reynes Cc: netdev@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- drivers/net/ethernet/micrel/ksz884x.c | 18 +-

[PATCH] mISDN: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
Morton Cc: Anton Vasilyev Cc: Ingo Molnar Cc: netdev@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- drivers/isdn/mIS

[PATCH] net: dl2k: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
Cc: netdev@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- drivers/net/ethernet/dlink/dl2k.c | 10 +- 1 file changed, 5 insert

[PATCH] net/mlx4_core: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- drivers/net/ethernet/mellanox/mlx4/catas.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git

[PATCH] drivers/net/3com: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- drivers/net/ethernet/3com/3c574_cs.c | 12 +--- drivers/net/ethernet/3com/3c589_cs.c | 10

[PATCH] net: amd8111e: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- drivers/net/ethernet/amd/amd8111e.c | 8 +++- 1 file changed, 3 insert

[PATCH] net: can: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
Cc: netdev@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- net/can/af_can.c | 4 ++-- net/can/af_can.h | 2 +- net/can/proc

[PATCH] chelsio: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
s Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- drivers/net/ethernet/chelsio/cxgb/sge.c | 30 +- 1 file changed,

[PATCH] atm: idt77252: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
Williams <3ch...@gmail.com> Cc: linux-atm-gene...@lists.sourceforge.net Cc: netdev@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be other

[PATCH] net: tulip: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
s Berg Cc: Eric Dumazet Cc: Philippe Reynes Cc: "yuval.sh...@oracle.com" Cc: netdev@vger.kernel.org Cc: linux-par...@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type"

[PATCH] drivers/atm/suni: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
m-gene...@lists.sourceforge.net Cc: netdev@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- drivers/atm/suni.c | 10 -- 1

[PATCH] net: ethernet: stmmac: Convert timers to use

2017-10-04 Thread Kees Cook
: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletion

[PATCH] ethernet/broadcom: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
Cc: Arnd Bergmann Cc: Jarod Wilson Cc: netdev@vger.kernel.org Cc: linux-arm-ker...@lists.infradead.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand

[PATCH] net/cw1200: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- drivers/net/wireless/st/cw1200/pm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) di

[PATCH] net: tulip: de2104x: Convert timers to use

2017-10-04 Thread Kees Cook
Wilson Cc: Philippe Reynes Cc: netdev@vger.kernel.org Cc: linux-par...@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. ---

[PATCH] net/hamradio/6pack: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- drivers/net/hamradio/6pack.c | 22 +++--- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git

[PATCH] isdn/hisax: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
s Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- drivers/isdn/hisax/amd7930_fn.c | 5 +++-- drivers/isdn/hisax/arcofi.c | 5 +++-- drive

[PATCH] xfrm: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- net/xfrm/xfrm_policy.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(

[PATCH] net/wireless/ray_cs: Convert timers to use

2017-10-04 Thread Kees Cook
-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- drivers/net/wireless/ray_cs.c | 53 --- 1 file changed, 24 insertions(+), 29

[PATCH] net/usb/usbnet: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- drivers/net/usb/usbnet.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drive

[PATCH] net/ti/tlan: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Samuel Chessman Cc: netdev@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This

[PATCH] net/irda: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
Molnar Cc: netdev@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- .../staging/irda/include/net/irda/irlmp_event.h| 6 +--

[PATCH] net/irda-usb: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
his in the future. Cc: Samuel Ortiz Cc: netdev@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- drivers/staging/irda/dri

[PATCH] net/mac80211/mesh_plink: Convert timers to use

2017-10-04 Thread Kees Cook
. Cc: Johannes Berg Cc: "David S. Miller" Cc: linux-wirel...@vger.kernel.org Cc: netdev@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherw

[PATCH] net/rose: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
nel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- net/rose/af_rose.c| 13 +++-- net/rose/rose_link.c | 16 +++- n

[PATCH] net/lapb: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
.@vger.kernel.org Cc: netdev@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- net/lapb/lapb_iface.c | 4 ++-- net/lapb/lapb_time

[PATCH] net/decnet: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
rge.net Cc: netdev@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- net/decnet/dn_dev.c | 12 +--- 1 file changed

Re: [PATCH] net/mac80211/mesh_plink: Convert timers to use

2017-10-05 Thread Kees Cook
On Wed, Oct 4, 2017 at 11:47 PM, Johannes Berg wrote: > On Wed, 2017-10-04 at 17:49 -0700, Kees Cook wrote: >> In preparation for unconditionally passing the struct timer_list >> pointer to all timer callbacks, switch to using the new timer_setup() >> and from_timer() to p

[PATCH v2] net/mac80211/mesh_plink: Convert timers to use timer_setup()

2017-10-05 Thread Kees Cook
. Cc: Johannes Berg Cc: "David S. Miller" Cc: linux-wirel...@vger.kernel.org Cc: netdev@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be o

<    1   2   3   4   5   6   7   8   >