lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 07 Dec 2020 01:15:49 +0100 From: Thomas Gleixner <tglx@...utronix.de> To: Corentin Labbe <clabbe.montjoie@...il.com> Cc: herbert@...dor.apana.org.au, mripard@...nel.org, wens@...e.org, linux-arm-kernel@...ts.infradead.org, linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org, Jens Axboe <axboe@...nel.dk>, linux-mm@...ck.org, Andrew Morton <akpm@...uxfoundation.org>, Julia Lawall <julia.lawall@...6.fr>, Matthew Wilcox <willy@...radead.org> Subject: Re: crypto: sun4i-ss: error with kmap On Sun, Dec 06 2020 at 22:40, Corentin Labbe wrote: > On Sat, Dec 05, 2020 at 08:48:15PM +0100, Thomas Gleixner wrote: >> So this maps two pages and unmaps the first one. That's all called from >> sun4i_ss_opti_poll() and the bug is clearly visible there: >> >> sg_miter_next(&mi); >> sg_miter_next(&mo); >> >> release_ss: >> sg_miter_stop(&mi); >> sg_miter_stop(&mo); >> >> Written by yourself :) Same issue in sun4i_ss_cipher_poll() >> >> Fix below. >> > > Unfortunatly, the crash still happen with the fix. > See http://kernel.montjoie.ovh/131321.log And why are you not looking for the reason of this problem in your own code yourself? It's not a regression caused by my work. Turn on CONFIG_DEBUG_HIGHMEM on 5.10-rcX or older kernels and you will get the very same crashes. My work just made these checks unconditional. This was broken forever and it's not my problem that you did not enable mandatory debug options when developing this thing. I gave you tons of hints by now how to debug this and what to look for. Obviously I overlooked something and here is the final hint: sg_miter_next(&mi); sg_miter_next(&mo); do { .... if (cond1) sg_miter_next(&mi); <--- HINT .... if (cond2) sg_miter_next(&mo); release_ss: sg_miter_stop(&mi); sg_miter_stop(&mo); So yes, I overlooked the obvious, but as I said above it's not something which my is failing due to my changes. It was broken forever, it just was not tested properly. Don't blame the messenger. My knowledge about how to use nested sg_miter correctly is close to zero. I can and did explain you the rules of kmap_atomic/local() but that's it. Thanks, tglx
Powered by blists - more mailing lists