https://github.com/ajordanr-google created
https://github.com/llvm/llvm-project/pull/74791
process_vm_readv is generally considered dangerous from a syscall perspective,
and is frequently blanket banned in seccomp filters such as those in Chromium
and ChromiumOS. We can get the same behaviour
@@ -2822,13 +2825,18 @@ bool UnwindCursor::setInfoForSigReturn(Registers_s390x &) {
// onto the stack.
const pint_t pc = static_cast(this->getReg(UNW_REG_IP));
// The PC might contain an invalid address if the unwind info is bad, so
- // directly accessing it could cause
@@ -2700,19 +2701,18 @@ bool UnwindCursor::setInfoForSigReturn(Registers_arm64 &) {
// [1]
https://github.com/torvalds/linux/blob/master/arch/arm64/kernel/vdso/sigreturn.S
const pint_t pc = static_cast(this->getReg(UNW_REG_IP));
// The PC might contain an invalid address
https://github.com/ajordanr-google edited
https://github.com/llvm/llvm-project/pull/74791
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ajordanr-google updated
https://github.com/llvm/llvm-project/pull/74791
>From 1f4df1b82970c95684eed93c8f6bcaa6d6507b88 Mon Sep 17 00:00:00 2001
From: Jordan R Abrahams-Whitehead
Date: Fri, 8 Dec 2023 00:09:59 +
Subject: [PATCH 1/2] [libunwind] Replace process_vm_readv wit
@@ -2822,13 +2825,18 @@ bool UnwindCursor::setInfoForSigReturn(Registers_s390x &) {
// onto the stack.
const pint_t pc = static_cast(this->getReg(UNW_REG_IP));
// The PC might contain an invalid address if the unwind info is bad, so
- // directly accessing it could cause
@@ -2700,19 +2701,18 @@ bool UnwindCursor::setInfoForSigReturn(Registers_arm64 &) {
// [1]
https://github.com/torvalds/linux/blob/master/arch/arm64/kernel/vdso/sigreturn.S
const pint_t pc = static_cast(this->getReg(UNW_REG_IP));
// The PC might contain an invalid address
https://github.com/ajordanr-google updated
https://github.com/llvm/llvm-project/pull/74791
>From 1f4df1b82970c95684eed93c8f6bcaa6d6507b88 Mon Sep 17 00:00:00 2001
From: Jordan R Abrahams-Whitehead
Date: Fri, 8 Dec 2023 00:09:59 +
Subject: [PATCH 1/3] [libunwind] Replace process_vm_readv wit
https://github.com/ajordanr-google updated
https://github.com/llvm/llvm-project/pull/74791
>From 1f4df1b82970c95684eed93c8f6bcaa6d6507b88 Mon Sep 17 00:00:00 2001
From: Jordan R Abrahams-Whitehead
Date: Fri, 8 Dec 2023 00:09:59 +
Subject: [PATCH 1/4] [libunwind] Replace process_vm_readv wit
https://github.com/ajordanr-google updated
https://github.com/llvm/llvm-project/pull/74791
>From 1f4df1b82970c95684eed93c8f6bcaa6d6507b88 Mon Sep 17 00:00:00 2001
From: Jordan R Abrahams-Whitehead
Date: Fri, 8 Dec 2023 00:09:59 +
Subject: [PATCH 1/5] [libunwind] Replace process_vm_readv wit
https://github.com/ajordanr-google updated
https://github.com/llvm/llvm-project/pull/74791
>From 1f4df1b82970c95684eed93c8f6bcaa6d6507b88 Mon Sep 17 00:00:00 2001
From: Jordan R Abrahams-Whitehead
Date: Fri, 8 Dec 2023 00:09:59 +
Subject: [PATCH 1/7] [libunwind] Replace process_vm_readv wit
https://github.com/ajordanr-google updated
https://github.com/llvm/llvm-project/pull/74791
>From 1f4df1b82970c95684eed93c8f6bcaa6d6507b88 Mon Sep 17 00:00:00 2001
From: Jordan R Abrahams-Whitehead
Date: Fri, 8 Dec 2023 00:09:59 +
Subject: [PATCH 1/7] [libunwind] Replace process_vm_readv wit
https://github.com/ajordanr-google edited
https://github.com/llvm/llvm-project/pull/74791
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ajordanr-google edited
https://github.com/llvm/llvm-project/pull/74791
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ajordanr-google updated
https://github.com/llvm/llvm-project/pull/74791
>From 1f4df1b82970c95684eed93c8f6bcaa6d6507b88 Mon Sep 17 00:00:00 2001
From: Jordan R Abrahams-Whitehead
Date: Fri, 8 Dec 2023 00:09:59 +
Subject: [PATCH 1/8] [libunwind] Replace process_vm_readv wit
@@ -26,7 +26,7 @@
__attribute__((naked)) void bad_unwind_info() {
#if defined(__aarch64__)
__asm__("// not using 0 because unwinder was already resilient to that\n"
- "mov x8, #4\n"
+ "mov x8, #12\n"
ajordanr-google wrote:
Note: cha
https://github.com/ajordanr-google edited
https://github.com/llvm/llvm-project/pull/74791
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2974,6 +2966,39 @@ bool UnwindCursor::getFunctionName(char *buf,
size_t bufLen,
buf, bufLen, offset);
}
+#if defined(_LIBUNWIND_CHECK_LINUX_SIGRETURN)
+template
+bool UnwindCursor::isReadableAddr(const pint_t addr) const {
+ // T
https://github.com/ajordanr-google updated
https://github.com/llvm/llvm-project/pull/74791
>From 1f4df1b82970c95684eed93c8f6bcaa6d6507b88 Mon Sep 17 00:00:00 2001
From: Jordan R Abrahams-Whitehead
Date: Fri, 8 Dec 2023 00:09:59 +
Subject: [PATCH 01/10] [libunwind] Replace process_vm_readv w
@@ -2974,6 +2966,39 @@ bool UnwindCursor::getFunctionName(char *buf,
size_t bufLen,
buf, bufLen, offset);
}
+#if defined(_LIBUNWIND_CHECK_LINUX_SIGRETURN)
+template
+bool UnwindCursor::isReadableAddr(const pint_t addr) const {
+ // T
@@ -2822,13 +2816,11 @@ bool UnwindCursor::setInfoForSigReturn(Registers_s390x &) {
// onto the stack.
const pint_t pc = static_cast(this->getReg(UNW_REG_IP));
// The PC might contain an invalid address if the unwind info is bad, so
- // directly accessing it could cause
@@ -2974,6 +2966,39 @@ bool UnwindCursor::getFunctionName(char *buf,
size_t bufLen,
buf, bufLen, offset);
}
+#if defined(_LIBUNWIND_CHECK_LINUX_SIGRETURN)
+template
+bool UnwindCursor::isReadableAddr(const pint_t addr) const {
+ // T
@@ -2762,18 +2757,17 @@ int UnwindCursor::stepThroughSigReturn(Registers_arm64 &) {
template
bool UnwindCursor::setInfoForSigReturn(Registers_riscv &) {
const pint_t pc = static_cast(getReg(UNW_REG_IP));
- uint32_t instructions[2];
- struct iovec local_iov = {&instructions
@@ -2974,6 +2966,39 @@ bool UnwindCursor::getFunctionName(char *buf,
size_t bufLen,
buf, bufLen, offset);
}
+#if defined(_LIBUNWIND_CHECK_LINUX_SIGRETURN)
+template
+bool UnwindCursor::isReadableAddr(const pint_t addr) const {
+ // T
@@ -2974,6 +2966,39 @@ bool UnwindCursor::getFunctionName(char *buf,
size_t bufLen,
buf, bufLen, offset);
}
+#if defined(_LIBUNWIND_CHECK_LINUX_SIGRETURN)
+template
+bool UnwindCursor::isReadableAddr(const pint_t addr) const {
+ // T
@@ -2974,6 +2966,39 @@ bool UnwindCursor::getFunctionName(char *buf,
size_t bufLen,
buf, bufLen, offset);
}
+#if defined(_LIBUNWIND_CHECK_LINUX_SIGRETURN)
+template
+bool UnwindCursor::isReadableAddr(const pint_t addr) const {
+ // T
@@ -2974,6 +2966,39 @@ bool UnwindCursor::getFunctionName(char *buf,
size_t bufLen,
buf, bufLen, offset);
}
+#if defined(_LIBUNWIND_CHECK_LINUX_SIGRETURN)
+template
+bool UnwindCursor::isReadableAddr(const pint_t addr) const {
+ // T
https://github.com/ajordanr-google updated
https://github.com/llvm/llvm-project/pull/74791
>From 1f4df1b82970c95684eed93c8f6bcaa6d6507b88 Mon Sep 17 00:00:00 2001
From: Jordan R Abrahams-Whitehead
Date: Fri, 8 Dec 2023 00:09:59 +
Subject: [PATCH 01/11] [libunwind] Replace process_vm_readv w
https://github.com/ajordanr-google updated
https://github.com/llvm/llvm-project/pull/74791
>From 1f4df1b82970c95684eed93c8f6bcaa6d6507b88 Mon Sep 17 00:00:00 2001
From: Jordan R Abrahams-Whitehead
Date: Fri, 8 Dec 2023 00:09:59 +
Subject: [PATCH 01/12] [libunwind] Replace process_vm_readv w
@@ -26,7 +26,7 @@
__attribute__((naked)) void bad_unwind_info() {
#if defined(__aarch64__)
__asm__("// not using 0 because unwinder was already resilient to that\n"
- "mov x8, #4\n"
+ "mov x8, #12\n"
ajordanr-google wrote:
Undid thi
@@ -2817,7 +2817,7 @@ bool UnwindCursor::setInfoForSigReturn(Registers_s390x &) {
const pint_t pc = static_cast(this->getReg(UNW_REG_IP));
// The PC might contain an invalid address if the unwind info is bad, so
// directly accessing it could cause a SIGSEGV.
- if (!isRe
@@ -2974,6 +2966,39 @@ bool UnwindCursor::getFunctionName(char *buf,
size_t bufLen,
buf, bufLen, offset);
}
+#if defined(_LIBUNWIND_CHECK_LINUX_SIGRETURN)
+template
+bool UnwindCursor::isReadableAddr(const pint_t addr) const {
+ // T
https://github.com/ajordanr-google edited
https://github.com/llvm/llvm-project/pull/74791
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ajordanr-google edited
https://github.com/llvm/llvm-project/pull/74791
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ajordanr-google edited
https://github.com/llvm/llvm-project/pull/74791
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ajordanr-google updated
https://github.com/llvm/llvm-project/pull/74791
>From 1f4df1b82970c95684eed93c8f6bcaa6d6507b88 Mon Sep 17 00:00:00 2001
From: Jordan R Abrahams-Whitehead
Date: Fri, 8 Dec 2023 00:09:59 +
Subject: [PATCH 01/13] [libunwind] Replace process_vm_readv w
@@ -2974,6 +2966,37 @@ bool UnwindCursor::getFunctionName(char *buf,
size_t bufLen,
buf, bufLen, offset);
}
+#if defined(_LIBUNWIND_CHECK_LINUX_SIGRETURN)
+template
+bool UnwindCursor::isReadableAddr(const pint_t addr) const {
+ // T
@@ -2974,6 +2966,37 @@ bool UnwindCursor::getFunctionName(char *buf,
size_t bufLen,
buf, bufLen, offset);
}
+#if defined(_LIBUNWIND_CHECK_LINUX_SIGRETURN)
+template
+bool UnwindCursor::isReadableAddr(const pint_t addr) const {
+ // T
@@ -2974,6 +2966,37 @@ bool UnwindCursor::getFunctionName(char *buf,
size_t bufLen,
buf, bufLen, offset);
}
+#if defined(_LIBUNWIND_CHECK_LINUX_SIGRETURN)
+template
+bool UnwindCursor::isReadableAddr(const pint_t addr) const {
+ // T
ajordanr-google wrote:
I don't have Commit Access (I so rarely actually commit to upstream), and I
don't think I have yet the "track record of submitting high quality patches" :)
Can someone else merge this once the checks are green?
https://github.com/llvm/llvm-project/pull/74791
ajordanr-google wrote:
Hmm. It looks like `[[maybe_unused]]` is still disallowed...
https://github.com/llvm/llvm-project/pull/74791
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ajordanr-google updated
https://github.com/llvm/llvm-project/pull/74791
>From 9d4665cf1ddda98129af2f6ff575989cec49af6d Mon Sep 17 00:00:00 2001
From: Jordan R Abrahams-Whitehead
Date: Fri, 8 Dec 2023 00:09:59 +
Subject: [PATCH 01/13] [libunwind] Replace process_vm_readv w
ajordanr-google wrote:
Rebased to include 47413bb2760e63a3302871ea770d6c0f5a742036 (a merge commit
seemed silly?). No other changes have been made.
https://github.com/llvm/llvm-project/pull/74791
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ajordanr-google wrote:
All CI runs are failing on unrelated tests... can we re-run the CI again in a
week or so?
https://github.com/llvm/llvm-project/pull/74791
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mai
https://github.com/ajordanr-google updated
https://github.com/llvm/llvm-project/pull/74791
>From 9d4665cf1ddda98129af2f6ff575989cec49af6d Mon Sep 17 00:00:00 2001
From: Jordan R Abrahams-Whitehead
Date: Fri, 8 Dec 2023 00:09:59 +
Subject: [PATCH 01/13] [libunwind] Replace process_vm_readv w
ajordanr-google wrote:
Done! Thanks for the heads up on the email. I'm not too familiar with the
GitHub workflow still. Also thanks for this fix PR.
https://github.com/llvm/llvm-project/pull/78054
___
cfe-commits mailing list
cfe-commits@lists.llvm.or
46 matches
Mail list logo