ACK: [SRU][Bionic][PATCH 1/1] s390/uprobes: implement arch_uretprobe_is_alive()

Stefan Bader stefan.bader at canonical.com
Mon Jul 30 12:04:54 UTC 2018


On 22.06.2018 18:31, Joseph Salisbury wrote:
> From: Heiko Carstens <heiko.carstens at de.ibm.com>
> 
> BugLink: http://bugs.launchpad.net/bugs/1777840
> 
> Implement s390 specific arch_uretprobe_is_alive() to avoid SIGSEGVs
> observed with uretprobes in combination with setjmp/longjmp.
> 
> See commit 2dea1d9c38e4 ("powerpc/uprobes: Implement
> arch_uretprobe_is_alive()") for more details.
> 
> With this implemented all test cases referenced in the above commit
> pass.
> 
> Reported-by: Ziqian SUN <zsun at redhat.com>
> Cc: <stable at vger.kernel.org> # v4.3+
> Signed-off-by: Heiko Carstens <heiko.carstens at de.ibm.com>
> Signed-off-by: Martin Schwidefsky <schwidefsky at de.ibm.com>
> (cherry picked from commit 783c3b53b9506db3e05daacfe34e0287eebb09d8)
> Signed-off-by: Joseph Salisbury <joseph.salisbury at canonical.com>
Acked-by: Stefan Bader <stefan.bader at canonical.com>
> ---
>  arch/s390/kernel/uprobes.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/arch/s390/kernel/uprobes.c b/arch/s390/kernel/uprobes.c
> index d9d1f51..5007fac 100644
> --- a/arch/s390/kernel/uprobes.c
> +++ b/arch/s390/kernel/uprobes.c
> @@ -150,6 +150,15 @@ unsigned long arch_uretprobe_hijack_return_addr(unsigned long trampoline,
>  	return orig;
>  }
>  
> +bool arch_uretprobe_is_alive(struct return_instance *ret, enum rp_check ctx,
> +			     struct pt_regs *regs)
> +{
> +	if (ctx == RP_CHECK_CHAIN_CALL)
> +		return user_stack_pointer(regs) <= ret->stack;
> +	else
> +		return user_stack_pointer(regs) < ret->stack;
> +}
> +
>  /* Instruction Emulation */
>  
>  static void adjust_psw_addr(psw_t *psw, unsigned long len)
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20180730/f2479584/attachment.sig>


More information about the kernel-team mailing list