Re: [PATCH] net: spider_net: Mark expected switch fall-through

2019-07-29 Thread Kees Cook
tice that, in this particular case, the code comment is > modified in accordance with what GCC is expecting to find. > > Reported-by: Stephen Rothwell > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook -Kees > --- > drivers/net/ethernet/toshiba/spider_net.c | 1 +

Re: UBSAN: array-index-out-of-bounds in arch_uprobe_analyze_insn

2020-12-01 Thread Kees Cook
aller.appspot.com/x/repro.c?x=164ee6c590 > > Reported-by: syzbot+9b64b619f10f19d19...@syzkaller.appspotmail.com > Fixes: 4b2bd5fec007 ("proc: fix timerslack_ns CAP_SYS_NICE check when > adjusting self") > > For information about bisection process see: https://goo.gl/tpsmEJ#bisection -- Kees Cook

Re: [PATCH net] cfg80211: fix callback type mismatches in wext-compat

2020-11-20 Thread Kees Cook
; Reported-by: Sedat Dilek > Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook -- Kees Cook

Re: [PATCH net] cfg80211: fix callback type mismatches in wext-compat

2020-11-20 Thread Kees Cook
On Tue, Nov 17, 2020 at 02:07:43PM -0800, Sami Tolvanen wrote: > On Tue, Nov 17, 2020 at 1:45 PM Kees Cook wrote: > > > > On Tue, Nov 17, 2020 at 12:59:02PM -0800, Sami Tolvanen wrote: > > > Instead of casting callback functions to type iw_handler, which trips > >

Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-20 Thread Kees Cook
ngs are supposed to warn about issues that could > be bugs. Falling through to default: break; can hardly be a bug?! It's certainly a place where the intent is not always clear. I think this makes all the cases unambiguous, and doesn't impact the machine code, since the compiler will happily optimize away any behavioral redundancy. -- Kees Cook

Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-20 Thread Kees Cook
On Fri, Nov 20, 2020 at 11:51:42AM -0800, Jakub Kicinski wrote: > On Fri, 20 Nov 2020 11:30:40 -0800 Kees Cook wrote: > > On Fri, Nov 20, 2020 at 10:53:44AM -0800, Jakub Kicinski wrote: > > > On Fri, 20 Nov 2020 12:21:39 -0600 Gustavo A. R. Silva wrote: > > > > This

Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-22 Thread Kees Cook
On Fri, Nov 20, 2020 at 11:51:42AM -0800, Jakub Kicinski wrote: > On Fri, 20 Nov 2020 11:30:40 -0800 Kees Cook wrote: > > On Fri, Nov 20, 2020 at 10:53:44AM -0800, Jakub Kicinski wrote: > > > On Fri, 20 Nov 2020 12:21:39 -0600 Gustavo A. R. Silva wrote: > > > > This

Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-24 Thread Kees Cook
On Mon, Nov 23, 2020 at 05:32:51PM -0800, Nick Desaulniers wrote: > On Sun, Nov 22, 2020 at 8:17 AM Kees Cook wrote: > > > > On Fri, Nov 20, 2020 at 11:51:42AM -0800, Jakub Kicinski wrote: > > > If none of the 140 patches here fix a real bug, and there is no change >

Re: [Intel-wired-lan] [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-24 Thread Kees Cook
inal series may be lower, but there are still bugs being found from it -- we need to finish this and shut the door on it for good.) -- Kees Cook

Re: [PATCH] entry: Fix boot for !CONFIG_GENERIC_ENTRY

2020-11-24 Thread Kees Cook
K flags instead of TIF > flags for !CONFIG_GENERIC_ENTRY. Also, add safeguards to catch this at > compilation time. > > Reported-by: Naresh Kamboju > Suggested-by: Jann Horn > Signed-off-by: Gabriel Krisman Bertazi Thanks for getting this fixed! 3136b93c3fb2 ("entry: Expose helpers to migrate TIF to SYSCALL_WORK flags") Reviewed-by: Kees Cook -- Kees Cook

Re: [Intel-wired-lan] [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-25 Thread Kees Cook
-through All switch/case blocks must end in one of: break; fallthrough; continue; goto ; return [expression]; [3] https://cwe.mitre.org/data/definitions/484.html -- Kees Cook

Re: [PATCH v5 0/3] Fix inefficiences and rename nla_strlcpy

2020-11-13 Thread Kees Cook
| 2 +- > net/sched/sch_api.c| 2 +- > net/tipc/netlink_compat.c | 2 +- > 29 files changed, 73 insertions(+), 61 deletions(-) > > -- > 2.20.1 > -- Kees Cook

Re: [PATCH] tracepoint: Do not fail unregistering a probe due to memory allocation

2020-11-17 Thread Kees Cook
ot discussed in the thread, what you had here wouldn't work in a CFI build if the function prototype of the call site and the function don't match. (Though I can't tell if .func() is ever called?) i.e. .func's prototype must match tp_stub_func()'s. -- Kees Cook

Re: [PATCH net] cfg80211: fix callback type mismatches in wext-compat

2020-11-17 Thread Kees Cook
wer, > + [IW_IOCTL_IDX(SIOCSIWGENIE)]= __cfg80211_wext_siwgenie, > + [IW_IOCTL_IDX(SIOCSIWAUTH)] = __cfg80211_wext_siwauth, > + [IW_IOCTL_IDX(SIOCGIWAUTH)] = __cfg80211_wext_giwauth, > + [IW_IOCTL_IDX(SIOCSIWENCODEEXT)]= __cfg80211_wext_siwencodeext, > + [IW_IOCTL_IDX(SIOCSIWPMKSA)]= __cfg80211_wext_siwpmksa, > }; > > const struct iw_handler_def cfg80211_wext_handler = { > > base-commit: 9c87c9f41245baa3fc4716cf39141439cf405b01 > -- > 2.29.2.299.gdc1121823c-goog > -- Kees Cook

Re: [RFC][PATCH v3 1/3] Fix unefficient call to memset before memcpu in nla_strlcpy.

2020-10-21 Thread Kees Cook
"foo\0" and dst is 5 bytes long, the result will be: > 1. "fooGG" after memcpy (G means garbage). > 2. "foo\0\0" after memset. > > Signed-off-by: Francis Laniel Looks good! (If there are future versions of this series, I think you can drop the RFC part...) Reviewed-by: Kees Cook -- Kees Cook

Re: [RFC][PATCH v3 2/3] Modify return value of nla_strlcpy to match that of strscpy.

2020-10-21 Thread Kees Cook
d to take into account this > modification. > > Signed-off-by: Francis Laniel This looks correct to me. Thanks for the respin! Reviewed-by: Kees Cook -- Kees Cook

Re: [RFC][PATCH v3 3/3] Rename nla_strlcpy to nla_strscpy.

2020-10-21 Thread Kees Cook
also be: "treewide: Rename nla_strlcpy to nla_strscpy" But otherwise, yup, easy mechanical change. Reviewed-by: Kees Cook > --- > drivers/infiniband/core/nldev.c| 10 +- > drivers/net/can/vxcan.c| 4 ++-- > drivers/net/veth.c

Re: [RFC][PATCH v3 3/3] Rename nla_strlcpy to nla_strscpy.

2020-10-22 Thread Kees Cook
On Thu, Oct 22, 2020 at 11:41:31AM +0200, Francis Laniel wrote: > Le jeudi 22 octobre 2020, 01:49:59 CEST Kees Cook a écrit : > > On Tue, Oct 20, 2020 at 06:47:07PM +0200, > > laniel_fran...@privacyrequired.com > wrote: > > > From: Francis Laniel > > >

Re: [RFC][PATCH v3 3/3] Rename nla_strlcpy to nla_strscpy.

2020-10-23 Thread Kees Cook
ht -- this is a very narrow use-case (NLA). I think this series is fine as-is. -- Kees Cook

Re: [PATCH v4 2/3] Modify return value of nla_strlcpy to match that of strscpy.

2020-10-30 Thread Kees Cook
> 0) { > /* We dropped the RTNL semaphore in order to >* perform the module load. So, even if we >* succeeded in loading the module we have to Oops, I think this should be >= 0 ? -- Kees Cook

Re: [PATCH net-next v5 0/7] introduce DEFINE_FLEX() macro

2023-09-12 Thread Kees Cook
ce_aq_move_sched_elems() > ice: make use of DEFINE_FLEX() in ice_ddp.c > ice: make use of DEFINE_FLEX() for struct ice_aqc_add_tx_qgrp > ice: make use of DEFINE_FLEX() for struct ice_aqc_dis_txq_item > ice: make use of DEFINE_FLEX() in ice_switch.c Looks good to me! Feel free to pick up via netdev. -Kees -- Kees Cook

Re: [PATCH v2 1/2][next] wl3501_cs: Fix out-of-bounds warning in wl3501_send_pkt

2021-04-07 Thread Kees Cook
tps://github.com/KSPP/linux/issues/109 > Reported-by: kernel test robot > Build-tested-by: kernel test robot > Link: https://lore.kernel.org/lkml/60641d9b.2enledogsdcsoav2%25...@intel.com/ > Signed-off-by: Gustavo A. R. Silva Thanks, this makes the code much easier for the compiler to validate at compile time. These cross-field memcpy()s are weird. I like the solution here. Reviewed-by: Kees Cook -- Kees Cook

Re: [PATCH v2 2/2][next] wl3501_cs: Fix out-of-bounds warning in wl3501_mgmt_join

2021-04-07 Thread Kees Cook
.el = { > .id = IW_MGMT_INFO_ELEMENT_DS_PARAMETER_SET, > .len = 1, > @@ -599,7 +599,7 @@ static int wl3501_mgmt_join(struct wl3501_card *this, u16 > stas) > }, > }; > > - memcpy(&a

Re: [PATCH v3 2/2] wl3501_cs: Fix out-of-bounds warnings in wl3501_mgmt_join

2021-04-15 Thread Kees Cook
mp;sig.beacon_period and &this->bss_set[i].beacon_period, because the > address of the new struct object _req_ is used as the destination, > instead. > > This helps with the ongoing efforts to globally enable -Warray-bounds > and get us closer to being able to tighten the FORTIFY_SOURCE routines > on memcpy(). > > Link: https://github.com/KSPP/linux/issues/109 > Reported-by: kernel test robot > Signed-off-by: Gustavo A. R. Silva Awesome! Thank you for this solution. Reviewed-by: Kees Cook -- Kees Cook

Re: [PATCH][next] sctp: Fix out-of-bounds warning in sctp_process_asconf_param()

2021-04-16 Thread Kees Cook
m/KSPP/linux/issues/109 > Reported-by: kernel test robot > Signed-off-by: Gustavo A. R. Silva Yup! Reviewed-by: Kees Cook -- Kees Cook

Re: [PATCH RESEND][next] rtl8xxxu: Fix fall-through warnings for Clang

2021-03-10 Thread Kees Cook
t;Clang doesn't parse comments" issue.) This could be a tree-wide patch and not bother you, but Greg KH has generally advised us to send these changes broken out. Anyway, this change still needs to land, so what would be the preferred path? I think Gustavo could just carry it for Linus to m

Re: [PATCH RESEND][next] rtl8xxxu: Fix fall-through warnings for Clang

2021-03-10 Thread Kees Cook
On Wed, Mar 10, 2021 at 02:31:57PM -0500, Jes Sorensen wrote: > On 3/10/21 2:14 PM, Kees Cook wrote: > > On Fri, Mar 05, 2021 at 03:40:33PM +0200, Kalle Valo wrote: > >> "Gustavo A. R. Silva" writes: > >> > >>> In preparation to enable -Wimplicit-f

Re: [PATCH RESEND][next] rtl8xxxu: Fix fall-through warnings for Clang

2021-03-10 Thread Kees Cook
On Wed, Mar 10, 2021 at 02:51:24PM -0500, Jes Sorensen wrote: > On 3/10/21 2:45 PM, Kees Cook wrote: > > On Wed, Mar 10, 2021 at 02:31:57PM -0500, Jes Sorensen wrote: > >> On 3/10/21 2:14 PM, Kees Cook wrote: > >>> Hm, this conversation looks like a miscommunicatio

Re: [PATCH v1 1/1] Firstly, as Andy mentioned, this should be smp_rmb() instead of rmb(). considering that TSYNC is a cross-thread situation, and rmb() is a mandatory barrier which should not be used

2021-02-02 Thread Kees Cook
BUG(); BUG() should never be used[1]. This is a recoverable situation, I think, and should be handled as such. -Kees [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#bug-and-bug-on > case SECCOMP_MODE_FILTER: > return __seccomp_filter(this_syscall, sd, false); > default: > -- > 2.19.1 > -- Kees Cook

Re: [PATCH v2] seccomp: Improve performace by optimizing rmb()

2021-02-10 Thread Kees Cook
ptimizing rmb() https://git.kernel.org/kees/c/a381b70a1cf8 -- Kees Cook

Re: [PATCH 0/3] Modernize tasklet callback API

2020-08-11 Thread Kees Cook
. Here's for the refactoring: https://github.com/KSPP/linux/issues/30 and here's for the removal: https://github.com/KSPP/linux/issues/94 if you can added details/examples of how they should be removed, that'd help other folks too, if they wanted to jump in. :) -Kees -- Kees Cook

Re: [PATCH] block: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Kees Cook
let is doing. > > I'd fix that up now before everything else goes in... As I mentioned in the other thread, I think this makes things much more readable. It's the same thing that the timer_struct conversion did (added a container_of wrapper) to avoid the ever-repeating use of typeof(), long lines, etc. -- Kees Cook

Re: [PATCH] block: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Kees Cook
On Mon, Aug 17, 2020 at 12:44:34PM -0700, Jens Axboe wrote: > On 8/17/20 12:29 PM, Kees Cook wrote: > > On Mon, Aug 17, 2020 at 06:56:47AM -0700, Jens Axboe wrote: > >> On 8/17/20 2:15 AM, Allen Pais wrote: > >>> From: Allen Pais > >>> > >&

Re: [PATCH] block: convert tasklets to use new tasklet_setup() API

2020-08-18 Thread Kees Cook
On Tue, Aug 18, 2020 at 01:00:33PM -0700, James Bottomley wrote: > On Mon, 2020-08-17 at 13:02 -0700, Jens Axboe wrote: > > On 8/17/20 12:48 PM, Kees Cook wrote: > > > On Mon, Aug 17, 2020 at 12:44:34PM -0700, Jens Axboe wrote: > > > > On 8/17/20 12:29 PM, Kees Cook w

[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

[PATCH v3 ipsec-next] xfrm: remove VLA usage in __xfrm6_sort()

2018-04-24 Thread Kees Cook
Signed-off-by: Kees Cook --- v3: - adjust Subject and commit log (Steffen) - use "= { }" instead of memset() (Stefano) - reorder variables (Stefano) v2: - use XFRM_MAX_DEPTH for "count" array (Steffen and Mathias). --- net/ipv6/xfrm6_state.c | 4 ++-- 1 file changed, 2 insertio

[PATCH v3] ath9k: dfs: Remove VLA usage

2018-04-24 Thread Kees Cook
In the quest to remove all stack VLA usage from the kernel[1], this redefines FFT_NUM_SAMPLES as a #define instead of const int, which still triggers gcc's VLA checking pass. [1] https://lkml.org/lkml/2018/3/7/621 Co-developed-by: Andreas Christoforou Signed-off-by: Kees Cook --- v3: re

Re: [PATCH v3] ath9k: dfs: Remove VLA usage

2018-04-25 Thread Kees Cook
89e3e Ah! Cool, no worries. I didn't see that in linux-next yet. :) Thanks! -Kees -- Kees Cook Pixel Security

[PATCH v4 ipsec-next] xfrm: remove VLA usage in __xfrm6_sort()

2018-04-25 Thread Kees Cook
Signed-off-by: Kees Cook --- v4: - actually remove memset(). :) v3: - adjust Subject and commit log (Steffen) - use "= { }" instead of memset() (Stefano) v2: - use XFRM_MAX_DEPTH for "count" array (Steffen and Mathias). --- net/ipv6/xfrm6_state.c | 6 ++ 1 file changed, 2

Re: [PATCH v5 0/2] Remove false-positive VLAs when using max()

2018-03-22 Thread Kees Cook
On Tue, Mar 20, 2018 at 4:23 PM, Linus Torvalds wrote: > On Sat, Mar 17, 2018 at 1:07 PM, Kees Cook wrote: >> >> No luck! :( gcc 4.4 refuses to play along. And, hilariously, not only >> does it not change the complaint about __builtin_choose_expr(), it >> also think

Re: [PATCH v2 bpf-next 1/4] bpf: unprivileged BPF access via /dev/bpf

2019-07-02 Thread Kees Cook
level controls: leave LSM wide open, make /dev/bpf owned by "bpfadmin" and bpftool becomes setuid "bpfadmin". For fine-grained controls, leave /dev/bpf wide open and add policy to SELinux, etc.) With only a new CAP, you don't get the fine-grained controls. (The "request abilities" part is the key there.) -- Kees Cook

Re: [PATCH v2 bpf-next 1/4] bpf: unprivileged BPF access via /dev/bpf

2019-08-15 Thread Kees Cook
ing things worse. I'm all for a "less privileged than root" API for eBPF, but I get worried when I see "security" being treated as a binary state. Especially when it is considered an always-failed state. :) -- Kees Cook

Re: [PATCH v2] riscv: add support for SECCOMP and SECCOMP_FILTER

2019-08-28 Thread Kees Cook
ou're building a tree that includes 9dd3fcb0ab73 ("selftests/seccomp: Handle namespace failures gracefully")? I assume it does, but I suspect something similar is happening, where the environment is slightly different than expected and the test stalls. Does it behave the same way under emulation (i.e. can I hope to reproduce this myself?) -- Kees Cook

Re: BUG: assuming atomic context at kernel/seccomp.c:LINE

2019-02-20 Thread Kees Cook
false > positive by adding and using __BPF_PROG_RUN() variant that does not have the > cant_sleep(); check. > > Fixes: 568f196756ad ("bpf: check that BPF programs run with preemption > disabled") > Reported-by: syzbot+8bf19ee2aa580de7a...@syzkaller.appspotmail.com

Re: [PATCH bpf-next v2] bpf, seccomp: fix false positive preemption splat for cbpf->ebpf progs

2019-02-20 Thread Kees Cook
sleep(); check. > > > > > > Fixes: 568f196756ad ("bpf: check that BPF programs run with preemption > > > disabled") > > > Reported-by: syzbot+8bf19ee2aa580de7a...@syzkaller.appspotmail.com > > > Signed-off-by: Daniel Borkmann > > > Acked-b

Re: [PATCH] sysctl: add proc_do_large_bitmap test node

2019-02-21 Thread Kees Cook
On Thu, Feb 21, 2019 at 9:45 AM Eric Sandeen wrote: > > Add a test node for proc_do_large_bitmap to the test_sysctl.c > infrastructure. It's sized the same as the one existing user. > > Signed-off-by: Eric Sandeen Acked-by: Kees Cook -Kees > --- > > diff --

Re: [PATCH bpf-next v2] bpf, seccomp: fix false positive preemption splat for cbpf->ebpf progs

2019-02-21 Thread Kees Cook
On Thu, Feb 21, 2019 at 11:29 AM Alexei Starovoitov wrote: > > On Thu, Feb 21, 2019 at 01:56:53PM +0100, Jann Horn wrote: > > On Thu, Feb 21, 2019 at 9:53 AM Daniel Borkmann > > wrote: > > > On 02/21/2019 06:31 AM, Kees Cook wrote: > > > > On Wed, Feb

Re: [PATCH bpf-next v2] bpf, seccomp: fix false positive preemption splat for cbpf->ebpf progs

2019-02-21 Thread Kees Cook
never happen. (In fact, recently I even had Tycho see if he could implement the recent seccomp user notification stuff via eBPF.) -- Kees Cook

Re: [PATCH] bpf: fix sysctl.c warning

2019-03-04 Thread Kees Cook
used-function] > static int proc_dointvec_minmax_bpf_stats(struct ctl_table *table, int write, > > The CONFIG_BPF_SYSCALL check was already handled, but the SYSCTL check > is needed on top. > > Fixes: 492ecee892c2 ("bpf: enable program stats") > Signed-off-by: Arnd Bergmann

Re: Question about seccomp / bpf

2019-05-09 Thread Kees Cook
7;s an ugly hack. > Another alternative is to attach seccomp prog to parent task > instead of N childrens. seccomp's filter is already shared by all the children of whatever process got the filter attached. -- Kees Cook

Re: [PATCH next] sysctl: add proc_dointvec_jiffies_minmax to limit the min/max write value

2019-05-15 Thread Kees Cook
proc_dointvec_minmax func. > >> > >> Signed-off-by: Zhiqiang Liu > >> Reported-by: Qiang Ning > >> Reviewed-by: Jie Liu If proc_dointvec_jiffies() can't just be fixed, where will the new function get used? It seems all the "unsigned int" users could benefit. -- Kees Cook

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

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

2017-10-05 Thread Kees Cook
On Thu, Oct 5, 2017 at 6:58 AM, Jozsef Kadlecsik wrote: > Hi, > > On Wed, 4 Oct 2017, 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_tim

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

2017-10-05 Thread Kees Cook
uct timer_list *t)) { struct list_set *map = set->data; - setup_timer(&map->gc, gc, (unsigned long)set); + timer_setup(&map->gc, gc, 0); mod_timer(&map->gc, jiffies + IPSET_GC_PERIOD(set->timeout) * HZ); } @@ -606,6 +607,7 @@ init_list_set(struct net *net, struct ip_set *set, u32 size) map->size = size; map->net = net; + map->set = set; INIT_LIST_HEAD(&map->members); set->data = map; -- 2.7.4 -- Kees Cook Pixel Security

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

2017-10-05 Thread Kees Cook
On Thu, Oct 5, 2017 at 12:58 AM, Paul Bolle wrote: > Hi Kees, > > On Wed, 2017-10-04 at 17:52 -0700, Kees Cook wrote: >> Also uses kzmalloc to replace open-coded field assignments to NULL and zero. > > If I'm allowed to whine (chances that I'm allowed to do that a

[PATCH] isdn/gigaset: Use kzalloc instead of open-coded field zeroing

2017-10-05 Thread Kees Cook
This replaces a kmalloc followed by a bunch of per-field zeroing with a single kzalloc call, reducing the lines of code. Cc: Paul Bolle Cc: Karsten Keil Cc: "David S. Miller" Cc: Johan Hovold Cc: gigaset307x-com...@lists.sourceforge.net Cc: netdev@vger.kernel.org Signed-off-by:

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

2017-10-05 Thread Kees Cook
et307x-com...@lists.sourceforge.net Cc: netdev@vger.kernel.org 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. v2: - split kzalloc() into a separate patch; pebolle. --- driv

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

2017-10-06 Thread Kees Cook
On Thu, Oct 5, 2017 at 2:38 AM, Leon Romanovsky wrote: > On Wed, Oct 04, 2017 at 05:51:54PM -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() >&

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

2017-10-06 Thread Kees Cook
On Fri, Oct 6, 2017 at 12:00 PM, Paul Bolle wrote: > On Thu, 2017-10-05 at 12:31 -0700, Kees Cook wrote: >> --- a/drivers/isdn/gigaset/bas-gigaset.c >> +++ b/drivers/isdn/gigaset/bas-gigaset.c > >> -static void cmd_in_timeout(unsigned long data) >> +static void cmd_i

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

2017-10-09 Thread Kees Cook
On Mon, Oct 9, 2017 at 2:15 AM, David Laight wrote: > From: Kees Cook >> Sent: 06 October 2017 20:40 > ... >> I'm in no rush for any specific change. There are about 900 call sites >> I'm making my way through, about 2/3rd are pretty trivial, and the >> l

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

2017-10-09 Thread Kees Cook
On Mon, Oct 9, 2017 at 10:53 AM, Marc Kleine-Budde wrote: > On 10/05/2017 02:51 AM, 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] timer: Remove meaningless .data/.function assignments

2017-10-09 Thread Kees Cook
: Jens Axboe Cc: netdev@vger.kernel.org Cc: linux-wirel...@vger.kernel.org Cc: de...@driverdev.osuosl.org Signed-off-by: Kees Cook Acked-by: Greg Kroah-Hartman # for staging Acked-by: Krzysztof Halasa # for wan/hdlc* Acked-by: Jens Axboe # for amiflop --- This should go via the timer/core tree

Re: net/wireless/ray_cs: Convert timers to use

2017-10-10 Thread Kees Cook
On Tue, Oct 10, 2017 at 1:26 AM, Kalle Valo wrote: > 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 pass the timer pointer explicit

[PATCH 1/3] atm: idt77105: Drop needless setup_timer()

2017-10-10 Thread Kees Cook
Calling setup_timer() is redundant when DEFINE_TIMER() has been used. Cc: Chas Williams <3ch...@gmail.com> Cc: linux-atm-gene...@lists.sourceforge.net Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook --- This is intended to go via the timer tree. Acks appreciated! --- drivers/atm/idt7

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

2017-10-10 Thread Kees Cook
.data fields. Cc: David S. Miller Cc: Krzysztof Halasa Cc: netdev@vger.kernel.org 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/wan/hdlc_ci

Re: [PATCH] rtl8xxxu: mark expected switch fall-throughs

2017-10-11 Thread Kees Cook
ully both gcc and clang have stepped up to solve this the same way static analyzers have solved it. It's not exactly pretty, but it does both document the intention for humans and provide a way for analyzers to report issues. Having the compiler help us not make mistakes is quite handy, and

[PATCH] mac80211: aggregation: Convert timers to use timer_setup()

2017-10-16 Thread Kees Cook
, along with the tid index itself. Cc: Johannes Berg Cc: "David S. Miller" Cc: linux-wirel...@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook --- This has been the least trivial timer conversion yet. Given the use of RCU and other things I may not even know about, I

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

2017-10-16 Thread Kees Cook
kernel.org Signed-off-by: Kees Cook --- net/mac80211/ibss.c | 7 +++ net/mac80211/ieee80211_i.h | 3 ++- net/mac80211/led.c | 11 ++- net/mac80211/main.c | 3 +-- net/mac80211/mesh.c | 27 --- net/mac80211/mesh.h |

[PATCH] wireless: qtnfmac: Convert timers to use timer_setup()

2017-10-16 Thread Kees Cook
-wirel...@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook --- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 7 +++ drivers/net/wireless/quantenna/qtnfmac/core.c | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/quantenna

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

2017-10-16 Thread Kees Cook
Cc: linux-wirel...@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook --- drivers/net/wireless/realtek/rtlwifi/base.c | 21 +++-- drivers/net/wireless/realtek/rtlwifi/base.h | 4 ++-- drivers/net/wireless/realtek/rtlwifi/core.c | 2

[PATCH] wireless: iwlegacy: Convert timers to use timer_setup()

2017-10-16 Thread Kees Cook
-off-by: Kees Cook --- drivers/net/wireless/intel/iwlegacy/3945-mac.c | 2 +- drivers/net/wireless/intel/iwlegacy/3945-rs.c | 10 +++--- drivers/net/wireless/intel/iwlegacy/4965-mac.c | 9 - drivers/net/wireless/intel/iwlegacy/common.c | 4 ++-- drivers/net/wireless/intel

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

2017-10-16 Thread Kees Cook
rge.net Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook --- include/net/dn.h| 7 --- include/net/dn_nsp.h| 1 - net/decnet/af_decnet.c | 4 net/decnet/dn_dev.c | 12 +--- net/decnet/dn_nsp_out.c | 11 --- 5 files changed, 5 insertions(+), 30 deletion

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

2017-10-16 Thread Kees Cook
Morton Cc: Anton Vasilyev Cc: Ingo Molnar Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook --- drivers/isdn/hardware/mISDN/mISDNipac.c | 7 +++ drivers/isdn/hardware/mISDN/w6692.c | 7 +++ drivers/isdn/mISDN/dsp.h| 2 +- drivers/isdn/mISDN/dsp_core.c

[PATCH 49/58] net: neterion: Convert timers to use timer_setup()

2017-10-16 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: Jon Mason Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook --- drivers/net/ethernet/neterion

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

2017-10-16 Thread Kees Cook
: Philippe Reynes Cc: Jarod Wilson Cc: Arvind Yadav Cc: "Bjørn Mork" Cc: "Stefan Brüns" Cc: Alexey Dobriyan Cc: Greg Ungerer Cc: linux-...@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook --- drivers/net/usb/catc.c | 6 +++--- dri

[PATCH 43/58] net: ethernet: apple: Convert timers to use timer_setup()

2017-10-16 Thread Kees Cook
kernel.org Signed-off-by: Kees Cook --- drivers/net/ethernet/apple/bmac.c | 12 +--- drivers/net/ethernet/apple/mace.c | 12 +--- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/drivers/net/ethernet/apple/bmac.c b/drivers/net/ethernet/apple/bmac.c index ea

[PATCH 51/58] ethernet/intel: Convert timers to use timer_setup()

2017-10-16 Thread Kees Cook
-wired-...@lists.osuosl.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook --- drivers/net/ethernet/intel/e100.c | 6 +++--- drivers/net/ethernet/intel/e1000e/netdev.c| 14 ++ drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 8 drivers/net/ethernet

[PATCH 53/58] net: atm: Convert timers to use timer_setup()

2017-10-16 Thread Kees Cook
" Cc: Hans Liljestrand Cc: "Reshetova, Elena" Cc: Bhumika Goyal Cc: Johannes Berg Cc: Roopa Prabhu Cc: Augusto Mecking Caringi Cc: Jarod Wilson Cc: Kalle Valo Cc: Thomas Gleixner Cc: Alexey Dobriyan Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook --- net/atm/clip.c | 4

[PATCH 42/58] isdnloop: Convert timers to use timer_setup()

2017-10-16 Thread Kees Cook
l Viro Cc: Stephen Hemminger Cc: Arnd Bergmann Cc: Johannes Berg Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook --- drivers/isdn/isdnloop/isdnloop.c | 33 ++--- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/drivers/isdn/isdnloop/isdnloop.c b/dr

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

2017-10-16 Thread Kees Cook
ned-off-by: Kees Cook --- drivers/net/ethernet/3com/3c574_cs.c | 12 +--- drivers/net/ethernet/3com/3c589_cs.c | 10 +- drivers/net/ethernet/3com/3c59x.c| 20 ++-- 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/drivers/net/ethernet/3com/3c574_cs.c

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

2017-10-16 Thread Kees Cook
Williams <3ch...@gmail.com> Cc: linux-atm-gene...@lists.sourceforge.net Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook --- drivers/atm/idt77252.c | 21 - drivers/atm/idt77252.h | 3 +++ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/drivers/atm/idt772

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

2017-10-16 Thread Kees Cook
too. When tasklets have their .data field removed, this can be refactored to call a central function after resolving the correct container_of() for a separate callback function for timer and tasklet. Cc: Oliver Neukum Cc: netdev@vger.kernel.org Cc: linux-...@vger.kernel.org Signed-off-by: Kees Cook

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

2017-10-16 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 Signed-off-by: Kees Cook --- drivers/net/ethernet/ti

[PATCH 15/58] pcmcia/electra_cf: Convert timers to use timer_setup()

2017-10-16 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: Michael Ellerman Cc: linux-pcm...@lists.infradead.org Signed-off-by: Kees Cook --- drivers/pcmcia

[PATCH 14/58] net: tulip: de2104x: Convert timers to use timer_setup()

2017-10-16 Thread Kees Cook
Wilson Cc: Philippe Reynes Cc: netdev@vger.kernel.org Cc: linux-par...@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Tobias Klauser --- drivers/net/ethernet/dec/tulip/de2104x.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/de

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

2017-10-16 Thread Kees Cook
Cc: Arnd Bergmann Cc: Jarod Wilson Cc: netdev@vger.kernel.org Cc: linux-arm-ker...@lists.infradead.org Signed-off-by: Kees Cook --- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 24 +--- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/drivers/net/etherne

[PATCH 08/58] net/wireless/ray_cs: Convert timers to use timer_setup()

2017-10-16 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: Kalle Valo Cc: linux-wirel...@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook

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

2017-10-16 Thread Kees Cook
Molnar Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook --- .../staging/irda/include/net/irda/irlmp_event.h| 6 +-- drivers/staging/irda/include/net/irda/timer.h | 11 ++--- drivers/staging/irda/net/af_irda.c | 7 ++- drivers/staging/irda/net/ircomm/ircomm_tty.c

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

2017-10-16 Thread Kees Cook
Signed-off-by: Kees Cook --- net/xfrm/xfrm_policy.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 2746b62a8944..b669c624a1ec 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -57,7 +57,7

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

2017-10-16 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 Signed-off-by: Kees Cook --- drivers/staging/irda/drivers

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

2017-10-16 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: Karsten Keil Cc: Geliang Tang Cc: "David S. Miller" Cc: netdev@vger.kernel.org Signed-of

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

2017-10-16 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: Andreas Koensgen Cc: linux-h...@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook

[PATCH 45/58] net: seeq: Convert timers to use timer_setup()

2017-10-16 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: Russell King Cc: linux-arm-ker...@lists.infradead.org Cc: netdev@vger.kernel.org Signed-off-by: Kees

  1   2   3   4   5   6   7   8   >