archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <>
To: Corentin Labbe <>
	Jens Axboe <>,, Andrew Morton <>,
	Julia Lawall <>,Matthew Wilcox
Subject: Re: crypto: sun4i-ss: error with kmap
Date: Mon, 07 Dec 2020 01:15:49 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <20201206214053.GA8458@Red>

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

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:


        do {
           if (cond1)
               sg_miter_next(&mi);      <--- HINT
           if (cond2)

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.



  reply	other threads:[~2020-12-07  0:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20201201130102.GA23461@Red>
     [not found] ` <>
     [not found]   ` <20201201135252.GA9584@Red>
     [not found]     ` <>
     [not found]       ` <20201201144529.GA6786@Red>
     [not found]         ` <>
     [not found]           ` <20201202195501.GA29296@Red>
     [not found]             ` <>
     [not found]               ` <20201203173846.GA16207@Red>
2020-12-03 23:34                 ` crypto: sun4i-ss: error with kmap Thomas Gleixner
2020-12-04 13:26                   ` Corentin Labbe
2020-12-04 15:08                     ` Thomas Gleixner
2020-12-04 19:27                       ` Corentin Labbe
2020-12-04 20:58                         ` Thomas Gleixner
2020-12-05 18:43                           ` Corentin Labbe
2020-12-05 19:48                             ` Thomas Gleixner
2020-12-05 20:16                               ` Julia Lawall
2020-12-06 21:40                               ` Corentin Labbe
2020-12-07  0:15                                 ` Thomas Gleixner [this message]
2020-12-07 12:18                                   ` Corentin Labbe
2020-12-07 15:53                                     ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).