Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1603510

Re: [PATCH 1/4] crypto: s5p-sss - Close possible race for completed requests

From Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/4] crypto: s5p-sss - Close possible race for completed requests
Date 2017-03-17 19:00 +0100
Message-ID <tm4kq-1GF-25@gated-at.bofh.it> (permalink)
References <tm1we-80O-19@gated-at.bofh.it> <tm1PA-8o8-9@gated-at.bofh.it> <tm4kq-1GF-27@gated-at.bofh.it> <tm1PA-8o8-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Friday, March 17, 2017 04:49:19 PM Krzysztof Kozlowski wrote:
> Driver is capable of handling only one request at a time and it stores
> it in its state container struct s5p_aes_dev.  This stored request must be
> protected between concurrent invocations (e.g. completing current
> request and scheduling new one).  Combination of lock and "busy" field
> is used for that purpose.
> 
> When "busy" field is true, the driver will not accept new request thus
> it will not overwrite currently handled data.
> 
> However commit 28b62b145868 ("crypto: s5p-sss - Fix spinlock recursion
> on LRW(AES)") moved some of the write to "busy" field out of a lock
> protected critical section.  This might lead to potential race between
> completing current request and scheduling a new one.  Effectively the
> request completion might try to operate on new crypto request.
> 
> Cc: <stable@vger.kernel.org> # v4.10.x
> Fixes: 28b62b145868 ("crypto: s5p-sss - Fix spinlock recursion on LRW(AES)")
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/4] crypto: s5p-sss - Fix and minor improvements Krzysztof Kozlowski <krzk@kernel.org> - 2017-03-17 16:00 +0100
  [PATCH 2/4] crypto: s5p-sss - Remove unused variant field from state container Krzysztof Kozlowski <krzk@kernel.org> - 2017-03-17 16:20 +0100
    Re: [PATCH 2/4] crypto: s5p-sss - Remove unused variant field from  state container Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2017-03-17 19:00 +0100
  [PATCH 1/4] crypto: s5p-sss - Close possible race for completed requests Krzysztof Kozlowski <krzk@kernel.org> - 2017-03-17 16:20 +0100
    Re: [PATCH 1/4] crypto: s5p-sss - Close possible race for completed  requests Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2017-03-17 19:00 +0100
  Re: [PATCH 0/4] crypto: s5p-sss - Fix and minor improvements Herbert Xu <herbert@gondor.apana.org.au> - 2017-03-24 15:20 +0100

csiph-web