lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 07 Jun 2024 13:42:41 +0800
From: Xi Ruoyao <xry111@...111.site>
To: Jinyang He <hejinyang@...ngson.cn>, Nathan Chancellor
 <nathan@...nel.org>,  Peter Zijlstra <peterz@...radead.org>
Cc: Huacai Chen <chenhuacai@...nel.org>, WANG Xuerui <kernel@...0n.name>, 
 Tiezhu Yang <yangtiezhu@...ngson.cn>, Nick Desaulniers
 <ndesaulniers@...gle.com>, Bill Wendling <morbo@...gle.com>, Justin Stitt
 <justinstitt@...gle.com>, Youling Tang <tangyouling@...inos.cn>,
 loongarch@...ts.linux.dev,  linux-kernel@...r.kernel.org,
 llvm@...ts.linux.dev, mengqinggang@...ngson.cn,  cailulu@...ngson.cn,
 wanglei@...ngson.cn, luweining@...ngson.cn, Yujie Liu
 <yujie.liu@...el.com>, Heng Qi <hengqi@...ux.alibaba.com>, Tejun Heo
 <tj@...nel.org>
Subject: Re: [PATCH] loongarch: Only select HAVE_OBJTOOL and allow ORC
 unwinder if the inline assembler supports R_LARCH_{32,64}_PCREL

On Thu, 2024-06-06 at 10:10 +0800, Jinyang He wrote:
> What I just confused is that there is no ".cfi_*"
> in the eplogue by clang, which may cause wrong backtrace if gdb set
> 
> breakpoint there and backtrace. (But this is out of this topic.)

I don't think it'll cause wrong backtrace.  The real assemble code has
restored the registers and missing .cfi_restore will just make unwinder
restore them again.  There are redundant works but not breakages.

For objtool the main difference seems a thing explained in
https://maskray.me/blog/2020-11-08-stack-unwinding by Fangrui:

   Note: on RISC-V and LoongArch, the stack slot for the previous frame
   pointer is stored at fp[-2] instead of fp[0]. See [Consider
   standardising which stack slot fp points
   to](https://github.com/riscv-non-isa/riscv-elf-psabi-doc/issues/18)
   for the RISC-V discussion.

So perhaps we just need to code a constant named "PREV_BP_OFFSET" or
something in arch/ and use it in update_cfi_state() instead of fully re-
implement the entire function?
-- 
Xi Ruoyao <xry111@...111.site>
School of Aerospace Science and Technology, Xidian University

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ