() to correctly reason about the size.
"objdump -d" shows no object code changes.
Cc: Ross Schmidt
Cc: Joe Perches
Cc: de...@driverdev.osuosl.org
Signed-off-by: Kees Cook
---
Hi Greg, since I've split out some other patches from my series, it made
sense to send this one di
d-off-by: Kees Cook
---
.../staging/rtl8192u/ieee80211/ieee80211.h| 4 +-
.../rtl8192u/ieee80211/ieee80211_crypt_ccmp.c | 4 +-
.../staging/rtl8192u/ieee80211/ieee80211_rx.c | 49 ++-
3 files changed, 19 insertions(+), 38 deletions(-)
diff --git a/drivers/staging/rtl
u8 reserved;
struct rtllib_qos_ac_parameter ac_params_record[QOS_QUEUE_NUM];
} __packed;
Cc: Darshan D V
Cc: Aditya Srivastava
Cc: de...@driverdev.osuosl.org
Cc: Larry Finger
Signed-off-by: Kees Cook
---
drivers/staging/rtl8192e/rtllib_crypt_ccmp.c | 4 +-
drivers/staging/rtl8192e/rtllib
; > >
> > > Why? this is internal things, why does seccomp come into play here?
> > >
> >
> > We already have security_binder_transfer_file() to control the sender
> > process. So for the receiver process, do we need the seccomp too? Or
> > do I miss something here?
>
> I do not know, is this something that is a requirement that seccomp
> handle all filesystem handles sent to a process? I do not know the
> seccomp "guarantee" that well, sorry.
This is an extremely confused thread. seccomp _uses_ the receive_fd()
API. receive_fd() calls the security_file_receive() LSM hook. The
security_binder_*() LSM hooks are different yet.
Please, let's wait for Christian to clarify his idea first.
--
Kees Cook
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
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
angerous code pattern, but it can mask finding them.
Then, at the end of the day, only the corner cases remain, and those can
be seen clearly as they change over time. Since we can never have a
one-time audit be anything other than advisory, we need to make it EASY
to do those kinds of audits so they c
27;s happening here. But as it turns out, it's easier to do
this by employing both the process of elimination (mark the counters)
and direct identification (mark the refcount_t). Then the pool of
"unannotated" atomic_t instances continues to shrink.
--
Kees Cook
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
tomics, which means we have a much lower chance of
introducing new flaws (and maybe we'll fix flaws during the conversion,
which we've certainly seen before when doing this stricter type/language
changes).
I don't see why this is an objectionable goal.
--
Kees Cook
__
to take this through mine.
I'd mentioned this in the v2, but yes, please take via your trees. :)
I'm glad to see this landing!
--
Kees Cook
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
? (Originally I thought this was going through Greg's tree since
it was touching a lot of drivers.)
--
Kees Cook
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
version doesn't change the overflow wrap around behavior.
>
> Reviewed-by: Joel Fernandes (Google)
> Signed-off-by: Shuah Khan
Yup, seems to be stats-only.
Reviewed-by: Kees Cook
--
Kees Cook
___
devel mailing list
de...@linuxdriv
On Mon, Sep 28, 2020 at 04:41:47PM -0600, Shuah Khan wrote:
> On 9/26/20 10:29 AM, Kees Cook wrote:
> > On Fri, Sep 25, 2020 at 05:47:14PM -0600, Shuah Khan wrote:
> > > 7. Verified that the test module compiles in kunit env. and test
> > >module ca
the atomic and atomic64 naming currently used (i.e. dropping the '32').
> However that is just my opinion and I am ok with either naming.
I had asked that they be size-named to avoid any confusion (i.e. we're
making a new API).
--
Kees Cook
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
On Fri, Sep 25, 2020 at 06:13:37PM -0600, Shuah Khan wrote:
> On 9/25/20 5:52 PM, Kees Cook wrote:
> > On Fri, Sep 25, 2020 at 05:47:14PM -0600, Shuah Khan wrote:
> > > -- Addressed Kees's comments:
> > > 1. Non-atomic counters renamed to counter_simp
c/html/latest/dev-tools/kunit/
Though I see the docs are still not updated[1] to reflect the Kconfig
(CONFIG_foo_KUNIT_TEST) and file naming conventions (foo_kunit.c).
-Kees
[1] https://lore.kernel.org/lkml/20200911042404.3598910-1-david...@google.com/
--
Kee
s
[1] https://github.com/KSPP/linux/issues/104
--
Kees Cook
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
it can never be used to guard object lifetimes
> and state management. I left _return ops for now, inc_return
> is necessary for now as per the discussion we had on this topic.
I still *really* do not want dec_return() to exist. That is asking for
trouble. I'd prefer inc_retur
On Wed, Sep 23, 2020 at 09:31:34PM +0200, Greg KH wrote:
> On Wed, Sep 23, 2020 at 12:04:58PM -0700, Kees Cook wrote:
> > On Wed, Sep 23, 2020 at 07:10:27AM +0200, Greg KH wrote:
> > > On Tue, Sep 22, 2020 at 07:43:36PM -0600, Shuah Khan wrote:
> >
truct counter_atomic br[_IOC_NR(BR_FAILED_REPLY) + 1];
> > + struct counter_atomic bc[_IOC_NR(BC_REPLY_SG) + 1];
> > + struct counter_atomic obj_created[BINDER_STAT_COUNT];
> > + struct counter_atomic obj_deleted[BINDER_STAT_COUNT];
>
> Th
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
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)
. 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 Coo
[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 16, 2020 at 01:48:20PM -0700, Dmitry Torokhov wrote:
> On Thu, Jul 16, 2020 at 12:14 PM Kees Cook wrote:
> >
> > On Thu, Jul 16, 2020 at 09:57:18AM +0200, Peter Zijlstra wrote:
> > > On Wed, Jul 15, 2020 at 08:08:44PM -0700, Kees Cook wrote:
> > >
On Thu, Jul 16, 2020 at 09:28:23AM +0200, Greg Kroah-Hartman wrote:
> On Wed, Jul 15, 2020 at 08:08:45PM -0700, Kees Cook wrote:
> > There's no reason for the tasklet callback to set an argument since it
> > always uses a global. Instead, use the global directly, in preparatio
the tasklet is scheduled from an interrupt handler. So
> we could get rid of these tasklets by using threaded IRQs.
Perhaps I can add a comment above the tasklet API area in interrupt.h?
--
Kees Cook
___
devel mailing list
de...@linuxdriverproject.org
http
On Thu, Jul 16, 2020 at 04:37:04PM +0100, Matthew Wilcox wrote:
> On Wed, Jul 15, 2020 at 08:08:47PM -0700, Kees Cook wrote:
> > +#define DECLARE_TASKLET(name, _callback) \
> > +struct tasklet_struct name = { \
> > + .
On Thu, Jul 16, 2020 at 12:29:14PM +0100, Matthew Wilcox wrote:
> On Wed, Jul 15, 2020 at 08:08:46PM -0700, Kees Cook wrote:
> > This converts all the existing DECLARE_TASKLET() (and ...DISABLED)
> > macros with DECLARE_TASKLET_OLD() in preparation for refactoring the
> >
On Thu, Jul 16, 2020 at 09:57:18AM +0200, Peter Zijlstra wrote:
> On Wed, Jul 15, 2020 at 08:08:44PM -0700, Kees Cook wrote:
> > Hi,
> >
> > This is the infrastructure changes to prepare the tasklet API for
> > conversion to passing the tasklet struct as the callback
will be removed as well. (On 64-bit this does
not grow the struct size as the new member fills the hole after atomic_t,
which is also "int" sized.)
Signed-off-by: Romain Perier
Co-developed-by: Allen Pais
Signed-off-by: Allen Pais
Co-developed-by: Kees Cook
Signed-off-by: Kees Cook
--
There's no reason for the tasklet callback to set an argument since it
always uses a global. Instead, use the global directly, in preparation
for converting the tasklet subsystem to modern callback conventions.
Signed-off-by: Kees Cook
---
drivers/usb/gadget/udc/snps_udc_core.c | 6 ++--
This converts all the existing DECLARE_TASKLET() (and ...DISABLED)
macros with DECLARE_TASKLET_OLD() in preparation for refactoring the
tasklet callback type. All existing DECLARE_TASKLET() users had a "0"
data argument, it has been removed here as well.
Signed-off-by: Kees Cook
--
lable. The entire tree of
changes is here[1] currently, but to split it up by maintainer the
infrastructure changes need to be landed first.
Review and Acks appreciated! :)
Thanks,
-Kees
[1] https://github.com/allenpais/tasklets/commits/tasklets_V2
Kees Cook (2):
usb: gadget: udc: Avoid
ne txrpt_ccx_sw_88e(txrpt_ccx) ((txrpt_ccx)->sw0 + ((txrpt_ccx)->sw1 <<
> 8))
> #define txrpt_ccx_qtime_88e(txrpt_ccx) \
> - ((txrpt_ccx)->ccx_qtime0+((txrpt_ccx)->ccx_qtime1<<8))
> + ((txrpt_ccx)->ccx_qtime0
On Thu, Mar 05, 2020 at 11:07:56AM +0300, Dan Carpenter wrote:
> On Wed, Mar 04, 2020 at 10:13:40AM -0800, Kees Cook wrote:
> > On Tue, Mar 03, 2020 at 12:38:32PM +0300, Dan Carpenter wrote:
> > > The real fix is to initialize everything manually, the automated
> > > ini
"Oh, I love that patch."
https://lore.kernel.org/lkml/CA+55aFykZL+cSBJjBBts7ebEFfyGPdMzTmLSxKnT_29=j94...@mail.gmail.com/
--
Kees Cook
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
On Wed, Feb 26, 2020 at 03:58:41PM +0100, Alexander Potapenko wrote:
> On Tue, Feb 25, 2020 at 4:24 PM Alexander Potapenko wrote:
> >
> > On Tue, Feb 25, 2020 at 5:18 AM Kees Cook wrote:
> > >
> > > On Mon, Feb 24, 2020 at 04:35:00PM +0100, gli...@google.com wrot
lp keep these markings in sync...
-Kees
>
> Cc: Kees Cook
> Cc: Greg Kroah-Hartman
> Signed-off-by: Alexander Potapenko
> ---
> drivers/android/binder.c | 12 ++--
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/android/binder.c b/d
t; +#ifndef __do_not_initialize
> +#define __do_not_initialize
> +#endif
> +
> /*
> * The below symbols may be defined for one or more, but not ALL, of the
> above
> * compilers. We don't consider that to be an error, so set them to nothing.
> --
> 2.25.0.265.g
otype). Many of these cases can be found with -Wcast-function-type,
which found that the rtl wifi drivers had a bunch of needless function
casts. Remove function casts for tasklet callbacks in the various drivers.
Signed-off-by: Kees Cook
Reviewed-by: Dan Carpenter
---
v2: rebased to staging-next,
On Fri, Nov 15, 2019 at 02:16:10PM +0800, Greg Kroah-Hartman wrote:
> On Thu, Nov 14, 2019 at 09:39:00PM -0800, Kees Cook wrote:
> > In order to make the entire kernel usable under Clang's Control Flow
> > Integrity protections, function prototype casts need to be avoided
&
On Fri, Nov 15, 2019 at 10:42:35AM +0300, Dan Carpenter wrote:
> On Fri, Nov 15, 2019 at 10:40:03AM +0300, Dan Carpenter wrote:
> > On Thu, Nov 14, 2019 at 09:39:00PM -0800, Kees Cook wrote:
> > > In order to make the entire kernel usable under Clang's Control Flow
>
otype). Many of these cases can be found with -Wcast-function-type,
which found that the rtl wifi drivers had a bunch of needless function
casts. Remove function casts for tasklet callbacks in the various drivers.
Signed-off-by: Kees Cook
---
drivers/staging/rtl8188eu/hal/rtl8188eu_rec
7;t change. Once we no
> > longer set these pages to reserved, we can rework this function to
> > perform separate checks for ZONE_DEVICE (split from PG_reserved checks).
> >
> > Cc: Kees Cook
> > Cc: Andrew Morton
> > Cc: Kate Stewart
> > Cc: Allison
rning, but presumably the overall stack usage is still
> significantly higher than in other configurations, so this would not
> address the full problem.
>
> I could not test this with CONFIG_INIT_STACK_ALL, which may or may not
> suffer from a similar problem.
>
> Fixes: 81a
*ieee;
+ struct ieee80211_device *ieee = NULL;
struct net_device *dev;
int i, err;
@@ -180,6 +180,7 @@ struct net_device *alloc_ieee80211(int sizeof_priv)
return dev;
failed:
+ ieee80211_networks_free(ieee);
if (dev)
free_netdev(dev);
Valdis, can you respin the patch?
-Kees
--
Kees Cook
Pixel Security
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
etnieks
Reviewed-by: Kees Cook
(And this seems to be the only case of this -- I don't see this code
trivially copy/pasted in other 80211 stacks.)
-Kees
> ---
> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c
> b/drivers/staging/rtl8192u/ieee80211/ieee
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
On Tue, Jul 24, 2018 at 10:31 AM, Joe Perches wrote:
> On Tue, 2018-07-24 at 09:49 -0700, Kees Cook wrote:
>> All users of AHASH_REQUEST_ON_STACK have been removed from the kernel, so
>> drop it entirely so no VLAs get reintroduced by future users.
>
> checkpatch has a test
On Tue, Jul 24, 2018 at 9:57 AM, Ard Biesheuvel
wrote:
> On 24 July 2018 at 18:49, Kees Cook wrote:
>> From: Ard Biesheuvel
>>
>> In the quest to remove all stack VLA usage from the kernel[1], this
>> drops AHASH_REQUEST_ON_STACK by preallocated the ahash request are
reduces stack usage. The stack allocation will be made
a fixed size in a later patch to the crypto subsystem.
[1]
https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com
Signed-off-by: Kees Cook
---
net/wireless/lib80211_crypt_tkip.c | 58
In the quest to remove all stack VLA usage from the kernel[1], this uses
the new HASH_MAX_DIGESTSIZE from the crypto layer to allocate the upper
bounds on stack usage.
[1]
https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com
Signed-off-by: Kees Cook
removing a layer of indirection this both improves
performance and reduces stack usage. The stack allocation will be made
a fixed size in a later patch to the crypto subsystem.
[1]
https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com
Signed-off-by: Kees Cook
reduces stack usage. The stack allocation will be made
a fixed size in a later patch to the crypto subsystem.
[1]
https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com
Signed-off-by: Kees Cook
---
drivers/block/drbd/drbd_int.h | 13 +++
drivers/block
: Kees Cook
---
include/crypto/cbc.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/crypto/cbc.h b/include/crypto/cbc.h
index f5b8bfc22e6d..47db0aac2ab9 100644
--- a/include/crypto/cbc.h
+++ b/include/crypto/cbc.h
@@ -113,7 +113,9 @@ static inline int
removing a layer of indirection this both improves
performance and reduces stack usage. The stack allocation will be made
a fixed size in a later patch to the crypto subsystem.
[1]
https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com
Signed-off-by: Kees Cook
=qpxydaacu1rq...@mail.gmail.com
Signed-off-by: Ard Biesheuvel
Signed-off-by: Kees Cook
---
crypto/ccm.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/crypto/ccm.c b/crypto/ccm.c
index 0a083342ec8c..b242fd0d3262 100644
--- a/crypto/ccm.c
+++ b/crypto/ccm.c
@@ -50,7 +50,10
All users of AHASH_REQUEST_ON_STACK have been removed from the kernel, so
drop it entirely so no VLAs get reintroduced by future users.
Signed-off-by: Kees Cook
---
include/crypto/hash.h | 5 -
1 file changed, 5 deletions(-)
diff --git a/include/crypto/hash.h b/include/crypto/hash.h
index
cra_blocksize is 144 (SHA3_224_BLOCK_SIZE, 18 8-byte words). For the
new blocksize limit, I went with 160 (20 8-byte words).
[1]
https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com
Signed-off-by: Kees Cook
---
crypto/algapi.c | 7 ++-
include
+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com
Signed-off-by: Kees Cook
Acked-by: Arnd Bergmann
---
drivers/net/ppp/ppp_mppe.c | 56 --
1 file changed, 30 insertions(+), 26 deletions(-)
diff --git a/drivers/net/ppp/ppp_mppe.c b/drivers/net/ppp
/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com
Signed-off-by: Kees Cook
Acked-by: Pavel Machek
---
arch/x86/power/hibernate_64.c | 36 ---
1 file changed, 21 insertions(+), 15 deletions(-)
diff --git a/arch/x86/power/hibernate_64.c b/arch
frame size of 1152 bytes is larger than
1024 bytes [-Wframe-larger-than=]
This passes the initial SKCIPHER_REQUEST_ON_STACK allocation to the leaf
functions for reuse. Two requests allocated on the stack is not needed
when only one is used at a time.
Signed-off-by: Kees Cook
Acked-by: Arnd Bergmann
...@mail.gmail.com
Signed-off-by: Kees Cook
---
crypto/ahash.c| 4 ++--
crypto/algif_hash.c | 2 +-
crypto/shash.c| 6 +++---
include/crypto/hash.h | 6 +-
4 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/crypto/ahash.c b/crypto/ahash.c
index a64c143165b1..78aaf2158c43
this helper was the only user.
[1]
https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com
Signed-off-by: Kees Cook
---
crypto/shash.c | 27 ---
include/linux/compiler-gcc.h | 1 -
2 files changed, 16 insertions(+), 12
In the quest to remove all stack VLA usage from the kernel[1], this uses
the new upper bound for the stack buffer. Also adds a sanity check.
[1]
https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com
Signed-off-by: Kees Cook
---
drivers/crypto/qat
crypto_skcipher_set_reqsize: 88
crypto_skcipher_set_reqsize: 472
[1]
https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com
Signed-off-by: Kees Cook
---
include/crypto/internal/skcipher.h | 1 +
include/crypto/skcipher.h | 4
K6CC=qpxydaacu1rq...@mail.gmail.com
Ard Biesheuvel (1):
crypto: ccm: Remove VLA usage
Kees Cook (17):
crypto: xcbc: Remove VLA usage
crypto: cbc: Remove VLA usage
crypto: hash: Remove VLA usage
dm: Remove VLA usage from hashes
crypto alg: Introduce generic max blocksize and alignmask
crypt
reduces stack usage. The stack allocation will be made
a fixed size in a later patch to the crypto subsystem.
[1]
https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com
Signed-off-by: Kees Cook
Reviewed-by: Eric Biggers
---
drivers/md/dm-crypt.c | 31
aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com
Signed-off-by: Kees Cook
---
crypto/xcbc.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/crypto/xcbc.c b/crypto/xcbc.c
index 25c75af50d3f..c055f57fab11 100644
--- a/crypto/xcbc.c
+++ b/crypto/xcbc.c
@@ -57,15 +57,17 @@ s
As already done treewide, switch from open-coded multiplication to using
2-factor allocator helpers.
Signed-off-by: Kees Cook
---
drivers/staging/gasket/gasket_core.c | 6 +++---
drivers/staging/gasket/gasket_interrupt.c | 15 +--
drivers/staging/gasket/gasket_page_table.c
x_urb = NULL;
> -
> DMESGE("Endpoint Alloc Failure");
> - return -ENOMEM;
> + goto out_release_mem;
> }
>
> netdev_dbg(dev, "End of initendpoints\n");
>
On Fri, Jun 15, 2018 at 9:47 AM, Kees Cook wrote:
> On Fri, Jun 15, 2018 at 9:33 AM, Greg Kroah-Hartman
> wrote:
>> On Sat, Jun 16, 2018 at 12:25:23AM +0800, Zhouyang Jia wrote:
>>> When usb_alloc_urb fails, the lack of error-handling code may
>>> cause unexpect
);
kfree(priv->rx_urb);
I think you need some kind of helper to do this, and you can call into
it from your error paths...
-Kees
> {sigh}
>
> No, you are still leaking memory on all of these changes that you just
> made :(
>
> greg k-h
--
Kees Cook
Pixel Security
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
_MAX_SERVICES
>
> Maybe just use ARRAY_SIZE(local_max_services) and not have the #define?
I think you mean ARRAY_SIZE(service_data) ? In that case, yeah, it
seems like a raw "64" for the array size can be used instead.
-Kees
--
Kees Cook
Pixel Secur
: Kees Cook
Reviewed-by: Rasmus Villemoes
---
drivers/staging/lustre/lustre/llite/xattr.c | 19 +--
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/lustre/lustre/llite/xattr.c
b/drivers/staging/lustre/lustre/llite/xattr.c
index 532384c91447
On Wed, Mar 7, 2018 at 5:10 AM, Rasmus Villemoes
wrote:
> On 2018-03-07 06:46, Kees Cook wrote:
>> The kernel would like to remove all VLA usage. This switches to a
>> simple kasprintf() instead.
>>
>> Signed-off-by: Kees Cook
>> ---
>> drivers/s
The kernel would like to remove all VLA usage. This switches to a
simple kasprintf() instead.
Signed-off-by: Kees Cook
---
drivers/staging/lustre/lustre/llite/xattr.c | 19 +--
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/lustre/lustre/llite
Noticed during Clang builds. This drops the redundant parentheses.
Cc: Samuel Ortiz
Cc: Greg Kroah-Hartman
Cc: de...@driverdev.osuosl.org
Signed-off-by: Kees Cook
---
drivers/staging/irda/net/irlmp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/irda
On Fri, Nov 3, 2017 at 2:49 PM, Bryan O'Donoghue
wrote:
>
>
> On 03/11/17 20:21, Kees Cook wrote:
>>
>> On Mon, Oct 30, 2017 at 5:05 PM, Kees Cook wrote:
>>>
>>> On Mon, Oct 30, 2017 at 5:01 PM, wrote:
>>>>
>>>> There's a
On Mon, Oct 30, 2017 at 5:05 PM, Kees Cook wrote:
> On Mon, Oct 30, 2017 at 5:01 PM, wrote:
>> There's a separate change to loopback.c an old patch ARAIR that will
>> subtract use of the timer from loopback.c so you can skip that bit.
>
> Okay, cool. Since the ope
watchdog_wq_callback(void *data)
> void rtl_watch_dog_timer_callback(struct timer_list *t)
> {
> struct rtl_priv *rtlpriv = from_timer(rtlpriv, t,
> works.watchdog_timer);
> - struct ieee80211_hw *hw = rtlpriv->hw;
>
> queue_delayed_work(rtlpriv->works.r
On Mon, Oct 30, 2017 at 5:01 PM, wrote:
> On 30 October 2017 9:37:37 p.m. GMT+00:00, Kees Cook
> wrote:
>>On Mon, Oct 30, 2017 at 4:48 AM, Johan Hovold wrote:
>>> On Mon, Oct 30, 2017 at 11:44:22AM +, Bryan O'Donoghue wrote:
>>>>
>>>>
>
Anholt
Cc: Stefan Wahren
Cc: Michael Zoran
Cc: Keerthi Reddy
Cc: linux-rpi-ker...@lists.infradead.org
Cc: linux-arm-ker...@lists.infradead.org
Cc: de...@driverdev.osuosl.org
Signed-off-by: Kees Cook
Tested-by: Stefan Wahren
---
.../vc04_services/interface/vchiq_arm/vchiq_arm.c | 17
ns.
>
> That's correct.
>
>> I'll probably need at least a day to look at that, so it'll be the
>> weekend before I can really allocate time.
>
> Cool. I'm quite sure I just rebased your loopback conversion patch on my
> core timeout handli
er
Cc: greybus-...@lists.linaro.org
Cc: de...@driverdev.osuosl.org
Signed-off-by: Kees Cook
---
v2: Added back "get" in timer code, thanks to Bryan. :)
---
drivers/staging/greybus/loopback.c | 19 +--
drivers/staging/greybus/operation.c | 7 +++
2 files changed, 12 insertions(
On Tue, Oct 24, 2017 at 6:30 AM, Bryan O'Donoghue
wrote:
> On 24/10/17 14:14, Kees Cook wrote:
>>
>> On Tue, Oct 24, 2017 at 5:52 AM, Bryan O'Donoghue
>> wrote:
>>>
>>> On 24/10/17 13:47, Kees Cook wrote:
>>>>
>>&g
On Tue, Oct 24, 2017 at 5:52 AM, Bryan O'Donoghue
wrote:
> On 24/10/17 13:47, Kees Cook wrote:
>>
>> On Tue, Oct 24, 2017 at 2:40 AM, Bryan O'Donoghue
>> wrote:
>>>
>>> On 24/10/17 10:35, Bryan O'Donoghue wrote:
>>>>
>>>
On Tue, Oct 24, 2017 at 2:40 AM, Bryan O'Donoghue
wrote:
> On 24/10/17 10:35, Bryan O'Donoghue wrote:
>>
>> On 24/10/17 09:25, Kees Cook wrote:
>>>
>>> In preparation for unconditionally passing the struct timer_list pointer
>>> to
>>
org
Signed-off-by: Kees Cook
---
drivers/staging/rtl8723bs/core/rtw_mlme.c | 10 +--
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 15 +++---
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 23 +++
drivers/staging/rtl8723bs/core/rtw_recv.c
-rpi-ker...@lists.infradead.org
Cc: linux-arm-ker...@lists.infradead.org
Cc: de...@driverdev.osuosl.org
Signed-off-by: Kees Cook
---
.../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 13 +++--
.../staging/vc04_services/interface/vchiq_arm/vchiq_arm.h | 1 +
2 files changed
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: Greg Kroah-Hartman
Cc: "Tobin C. Harding"
Cc: de...@driverdev.osuosl.org
Signed-off-by:
er
Cc: greybus-...@lists.linaro.org
Cc: de...@driverdev.osuosl.org
Signed-off-by: Kees Cook
---
drivers/staging/greybus/loopback.c | 14 --
drivers/staging/greybus/operation.c | 7 +++
2 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/greybus/loopback.c
b/
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.
Signed-off-by: Kees Cook
---
drivers/staging/media/atomisp/i2c/lm3554.c | 8 +++-
1 file changed, 3
...@driverdev.osuosl.org
Signed-off-by: Kees Cook
---
drivers/staging/wlan-ng/hfa384x_usb.c | 29 +
drivers/staging/wlan-ng/prism2mgmt.h | 2 +-
drivers/staging/wlan-ng/prism2sta.c | 4 ++--
3 files changed, 16 insertions(+), 19 deletions(-)
diff --git a/drivers/staging
On Tue, Oct 17, 2017 at 1:23 AM, Sakari Ailus wrote:
> On Mon, Oct 16, 2017 at 04:24:56PM -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()
>&
1 - 100 of 152 matches
Mail list logo