All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ard Biesheuvel <ardb@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux Crypto Mailing List <linux-crypto@vger.kernel.org>
Subject: Re: [PATCH] crypto: lib/chacha20poly1305 - Set SG_MITER_ATOMIC unconditionally
Date: Mon, 14 Sep 2020 23:55:53 -0700	[thread overview]
Message-ID: <CAHk-=wie0Kb-+XOZNasoay7AKCaQ8Ew8=LyvWTBeiPXC3v2GSA@mail.gmail.com> (raw)
In-Reply-To: <CAHk-=wgX=ynJAXYYOAM7J8Tee8acERrGOopNu6ZcLN=SEXdGKA@mail.gmail.com>

On Mon, Sep 14, 2020 at 11:45 PM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> I mean, I did find one case that didn't set it (cb710-mmc.c), but
> pattern-matching to the other mmc cases, that one looks like it
> _should_ have set the atomic flag like everybody else did.

Oh, and immediately after sending that out I notice
nvmet_bdev_execute_rw(), which does seem to make allocations inside
that sg_miter loop.

So those non-atomic cases do clearly exist.

It does make the case for why kmap_atomic() wants to have the
debugging code. It will "just work" on 64-bit to do it wrong, because
the address doesn't become invalid just because you sleep or get
rescheduled. But then the code that every developer tests (since
developers tend to run on good hardware) might be completely broken on
bad old hardware.

Maybe we could hide it behind a debug option, at least.

Or, alterantively, introduce a new "debug_preempt_count" that doesn't
actually disable preemption, but warns about actual sleeping
operations..

             Linus

  reply	other threads:[~2020-09-15  6:56 UTC|newest]

Thread overview: 282+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-14 20:42 [patch 00/13] preempt: Make preempt count unconditional Thomas Gleixner
2020-09-14 20:42 ` Thomas Gleixner
2020-09-14 20:42 ` [Intel-gfx] " Thomas Gleixner
2020-09-14 20:42 ` Thomas Gleixner
2020-09-14 20:42 ` Thomas Gleixner
2020-09-14 20:42 ` [patch 01/13] lib/debug: Remove pointless ARCH_NO_PREEMPT dependencies Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42   ` [Intel-gfx] " Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42 ` [patch 02/13] preempt: Make preempt count unconditional Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42   ` [Intel-gfx] " Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42 ` [patch 03/13] preempt: Clenaup PREEMPT_COUNT leftovers Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42   ` [Intel-gfx] " Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-16 10:56   ` Valentin Schneider
2020-09-16 10:56     ` Valentin Schneider
2020-09-16 10:56     ` [Intel-gfx] " Valentin Schneider
2020-09-16 10:56     ` Valentin Schneider
2020-09-14 20:42 ` [patch 04/13] lockdep: " Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42   ` [Intel-gfx] " Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-15 16:11   ` Will Deacon
2020-09-15 16:11     ` Will Deacon
2020-09-15 16:11     ` [Intel-gfx] " Will Deacon
2020-09-15 16:11     ` Will Deacon
2020-09-15 16:11     ` Will Deacon
2020-09-14 20:42 ` [patch 05/13] mm/pagemap: " Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42   ` [Intel-gfx] " Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-15  0:52   ` kernel test robot
2020-09-15  0:52     ` kernel test robot
2020-09-15  2:40   ` kernel test robot
2020-09-15  5:28   ` kernel test robot
2020-09-14 20:42 ` [patch 06/13] locking/bitspinlock: " Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42   ` [Intel-gfx] " Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-15 16:10   ` Will Deacon
2020-09-15 16:10     ` Will Deacon
2020-09-15 16:10     ` [Intel-gfx] " Will Deacon
2020-09-15 16:10     ` Will Deacon
2020-09-15 16:10     ` Will Deacon
2020-09-14 20:42 ` [patch 07/13] uaccess: " Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42   ` [Intel-gfx] " Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42 ` [patch 08/13] sched: " Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42   ` [Intel-gfx] " Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-16 10:56   ` Valentin Schneider
2020-09-16 10:56     ` Valentin Schneider
2020-09-16 10:56     ` [Intel-gfx] " Valentin Schneider
2020-09-16 10:56     ` Valentin Schneider
2020-09-14 20:42 ` [patch 09/13] ARM: " Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42   ` [Intel-gfx] " Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42 ` [patch 10/13] xtensa: " Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42   ` [Intel-gfx] " Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42 ` [patch 11/13] drm/i915: " Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42   ` [Intel-gfx] " Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42 ` [patch 12/13] rcutorture: " Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42   ` [Intel-gfx] " Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42 ` [patch 13/13] preempt: Remove PREEMPT_COUNT from Kconfig Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42   ` [Intel-gfx] " Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:42   ` Thomas Gleixner
2020-09-14 20:54 ` [patch 00/13] preempt: Make preempt count unconditional Steven Rostedt
2020-09-14 20:54   ` Steven Rostedt
2020-09-14 20:54   ` [Intel-gfx] " Steven Rostedt
2020-09-14 20:54   ` Steven Rostedt
2020-09-14 20:54   ` Steven Rostedt
2020-09-14 20:59 ` Linus Torvalds
2020-09-14 20:59   ` Linus Torvalds
2020-09-14 20:59   ` [Intel-gfx] " Linus Torvalds
2020-09-14 20:59   ` Linus Torvalds
2020-09-14 20:59   ` Linus Torvalds
2020-09-14 21:55   ` Thomas Gleixner
2020-09-14 21:55     ` Thomas Gleixner
2020-09-14 21:55     ` Thomas Gleixner
2020-09-14 21:55     ` [Intel-gfx] " Thomas Gleixner
2020-09-14 21:55     ` Thomas Gleixner
2020-09-14 21:55     ` Thomas Gleixner
2020-09-14 22:24     ` Linus Torvalds
2020-09-14 22:24       ` Linus Torvalds
2020-09-14 22:24       ` [Intel-gfx] " Linus Torvalds
2020-09-14 22:24       ` Linus Torvalds
2020-09-14 22:37       ` Linus Torvalds
2020-09-14 22:37         ` Linus Torvalds
2020-09-14 22:37         ` [Intel-gfx] " Linus Torvalds
2020-09-14 22:37         ` Linus Torvalds
2020-09-15  3:21         ` [PATCH] crypto: lib/chacha20poly1305 - Set SG_MITER_ATOMIC unconditionally Herbert Xu
2020-09-15  3:21           ` Herbert Xu
2020-09-15  3:21           ` Herbert Xu
2020-09-15  3:21           ` [Intel-gfx] " Herbert Xu
2020-09-15  3:21           ` Herbert Xu
2020-09-15  3:30         ` Herbert Xu
2020-09-15  6:03           ` Ard Biesheuvel
2020-09-15  6:40             ` Herbert Xu
2020-09-15  6:45           ` Linus Torvalds
2020-09-15  6:55             ` Linus Torvalds [this message]
2020-09-15  7:05               ` Herbert Xu
2020-09-15  7:10                 ` Ard Biesheuvel
2020-09-15  9:34                 ` Thomas Gleixner
2020-09-15 10:02                   ` Ard Biesheuvel
2020-09-15 10:05                     ` Herbert Xu
2020-09-15 10:08                       ` Ard Biesheuvel
2020-09-15 10:10                         ` Herbert Xu
2020-09-15 19:04                           ` Thomas Gleixner
2020-09-15  7:08               ` Ard Biesheuvel
2020-09-15  6:20         ` [patch 00/13] preempt: Make preempt count unconditional Ard Biesheuvel
2020-09-15  6:20           ` Ard Biesheuvel
2020-09-15  6:20           ` [Intel-gfx] " Ard Biesheuvel
2020-09-15  6:20           ` Ard Biesheuvel
2020-09-15  6:20           ` Ard Biesheuvel
2020-09-15  6:22           ` Herbert Xu
2020-09-15  6:22             ` Herbert Xu
2020-09-15  6:22             ` Herbert Xu
2020-09-15  6:22             ` [Intel-gfx] " Herbert Xu
2020-09-15  6:22             ` Herbert Xu
2020-09-15  6:39             ` Linus Torvalds
2020-09-15  6:39               ` Linus Torvalds
2020-09-15  6:39               ` [Intel-gfx] " Linus Torvalds
2020-09-15  6:39               ` Linus Torvalds
2020-09-15  6:39               ` Linus Torvalds
2020-09-15  7:24               ` Thomas Gleixner
2020-09-15  7:24                 ` Thomas Gleixner
2020-09-15  7:24                 ` [Intel-gfx] " Thomas Gleixner
2020-09-15 17:29                 ` Linus Torvalds
2020-09-15 17:29                   ` Linus Torvalds
2020-09-15 17:29                   ` [Intel-gfx] " Linus Torvalds
2020-09-15 17:29                   ` Linus Torvalds
2020-09-15 17:29                   ` Linus Torvalds
2020-09-15  8:39       ` Thomas Gleixner
2020-09-15  8:39         ` Thomas Gleixner
2020-09-15  8:39         ` Thomas Gleixner
2020-09-15  8:39         ` [Intel-gfx] " Thomas Gleixner
2020-09-15  8:39         ` Thomas Gleixner
2020-09-15 17:35         ` Linus Torvalds
2020-09-15 17:35           ` Linus Torvalds
2020-09-15 17:35           ` [Intel-gfx] " Linus Torvalds
2020-09-15 17:35           ` Linus Torvalds
2020-09-15 17:35           ` Linus Torvalds
2020-09-15 19:57           ` Thomas Gleixner
2020-09-15 19:57             ` Thomas Gleixner
2020-09-15 19:57             ` Thomas Gleixner
2020-09-15 19:57             ` [Intel-gfx] " Thomas Gleixner
2020-09-15 19:57             ` Thomas Gleixner
2020-09-15 19:57             ` Thomas Gleixner
2020-09-16 18:34             ` Linus Torvalds
2020-09-16 18:34               ` Linus Torvalds
2020-09-16 18:34               ` [Intel-gfx] " Linus Torvalds
2020-09-16 18:34               ` Linus Torvalds
2020-09-16 18:34               ` Linus Torvalds
2020-09-16  7:37           ` Daniel Vetter
2020-09-16  7:37             ` Daniel Vetter
2020-09-16  7:37             ` [Intel-gfx] " Daniel Vetter
2020-09-16  7:37             ` Daniel Vetter
2020-09-16  7:37             ` Daniel Vetter
2020-09-16 15:29             ` Paul E. McKenney
2020-09-16 15:29               ` Paul E. McKenney
2020-09-16 15:29               ` [Intel-gfx] " Paul E. McKenney
2020-09-16 15:29               ` Paul E. McKenney
2020-09-16 15:29               ` Paul E. McKenney
2020-09-16 18:32               ` Linus Torvalds
2020-09-16 18:32                 ` Linus Torvalds
2020-09-16 18:32                 ` [Intel-gfx] " Linus Torvalds
2020-09-16 18:32                 ` Linus Torvalds
2020-09-16 18:32                 ` Linus Torvalds
2020-09-16 20:43                 ` Paul E. McKenney
2020-09-16 20:43                   ` Paul E. McKenney
2020-09-16 20:43                   ` [Intel-gfx] " Paul E. McKenney
2020-09-16 20:43                   ` Paul E. McKenney
2020-09-16 20:43                   ` Paul E. McKenney
2020-09-17  6:38                 ` Ard Biesheuvel
2020-09-17  6:38                   ` Ard Biesheuvel
2020-09-17  6:38                   ` [Intel-gfx] " Ard Biesheuvel
2020-09-17  6:38                   ` Ard Biesheuvel
2020-09-17  6:38                   ` Ard Biesheuvel
2020-09-16 20:29               ` Daniel Vetter
2020-09-16 20:29                 ` Daniel Vetter
2020-09-16 20:29                 ` [Intel-gfx] " Daniel Vetter
2020-09-16 20:29                 ` Daniel Vetter
2020-09-16 20:29                 ` Daniel Vetter
2020-09-16 20:58                 ` Paul E. McKenney
2020-09-16 20:58                   ` Paul E. McKenney
2020-09-16 20:58                   ` [Intel-gfx] " Paul E. McKenney
2020-09-16 20:58                   ` Paul E. McKenney
2020-09-16 20:58                   ` Paul E. McKenney
2020-09-16 21:43                   ` Daniel Vetter
2020-09-16 21:43                     ` Daniel Vetter
2020-09-16 21:43                     ` [Intel-gfx] " Daniel Vetter
2020-09-16 21:43                     ` Daniel Vetter
2020-09-16 21:43                     ` Daniel Vetter
2020-09-16 22:39                     ` Paul E. McKenney
2020-09-16 22:39                       ` Paul E. McKenney
2020-09-16 22:39                       ` [Intel-gfx] " Paul E. McKenney
2020-09-16 22:39                       ` Paul E. McKenney
2020-09-16 22:39                       ` Paul E. McKenney
2020-09-17  7:52                       ` Daniel Vetter
2020-09-17  7:52                         ` Daniel Vetter
2020-09-17  7:52                         ` [Intel-gfx] " Daniel Vetter
2020-09-17  7:52                         ` Daniel Vetter
2020-09-17  7:52                         ` Daniel Vetter
2020-09-17 16:28                         ` Paul E. McKenney
2020-09-17 16:28                           ` Paul E. McKenney
2020-09-17 16:28                           ` [Intel-gfx] " Paul E. McKenney
2020-09-17 16:28                           ` Paul E. McKenney
2020-09-17 16:28                           ` Paul E. McKenney
2020-09-29  8:19                     ` Michal Hocko
2020-09-29  8:23                       ` [Intel-gfx] " Michal Hocko
2020-09-29  8:23                       ` Michal Hocko
2020-09-29  8:23                       ` Michal Hocko
2020-09-29  8:23                       ` Michal Hocko
2020-09-29  8:21                       ` [Intel-gfx] " Michal Hocko
2020-09-29  8:21                       ` Michal Hocko
2020-09-29  8:21                       ` Michal Hocko
2020-09-29  8:21                       ` Michal Hocko
2020-09-29  8:20                       ` [Intel-gfx] " Michal Hocko
2020-09-29  8:20                       ` Michal Hocko
2020-09-29  8:20                       ` Michal Hocko
2020-09-29  8:20                       ` Michal Hocko
2020-09-29  8:19                       ` [Intel-gfx] " Michal Hocko
2020-09-29  8:19                       ` Michal Hocko
2020-09-29  8:19                       ` Michal Hocko
2020-09-29  8:19                       ` Michal Hocko
2020-09-29  8:19                       ` Michal Hocko
2020-09-29  8:19                       ` [Intel-gfx] " Michal Hocko
2020-09-29  8:19                       ` Michal Hocko
2020-09-29  8:19                       ` Michal Hocko
2020-09-29  9:00                       ` Daniel Vetter
2020-09-29  9:00                         ` Daniel Vetter
2020-09-29  9:00                         ` [Intel-gfx] " Daniel Vetter
2020-09-29  9:00                         ` Daniel Vetter
2020-09-29  9:00                         ` Daniel Vetter
2020-09-29 14:54                         ` Michal Hocko
2020-09-29 14:54                           ` Michal Hocko
2020-09-29 14:54                           ` [Intel-gfx] " Michal Hocko
2020-09-29 14:54                           ` Michal Hocko
2020-09-29 14:54                           ` Michal Hocko
2020-09-16 19:23     ` Matthew Wilcox
2020-09-16 19:23       ` Matthew Wilcox
2020-09-16 19:23       ` [Intel-gfx] " Matthew Wilcox
2020-09-16 19:23       ` Matthew Wilcox
2020-09-16 19:23       ` Matthew Wilcox
2020-09-16 20:48       ` Paul E. McKenney
2020-09-16 20:48         ` Paul E. McKenney
2020-09-16 20:48         ` [Intel-gfx] " Paul E. McKenney
2020-09-16 20:48         ` Paul E. McKenney
2020-09-16 20:48         ` Paul E. McKenney
2020-09-15 17:25   ` Paul E. McKenney
2020-09-15 17:25     ` Paul E. McKenney
2020-09-15 17:25     ` [Intel-gfx] " Paul E. McKenney
2020-09-15 17:25     ` Paul E. McKenney
2020-09-15 17:25     ` Paul E. McKenney
2020-09-15 17:25     ` Paul E. McKenney
2020-09-14 22:01 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for " Patchwork

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to='CAHk-=wie0Kb-+XOZNasoay7AKCaQ8Ew8=LyvWTBeiPXC3v2GSA@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=ardb@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.