[go] runtime: support riscv64 SV57 mode

179 просмотров
Перейти к первому непрочитанному сообщению

Dmitry Vyukov (Gerrit)

не прочитано,
27 мая 2022 г., 13:01:0727.05.2022
– goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Dmitry Vyukov has uploaded this change for review.

View Change

runtime: support riscv64 SV57 mode

Riscv64 has SV57 mode when user-space VA is 56 bits.
Linux kernel recently got support for this mode and Go binaries started crashing as:

runtime: lfstack.push invalid packing: node=0xffffff5908a940 cnt=0x1
packed=0xffff5908a9400001 -> node=0xffff5908a940

Adjust lfstack code to use only 8 top bits of pointers on riscv64.

For context see:
https://groups.google.com/g/syzkaller-bugs/c/lU0GQTZoNQQ/m/O_c3vmE3AAAJ

Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
---
M src/runtime/lfstack_64bit.go
1 file changed, 30 insertions(+), 0 deletions(-)

diff --git a/src/runtime/lfstack_64bit.go b/src/runtime/lfstack_64bit.go
index 154130c..afe1d4c 100644
--- a/src/runtime/lfstack_64bit.go
+++ b/src/runtime/lfstack_64bit.go
@@ -36,12 +36,19 @@
// We use one bit to distinguish between the two ranges.
aixAddrBits = 57
aixCntBits = 64 - aixAddrBits + 3
+
+ // Riscv64 SV57 mode gives 56 bits of userspace VA.
+ riscv64AddrBits = 56
+ riscv64CntBits = 64 - riscv64AddrBits + 3
)

func lfstackPack(node *lfnode, cnt uintptr) uint64 {
if GOARCH == "ppc64" && GOOS == "aix" {
return uint64(uintptr(unsafe.Pointer(node)))<<(64-aixAddrBits) | uint64(cnt&(1<<aixCntBits-1))
}
+ if GOARCH == "riscv64" {
+ return uint64(uintptr(unsafe.Pointer(node)))<<(64-riscv64AddrBits) | uint64(cnt&(1<<riscv64CntBits-1))
+ }
return uint64(uintptr(unsafe.Pointer(node)))<<(64-addrBits) | uint64(cnt&(1<<cntBits-1))
}

@@ -54,5 +61,8 @@
if GOARCH == "ppc64" && GOOS == "aix" {
return (*lfnode)(unsafe.Pointer(uintptr((val >> aixCntBits << 3) | 0xa<<56)))
}
+ if GOARCH == "riscv64" {
+ return (*lfnode)(unsafe.Pointer(uintptr(val >> riscv64CntBits << 3)))
+ }
return (*lfnode)(unsafe.Pointer(uintptr(val >> cntBits << 3)))
}

To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
Gerrit-Change-Number: 409055
Gerrit-PatchSet: 1
Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
Gerrit-MessageType: newchange

Dmitry Vyukov (Gerrit)

не прочитано,
27 мая 2022 г., 13:02:1327.05.2022
– goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Patch set 1:Run-TryBot +1

View Change

    To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
    Gerrit-Change-Number: 409055
    Gerrit-PatchSet: 1
    Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
    Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
    Gerrit-Comment-Date: Fri, 27 May 2022 17:02:08 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment

    Dmitry Vyukov (Gerrit)

    не прочитано,
    28 мая 2022 г., 04:20:2528.05.2022
    – goph...@pubsubhelper.golang.org, Gopher Robot, golang-co...@googlegroups.com

    View Change

    1 comment:

    • Patchset:

      • Patch Set #1:

        TryBots are happy.

        Does normal trybot run include riscv machines?

    To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
    Gerrit-Change-Number: 409055
    Gerrit-PatchSet: 1
    Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
    Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
    Gerrit-Reviewer: Gopher Robot <go...@golang.org>
    Gerrit-Comment-Date: Sat, 28 May 2022 08:20:20 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Gopher Robot <go...@golang.org>
    Gerrit-MessageType: comment

    Dmitry Vyukov (Gerrit)

    не прочитано,
    28 мая 2022 г., 04:23:0128.05.2022
    – goph...@pubsubhelper.golang.org, Gopher Robot, golang-co...@googlegroups.com

    View Change

    1 comment:

    • Patchset:

      • Patch Set #1:

        Btw x86 now has 5-level page tables with 56 bit addresses as well.
        Maybe we should switch to 56 bits everywhere?

    To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
    Gerrit-Change-Number: 409055
    Gerrit-PatchSet: 1
    Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
    Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
    Gerrit-Reviewer: Gopher Robot <go...@golang.org>
    Gerrit-Comment-Date: Sat, 28 May 2022 08:22:56 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Zhuo Meng (Gerrit)

    не прочитано,
    29 мая 2022 г., 21:49:0729.05.2022
    – Dmitry Vyukov, goph...@pubsubhelper.golang.org, Zhuo Meng, Gopher Robot, golang-co...@googlegroups.com

    Attention is currently required from: Dmitry Vyukov.

    View Change

    1 comment:

    • Patchset:

      • Patch Set #1:

        Does normal trybot run include riscv machines?

        No, You have to use `TRY=linux-riscv64` in the commit message for trybots.

    To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
    Gerrit-Change-Number: 409055
    Gerrit-PatchSet: 1
    Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
    Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
    Gerrit-Reviewer: Gopher Robot <go...@golang.org>
    Gerrit-CC: Zhuo Meng <m...@golangcn.org>
    Gerrit-Attention: Dmitry Vyukov <dvy...@google.com>
    Gerrit-Comment-Date: Mon, 30 May 2022 01:49:00 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Dmitry Vyukov <dvy...@google.com>

    Zhuo Meng (Gerrit)

    не прочитано,
    29 мая 2022 г., 21:55:0429.05.2022
    – Dmitry Vyukov, goph...@pubsubhelper.golang.org, Zhuo Meng, Gopher Robot, golang-co...@googlegroups.com

    Attention is currently required from: Dmitry Vyukov.

    Patch set 1:Run-TryBot +1

    View Change

    1 comment:

    To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
    Gerrit-Change-Number: 409055
    Gerrit-PatchSet: 1
    Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
    Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
    Gerrit-Reviewer: Gopher Robot <go...@golang.org>
    Gerrit-Reviewer: Zhuo Meng <m...@golangcn.org>
    Gerrit-Attention: Dmitry Vyukov <dvy...@google.com>
    Gerrit-Comment-Date: Mon, 30 May 2022 01:54:58 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment

    Dmitry Vyukov (Gerrit)

    не прочитано,
    30 мая 2022 г., 02:51:0130.05.2022
    – goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

    Attention is currently required from: Dmitry Vyukov, Zhuo Meng.

    Dmitry Vyukov uploaded patch set #2 to this change.

    View Change

    The following approvals got outdated and were removed: Run-TryBot+1 by Dmitry Vyukov, Run-TryBot+1 by Zhuo Meng, TryBot-Result+1 by Gopher Robot

    runtime: support riscv64 SV57 mode

    Riscv64 has SV57 mode when user-space VA is 56 bits.
    Linux kernel recently got support for this mode and Go binaries started crashing as:

    runtime: lfstack.push invalid packing: node=0xffffff5908a940 cnt=0x1
    packed=0xffff5908a9400001 -> node=0xffff5908a940

    Adjust lfstack code to use only 8 top bits of pointers on riscv64.

    For context see:
    https://groups.google.com/g/syzkaller-bugs/c/lU0GQTZoNQQ/m/O_c3vmE3AAAJ

    TRY=linux-riscv64


    Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
    ---
    M src/runtime/lfstack_64bit.go
    1 file changed, 32 insertions(+), 0 deletions(-)

    To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
    Gerrit-Change-Number: 409055
    Gerrit-PatchSet: 2
    Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
    Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
    Gerrit-Reviewer: Gopher Robot <go...@golang.org>
    Gerrit-Reviewer: Zhuo Meng <m...@golangcn.org>
    Gerrit-Attention: Dmitry Vyukov <dvy...@google.com>
    Gerrit-Attention: Zhuo Meng <m...@golangcn.org>
    Gerrit-MessageType: newpatchset

    Dmitry Vyukov (Gerrit)

    не прочитано,
    30 мая 2022 г., 02:51:1130.05.2022
    – goph...@pubsubhelper.golang.org, Zhuo Meng, Gopher Robot, golang-co...@googlegroups.com

    Attention is currently required from: Zhuo Meng.

    Patch set 2:Run-TryBot +1

    View Change

      To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
      Gerrit-Change-Number: 409055
      Gerrit-PatchSet: 2
      Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
      Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
      Gerrit-Reviewer: Gopher Robot <go...@golang.org>
      Gerrit-Reviewer: Zhuo Meng <m...@golangcn.org>
      Gerrit-Attention: Zhuo Meng <m...@golangcn.org>
      Gerrit-Comment-Date: Mon, 30 May 2022 06:51:06 +0000

      Zhuo Meng (Gerrit)

      не прочитано,
      30 мая 2022 г., 02:55:3030.05.2022
      – Dmitry Vyukov, goph...@pubsubhelper.golang.org, Zhuo Meng, Gopher Robot, golang-co...@googlegroups.com

      Attention is currently required from: Dmitry Vyukov.

      View Change

      1 comment:

      • Patchset:

        • Patch Set #2:

          Sorry, I mean "comment message" not "commit message".

      To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
      Gerrit-Change-Number: 409055
      Gerrit-PatchSet: 2
      Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
      Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
      Gerrit-Reviewer: Gopher Robot <go...@golang.org>
      Gerrit-Reviewer: Zhuo Meng <m...@golangcn.org>
      Gerrit-Attention: Dmitry Vyukov <dvy...@google.com>
      Gerrit-Comment-Date: Mon, 30 May 2022 06:55:24 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Gerrit-MessageType: comment

      Dmitry Vyukov (Gerrit)

      не прочитано,
      30 мая 2022 г., 03:08:2330.05.2022
      – goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

      Attention is currently required from: Dmitry Vyukov.

      Dmitry Vyukov uploaded patch set #3 to this change.

      View Change

      The following approvals got outdated and were removed: Run-TryBot+1 by Dmitry Vyukov

      runtime: support riscv64 SV57 mode


      Riscv64 has SV57 mode when user-space VA is 56 bits.
      Linux kernel recently got support for this mode and Go binaries started crashing as:

      runtime: lfstack.push invalid packing: node=0xffffff5908a940 cnt=0x1
      packed=0xffff5908a9400001 -> node=0xffff5908a940

      Adjust lfstack code to use only 8 top bits of pointers on riscv64.

      For context see:
      https://groups.google.com/g/syzkaller-bugs/c/lU0GQTZoNQQ/m/O_c3vmE3AAAJ

      Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
      ---
      M src/runtime/lfstack_64bit.go
      1 file changed, 30 insertions(+), 0 deletions(-)

      To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
      Gerrit-Change-Number: 409055
      Gerrit-PatchSet: 3
      Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
      Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
      Gerrit-Reviewer: Gopher Robot <go...@golang.org>
      Gerrit-Reviewer: Zhuo Meng <m...@golangcn.org>
      Gerrit-Attention: Dmitry Vyukov <dvy...@google.com>
      Gerrit-MessageType: newpatchset

      Meng Zhuo (Gerrit)

      не прочитано,
      31 мая 2022 г., 08:20:2331.05.2022
      – Dmitry Vyukov, goph...@pubsubhelper.golang.org, Cherry Mui, Joel Sing, Ian Lance Taylor, Meng Zhuo, Gopher Robot, golang-co...@googlegroups.com

      Attention is currently required from: Cherry Mui, Dmitry Vyukov, Ian Lance Taylor, Joel Sing.

      Patch set 3:Run-TryBot +1

      View Change

        To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: go
        Gerrit-Branch: master
        Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
        Gerrit-Change-Number: 409055
        Gerrit-PatchSet: 3
        Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
        Gerrit-Reviewer: Cherry Mui <cher...@google.com>
        Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
        Gerrit-Reviewer: Gopher Robot <go...@golang.org>
        Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
        Gerrit-Reviewer: Joel Sing <jo...@sing.id.au>
        Gerrit-Reviewer: Meng Zhuo <m...@golangcn.org>
        Gerrit-Attention: Joel Sing <jo...@sing.id.au>
        Gerrit-Attention: Dmitry Vyukov <dvy...@google.com>
        Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
        Gerrit-Attention: Cherry Mui <cher...@google.com>
        Gerrit-Comment-Date: Tue, 31 May 2022 12:20:16 +0000

        Meng Zhuo (Gerrit)

        не прочитано,
        7 июн. 2022 г., 22:08:4307.06.2022
        – Dmitry Vyukov, goph...@pubsubhelper.golang.org, Gopher Robot, Cherry Mui, Joel Sing, Ian Lance Taylor, Meng Zhuo, golang-co...@googlegroups.com

        Attention is currently required from: Dmitry Vyukov.

        View Change

        1 comment:

        • Patchset:

        To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: go
        Gerrit-Branch: master
        Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
        Gerrit-Change-Number: 409055
        Gerrit-PatchSet: 3
        Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
        Gerrit-Reviewer: Cherry Mui <cher...@google.com>
        Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
        Gerrit-Reviewer: Gopher Robot <go...@golang.org>
        Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
        Gerrit-Reviewer: Joel Sing <jo...@sing.id.au>
        Gerrit-Reviewer: Meng Zhuo <m...@golangcn.org>
        Gerrit-Attention: Dmitry Vyukov <dvy...@google.com>
        Gerrit-Comment-Date: Wed, 08 Jun 2022 02:08:36 +0000

        Meng Zhuo (Gerrit)

        не прочитано,
        17 июн. 2022 г., 04:07:0717.06.2022
        – Dmitry Vyukov, goph...@pubsubhelper.golang.org, Gopher Robot, Cherry Mui, Joel Sing, Ian Lance Taylor, Meng Zhuo, golang-co...@googlegroups.com

        Attention is currently required from: Dmitry Vyukov.

        View Change

        1 comment:

        To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: go
        Gerrit-Branch: master
        Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
        Gerrit-Change-Number: 409055
        Gerrit-PatchSet: 3
        Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
        Gerrit-Reviewer: Cherry Mui <cher...@google.com>
        Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
        Gerrit-Reviewer: Gopher Robot <go...@golang.org>
        Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
        Gerrit-Reviewer: Joel Sing <jo...@sing.id.au>
        Gerrit-Reviewer: Meng Zhuo <m...@golangcn.org>
        Gerrit-Attention: Dmitry Vyukov <dvy...@google.com>
        Gerrit-Comment-Date: Fri, 17 Jun 2022 08:06:59 +0000

        Cherry Mui (Gerrit)

        не прочитано,
        17 июн. 2022 г., 12:12:5017.06.2022
        – Dmitry Vyukov, goph...@pubsubhelper.golang.org, Austin Clements, Michael Knyszek, Dmitri Goutnik, Gopher Robot, Joel Sing, Ian Lance Taylor, Meng Zhuo, golang-co...@googlegroups.com

        Attention is currently required from: Austin Clements, Dmitry Vyukov, Meng Zhuo, Michael Knyszek.

        View Change

        1 comment:

        • Patchset:

          • Patch Set #3:

            Hi, Cherry, Ian […]

            Is there a way we can test this configuration? I'm not sure whether this is enough to support address space beyond 48 bits. There are other places in the runtime that makes assumptions about the address space.

        To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: go
        Gerrit-Branch: master
        Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
        Gerrit-Change-Number: 409055
        Gerrit-PatchSet: 3
        Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
        Gerrit-Reviewer: Austin Clements <aus...@google.com>
        Gerrit-Reviewer: Cherry Mui <cher...@google.com>
        Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
        Gerrit-Reviewer: Gopher Robot <go...@golang.org>
        Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
        Gerrit-Reviewer: Joel Sing <jo...@sing.id.au>
        Gerrit-Reviewer: Meng Zhuo <m...@golangcn.org>
        Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
        Gerrit-CC: Dmitri Goutnik <dgou...@gmail.com>
        Gerrit-Attention: Austin Clements <aus...@google.com>
        Gerrit-Attention: Michael Knyszek <mkny...@google.com>
        Gerrit-Attention: Dmitry Vyukov <dvy...@google.com>
        Gerrit-Attention: Meng Zhuo <m...@golangcn.org>
        Gerrit-Comment-Date: Fri, 17 Jun 2022 16:12:46 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Meng Zhuo <m...@golangcn.org>
        Gerrit-MessageType: comment

        Michael Knyszek (Gerrit)

        не прочитано,
        17 июн. 2022 г., 14:43:5317.06.2022
        – Dmitry Vyukov, goph...@pubsubhelper.golang.org, Austin Clements, Dmitri Goutnik, Gopher Robot, Cherry Mui, Joel Sing, Ian Lance Taylor, Meng Zhuo, golang-co...@googlegroups.com

        Attention is currently required from: Austin Clements, Cherry Mui, Dmitry Vyukov, Meng Zhuo.

        View Change

        1 comment:

        • Patchset:

          • Patch Set #3:

            Is there a way we can test this configuration? I'm not sure whether this is enough to support addres […]

            yeah there are quite a few other places.

            the page allocator constants also need to be updated, as well as heapAddrBits, it's corresponding documentation, and making sure constants derived from it continue to make sense.

            when that happens, there will also be an increase in address space use from mheap_.arenas and the page allocator's structures. should be fine for most people, but will likely generate more complaints from users of `ulimit -v` if we make it the default on Linux. we can use less address space for these structures by addinng indirections, but at the cost of performance (these structures are hot, so in the single-digit percent).

            (and I would actually prefer this be the default; supporting both 48-bit and 57-bit mode would be another bifurcation in the configurations we need to test. it shouldn't be too hard to just update our builder images to use kernels in 57-bit mode? maybe lots of other things will break.)

            I personally would welcome support for this, but I think this is going to be a bit of a journey.

        To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: go
        Gerrit-Branch: master
        Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
        Gerrit-Change-Number: 409055
        Gerrit-PatchSet: 3
        Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
        Gerrit-Reviewer: Austin Clements <aus...@google.com>
        Gerrit-Reviewer: Cherry Mui <cher...@google.com>
        Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
        Gerrit-Reviewer: Gopher Robot <go...@golang.org>
        Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
        Gerrit-Reviewer: Joel Sing <jo...@sing.id.au>
        Gerrit-Reviewer: Meng Zhuo <m...@golangcn.org>
        Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
        Gerrit-CC: Dmitri Goutnik <dgou...@gmail.com>
        Gerrit-Attention: Austin Clements <aus...@google.com>
        Gerrit-Attention: Dmitry Vyukov <dvy...@google.com>
        Gerrit-Attention: Meng Zhuo <m...@golangcn.org>
        Gerrit-Attention: Cherry Mui <cher...@google.com>
        Gerrit-Comment-Date: Fri, 17 Jun 2022 18:43:49 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Meng Zhuo <m...@golangcn.org>
        Comment-In-Reply-To: Cherry Mui <cher...@google.com>
        Gerrit-MessageType: comment

        Christian Stewart (Gerrit)

        не прочитано,
        27 июн. 2022 г., 17:00:4627.06.2022
        – Dmitry Vyukov, goph...@pubsubhelper.golang.org, Austin Clements, Michael Knyszek, Dmitri Goutnik, Gopher Robot, Cherry Mui, Joel Sing, Ian Lance Taylor, Meng Zhuo, golang-co...@googlegroups.com

        Attention is currently required from: Cherry Mui, Christian Stewart, Dmitry Vyukov, Michael Knyszek.

        View Change

        1 comment:

        • Patchset:

          • Patch Set #3:

            yeah there are quite a few other places. […]

            Go binaries are no longer working due to this issue on qemu-riscv (which I guess is in SV57 mode).

        To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: go
        Gerrit-Branch: master
        Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
        Gerrit-Change-Number: 409055
        Gerrit-PatchSet: 3
        Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
        Gerrit-Reviewer: Austin Clements <aus...@google.com>
        Gerrit-Reviewer: Cherry Mui <cher...@google.com>
        Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
        Gerrit-Reviewer: Gopher Robot <go...@golang.org>
        Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
        Gerrit-Reviewer: Joel Sing <jo...@sing.id.au>
        Gerrit-Reviewer: Meng Zhuo <m...@golangcn.org>
        Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
        Gerrit-CC: Christian Stewart <chri...@paral.in>
        Gerrit-CC: Dmitri Goutnik <dgou...@gmail.com>
        Gerrit-Attention: Christian Stewart <chri...@paral.in>
        Gerrit-Attention: Michael Knyszek <mkny...@google.com>
        Gerrit-Attention: Dmitry Vyukov <dvy...@google.com>
        Gerrit-Attention: Cherry Mui <cher...@google.com>
        Gerrit-Comment-Date: Mon, 27 Jun 2022 21:00:42 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Michael Knyszek <mkny...@google.com>

        Christian Stewart (Gerrit)

        не прочитано,
        24 июл. 2022 г., 18:52:1924.07.2022
        – Dmitry Vyukov, goph...@pubsubhelper.golang.org, Austin Clements, Michael Knyszek, Dmitri Goutnik, Gopher Robot, Cherry Mui, Joel Sing, Ian Lance Taylor, Meng Zhuo, golang-co...@googlegroups.com

        Attention is currently required from: Cherry Mui, Dmitri Goutnik, Dmitry Vyukov, Ian Lance Taylor, Meng Zhuo, Michael Knyszek.

        View Change

        1 comment:

        • Patchset:

          • Patch Set #3:

            Go binaries are no longer working due to this issue on qemu-riscv (which I guess is in SV57 mode).

            Hi all, after applying this patch to Buildroot, running Go binaries in qemu-riscv (SV57 mode) works fine. Without the patch, they crash.

            Could this be merged for the next release?

        To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: go
        Gerrit-Branch: master
        Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
        Gerrit-Change-Number: 409055
        Gerrit-PatchSet: 3
        Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
        Gerrit-Reviewer: Austin Clements <aus...@google.com>
        Gerrit-Reviewer: Cherry Mui <cher...@google.com>
        Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
        Gerrit-Reviewer: Gopher Robot <go...@golang.org>
        Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
        Gerrit-Reviewer: Joel Sing <jo...@sing.id.au>
        Gerrit-Reviewer: Meng Zhuo <m...@golangcn.org>
        Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
        Gerrit-CC: Christian Stewart <chri...@paral.in>
        Gerrit-CC: Dmitri Goutnik <dgou...@gmail.com>
        Gerrit-Attention: Michael Knyszek <mkny...@google.com>
        Gerrit-Attention: Dmitri Goutnik <dgou...@gmail.com>
        Gerrit-Attention: Dmitry Vyukov <dvy...@google.com>
        Gerrit-Attention: Meng Zhuo <m...@golangcn.org>
        Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
        Gerrit-Attention: Cherry Mui <cher...@google.com>
        Gerrit-Comment-Date: Sun, 24 Jul 2022 22:52:16 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Christian Stewart <chri...@paral.in>

        Meng Zhuo (Gerrit)

        не прочитано,
        24 июл. 2022 г., 21:37:5524.07.2022
        – Dmitry Vyukov, goph...@pubsubhelper.golang.org, Meng Zhuo, Christian Stewart, Austin Clements, Michael Knyszek, Dmitri Goutnik, Gopher Robot, Cherry Mui, Joel Sing, Ian Lance Taylor, golang-co...@googlegroups.com

        Attention is currently required from: Cherry Mui, Dmitri Goutnik, Dmitry Vyukov, Ian Lance Taylor, Michael Knyszek.

        Patch set 3:Code-Review +1

        View Change

          To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: go
          Gerrit-Branch: master
          Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
          Gerrit-Change-Number: 409055
          Gerrit-PatchSet: 3
          Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
          Gerrit-Reviewer: Austin Clements <aus...@google.com>
          Gerrit-Reviewer: Cherry Mui <cher...@google.com>
          Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
          Gerrit-Reviewer: Gopher Robot <go...@golang.org>
          Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
          Gerrit-Reviewer: Joel Sing <jo...@sing.id.au>
          Gerrit-Reviewer: Meng Zhuo <m...@golangcn.org>
          Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
          Gerrit-CC: Christian Stewart <chri...@paral.in>
          Gerrit-CC: Dmitri Goutnik <dgou...@gmail.com>
          Gerrit-Attention: Michael Knyszek <mkny...@google.com>
          Gerrit-Attention: Dmitri Goutnik <dgou...@gmail.com>
          Gerrit-Attention: Dmitry Vyukov <dvy...@google.com>
          Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
          Gerrit-Attention: Cherry Mui <cher...@google.com>
          Gerrit-Comment-Date: Mon, 25 Jul 2022 01:37:50 +0000

          Ian Lance Taylor (Gerrit)

          не прочитано,
          27 июл. 2022 г., 21:25:0027.07.2022
          – Dmitry Vyukov, goph...@pubsubhelper.golang.org, Meng Zhuo, Christian Stewart, Austin Clements, Michael Knyszek, Dmitri Goutnik, Gopher Robot, Cherry Mui, Joel Sing, Ian Lance Taylor, golang-co...@googlegroups.com

          Attention is currently required from: Cherry Mui, Dmitri Goutnik, Dmitry Vyukov, Michael Knyszek.

          View Change

          1 comment:

          • Patchset:

            • Patch Set #3:

              mknyszek, austin: it seems that this CL fixes an immediate problem (issue #54104). Should we go ahead and submit this, or is this problematic by itself? Thanks.

          To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: go
          Gerrit-Branch: master
          Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
          Gerrit-Change-Number: 409055
          Gerrit-PatchSet: 3
          Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
          Gerrit-Reviewer: Austin Clements <aus...@google.com>
          Gerrit-Reviewer: Cherry Mui <cher...@google.com>
          Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
          Gerrit-Reviewer: Gopher Robot <go...@golang.org>
          Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
          Gerrit-Reviewer: Joel Sing <jo...@sing.id.au>
          Gerrit-Reviewer: Meng Zhuo <m...@golangcn.org>
          Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
          Gerrit-CC: Christian Stewart <chri...@paral.in>
          Gerrit-CC: Dmitri Goutnik <dgou...@gmail.com>
          Gerrit-Attention: Michael Knyszek <mkny...@google.com>
          Gerrit-Attention: Dmitri Goutnik <dgou...@gmail.com>
          Gerrit-Attention: Dmitry Vyukov <dvy...@google.com>
          Gerrit-Attention: Cherry Mui <cher...@google.com>
          Gerrit-Comment-Date: Thu, 28 Jul 2022 01:24:55 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Gerrit-MessageType: comment

          Michael Knyszek (Gerrit)

          не прочитано,
          28 июл. 2022 г., 06:57:2428.07.2022
          – Dmitry Vyukov, goph...@pubsubhelper.golang.org, Meng Zhuo, Christian Stewart, Austin Clements, Dmitri Goutnik, Gopher Robot, Cherry Mui, Joel Sing, Ian Lance Taylor, golang-co...@googlegroups.com

          Attention is currently required from: Cherry Mui, Dmitri Goutnik, Dmitry Vyukov, Ian Lance Taylor.

          View Change

          3 comments:

          • Commit Message:

          • Patchset:

            • Patch Set #3:

              mknyszek, austin: it seems that this CL fixes an immediate problem (issue #54104). […]

              it's just incomplete, and we could be OK with that. it can be a little jarring that the *only* thing that supports SV57 mode explicitly is lfstack.

              at the very least, there should probably be an additional comment. I left a comment about that.

          • File src/runtime/lfstack_64bit.go:

            • Patch Set #3, Line 40: // Riscv64 SV57 mode gives 56 bits of userspace VA.

              please add a comment that although lfstack supports it, broader support for SV57 mode is incomplete, and there may be other issues. please reference the issue (#54104) as well.

          To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: go
          Gerrit-Branch: master
          Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
          Gerrit-Change-Number: 409055
          Gerrit-PatchSet: 3
          Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
          Gerrit-Reviewer: Austin Clements <aus...@google.com>
          Gerrit-Reviewer: Cherry Mui <cher...@google.com>
          Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
          Gerrit-Reviewer: Gopher Robot <go...@golang.org>
          Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
          Gerrit-Reviewer: Joel Sing <jo...@sing.id.au>
          Gerrit-Reviewer: Meng Zhuo <m...@golangcn.org>
          Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
          Gerrit-CC: Christian Stewart <chri...@paral.in>
          Gerrit-CC: Dmitri Goutnik <dgou...@gmail.com>
          Gerrit-Attention: Dmitri Goutnik <dgou...@gmail.com>
          Gerrit-Attention: Dmitry Vyukov <dvy...@google.com>
          Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
          Gerrit-Attention: Cherry Mui <cher...@google.com>
          Gerrit-Comment-Date: Thu, 28 Jul 2022 10:57:17 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Ian Lance Taylor <ia...@golang.org>
          Gerrit-MessageType: comment

          Dmitry Vyukov (Gerrit)

          не прочитано,
          29 июл. 2022 г., 07:12:4329.07.2022
          – goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

          Attention is currently required from: Cherry Mui, Dmitri Goutnik, Dmitry Vyukov, Ian Lance Taylor, Meng Zhuo.

          Dmitry Vyukov uploaded patch set #4 to this change.

          View Change

          The following approvals got outdated and were removed: Run-TryBot+1 by Meng Zhuo, TryBot-Result+1 by Gopher Robot

          runtime: support riscv64 SV57 mode

          Riscv64 has SV57 mode when user-space VA is 56 bits.
          Linux kernel recently got support for this mode and Go binaries started crashing as:

          runtime: lfstack.push invalid packing: node=0xffffff5908a940 cnt=0x1
          packed=0xffff5908a9400001 -> node=0xffff5908a940

          Adjust lfstack code to use only 8 top bits of pointers on riscv64.

          For context see:
          https://groups.google.com/g/syzkaller-bugs/c/lU0GQTZoNQQ/m/O_c3vmE3AAAJ

          Update #54104


          Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
          ---
          M src/runtime/lfstack_64bit.go
          1 file changed, 34 insertions(+), 0 deletions(-)

          To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: go
          Gerrit-Branch: master
          Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
          Gerrit-Change-Number: 409055
          Gerrit-PatchSet: 4
          Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
          Gerrit-Reviewer: Austin Clements <aus...@google.com>
          Gerrit-Reviewer: Cherry Mui <cher...@google.com>
          Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
          Gerrit-Reviewer: Gopher Robot <go...@golang.org>
          Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
          Gerrit-Reviewer: Joel Sing <jo...@sing.id.au>
          Gerrit-Reviewer: Meng Zhuo <m...@golangcn.org>
          Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
          Gerrit-CC: Christian Stewart <chri...@paral.in>
          Gerrit-CC: Dmitri Goutnik <dgou...@gmail.com>
          Gerrit-Attention: Dmitri Goutnik <dgou...@gmail.com>
          Gerrit-Attention: Dmitry Vyukov <dvy...@google.com>
          Gerrit-Attention: Meng Zhuo <m...@golangcn.org>
          Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
          Gerrit-Attention: Cherry Mui <cher...@google.com>
          Gerrit-MessageType: newpatchset

          Dmitry Vyukov (Gerrit)

          не прочитано,
          29 июл. 2022 г., 07:13:2429.07.2022
          – goph...@pubsubhelper.golang.org, Meng Zhuo, Christian Stewart, Austin Clements, Michael Knyszek, Dmitri Goutnik, Gopher Robot, Cherry Mui, Joel Sing, Ian Lance Taylor, golang-co...@googlegroups.com

          Attention is currently required from: Cherry Mui, Dmitri Goutnik, Ian Lance Taylor, Meng Zhuo, Michael Knyszek.

          View Change

          3 comments:

          • Commit Message:

            • please add a reference to the issue, such as a line like: […]

              Done

          • Patchset:

          • File src/runtime/lfstack_64bit.go:

            • please add a comment that although lfstack supports it, broader support for SV57 mode is incomplete, […]

              Done

          To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: go
          Gerrit-Branch: master
          Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
          Gerrit-Change-Number: 409055
          Gerrit-PatchSet: 4
          Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
          Gerrit-Reviewer: Austin Clements <aus...@google.com>
          Gerrit-Reviewer: Cherry Mui <cher...@google.com>
          Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
          Gerrit-Reviewer: Gopher Robot <go...@golang.org>
          Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
          Gerrit-Reviewer: Joel Sing <jo...@sing.id.au>
          Gerrit-Reviewer: Meng Zhuo <m...@golangcn.org>
          Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
          Gerrit-CC: Christian Stewart <chri...@paral.in>
          Gerrit-CC: Dmitri Goutnik <dgou...@gmail.com>
          Gerrit-Attention: Michael Knyszek <mkny...@google.com>
          Gerrit-Attention: Dmitri Goutnik <dgou...@gmail.com>
          Gerrit-Attention: Meng Zhuo <m...@golangcn.org>
          Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
          Gerrit-Attention: Cherry Mui <cher...@google.com>
          Gerrit-Comment-Date: Fri, 29 Jul 2022 11:13:18 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Michael Knyszek <mkny...@google.com>
          Gerrit-MessageType: comment

          Cherry Mui (Gerrit)

          не прочитано,
          29 июл. 2022 г., 10:08:3029.07.2022
          – Dmitry Vyukov, goph...@pubsubhelper.golang.org, Meng Zhuo, Christian Stewart, Austin Clements, Michael Knyszek, Dmitri Goutnik, Gopher Robot, Joel Sing, Ian Lance Taylor, golang-co...@googlegroups.com

          Attention is currently required from: Dmitri Goutnik, Dmitry Vyukov, Ian Lance Taylor, Meng Zhuo, Michael Knyszek.

          Patch set 4:Code-Review +1

          View Change

            To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

            Gerrit-Project: go
            Gerrit-Branch: master
            Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
            Gerrit-Change-Number: 409055
            Gerrit-PatchSet: 4
            Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
            Gerrit-Reviewer: Austin Clements <aus...@google.com>
            Gerrit-Reviewer: Cherry Mui <cher...@google.com>
            Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
            Gerrit-Reviewer: Gopher Robot <go...@golang.org>
            Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
            Gerrit-Reviewer: Joel Sing <jo...@sing.id.au>
            Gerrit-Reviewer: Meng Zhuo <m...@golangcn.org>
            Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
            Gerrit-CC: Christian Stewart <chri...@paral.in>
            Gerrit-CC: Dmitri Goutnik <dgou...@gmail.com>
            Gerrit-Attention: Michael Knyszek <mkny...@google.com>
            Gerrit-Attention: Dmitry Vyukov <dvy...@google.com>
            Gerrit-Attention: Dmitri Goutnik <dgou...@gmail.com>
            Gerrit-Attention: Meng Zhuo <m...@golangcn.org>
            Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
            Gerrit-Comment-Date: Fri, 29 Jul 2022 14:08:26 +0000

            Meng Zhuo (Gerrit)

            не прочитано,
            3 авг. 2022 г., 05:35:3803.08.2022
            – Dmitry Vyukov, goph...@pubsubhelper.golang.org, Meng Zhuo, Cherry Mui, Christian Stewart, Austin Clements, Michael Knyszek, Dmitri Goutnik, Gopher Robot, Joel Sing, Ian Lance Taylor, golang-co...@googlegroups.com

            Attention is currently required from: Dmitri Goutnik, Dmitry Vyukov, Ian Lance Taylor, Michael Knyszek.

            Patch set 4:Run-TryBot +1Code-Review +1

            View Change

              To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

              Gerrit-Project: go
              Gerrit-Branch: master
              Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
              Gerrit-Change-Number: 409055
              Gerrit-PatchSet: 4
              Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
              Gerrit-Reviewer: Austin Clements <aus...@google.com>
              Gerrit-Reviewer: Cherry Mui <cher...@google.com>
              Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
              Gerrit-Reviewer: Gopher Robot <go...@golang.org>
              Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
              Gerrit-Reviewer: Joel Sing <jo...@sing.id.au>
              Gerrit-Reviewer: Meng Zhuo <m...@golangcn.org>
              Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
              Gerrit-CC: Christian Stewart <chri...@paral.in>
              Gerrit-CC: Dmitri Goutnik <dgou...@gmail.com>
              Gerrit-Attention: Michael Knyszek <mkny...@google.com>
              Gerrit-Attention: Dmitry Vyukov <dvy...@google.com>
              Gerrit-Attention: Dmitri Goutnik <dgou...@gmail.com>
              Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
              Gerrit-Comment-Date: Wed, 03 Aug 2022 09:35:33 +0000

              Michael Knyszek (Gerrit)

              не прочитано,
              3 авг. 2022 г., 15:11:0603.08.2022
              – Dmitry Vyukov, goph...@pubsubhelper.golang.org, Gopher Robot, Meng Zhuo, Cherry Mui, Christian Stewart, Austin Clements, Dmitri Goutnik, Joel Sing, Ian Lance Taylor, golang-co...@googlegroups.com

              Attention is currently required from: Dmitri Goutnik, Dmitry Vyukov, Ian Lance Taylor.

              Patch set 4:Code-Review +2

              View Change

                To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

                Gerrit-Project: go
                Gerrit-Branch: master
                Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
                Gerrit-Change-Number: 409055
                Gerrit-PatchSet: 4
                Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
                Gerrit-Reviewer: Austin Clements <aus...@google.com>
                Gerrit-Reviewer: Cherry Mui <cher...@google.com>
                Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
                Gerrit-Reviewer: Gopher Robot <go...@golang.org>
                Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
                Gerrit-Reviewer: Joel Sing <jo...@sing.id.au>
                Gerrit-Reviewer: Meng Zhuo <m...@golangcn.org>
                Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
                Gerrit-CC: Christian Stewart <chri...@paral.in>
                Gerrit-CC: Dmitri Goutnik <dgou...@gmail.com>
                Gerrit-Attention: Dmitry Vyukov <dvy...@google.com>
                Gerrit-Attention: Dmitri Goutnik <dgou...@gmail.com>
                Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
                Gerrit-Comment-Date: Wed, 03 Aug 2022 19:11:01 +0000

                Joel Sing (Gerrit)

                не прочитано,
                3 авг. 2022 г., 16:00:3603.08.2022
                – Dmitry Vyukov, goph...@pubsubhelper.golang.org, Gopher Robot, Meng Zhuo, Cherry Mui, Christian Stewart, Austin Clements, Dmitri Goutnik, Ian Lance Taylor, golang-co...@googlegroups.com

                Attention is currently required from: Dmitri Goutnik, Dmitry Vyukov, Ian Lance Taylor.

                Patch set 4:Code-Review +1

                View Change

                2 comments:

                To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

                Gerrit-Project: go
                Gerrit-Branch: master
                Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
                Gerrit-Change-Number: 409055
                Gerrit-PatchSet: 4
                Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
                Gerrit-Reviewer: Austin Clements <aus...@google.com>
                Gerrit-Reviewer: Cherry Mui <cher...@google.com>
                Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
                Gerrit-Reviewer: Gopher Robot <go...@golang.org>
                Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
                Gerrit-Reviewer: Joel Sing <jo...@sing.id.au>
                Gerrit-Reviewer: Meng Zhuo <m...@golangcn.org>
                Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
                Gerrit-CC: Christian Stewart <chri...@paral.in>
                Gerrit-CC: Dmitri Goutnik <dgou...@gmail.com>
                Gerrit-Attention: Dmitry Vyukov <dvy...@google.com>
                Gerrit-Attention: Dmitri Goutnik <dgou...@gmail.com>
                Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
                Gerrit-Comment-Date: Wed, 03 Aug 2022 20:00:30 +0000

                Dmitry Vyukov (Gerrit)

                не прочитано,
                4 авг. 2022 г., 01:33:0504.08.2022
                – goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

                Attention is currently required from: Dmitri Goutnik, Dmitry Vyukov, Ian Lance Taylor, Meng Zhuo.

                Dmitry Vyukov uploaded patch set #5 to this change.

                View Change

                The following approvals got outdated and were removed: Run-TryBot+1 by Meng Zhuo, TryBot-Result+1 by Gopher Robot

                runtime: support riscv64 SV57 mode

                riscv64 has SV57 mode when user-space VA is 56 bits.

                Linux kernel recently got support for this mode and Go binaries started crashing as:

                runtime: lfstack.push invalid packing: node=0xffffff5908a940 cnt=0x1
                packed=0xffff5908a9400001 -> node=0xffff5908a940

                Adjust lfstack code to use only 8 top bits of pointers on riscv64.

                For context see:
                https://groups.google.com/g/syzkaller-bugs/c/lU0GQTZoNQQ/m/O_c3vmE3AAAJ

                Update #54104

                Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
                ---
                M src/runtime/lfstack_64bit.go
                1 file changed, 34 insertions(+), 0 deletions(-)

                To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

                Gerrit-Project: go
                Gerrit-Branch: master
                Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
                Gerrit-Change-Number: 409055
                Gerrit-PatchSet: 5
                Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
                Gerrit-Reviewer: Austin Clements <aus...@google.com>
                Gerrit-Reviewer: Cherry Mui <cher...@google.com>
                Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
                Gerrit-Reviewer: Gopher Robot <go...@golang.org>
                Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
                Gerrit-Reviewer: Joel Sing <jo...@sing.id.au>
                Gerrit-Reviewer: Meng Zhuo <m...@golangcn.org>
                Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
                Gerrit-CC: Christian Stewart <chri...@paral.in>
                Gerrit-CC: Dmitri Goutnik <dgou...@gmail.com>
                Gerrit-Attention: Dmitry Vyukov <dvy...@google.com>
                Gerrit-Attention: Dmitri Goutnik <dgou...@gmail.com>
                Gerrit-Attention: Meng Zhuo <m...@golangcn.org>
                Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
                Gerrit-MessageType: newpatchset

                Dmitry Vyukov (Gerrit)

                не прочитано,
                4 авг. 2022 г., 01:33:1804.08.2022
                – goph...@pubsubhelper.golang.org, Joel Sing, Gopher Robot, Meng Zhuo, Cherry Mui, Christian Stewart, Austin Clements, Dmitri Goutnik, Ian Lance Taylor, golang-co...@googlegroups.com

                Attention is currently required from: Dmitri Goutnik, Ian Lance Taylor, Joel Sing, Meng Zhuo.

                View Change

                2 comments:

                • Commit Message:

                  • Done

                • File src/runtime/lfstack_64bit.go:

                  • Done

                To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

                Gerrit-Project: go
                Gerrit-Branch: master
                Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
                Gerrit-Change-Number: 409055
                Gerrit-PatchSet: 4
                Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
                Gerrit-Reviewer: Austin Clements <aus...@google.com>
                Gerrit-Reviewer: Cherry Mui <cher...@google.com>
                Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
                Gerrit-Reviewer: Gopher Robot <go...@golang.org>
                Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
                Gerrit-Reviewer: Joel Sing <jo...@sing.id.au>
                Gerrit-Reviewer: Meng Zhuo <m...@golangcn.org>
                Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
                Gerrit-CC: Christian Stewart <chri...@paral.in>
                Gerrit-CC: Dmitri Goutnik <dgou...@gmail.com>
                Gerrit-Attention: Joel Sing <jo...@sing.id.au>
                Gerrit-Attention: Dmitri Goutnik <dgou...@gmail.com>
                Gerrit-Attention: Meng Zhuo <m...@golangcn.org>
                Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
                Gerrit-Comment-Date: Thu, 04 Aug 2022 05:33:12 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                Comment-In-Reply-To: Joel Sing <jo...@sing.id.au>
                Gerrit-MessageType: comment

                Dmitry Vyukov (Gerrit)

                не прочитано,
                4 авг. 2022 г., 01:33:4704.08.2022
                – goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Joel Sing, Michael Knyszek, Gopher Robot, Meng Zhuo, Cherry Mui, Christian Stewart, Austin Clements, Dmitri Goutnik, Ian Lance Taylor, golang-co...@googlegroups.com

                Dmitry Vyukov submitted this change.

                View Change



                4 is the latest approved patch-set.
                The change was submitted with unreviewed changes in the following files:

                ```
                The name of the file: src/runtime/lfstack_64bit.go
                Insertions: 1, Deletions: 1.

                @@ -37,7 +37,7 @@
                aixAddrBits = 57
                aixCntBits = 64 - aixAddrBits + 3

                - // Riscv64 SV57 mode gives 56 bits of userspace VA.
                + // riscv64 SV57 mode gives 56 bits of userspace VA.
                // lfstack code supports it, but broader support for SV57 mode is incomplete,
                // and there may be other issues (see #54104).
                riscv64AddrBits = 56
                ```

                Approvals: Meng Zhuo: Looks good to me, but someone else must approve Michael Knyszek: Looks good to me, approved Cherry Mui: Looks good to me, but someone else must approve Joel Sing: Looks good to me, but someone else must approve
                runtime: support riscv64 SV57 mode

                riscv64 has SV57 mode when user-space VA is 56 bits.
                Linux kernel recently got support for this mode and Go binaries started crashing as:

                runtime: lfstack.push invalid packing: node=0xffffff5908a940 cnt=0x1
                packed=0xffff5908a9400001 -> node=0xffff5908a940

                Adjust lfstack code to use only 8 top bits of pointers on riscv64.

                For context see:
                https://groups.google.com/g/syzkaller-bugs/c/lU0GQTZoNQQ/m/O_c3vmE3AAAJ

                Update #54104

                Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
                Reviewed-on: https://go-review.googlesource.com/c/go/+/409055
                Reviewed-by: Joel Sing <jo...@sing.id.au>
                Reviewed-by: Meng Zhuo <m...@golangcn.org>
                Reviewed-by: Michael Knyszek <mkny...@google.com>
                Reviewed-by: Cherry Mui <cher...@google.com>
                ---
                M src/runtime/lfstack_64bit.go
                1 file changed, 39 insertions(+), 0 deletions(-)

                diff --git a/src/runtime/lfstack_64bit.go b/src/runtime/lfstack_64bit.go
                index 154130c..88cbd3b 100644
                --- a/src/runtime/lfstack_64bit.go
                +++ b/src/runtime/lfstack_64bit.go
                @@ -36,12 +36,21 @@
                // We use one bit to distinguish between the two ranges.
                aixAddrBits = 57
                aixCntBits = 64 - aixAddrBits + 3
                +
                + // riscv64 SV57 mode gives 56 bits of userspace VA.
                + // lfstack code supports it, but broader support for SV57 mode is incomplete,
                + // and there may be other issues (see #54104).
                + riscv64AddrBits = 56
                + riscv64CntBits = 64 - riscv64AddrBits + 3
                )

                func lfstackPack(node *lfnode, cnt uintptr) uint64 {
                if GOARCH == "ppc64" && GOOS == "aix" {
                return uint64(uintptr(unsafe.Pointer(node)))<<(64-aixAddrBits) | uint64(cnt&(1<<aixCntBits-1))
                }
                + if GOARCH == "riscv64" {
                + return uint64(uintptr(unsafe.Pointer(node)))<<(64-riscv64AddrBits) | uint64(cnt&(1<<riscv64CntBits-1))
                + }
                return uint64(uintptr(unsafe.Pointer(node)))<<(64-addrBits) | uint64(cnt&(1<<cntBits-1))
                }

                @@ -54,5 +63,8 @@
                if GOARCH == "ppc64" && GOOS == "aix" {
                return (*lfnode)(unsafe.Pointer(uintptr((val >> aixCntBits << 3) | 0xa<<56)))
                }
                + if GOARCH == "riscv64" {
                + return (*lfnode)(unsafe.Pointer(uintptr(val >> riscv64CntBits << 3)))
                + }
                return (*lfnode)(unsafe.Pointer(uintptr(val >> cntBits << 3)))
                }

                To view, visit change 409055. To unsubscribe, or for help writing mail filters, visit settings.

                Gerrit-Project: go
                Gerrit-Branch: master
                Gerrit-Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
                Gerrit-Change-Number: 409055
                Gerrit-PatchSet: 6
                Gerrit-Owner: Dmitry Vyukov <dvy...@google.com>
                Gerrit-Reviewer: Austin Clements <aus...@google.com>
                Gerrit-Reviewer: Cherry Mui <cher...@google.com>
                Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
                Gerrit-Reviewer: Gopher Robot <go...@golang.org>
                Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
                Gerrit-Reviewer: Joel Sing <jo...@sing.id.au>
                Gerrit-Reviewer: Meng Zhuo <m...@golangcn.org>
                Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
                Gerrit-CC: Christian Stewart <chri...@paral.in>
                Gerrit-CC: Dmitri Goutnik <dgou...@gmail.com>
                Gerrit-MessageType: merged
                Ответить всем
                Отправить сообщение автору
                Переслать
                0 новых сообщений