* request for 4.14-stable: 293edc27f8bc ("stating: ccree: revert "staging: ccree: fix leak of import() after init()"")
@ 2019-04-07 15:40 Sudip Mukherjee
2019-04-08 14:09 ` Sasha Levin
0 siblings, 1 reply; 5+ messages in thread
From: Sudip Mukherjee @ 2019-04-07 15:40 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: stable, Gilad Ben-Yossef
[-- Attachment #1: Type: text/plain, Size: 90 bytes --]
Hi Greg,
This was missing in 4.14-stable. Please apply to your queue.
--
Regards
Sudip
[-- Attachment #2: 0001-stating-ccree-revert-staging-ccree-fix-leak-of-impor.patch --]
[-- Type: text/x-diff, Size: 1861 bytes --]
From aea00e5caac52ffe575b3c94d6bd47703ab44b0e Mon Sep 17 00:00:00 2001
From: Gilad Ben-Yossef <gilad@benyossef.com>
Date: Sun, 7 Jan 2018 12:14:22 +0000
Subject: [PATCH] stating: ccree: revert "staging: ccree: fix leak of import() after init()"
commit 293edc27f8bc8a44978e9e95902b07b74f1c7523 upstream
This reverts commit c5f39d07860c ("staging: ccree: fix leak of import()
after init()") and commit aece09024414 ("staging: ccree: Uninitialized
return in ssi_ahash_import()").
This is the wrong solution and ends up relying on uninitialized memory,
although it was not obvious to me at the time.
Cc: stable@vger.kernel.org
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
---
drivers/staging/ccree/ssi_hash.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c
index e266a70a1b32..13291aeaf350 100644
--- a/drivers/staging/ccree/ssi_hash.c
+++ b/drivers/staging/ccree/ssi_hash.c
@@ -1781,7 +1781,7 @@ static int ssi_ahash_import(struct ahash_request *req, const void *in)
struct device *dev = &ctx->drvdata->plat_dev->dev;
struct ahash_req_ctx *state = ahash_request_ctx(req);
u32 tmp;
- int rc = 0;
+ int rc;
memcpy(&tmp, in, sizeof(u32));
if (tmp != CC_EXPORT_MAGIC) {
@@ -1790,12 +1790,9 @@ static int ssi_ahash_import(struct ahash_request *req, const void *in)
}
in += sizeof(u32);
- /* call init() to allocate bufs if the user hasn't */
- if (!state->digest_buff) {
- rc = ssi_hash_init(state, ctx);
- if (rc)
- goto out;
- }
+ rc = ssi_hash_init(state, ctx);
+ if (rc)
+ goto out;
dma_sync_single_for_cpu(dev, state->digest_buff_dma_addr,
ctx->inter_digestsize, DMA_BIDIRECTIONAL);
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: request for 4.14-stable: 293edc27f8bc ("stating: ccree: revert "staging: ccree: fix leak of import() after init()"")
2019-04-07 15:40 request for 4.14-stable: 293edc27f8bc ("stating: ccree: revert "staging: ccree: fix leak of import() after init()"") Sudip Mukherjee
@ 2019-04-08 14:09 ` Sasha Levin
2019-04-11 11:40 ` Gilad Ben-Yossef
0 siblings, 1 reply; 5+ messages in thread
From: Sasha Levin @ 2019-04-08 14:09 UTC (permalink / raw)
To: Sudip Mukherjee; +Cc: Greg Kroah-Hartman, stable, Gilad Ben-Yossef
On Sun, Apr 07, 2019 at 04:40:08PM +0100, Sudip Mukherjee wrote:
>Hi Greg,
>
>This was missing in 4.14-stable. Please apply to your queue.
Gilad, could you ack the backport?
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: request for 4.14-stable: 293edc27f8bc ("stating: ccree: revert "staging: ccree: fix leak of import() after init()"")
2019-04-08 14:09 ` Sasha Levin
@ 2019-04-11 11:40 ` Gilad Ben-Yossef
2019-04-11 11:57 ` Sudip Mukherjee
0 siblings, 1 reply; 5+ messages in thread
From: Gilad Ben-Yossef @ 2019-04-11 11:40 UTC (permalink / raw)
To: Sasha Levin; +Cc: Sudip Mukherjee, Greg Kroah-Hartman, stable, Gilad Ben-Yossef
Hi,
On Mon, Apr 8, 2019 at 5:09 PM Sasha Levin <sashal@kernel.org> wrote:
>
> On Sun, Apr 07, 2019 at 04:40:08PM +0100, Sudip Mukherjee wrote:
> >Hi Greg,
> >
> >This was missing in 4.14-stable. Please apply to your queue.
>
> Gilad, could you ack the backport?
>
There is nothing wrong in the backport itself but It does not seem
useful since there were many changes on top if this one since the
driver matured out of the staging area, so I wonder if it is useful to
take it...
Gilad
--
Gilad Ben-Yossef
Chief Coffee Drinker
values of β will give rise to dom!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: request for 4.14-stable: 293edc27f8bc ("stating: ccree: revert "staging: ccree: fix leak of import() after init()"")
2019-04-11 11:40 ` Gilad Ben-Yossef
@ 2019-04-11 11:57 ` Sudip Mukherjee
2019-04-11 14:36 ` Sasha Levin
0 siblings, 1 reply; 5+ messages in thread
From: Sudip Mukherjee @ 2019-04-11 11:57 UTC (permalink / raw)
To: Gilad Ben-Yossef; +Cc: Sasha Levin, Sudip Mukherjee, Greg Kroah-Hartman, Stable
On Thu, Apr 11, 2019 at 12:40 PM Gilad Ben-Yossef <gilad@benyossef.com> wrote:
>
> Hi,
>
> On Mon, Apr 8, 2019 at 5:09 PM Sasha Levin <sashal@kernel.org> wrote:
> >
> > On Sun, Apr 07, 2019 at 04:40:08PM +0100, Sudip Mukherjee wrote:
> > >Hi Greg,
> > >
> > >This was missing in 4.14-stable. Please apply to your queue.
> >
> > Gilad, could you ack the backport?
> >
>
> There is nothing wrong in the backport itself but It does not seem
> useful since there were many changes on top if this one since the
> driver matured out of the staging area, so I wonder if it is useful to
> take it...
It matured out of staging from v4.17 and if I consider v4.14-stable,
it is still in staging. :)
--
Regards
Sudip
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: request for 4.14-stable: 293edc27f8bc ("stating: ccree: revert "staging: ccree: fix leak of import() after init()"")
2019-04-11 11:57 ` Sudip Mukherjee
@ 2019-04-11 14:36 ` Sasha Levin
0 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2019-04-11 14:36 UTC (permalink / raw)
To: Sudip Mukherjee; +Cc: Gilad Ben-Yossef, Greg Kroah-Hartman, Stable
On Thu, Apr 11, 2019 at 12:57:38PM +0100, Sudip Mukherjee wrote:
>On Thu, Apr 11, 2019 at 12:40 PM Gilad Ben-Yossef <gilad@benyossef.com> wrote:
>>
>> Hi,
>>
>> On Mon, Apr 8, 2019 at 5:09 PM Sasha Levin <sashal@kernel.org> wrote:
>> >
>> > On Sun, Apr 07, 2019 at 04:40:08PM +0100, Sudip Mukherjee wrote:
>> > >Hi Greg,
>> > >
>> > >This was missing in 4.14-stable. Please apply to your queue.
>> >
>> > Gilad, could you ack the backport?
>> >
>>
>> There is nothing wrong in the backport itself but It does not seem
>> useful since there were many changes on top if this one since the
>> driver matured out of the staging area, so I wonder if it is useful to
>> take it...
>
>It matured out of staging from v4.17 and if I consider v4.14-stable,
>it is still in staging. :)
I've queued it up, thank you.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-04-11 14:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-07 15:40 request for 4.14-stable: 293edc27f8bc ("stating: ccree: revert "staging: ccree: fix leak of import() after init()"") Sudip Mukherjee
2019-04-08 14:09 ` Sasha Levin
2019-04-11 11:40 ` Gilad Ben-Yossef
2019-04-11 11:57 ` Sudip Mukherjee
2019-04-11 14:36 ` Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox