All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: kirill.shutemov@linux.intel.com,
	Dave Hansen <dave.hansen@linux.intel.com>,
	linux-kernel@vger.kernel.org, x86@kernel.org, jejb@linux.ibm.com,
	martin.petersen@oracle.com
Subject: Re: [GIT PULL] x86/mm for 6.2
Date: Fri, 16 Dec 2022 09:43:11 -0600	[thread overview]
Message-ID: <CAHk-=whjCVDeVa8jxEjnimfhKNnXiku7ku4NirmY+poKsnM5HQ@mail.gmail.com> (raw)
In-Reply-To: <20221216150532.ll4oyff2tlrisqsh@box.shutemov.name>

On Fri, Dec 16, 2022 at 9:05 AM Kirill A. Shutemov <kirill@shutemov.name> wrote:
>
> Below is preliminary fixup that suppose to address the issue. It does not
> include change to untagged_addr() interface to avoid the clutter.

Looks like the right direction.

And once you change untagged_addr() to take 'tsk', you should then be
able to cache all the information in the thread struct, and avoid the
'tsk->mm' dereference entirely.

> kthread_use_mm() should be safe as long as no arch actually implements
> per-thread tagging enabling.

I think in a perfect world the (few) users of kthread_use_mm() would
also just make sure they did the locking of thing, so that they can't
have that race with somebody that then would enable LAM later.

             Linus

  reply	other threads:[~2022-12-16 15:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-13 17:42 [GIT PULL] x86/mm for 6.2 Dave Hansen
2022-12-14 22:36 ` Linus Torvalds
2022-12-15 12:30   ` kirill.shutemov
2022-12-15 17:17     ` Linus Torvalds
2022-12-15 17:26       ` Linus Torvalds
2022-12-15 21:53         ` Dave Hansen
2022-12-15 22:46           ` Linus Torvalds
2022-12-16  2:16       ` kirill.shutemov
2022-12-16 15:05         ` Kirill A. Shutemov
2022-12-16 15:43           ` Linus Torvalds [this message]
2022-12-17 16:43             ` Kirill A. Shutemov
2022-12-16 20:09 ` Jason A. Donenfeld

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-=whjCVDeVa8jxEjnimfhKNnXiku7ku4NirmY+poKsnM5HQ@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=jejb@linux.ibm.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=x86@kernel.org \
    /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.