linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Daniel Axtens <dja@axtens.net>, linuxppc-dev@ozlabs.org
Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
	hughd@google.com
Subject: Re: [PATCH 2/5] powerpc: Allow 4096 bytes of stack expansion for the signal frame
Date: Fri, 24 Jul 2020 19:20:18 +1000	[thread overview]
Message-ID: <87wo2tp8vh.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <87blk6tkuv.fsf@dja-thinkpad.axtens.net>

Daniel Axtens <dja@axtens.net> writes:
> Hi Michael,
>
> Unfortunately, this patch doesn't completely solve the problem.
>
> Trying the original reproducer, I'm still able to trigger the crash even
> with this patch, although not 100% of the time. (If I turn ASLR off
> outside of tmux it reliably crashes, if I turn ASLR off _inside_ of tmux
> it reliably succeeds; all of this is on a serial console.)
>
> ./foo 1241000 & sleep 1; killall -USR1 foo; echo ok
>
> If I add some debugging information, I see that I'm getting
> address + 4096 = 7fffffed0fa0
> gpr1 =           7fffffed1020
>
> So address + 4096 is 0x80 bytes below the 4k window. I haven't been able
> to figure out why, gdb gives me a NIP in __kernel_sigtramp_rt64 but I
> don't know what to make of that.

Thanks for testing.

I looked at it again this morning and it's fairly obvious when it's not
11pm :)

We need space for struct rt_sigframe as well as another 128 bytes,
which is __SIGNAL_FRAMESIZE. It's actually mentioned in the comment
above struct rt_sigframe.

I'll send a v2.

> P.S. I don't know what your policy on linking to kernel bugzilla is, but
> if you want:
>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=205183

In general I prefer to keep things clean with just a single Link: tag
pointing to the archive of the patch submission.

That can then contain further links and other info, and has the
advantage that people can reply to the patch submission in the future to
add information to the thread that wasn't known at the time of the
commit.

cheers

  reply	other threads:[~2020-07-24  9:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-03 14:13 [PATCH 1/5] selftests/powerpc: Add test of stack expansion logic Michael Ellerman
2020-07-03 14:13 ` [PATCH 2/5] powerpc: Allow 4096 bytes of stack expansion for the signal frame Michael Ellerman
2020-07-23 13:35   ` Daniel Axtens
2020-07-24  9:20     ` Michael Ellerman [this message]
2020-07-03 14:13 ` [PATCH 3/5] selftests/powerpc: Update the stack expansion test Michael Ellerman
2020-07-05 17:52   ` Christophe Leroy
2020-07-07  6:53     ` Michael Ellerman
2020-07-03 14:13 ` [RFC PATCH 4/5] powerpc/mm: Remove custom stack expansion checking Michael Ellerman
2020-07-05 17:49   ` Christophe Leroy
2020-07-06  1:15     ` Nicholas Piggin
2020-07-07  6:53     ` Michael Ellerman
2020-07-23 14:11   ` Daniel Axtens
2020-07-03 14:13 ` [RFC PATCH 5/5] selftests/powerpc: Remove powerpc special cases from stack expansion test Michael Ellerman

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=87wo2tp8vh.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=dja@axtens.net \
    --cc=hughd@google.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).