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
m/KSPP/linux/issues/109
> Reported-by: kernel test robot
> Signed-off-by: Gustavo A. R. Silva
Yup!
Reviewed-by: Kees Cook
--
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
.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
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
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
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
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
ptimizing rmb()
https://git.kernel.org/kees/c/a381b70a1cf8
--
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
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
-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
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
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
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
>
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
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
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
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
> >
; Reported-by: Sedat Dilek
> Signed-off-by: Sami Tolvanen
Reviewed-by: Kees Cook
--
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
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
| 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
> 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
ht -- this is a very narrow use-case (NLA). I think this series is
fine as-is.
--
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
> > >
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
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
"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
On Tue, Oct 06, 2020 at 04:28:09AM +0200, Willy Tarreau wrote:
> Hi Kees,
>
> On Mon, Oct 05, 2020 at 07:12:29PM -0700, Kees Cook wrote:
> > On Fri, Oct 02, 2020 at 05:16:11PM +0200, Thibaut Sautereau wrote:
> > > From: Thibaut Sautereau
> > >
> > >
Emese Revfy
> Signed-off-by: Thibaut Sautereau
Yes, that looks correct. Thank you!
Acked-by: Kees Cook
I'm not sure the best tree for this. Ted, Andrew, Linus? I'll take it
via my gcc plugin tree if no one else takes it. :)
--
Kees Cook
changes for feedback. I was
surprised to find the changes in the seccomp selftests today in Linus's
tree. I didn't seem to get CCed on this series, even though
get_maintainers shows this:
$ ./scripts/get_maintainer.pl 0001-selftests-seccomp-add-xtensa-support.mbox
Kees Cook (supporter:
NING: sum of
> probable bitmasks, consider |
Applied, thanks!
[1/1] selftests/seccomp: Use bitwise instead of arithmetic operator for flags
https://git.kernel.org/kees/c/76993fe3c1e4
Sorry for the massive delay on this one! I lost this email in my inbox. :)
--
Kees Cook
.wiki.kernel.org/en/developers/documentation/submittingpatches
FWIW, I don't think a revert is needed here to wait for the from_tasket()
-> container_from() API to land since from_tasklet() is already being
used by other trees. Let's just get this done so we can get closer to
ripping out the old tasklet API. We'll have to do a treewide
from_timer(), from_tasklet() -> container_from() anyway...
--
Kees Cook
t's the same form as container_of()
> > > and I think we need urgent agreement to not stall everything else so
> > > the most innocuous name is likely to get the widest acceptance.
> >
> > Kees,
> >
> > Will you be sending the newly proposed API to Linus? I have V2
> > which uses container_from()
> > ready to be sent out.
>
> I liked that James swapped the first two arguments so that it matches
> container_of(). Plus it's nice that when you have:
>
> struct whatever *foo = container_from(ptr, foo, member);
>
> Then it means that "ptr == &foo->member".
I'm a bit stalled right now -- the merge window was keeping me busy, and
this week is the Linux Plumbers Conference. This is on my list, but I
haven't gotten back around to it. If you want, feel free to send the
container_from() patch; you might be able to unblock this faster than me
right now. :)
-Kees
--
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
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
> >>>
> >&
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
. 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
On Fri, Aug 07, 2020 at 05:02:15PM -0700, John Stultz wrote:
> On Fri, Aug 7, 2020 at 3:18 PM Kees Cook wrote:
> >
> > On Fri, Aug 07, 2020 at 01:29:24PM -0700, John Stultz wrote:
> > > On Thu, Jul 9, 2020 at 11:28 AM Kees Cook wrote:
> > > >
> &
u8 fault_type;
int err;
- if (event->type < FAULT_TYPE_MAX)
- strncpy(type_str, fault_type[event->type],
strlen(fault_type[event->type]));
- else
- strncpy(type_str, "Unknown", strlen("Unknown"));
-
- err = devlink_fmsg_string_pair_put(fmsg, "Fault type", type_str);
+ fault_type = clamp(event->type, FAULT_TYPE_MAX);
+ err = devlink_fmsg_string_pair_put(fmsg, "Fault type",
type_str[fault_type]);
if (err)
return err;
-Kees
[1]
https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings
--
Kees Cook
On Fri, Aug 07, 2020 at 01:29:24PM -0700, John Stultz wrote:
> On Thu, Jul 9, 2020 at 11:28 AM Kees Cook wrote:
> >
> > Duplicate the cleanups from commit 2618d530dd8b ("net/scm: cleanup
> > scm_detach_fds") into the compat code.
> >
> > Replace ope
[heavily trimmed CC list because I think lkml is ignoring this
thread...]
On Thu, Jul 30, 2020 at 09:03:55AM +0200, Thomas Gleixner wrote:
> Kees,
>
> Kees Cook writes:
> > This is the infrastructure changes to prepare the tasklet API for
> > conversion to passing the
On Thu, Jul 09, 2020 at 10:00:42PM +0200, Jann Horn wrote:
> On Thu, Jul 9, 2020 at 8:26 PM Kees Cook wrote:
> > The sock counting (sock_update_netprioidx() and sock_update_classid())
> > was missing from pidfd's implementation of received fd installation. Add
> > a call
On Thu, Jul 09, 2020 at 10:00:42PM +0200, Jann Horn wrote:
> On Thu, Jul 9, 2020 at 8:26 PM Kees Cook wrote:
> > The sock counting (sock_update_netprioidx() and sock_update_classid())
> > was missing from pidfd's implementation of received fd installation. Add
> > a call
agram not set
correctly")
Fixes: d84295067fc7 ("net: net_cls: fd passed in SCM_RIGHTS datagram not set
correctly")
Signed-off-by: Kees Cook
---
include/net/sock.h | 4
net/compat.c | 1 +
net/core/sock.c| 21 +
3 files changed, 26 insertions(+)
Replace the open-coded version of receive_fd() with a call to the
new helper.
Thanks to Vamshi K Sthambamkadi for
catching a missed fput() in an earlier version of this patch.
Reviewed-by: Sargun Dhillon
Acked-by: Christian Brauner
Signed-off-by: Kees Cook
---
kernel/pid.c | 15
receive_fd().
Reviewed-by: Sargun Dhillon
Acked-by: Christian Brauner
Signed-off-by: Kees Cook
---
fs/file.c| 41 +
include/linux/file.h | 8
include/net/scm.h| 1 -
net/compat.c | 2 +-
net/core/scm.c
Acked-by: Christian Brauner
Signed-off-by: Kees Cook
---
include/net/scm.h | 1 +
net/compat.c | 56 +--
net/core/scm.c| 27 ++-
3 files changed, 37 insertions(+), 47 deletions(-)
diff --git a/include/net/scm.h b/include
!
-Kees
[1] https://lore.kernel.org/lkml/20200603011044.7972-1-sar...@sargun.me/
[2] https://lore.kernel.org/lkml/20200610045214.1175600-1-keesc...@chromium.org/
Kees Cook (7):
net/compat: Add missing sock updates for SCM_RIGHTS
pidfd: Add missing sock updates for pidfd_getfd()
net/scm
The sock counting (sock_update_netprioidx() and sock_update_classid())
was missing from pidfd's implementation of received fd installation. Add
a call to the new __receive_sock() helper.
Cc: sta...@vger.kernel.org
Fixes: 8649c322f75c ("pid: Implement pidfd_getfd syscall")
Signed-of
an earlier version of this patch.
Reviewed-by: Sargun Dhillon
Acked-by: Christian Brauner
Signed-off-by: Kees Cook
---
fs/file.c| 25 +++--
include/linux/file.h | 10 +++---
2 files changed, 26 insertions(+), 9 deletions(-)
diff --git a/fs/file.c b/fs/fi
receive_fd() for pidfd and seccomp that does not use the ufd
argument. For the new helper, the allocated fd needs to be returned on
success. Update the existing callers to handle it.
Reviewed-by: Sargun Dhillon
Acked-by: Christian Brauner
Signed-off-by: Kees Cook
---
fs/file.c| 17
: Sargun Dhillon
Link: https://lore.kernel.org/r/20200603011044.7972-5-sar...@sargun.me
Co-developed-by: Kees Cook
Signed-off-by: Kees Cook
---
tools/testing/selftests/seccomp/seccomp_bpf.c | 229 ++
1 file changed, 229 insertions(+)
diff --git a/tools/testing/selftests/seccomp
dk/
[3]:
https://lore.kernel.org/lkml/20200612104629.GA15814@ircssh-2.c.rugged-nimbus-611.internal
Suggested-by: Matt Denton
Link: https://lore.kernel.org/r/20200603011044.7972-4-sar...@sargun.me
Signed-off-by: Sargun Dhillon
Co-developed-by: Kees Cook
Signed-off-by: Kees Cook
---
include/
x (going back to 3.6...), so, yeah,
for ease of backport, probably an explicit sock_update() implementation
(with compat and native scm using it), and a second patch for pidfd.
Let me see what I looks best...
--
Kees Cook
fine OPEN_HOW_SIZE_LATEST OPEN_HOW_SIZE_VER0
The ..._SIZE_VER0 and ...LATEST stuff doesn't seem useful to export via
UAPI. Above, 2 of the 3 export to uapi. Is there a specific rationale
for which should and which shouldn't?
> > +#undef EA_IOCTL
>
> Why is this undefed? :)
It was defined "in" a function, so I like to mimic function visibility.
But you're right; there's no reason to undef it.
--
Kees Cook
On Tue, Jul 07, 2020 at 02:38:54PM +0200, Christian Brauner wrote:
> On Mon, Jul 06, 2020 at 01:17:18PM -0700, Kees Cook wrote:
> > Expand __receive_fd() with support for replace_fd() for the coming seccomp
> > "addfd" ioctl(). Add new wrapper receive_fd_replace() for
On Tue, Jul 07, 2020 at 02:22:20PM +0200, Christian Brauner wrote:
> On Mon, Jul 06, 2020 at 01:17:17PM -0700, Kees Cook wrote:
> > The sock counting (sock_update_netprioidx() and sock_update_classid()) was
> > missing from pidfd's implementation of received fd installation.
On Tue, Jul 07, 2020 at 01:49:23PM +0200, Christian Brauner wrote:
> On Mon, Jul 06, 2020 at 01:17:16PM -0700, Kees Cook wrote:
> > For both pidfd and seccomp, the __user pointer is not used. Update
> > __receive_fd() to make writing to ufd optional via a NULL check. Howev
On Tue, Jul 07, 2020 at 01:41:03PM +0200, Christian Brauner wrote:
> On Mon, Jul 06, 2020 at 01:17:14PM -0700, Kees Cook wrote:
> > Duplicate the cleanups from commit 2618d530dd8b ("net/scm: cleanup
> > scm_detach_fds") into the compat code.
> >
> > Move t
atagram not set
correctly")
Fixes: d84295067fc7 ("net: net_cls: fd passed in SCM_RIGHTS datagram not set
correctly")
Signed-off-by: Kees Cook
---
include/net/scm.h | 1 +
net/compat.c | 55 +--
net/core/scm.c| 18 ---
receive_fd() for pidfd and seccomp that does not use the ufd
argument. For the new helper, the allocated fd needs to be returned on
success. Update the existing callers to handle it.
Reviewed-by: Sargun Dhillon
Signed-off-by: Kees Cook
---
fs/file.c| 23 +++
include
receive_fd().
Reviewed-by: Sargun Dhillon
Signed-off-by: Kees Cook
---
fs/file.c| 48
include/linux/file.h | 8
include/linux/net.h | 9 +
include/net/scm.h| 1 -
net/compat.c | 2 +-
net/core/scm.c
this in the for-next/seccomp tree, unless someone
has objections. :) Please review and test!
-Kees
[1] https://lore.kernel.org/lkml/20200603011044.7972-1-sar...@sargun.me/
[2] https://lore.kernel.org/lkml/20200610045214.1175600-1-keesc...@chromium.org/
Kees Cook (5):
net/scm: Regularize compat
an earlier version of this patch.
Reviewed-by: Sargun Dhillon
Signed-off-by: Kees Cook
---
fs/file.c| 24 ++--
include/linux/file.h | 10 +++---
2 files changed, 25 insertions(+), 9 deletions(-)
diff --git a/fs/file.c b/fs/file.c
index 0efdcf413210..11313ff36
rlier version of this patch.
Fixes: 8649c322f75c ("pid: Implement pidfd_getfd syscall")
Reviewed-by: Sargun Dhillon
Signed-off-by: Kees Cook
---
kernel/pid.c | 13 ++---
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/kernel/pid.c b/kernel/pid.c
index f1496b757162..a31c
.kernel.org/lkml/a328b91d-fd8f-4f27-b3c2-91a9c45f1...@rasmusvillemoes.dk/
[3]:
https://lore.kernel.org/lkml/20200612104629.GA15814@ircssh-2.c.rugged-nimbus-611.internal
Suggested-by: Matt Denton
Link: https://lore.kernel.org/r/20200603011044.7972-4-sar...@sargun.me
Signed-off-by: Sargun Dhill
: Sargun Dhillon
Link: https://lore.kernel.org/r/20200603011044.7972-5-sar...@sargun.me
Co-developed-by: Kees Cook
Signed-off-by: Kees Cook
---
tools/testing/selftests/seccomp/seccomp_bpf.c | 229 ++
1 file changed, 229 insertions(+)
diff --git a/tools/testing/selftests/seccomp
On Mon, Jul 06, 2020 at 06:12:45PM +0200, Christian Brauner wrote:
> On Mon, Jul 06, 2020 at 08:34:06AM -0700, Kees Cook wrote:
> > Yup, this was a mistake in my refactoring of the pidfs changes.
>
> I already did.
Er, what? (I had a typo in my quote: s/pidfs/pidfd/.) I was try
On Mon, Jul 06, 2020 at 03:07:13PM +0200, Christian Brauner wrote:
> On Wed, Jun 17, 2020 at 03:03:24PM -0700, Kees Cook wrote:
> > The sock counting (sock_update_netprioidx() and sock_update_classid()) was
> > missing from pidfd's implementation of received fd installation.
the same do_enable_set() path
which implies there are racing writes to the debugfs write handler. It
seems locking is missing for both listen_chan and enable_6lowpan. The
latter seems misused in is_bt_6lowpan(), which should likely just be
checking for chan->ops == &bt_6lowpan_chan_ops, I think?
I have no way to actually test changes to this code...
--
Kees Cook
On Sun, Jul 05, 2020 at 01:10:54PM -0700, Linus Torvalds wrote:
> On Fri, Jul 3, 2020 at 8:50 AM Kees Cook wrote:
> >
> > With 67 kthreads on a booted system, this patch does not immediately
> > blow up...
>
> Did you try making read/write inc/dec that thing too? Or do
}
#ifdef __ARCH_WANT_SYS_FORK
--
Kees Cook
On Fri, Jul 03, 2020 at 08:02:07AM +0200, Greg Kroah-Hartman wrote:
> On Thu, Jul 02, 2020 at 04:26:35PM -0700, Kees Cook wrote:
> > + sattr->battr.size = 3 /* "0x", "\n" */ + (BITS_PER_LONG / 4);
>
> They get a correct "size" value now,
On Thu, Jul 02, 2020 at 06:00:17PM -0700, Linus Torvalds wrote:
> On Thu, Jul 2, 2020 at 4:26 PM Kees Cook wrote:
> >
> > The kprobe show() functions were using "current"'s creds instead
> > of the file opener's creds for kallsyms visibility. Fix to use
&
.kernel.org
Reported-by: Dominik Czarnota
Fixes: be71eda5383f ("module: Fix display of wrong module .text address")
Signed-off-by: Kees Cook
---
kernel/module.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/module.c b/kernel/module.c
index 9e2954519259.
that were doing checks
during "read" context instead of "open" context. This fixes all of these
cases by plumbing the file->f_cred through to their ultimate checks via
kallsyms_show_value()'s new cred argument.
Testing, reviews, and acks appreciated. :)
Thanks!
s callers now that
kallsysm_show_value() has been refactored to take struct cred.
Cc: sta...@vger.kernel.org
Fixes: 7105e828c087 ("bpf: allow for correlation of maps and helpers in dump")
Signed-off-by: Kees Cook
---
include/linux/filter.h | 4 ++--
kernel/bpf/syscall.c | 37 ++
In order to gain access to the open file's f_cred for kallsym visibility
permission checks, refactor the module section attributes to use the
bin_attribute instead of attribute interface. Additionally removes the
redundant "name" struct member.
Cc: sta...@vger.kernel.org
Signed-of
e fixed in the coming patches.
Additionally switch return value to bool, since it is always used as a
direct permission check, not a 0-on-success, negative-on-error style
function return.
Cc: sta...@vger.kernel.org
Signed-off-by: Kees Cook
---
include/linux/filter.h | 2 +-
include/linux/kalls
Fixes: ffb9bd68ebdb ("kprobes: Show blacklist addresses as same as kallsyms
does")
Signed-off-by: Kees Cook
---
kernel/kprobes.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index d4de217e4a91..2e97febeef77 100644
--- a/kernel/kprob
On Thu, Jul 02, 2020 at 04:23:35PM +0100, Mark Brown wrote:
> On Thu, Jul 02, 2020 at 08:21:40AM -0700, Kees Cook wrote:
> > On Wed, Jul 01, 2020 at 09:39:20PM +0100, Mark Brown wrote:
>
> > > Please copy maintainers on patches :(
>
> > Hi! Sorry about that; the CC
On Wed, Jul 01, 2020 at 09:39:20PM +0100, Mark Brown wrote:
> On Fri, Jun 19, 2020 at 08:29:59PM -0700, Kees Cook wrote:
> > Using uninitialized_var() is dangerous as it papers over real bugs[1]
> > (or can in the future), and suppresses unrelated compiler warnings (e.g.
> > &
On Mon, Jun 22, 2020 at 10:04:18AM -0700, Nick Desaulniers wrote:
> On Fri, Jun 19, 2020 at 8:30 PM Kees Cook wrote:
> >
> > Using uninitialized_var() is dangerous as it papers over real bugs[1]
> > (or can in the future), and suppresses unrelated compiler warnings (e.g.
On Sat, Jun 20, 2020 at 09:03:34AM +0200, Sedat Dilek wrote:
> On Sat, Jun 20, 2020 at 5:30 AM Kees Cook wrote:
> >
> > v2:
> > - more special-cased fixes
> > - add reviews
> > v1:
> > https://lore.kernel.org/lkml/20200603233203.1695403-1-keesc...@chrom
v0ve...@mail.gmail.com/
Fixes: 58619b14d106 ("b43: move under broadcom vendor directory")
Signed-off-by: Kees Cook
---
drivers/net/wireless/broadcom/b43/phy_n.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/broadcom/b43/phy_n.c
b/drivers/net/wireless
z2500WfbKXAx8s67wrm9=yvju65tplgn_ybynv0ve...@mail.gmail.com/
Fixes: ce1e518190ea ("ide: don't disable interrupts during kmap_atomic()")
Reviewed-by: Nick Desaulniers
Signed-off-by: Kees Cook
---
drivers/ide/ide-taskfile.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/i
rg/lkml/ca+55afwgbgqhbp1fkxvrkepzyr5j8n1vkt1vzdz9knmpuxh...@mail.gmail.com/
[4]
https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yvju65tplgn_ybynv0ve...@mail.gmail.com/
Fixes: a29728463b25 ("drbd: Backport the "events2" command")
Reviewed-by: Nick Desaulniers
Signed-off-by: Kees Cook
---
d
Acked-by: Kalle Valo
Signed-off-by: Kees Cook
---
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c
b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c
index f070f25bb735.
rg/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yvju65tplgn_ybynv0ve...@mail.gmail.com/
Fixes: 1e01979c8f50 ("x86, numa: Implement pfn -> nid mapping granularity
check")
Signed-off-by: Kees Cook
---
arch/x86/mm/numa.c| 18 +-
include/linux/page-flags-layout.h | 4 ++
yvju65tplgn_ybynv0ve...@mail.gmail.com/
Suggested-by: Nathan Chancellor
Fixes: f05ed4d56e9c ("KVM: PPC: Split out code from book3s.c into book3s_pr.c")
Signed-off-by: Kees Cook
---
arch/powerpc/kvm/book3s_pr.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/powerpc/kvm/book3s_pr.c
Nothing should be using this macro, and the entire idea of tricking the
compiler into silencing such warnings is a mistake.
Signed-off-by: Kees Cook
---
Documentation/process/deprecated.rst | 18 ++
1 file changed, 18 insertions(+)
diff --git a/Documentation/process
+55aFz2500WfbKXAx8s67wrm9=yvju65tplgn_ybynv0ve...@mail.gmail.com/
Suggested-by: Chao Yu
Signed-off-by: Jason Yan
Reviewed-by: Chao Yu
Link: https://lore.kernel.org/r/20200615085132.166470-1-yanai...@huawei.com
Signed-off-by: Kees Cook
---
fs/f2fs/data.c | 4 +---
1 file changed, 1 insertion(+), 3
Ax8s67wrm9=yvju65tplgn_ybynv0ve...@mail.gmail.com/
Fixes: 5f7aa9071e93 ("clk: st: Support for QUADFS inside ClockGenB/C/D/E/F")
Signed-off-by: Kees Cook
---
drivers/clk/st/clkgen-fsyn.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/clk/st/clkgen-fsyn.c b/drivers/clk/st
ence unnecessary noisy debug output")
Signed-off-by: Kees Cook
---
drivers/input/touchscreen/sur40.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/input/touchscreen/sur40.c
b/drivers/input/touchscreen/sur40.c
index 34d31c7ec8ba..620cdd7d214a 100644
--- a/drivers
/lkml/CA+55aFw+Vbj0i=1tgqcr5vqkczwj0qxk6cernou6eedsuda...@mail.gmail.com/
[3]
https://lore.kernel.org/lkml/ca+55afwgbgqhbp1fkxvrkepzyr5j8n1vkt1vzdz9knmpuxh...@mail.gmail.com/
[4]
https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yvju65tplgn_ybynv0ve...@mail.gmail.com/
Signed-off-by: Kee
yvju65tplgn_ybynv0ve...@mail.gmail.com/
Suggested-by: Linus Torvalds
Reviewed-by: Bart van Assche
Reviewed-by: Miguel Ojeda
Tested-by: Nathan Chancellor
Tested-by: Sedat Dilek
Signed-off-by: Kees Cook
---
include/linux/compiler-clang.h | 2 --
include/linux/compiler-gcc.h | 6 --
tools/include/
ttps://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yvju65tplgn_ybynv0ve...@mail.gmail.com/
Reviewed-by: Leon Romanovsky # drivers/infiniband and
mlx4/mlx5
Acked-by: Jason Gunthorpe # IB
Acked-by: Kalle Valo # wireless drivers
Reviewed-by: Chao Yu # erofs
Signed-off-by: Kees Cook
---
arch/arm/mach-sa1100/as
rg/lkml/ca+55afwgbgqhbp1fkxvrkepzyr5j8n1vkt1vzdz9knmpuxh...@mail.gmail.com/
[4]
https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yvju65tplgn_ybynv0ve...@mail.gmail.com/
Fixes: 399145f9eb6c ("mm/debug: add tests validating architecture page table
helpers")
Signed-off-by: Kees Cook
---
mm/debug_vm_pgta
1 - 100 of 799 matches
Mail list logo