Skip to content

Commit

Permalink
unix: update to Linux 6.11
Browse files Browse the repository at this point in the history
Change-Id: I1cc777822da1b557e69634faade8e24d06c00ce8
GitHub-Last-Rev: d09238e
GitHub-Pull-Request: #218
Reviewed-on: https://go-review.googlesource.com/c/sys/+/613855
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
  • Loading branch information
mauri870 authored and gopherbot committed Sep 30, 2024
1 parent 981de40 commit e7397b9
Show file tree
Hide file tree
Showing 26 changed files with 147 additions and 36 deletions.
4 changes: 2 additions & 2 deletions unix/linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
# Get the git sources. If not cached, this takes O(5 minutes).
WORKDIR /git
RUN git config --global advice.detachedHead false
# Linux Kernel: Released 14 July 2024
RUN git clone --branch v6.10 --depth 1 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux
# Linux Kernel: Released 15 Sep 2024
RUN git clone --branch v6.11 --depth 1 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux
# GNU C library: Released 21 July 2024
RUN git clone --branch release/2.40/master --depth 1 https://sourceware.org/git/glibc.git

Expand Down
14 changes: 14 additions & 0 deletions unix/linux/mksysnum.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ package main

import (
"bufio"
"bytes"
"fmt"
"os"
"os/exec"
Expand Down Expand Up @@ -125,6 +126,19 @@ func main() {
fmt.Fprintf(os.Stderr, "can't run %s", cc)
os.Exit(1)
}

switch goarch {
case "riscv64", "loong64", "arm64":
// Kernel linux v6.11 removed some __NR_* macros that only
// existed on some architectures as an implementation detail. In
// order to keep backwards compatibility we add them back.
//
// See https://lkml.org/lkml/2024/8/5/1283.
if !bytes.Contains(cmd, []byte("#define __NR_arch_specific_syscall")) {
cmd = append(cmd, []byte("#define __NR_arch_specific_syscall 244\n")...)
}
}

s := bufio.NewScanner(strings.NewReader(string(cmd)))
var offset, prev, asOffset int
var nums syscallNums
Expand Down
2 changes: 2 additions & 0 deletions unix/syscall_linux_arm64.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,5 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error
}
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
}

const SYS_FSTATAT = SYS_NEWFSTATAT
2 changes: 2 additions & 0 deletions unix/syscall_linux_loong64.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,3 +214,5 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error
}
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
}

const SYS_FSTATAT = SYS_NEWFSTATAT
2 changes: 2 additions & 0 deletions unix/syscall_linux_riscv64.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,5 @@ func RISCVHWProbe(pairs []RISCVHWProbePairs, set *CPUSet, flags uint) (err error
}
return riscvHWProbe(pairs, setSize, set, flags)
}

const SYS_FSTATAT = SYS_NEWFSTATAT
13 changes: 11 additions & 2 deletions unix/zerrors_linux.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions unix/zerrors_linux_386.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions unix/zerrors_linux_amd64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions unix/zerrors_linux_arm.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions unix/zerrors_linux_arm64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions unix/zerrors_linux_loong64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions unix/zerrors_linux_mips.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions unix/zerrors_linux_mips64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions unix/zerrors_linux_mips64le.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions unix/zerrors_linux_mipsle.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions unix/zerrors_linux_ppc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions unix/zerrors_linux_ppc64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions unix/zerrors_linux_ppc64le.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions unix/zerrors_linux_riscv64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions unix/zerrors_linux_s390x.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions unix/zerrors_linux_sparc64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions unix/zsysnum_linux_amd64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion unix/zsysnum_linux_arm64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions unix/zsysnum_linux_loong64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion unix/zsysnum_linux_riscv64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e7397b9

Please sign in to comment.