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]
Message-ID: <87730f18-4ad7-2a21-f1bd-483074748b37@loongson.cn>
Date: Thu, 27 Nov 2025 09:39:17 +0800
From: Tiezhu Yang <yangtiezhu@...ngson.cn>
To: Bibo Mao <maobibo@...ngson.cn>, Jinyang He <hejinyang@...ngson.cn>
Cc: Huacai Chen <chenhuacai@...nel.org>, Xi Zhang <zhangxi@...inos.cn>,
 Xianglai Li <lixianglai@...ngson.cn>, loongarch@...ts.linux.dev,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] LoongArch: Handle special PC in unwind_next_frame()

On 2025/11/26 下午5:56, Bibo Mao wrote:
> 
> 
> On 2025/11/26 下午5:09, Tiezhu Yang wrote:
>> Cc: Bibo Mao <maobibo@...ngson.cn>
...
>> +#if IS_ENABLED(CONFIG_KVM)
>> +void (*get_kvm_entry_info)(unsigned long *old, unsigned long *new, 
>> unsigned long *size);
>> +EXPORT_SYMBOL_GPL(get_kvm_entry_info);
>> +#endif
> this method mixes kvm and unwind components and it is obvious hack 
> method. If there are other modules which have the similar problem, how 
> to handle it? Add get_MODULE_1_entry_info/get_MODULE_2_entry_info API :)

Currently, there is no other similar issue and something that should not
happen in the future, this is "concrete question concrete analysis" and
"handle special cases with special methods".

> KVM module copy exception function to allocated memory, it breaks unwind 
> rules. KVM can compile exception function in kernel and do not copy the 
> exception functions or LoongArch kernel provides unwind hint APIs to 
> handle it.

That is better if it is possible for KVM, no general API for kernel IMO.

>>   static inline unsigned long bt_address(unsigned long ra)
...
>> +       get_kvm_entry_info = kvm_entry_info;
> Is this API get_kvm_entry_info() general for all modules or kernel 
> components?

No, it is just to get the necessary exception info for this special KVM
case, we can use something like EXPORT_SYMBOL_FOR_KVM_INTERNAL to avoid
the potential misuse if possible (not tested yet).

Thanks,
Tiezhu


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ