public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Dave Hansen <dave.hansen@intel.com>,
	"Kirill A. Shutemov" <kirill@shutemov.name>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	kirill.shutemov@linux.intel.com
Subject: Re: [GIT PULL] x86/mm for 6.4
Date: Wed, 3 May 2023 10:01:26 +0200	[thread overview]
Message-ID: <20230503080126.GA1676736@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CAHk-=wgN=GY2A0htYQQRmPaLCorWnFatY_XO0X2w_m9xXQDcPA@mail.gmail.com>

On Tue, May 02, 2023 at 01:14:33PM -0700, Linus Torvalds wrote:
> On Tue, May 2, 2023 at 9:00 AM Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> >
> > > I guess it also wouldn't matter as much either if we hid it in a helper
> > > like the attached patch and I didn't have to read it twice. ;)
> >
> > Yeah, I think that's a good solution.
> 
> Hmm. And as I was rebasing the patch to fix up my patch, I realized
> that the current -git top-of-tree state is actually broken.
> 
> That
> 
>   #define access_ok(addr, size)                                           \
>   ({                                                                      \
>           WARN_ON_IN_IRQ();                                               \
>           likely(__access_ok(untagged_addr(addr), size));                 \
>   })
> 
> is actually *wrong* in two ways.
> 
> Now, in my original patch, I added a comment about how that
> "WARN_ON_IN_IRQ()" is bogus and this shouldn't be x86-specific at all.
> 
> I ended up going back in time to see why it was added, and I think it
> was added because we used to access 'current' in access_ok(), due to
> it using that user_addr_max() thing:
> 
>         likely(!__range_not_ok(addr, size, user_addr_max()));
> 
> but that was all removed by the set_fs() removal by Christoph Hellwig.

So I had a poke around, trying to figure out where it came from, and
yes. Commit ae31fe51a3cc ("perf/x86: Restore TASK_SIZE check on frame
pointer") is the reason that WARN_ON_IN_IRQ() thing got added.



  parent reply	other threads:[~2023-05-03  8:01 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-27 22:56 [GIT PULL] x86/mm for 6.4 Dave Hansen
2023-04-28 17:23 ` pr-tracker-bot
2023-04-28 20:07 ` Linus Torvalds
2023-04-28 20:15   ` Linus Torvalds
2023-04-29  0:38     ` Kirill A. Shutemov
2023-04-29  1:04       ` Linus Torvalds
2023-05-02 15:42       ` Dave Hansen
2023-05-02 16:00         ` Linus Torvalds
2023-05-02 20:14           ` Linus Torvalds
2023-05-03  0:53             ` Dave Hansen
2023-05-03  1:17               ` Linus Torvalds
2023-05-03 16:38                 ` Linus Torvalds
2023-05-03 16:44                   ` Dave Hansen
2023-05-03 16:51                     ` Linus Torvalds
2023-05-03 17:54                   ` Linus Torvalds
2023-05-03 19:01                     ` Peter Zijlstra
2023-05-03 19:19                       ` Linus Torvalds
2023-05-05 19:56                       ` Linus Torvalds
2023-05-05 20:59                         ` Kirill A. Shutemov
2023-05-04  6:28                   ` Kirill A. Shutemov
2023-05-04 15:25                     ` Dave Hansen
2023-05-04 17:10                       ` Kirill A. Shutemov
2023-05-04 17:10                     ` Linus Torvalds
2023-05-03  8:01             ` Peter Zijlstra [this message]
2023-05-03 16:38               ` Linus Torvalds
2023-06-16  8:47   ` Alexander Potapenko
2023-06-16 16:22     ` Linus Torvalds
2023-06-19 12:03       ` Alexander Potapenko

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=20230503080126.GA1676736@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox