mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Waiman Long <longman@redhat.com>
To: Andy Lutomirski <luto@kernel.org>
Cc: Dave Hansen <dave.hansen@intel.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>, X86 ML <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH] x86/mm/fault: Allow stack access below %rsp
Date: Fri, 2 Nov 2018 16:34:04 -0400	[thread overview]
Message-ID: <32f64637-8c9e-9b8d-9570-095b015757a9@redhat.com> (raw)
In-Reply-To: <CALCETrVqe2BhHTMG0joSC3eTk6CibAtn1c5gd7Ou6zLXQrgO3w@mail.gmail.com>

On 11/02/2018 04:11 PM, Andy Lutomirski wrote:
> On Fri, Nov 2, 2018 at 12:50 PM Waiman Long <longman@redhat.com> wrote:
>> On 11/02/2018 03:44 PM, Dave Hansen wrote:
>>> On 11/2/18 12:40 PM, Waiman Long wrote:
>>>> The 64k+ limit check is kind of arbitrary. So the check is now removed
>>>> to just let expand_stack() decide if a segmentation fault should happen.
>>> With the 64k check removed, what's the next limit that we bump into?  Is
>>> it just the stack_guard_gap space above the next-lowest VMA?
>> I think it is both the stack_guard_gap space above the next lowest VMA
>> and the rlimit(RLIMIT_STACK).
>>
> Did the non-working programs ever work?  Because, if not, I say let them fail.

The program was working before on older kernel. After the backport of
the commit 1be7107fbe18 ("mm: larger stack guard gap, between vmas"),
the program stopped working. I believe it is the removal of the
check_stack_guard_page() function which did expand the stack. So the 64k
check was actually not functional because of the stack expansion before
hand, but now it does.

Anyway, I see the current 64k check a very crude check on an userspace
error. I think there are quite a number of more powerful userspace tools
out there that can do this kind of check more effectively. Kernel isn't
the right place to do that.

Cheers,
Longman



  reply	other threads:[~2018-11-02 20:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-02 19:40 Waiman Long
2018-11-02 19:44 ` Dave Hansen
2018-11-02 19:50   ` Waiman Long
2018-11-02 20:11     ` Andy Lutomirski
2018-11-02 20:34       ` Waiman Long [this message]
2018-11-02 22:28     ` Dave Hansen
2018-11-05  5:11       ` Andy Lutomirski
2018-11-05  5:14         ` Andy Lutomirski
2018-11-05 17:20           ` Dave Hansen
2018-11-05 19:21             ` Andy Lutomirski
2018-11-05 16:27       ` Waiman Long
2018-11-05 17:51         ` Dave Hansen

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=32f64637-8c9e-9b8d-9570-095b015757a9@redhat.com \
    --to=longman@redhat.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --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

all inboxes | Powered by JetHome®