From: Linus Torvalds <torvalds@linux-foundation.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: kernel test robot <lkp@intel.com>, LKP <lkp@01.org>,
Linux List Kernel Mailing <linux-kernel@vger.kernel.org>,
Linux-MM <linux-mm@kvack.org>,
linux-arch <linux-arch@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Will Deacon <will.deacon@arm.com>,
Andy Lutomirski <luto@kernel.org>, Nadav Amit <namit@vmware.com>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: 1808d65b55 ("asm-generic/tlb: Remove arch_tlb*_mmu()"): BUG: KASAN: stack-out-of-bounds in __change_page_attr_set_clr
Date: Fri, 12 Apr 2019 08:32:38 -0700 [thread overview]
Message-ID: <CAHk-=wieBr3G=_ZGoCndi8XnuG1wtkedaGqkWB+=AVq65=_8sQ@mail.gmail.com> (raw)
In-Reply-To: <20190412105633.GM14281@hirez.programming.kicks-ass.net>
On Fri, Apr 12, 2019 at 3:56 AM Peter Zijlstra <peterz@infradead.org> wrote:
>
> --- a/arch/x86/mm/tlb.c
> +++ b/arch/x86/mm/tlb.c
> @@ -728,7 +728,7 @@ void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start,
> {
> int cpu;
>
> - struct flush_tlb_info info __aligned(SMP_CACHE_BYTES) = {
> + struct flush_tlb_info info = {
> .mm = mm,
> .stride_shift = stride_shift,
> .freed_tables = freed_tables,
>
Ack.
We should never have stack alignment bigger than 16 bytes. And
preferably not even that. Trying to align stack at a cacheline
boundary is wrong - if you *really* need things to be that aligned, do
something else (regular kmalloc, percpu temp area, static allocation -
whatever).
Linus
next prev parent reply other threads:[~2019-04-12 15:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-10 14:55 1808d65b55 ("asm-generic/tlb: Remove arch_tlb*_mmu()"): BUG: KASAN: stack-out-of-bounds in __change_page_attr_set_clr kernel test robot
2019-04-11 19:39 ` Peter Zijlstra
2019-04-11 19:54 ` Peter Zijlstra
2019-04-11 21:13 ` Peter Zijlstra
2019-04-12 10:56 ` Peter Zijlstra
2019-04-12 11:17 ` Peter Zijlstra
2019-04-12 15:11 ` Nadav Amit
2019-04-12 15:18 ` Nadav Amit
2019-04-12 17:05 ` Nadav Amit
2019-04-12 17:14 ` Andy Lutomirski
2019-04-12 17:49 ` Nadav Amit
2019-04-12 18:13 ` Peter Zijlstra
2019-04-12 18:19 ` Peter Zijlstra
2019-04-12 19:42 ` Nadav Amit
2019-04-12 15:32 ` Linus Torvalds [this message]
2019-04-12 16:50 ` David Howells
2019-04-12 18:15 ` Peter Zijlstra
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-=wieBr3G=_ZGoCndi8XnuG1wtkedaGqkWB+=AVq65=_8sQ@mail.gmail.com' \
--to=torvalds@linux-foundation.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkp@01.org \
--cc=lkp@intel.com \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=namit@vmware.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=will.deacon@arm.com \
/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;
as well as URLs for NNTP newsgroup(s).