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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f99fe71d-cd97-e641-d637-5e7efbcad5f5@loongson.cn>
Date:   Sun, 23 Apr 2023 18:39:38 +0800
From:   Tiezhu Yang <yangtiezhu@...ngson.cn>
To:     Bagas Sanjaya <bagasdotme@...il.com>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Cc:     linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
        loongson-kernel@...ts.loongnix.cn, Oleg Nesterov <oleg@...hat.com>,
        Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
Subject: Re: [PATCH] MIPS: uprobes: Restore thread.trap_nr

Cc:
Oleg Nesterov <oleg@...hat.com>
Srikar Dronamraju <srikar@...ux.vnet.ibm.com>

On 04/23/2023 11:08 AM, Bagas Sanjaya wrote:
> On Sun, Apr 23, 2023 at 09:38:03AM +0800, Tiezhu Yang wrote:
>> thread.trap_nr is saved in arch_uprobe_pre_xol(), it should be restored
>> in arch_uprobe_{post,abort}_xol() accordingly, actually it was only done
>> in the post function, just do it in the abort function too, this change
>> is similar with x86 and powerpc.
>
> I'm confused (please fix up grammar, spelling, and punctuation). Can you
> explain why thread.trap_nr should be restored somewhere else? Also, what
> x86/powerpc changes as reference?
>

Here is the related first commit for x86 in 2012:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0326f5a94dde

When xol insn itself triggers the signal, restart the original insn,
in this case, UTASK_SSTEP_TRAPPED is set [1], it does *abort_xol()
instead of *post_xol() [2], then should do the restore operations.

Maybe Oleg and Srikar could give more detailed backgrounds, thank you.
https://lore.kernel.org/lkml/1682213883-3654-1-git-send-email-yangtiezhu@loongson.cn/

[1] 
https://elixir.bootlin.com/linux/latest/source/kernel/events/uprobes.c#L1980
[2] 
https://elixir.bootlin.com/linux/latest/source/kernel/events/uprobes.c#L2268

Thanks,
Tiezhu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ