Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 259332
Alias:
Product:
Component:
Status: CLOSED
Resolution: FIXED
Assigned To: Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Christopher Head <chead@telus.net>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
cryptoapi.patch The patch from git patch Christopher Head 2009-02-17 08:55 0000 826 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 259332 depends on: Show dependency tree
Bug 259332 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.




View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2009-02-17 08:54 0000
Hardened sources 2.6.28 breaks crypsetup for dmcrypt due to an apparent race
condition which has been fixed in 2.6.29-rc5. Since there are no hardened
patches available yet for 2.6.29, is there any chance of having this (very
small!) patch backported into 2.6.28? I'm using locally-hacked sources right
now, and I'm sure lots of people could benefit from this patch.

I will attach the patch file and GIT commit info momentarily.

Reproducible: Always

Steps to Reproduce:

------- Comment #1 From Christopher Head 2009-02-17 08:54:20 0000 -------
Commit comment:
commit b8e15992b420d09dae831125a623c474c8637cee
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date:   Wed Jan 28 14:09:59 2009 +1100

    crypto: api - Fix algorithm test race that broke aead initialisation

    When we complete a test we'll notify everyone waiting on it, drop
    the mutex, and then remove the test larval (after reacquiring the
    mutex).  If one of the notified parties tries to register another
    algorithm with the same driver name prior to the removal of the
    test larval, they will fail with EEXIST as only one algorithm of
    a given name can be tested at any time.

    This broke the initialisation of aead and givcipher algorithms as
    they will register two algorithms with the same driver name, in
    sequence.

    This patch fixes the problem by marking the larval as dead before
    we drop the mutex, and also ignoring all dead or dying algorithms
    on the registration path.

    Tested-by: Andreas Steffen <andreas.steffen@strongswan.org>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

------- Comment #2 From Christopher Head 2009-02-17 08:55:18 0000 -------
Created an attachment (id=182315) [details]
The patch from git

------- Comment #3 From Kerin Millar 2009-02-21 21:11:50 0000 -------
Thanks. I've submitted this upstream with a view to having it incorporated in
the next 2.6.28-stable tree release.

------- Comment #4 From Mike Pagano 2009-02-22 01:39:31 0000 -------
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff_plain;h=b8e15992b420d09dae831125a623c474c8637cee

------- Comment #5 From Kerin Millar 2009-02-22 02:02:45 0000 -------
Herbert's given it the thumbs up, so please add it to the next genpatches
release if that occurs before the next stable tree release.

------- Comment #6 From Kerin Millar 2009-02-22 02:05:10 0000 -------
Oops, I was oblivious to the InSVN keyword whilst writing the previous comment
:)

------- Comment #7 From Mike Pagano 2009-03-08 11:32:33 0000 -------
Fixed in gentoo-sources-2.6.28-r3

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug