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
*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
; > >
> > > 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
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
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
() 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
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
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:
> >
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
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
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
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
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 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
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
? (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
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
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
__
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
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
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
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
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
>
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
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
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
>
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
&
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,
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
: Jens Axboe
Cc: net...@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
---
drivers/block/amiflop.c
With timer initialization made unconditional, there is no reason to
make del_timer_sync() calls conditionally, there by removing the test
of the .data field.
Cc: Ian Abbott
Cc: H Hartley Sweeten
Cc: Greg Kroah-Hartman
Cc: de...@driverdev.osuosl.org
Signed-off-by: Kees Cook
---
drivers
wirel...@vger.kernel.org
Cc: de...@driverdev.osuosl.org
Cc: Thomas Gleixner
Signed-off-by: Kees Cook
---
This requires commit 686fef928bba ("timer: Prepare to change timer
callback argument type") in v4.14-rc3, but should be otherwise
stand-alone.
---
drivers/staging/wilc1000/host_i
Cc: Varsha Rao
Cc: Julia Lawall
Cc: Aleksey Kurbatov
Cc: Vijai Kumar K
Cc: Wei Yongjun
Cc: "Raphaël Beamonte"
Cc: Jannik Becher
Cc: Joseph Wright
Cc: de...@driverdev.osuosl.org
Cc: Thomas Gleixner
Signed-off-by: Kees Cook
---
This requires commit 686fef928bba ("timer: Pr
...@driverdev.osuosl.org
Cc: Thomas Gleixner
Signed-off-by: Kees Cook
---
This requires commit 686fef928bba ("timer: Prepare to change timer
callback argument type") in v4.14-rc3, but should be otherwise
stand-alone.
---
drivers/staging/rtl8192u/ieee80211/ieee80211.h | 6 +--
.../staging/rtl8192u
: linux-me...@vger.kernel.org
Cc: de...@driverdev.osuosl.org
Cc: Thomas Gleixner
Signed-off-by: Kees Cook
---
This requires commit 686fef928bba ("timer: Prepare to change timer
callback argument type") in v4.14-rc3, but should be otherwise
stand-alone.
---
drivers/staging/media/atomisp/pc
: Yamanappagouda Patil
Cc: Luca Ceresoli
Cc: Victor Carvajal
Cc: Sebastian Haas
Cc: de...@driverdev.osuosl.org
Cc: Thomas Gleixner
Signed-off-by: Kees Cook
---
This requires commit 686fef928bba ("timer: Prepare to change timer
callback argument type") in v4.14-rc3, but should be other
: Julia Lawall
Cc: "David S. Miller"
Cc: Johannes Berg
Cc: Yamanappagouda Patil
Cc: Georgiana Rodica Chelu
Cc: Colin Ian King
Cc: Baoyou Xie
Cc: de...@driverdev.osuosl.org
Cc: Thomas Gleixner
Signed-off-by: Kees Cook
---
This requires commit 686fef928bba ("timer: Prepare
: Jens Axboe
Cc: net...@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
Cc: Varsha Rao
Cc: Julia Lawall
Cc: Aleksey Kurbatov
Cc: Vijai Kumar K
Cc: Wei Yongjun
Cc: "Raphaël Beamonte"
Cc: Jannik Becher
Cc: Joseph Wright
Cc: de...@driverdev.osuosl.org
Signed-off-by: Kees Cook
---
drivers/staging/rtl8712/mlme_linux.c
wirel...@vger.kernel.org
Cc: de...@driverdev.osuosl.org
Signed-off-by: Kees Cook
---
drivers/staging/wilc1000/host_interface.c | 39 +--
drivers/staging/wilc1000/host_interface.h | 5 +++
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 +--
3 files change
: Arnd Bergmann
Cc: Baoyou Xie
Cc: Tuomo Rinne
Cc: Colin Ian King
Cc: de...@driverdev.osuosl.org
Signed-off-by: Kees Cook
---
drivers/staging/rtl8192u/ieee80211/ieee80211.h | 6 +--
.../staging/rtl8192u/ieee80211/ieee80211_crypt.c | 4 +-
.../staging/rtl8192u/ieee80211
-transaction.
Cc: Greg Kroah-Hartman
Cc: Bhumika Goyal
Cc: de...@driverdev.osuosl.org
Signed-off-by: Kees Cook
---
drivers/staging/fwserial/fwserial.c | 16
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/fwserial/fwserial.c
b/drivers/staging/fwserial
: Yamanappagouda Patil
Cc: Luca Ceresoli
Cc: Victor Carvajal
Cc: Sebastian Haas
Cc: de...@driverdev.osuosl.org
Signed-off-by: Kees Cook
---
drivers/staging/rtl8188eu/core/rtw_led.c | 7 +++
drivers/staging/rtl8188eu/core/rtw_mlme.c| 15 +--
drivers/staging
Cc: de...@driverdev.osuosl.org
Signed-off-by: Kees Cook
---
drivers/staging/dgnc/dgnc_driver.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/dgnc/dgnc_driver.c
b/drivers/staging/dgnc/dgnc_driver.c
index c1b6079384e9..d9bf5da1b8e5 100644
--- a/drivers
Lawall
Cc: Yamanappagouda Patil
Cc: "David S. Miller"
Cc: Johannes Berg
Cc: Georgiana Rodica Chelu
Cc: Colin Ian King
Cc: Baoyou Xie
Cc: de...@driverdev.osuosl.org
Signed-off-by: Kees Cook
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 25 ++---
drivers/staging/rtl8192e
Kroah-Hartman
Cc: de...@driverdev.osuosl.org
Signed-off-by: Kees Cook
---
drivers/staging/comedi/drivers/comedi_test.c | 18 ++
drivers/staging/comedi/drivers/das16.c | 11 ++-
drivers/staging/comedi/drivers/jr3_pci.c | 10 ++
3 files changed, 22 insertions
: linux-me...@vger.kernel.org
Cc: de...@driverdev.osuosl.org
Signed-off-by: Kees Cook
---
drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 13 -
drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.h | 6 +-
.../media/atomisp/pci/atomisp2/atomisp_compat_css20.c | 2
Shih
Cc: shaofu
Cc: de...@driverdev.osuosl.org
Signed-off-by: Kees Cook
---
drivers/staging/rtlwifi/base.c | 21 +++--
drivers/staging/rtlwifi/base.h | 4 ++--
drivers/staging/rtlwifi/core.c | 2 +-
drivers/staging/rtlwifi/phydm
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()
>&
...@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
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
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/
-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
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
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
>>
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 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
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(
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
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
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:
>>>>
>>>>
>
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: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
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
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
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
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
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
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
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
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
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
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
=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
: 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
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
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
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
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 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
t;> init.
>> This protects the data structure from accidental corruption.
>>
>> Suggested-by: Kees Cook
>> Signed-off-by: Jess Frazelle
>> ---
>> drivers/pci/host/pci-hyperv.c | 2 +-
>> drivers/pci/host/vmd.c| 2 +-
>> drivers/pci/ms
);
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
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
x_urb = NULL;
> -
> DMESGE("Endpoint Alloc Failure");
> - return -ENOMEM;
> + goto out_release_mem;
> }
>
> netdev_dbg(dev, "End of initendpoints\n");
>
Calling kthread_run with a single name parameter causes it to be handled
as a format string. Since the uisthread interface lacks format parameters,
use "%s" to avoid any potential accidents from callers passing in dynamic
string content.
Signed-off-by: Kees Cook
---
drivers/stag
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
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
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
"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 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
1 - 100 of 152 matches
Mail list logo