From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Michael Ellerman <mpe@ellerman.id.au>, linuxppc-dev@lists.ozlabs.org
Cc: pmenzel@molgen.mpg.de
Subject: Re: [PATCH] powerpc/vdso: Don't use r30 to avoid breaking Go lang
Date: Sun, 01 Aug 2021 23:14:00 +1000 [thread overview]
Message-ID: <162782364020.2951535.1863268158095209284.b4-ty@ellerman.id.au> (raw)
In-Reply-To: <20210729131244.2595519-1-mpe@ellerman.id.au>
On Thu, 29 Jul 2021 23:12:44 +1000, Michael Ellerman wrote:
> The Go runtime uses r30 for some special value called 'g'. It assumes
> that value will remain unchanged even when calling VDSO functions.
> Although r30 is non-volatile across function calls, the callee is free
> to use it, as long as the callee saves the value and restores it before
> returning.
>
> It used to be true by accident that the VDSO didn't use r30, because the
> VDSO was hand-written asm. When we switched to building the VDSO from C
> the compiler started using r30, at least in some builds, leading to
> crashes in Go. eg:
>
> [...]
Applied to powerpc/fixes.
[1/1] powerpc/vdso: Don't use r30 to avoid breaking Go lang
https://git.kernel.org/powerpc/c/a88603f4b92ecef9e2359e40bcb99ad399d85dd7
cheers
next prev parent reply other threads:[~2021-08-01 13:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-29 13:12 [PATCH] powerpc/vdso: Don't use r30 to avoid breaking Go lang Michael Ellerman
2021-07-29 13:42 ` Paul Menzel
2021-07-29 16:25 ` Nick Desaulniers
2021-07-30 23:55 ` Segher Boessenkool
2021-08-01 13:14 ` Michael Ellerman [this message]
2021-08-02 11:27 ` 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=162782364020.2951535.1863268158095209284.b4-ty@ellerman.id.au \
--to=patch-notifications@ellerman.id.au \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=pmenzel@molgen.mpg.de \
/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).