Re: [PATCH v3 09/19] unwind: Introduce sframe user space unwinding
Jens Remus <[email protected]>
| Newsgroups | org.kernel.vger.linux-toolchains,org.kernel.vger.linux-kernel,org.kernel.vger.linux-perf-users |
|---|---|
| Organization | IBM Deutschland Research & Development GmbH |
| Message-ID | <[email protected]> |
On 13.11.2024 23:13, Steven Rostedt wrote:
> On Wed, 13 Nov 2024 13:15:35 -0800
> BTW, the following changes were needed to make it work for me:
> diff --git a/kernel/unwind/sframe.c b/kernel/unwind/sframe.c
> index 933e47696e29..ca4ef0b72772 100644
> --- a/kernel/unwind/sframe.c
> +++ b/kernel/unwind/sframe.c
> @@ -73,15 +73,15 @@ static int find_fde(struct sframe_section *sec, unsigned long ip,
> struct sframe_fde *fde)
> {
> struct sframe_fde __user *first, *last, *found = NULL;
> - u32 ip_off, func_off_low = 0, func_off_high = -1;
> + s32 ip_off, func_off_low = INT_MIN, func_off_high = INT_MAX;
Coincidentally I was experimenting with exactly the same changes, except
that I used S32_MIN and S32_MAX. Any preference?
>
> ip_off = ip - sec->sframe_addr;
>
> first = (void __user *)sec->fdes_addr;
> - last = first + sec->fdes_nr;
> + last = first + sec->fdes_nr - 1;
> while (first <= last) {
> struct sframe_fde __user *mid;
> - u32 func_off;
> + s32 func_off;
>
> mid = first + ((last - first) / 2);
>
Thanks and regards,
Jens
--
Jens Remus
Linux on Z Development (D3303) and z/VSE Support
+49-7031-16-1128 Office
[email protected]
IBM
IBM Deutschland Research & Development GmbH; Vorsitzender des
Aufsichtsrats: Wolfgang Wendt; Geschäftsführung: David Faller; Sitz der
Gesellschaft: Böblingen; Registergericht: Amtsgericht Stuttgart, HRB 243294
IBM Data Privacy Statement: https://www.ibm.com/privacy/