From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8CBEA12AAF4 for ; Thu, 4 Apr 2024 16:12:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712247170; cv=none; b=k7g5zqeLpPSmjtcHDMcO9dbiSHgpJ+kzdzgWnAlH9CI1VHGZZfb75mQC6cgJzEyJd7dMFpHhXzjX3TlXyAjc13CXHfzTc5qHqCgu1e04TBj8olvsG1ApZZp6RX/zDnOi7Kck98f/lPjYRmOhJmftakUYFQgoqNk2yP/VAq4GSao= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712247170; c=relaxed/simple; bh=3HSmrmrDL7YmMBwELqadS0hgYO3UwLptL2RIgXbGdgQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=u4uzQ4vywp3Qjl9YKURyug2WIss4XTRc7KCTXEXWQvesATEiuUsCrlIvLUAUO1/+3Lq0V9BumntFhCf1qhxD0Mjv+3OkU10u8IjCF2vdmOQqw2G4phTwHMCAyPmaqv6KMbbGaeGfcscV4uQUiMiE+dI2kxvFVCdj3bzwmQNSc7s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=QsbYvA62; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QsbYvA62" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712247167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=3HSmrmrDL7YmMBwELqadS0hgYO3UwLptL2RIgXbGdgQ=; b=QsbYvA62wzRq+kCZQd22gy3QsR/FsAyz+R77mjAtZsmBHueKq2UvZWFS5ChORcob3vD2xB s7VVB7wddy2cIzSmcZ1+NQiGP4yXr5ZiQwXcrLkQokE4Kxg6sxUDABGuBJcmqN29dQ1pWv v+kLpCOTyYW/eSXSf7tDmTIc4z4gg5E= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-101-j9ymssyqOlWdOSkA-ie3Bw-1; Thu, 04 Apr 2024 12:12:44 -0400 X-MC-Unique: j9ymssyqOlWdOSkA-ie3Bw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2C64885A5B9; Thu, 4 Apr 2024 16:12:43 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.225.21]) by smtp.corp.redhat.com (Postfix) with SMTP id 10D51492BC6; Thu, 4 Apr 2024 16:12:38 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Thu, 4 Apr 2024 18:11:18 +0200 (CEST) Date: Thu, 4 Apr 2024 18:11:09 +0200 From: Oleg Nesterov To: Masami Hiramatsu Cc: Andrii Nakryiko , Jiri Olsa , Steven Rostedt , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, bpf@vger.kernel.org, Song Liu , Yonghong Song , John Fastabend , Peter Zijlstra , Thomas Gleixner , "Borislav Petkov (AMD)" , x86@kernel.org, linux-api@vger.kernel.org Subject: Re: [PATCHv2 1/3] uprobe: Add uretprobe syscall to speed up return probe Message-ID: <20240404161108.GG7153@redhat.com> References: <20240402093302.2416467-1-jolsa@kernel.org> <20240402093302.2416467-2-jolsa@kernel.org> <20240403100708.233575a8ac2a5bac2192d180@kernel.org> <20240403230937.c3bd47ee47c102cd89713ee8@kernel.org> <20240404095829.ec5db177f29cd29e849169fa@kernel.org> <20240405005405.9bcbe5072d2f32967501edb3@kernel.org> Precedence: bulk X-Mailing-List: linux-api@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240405005405.9bcbe5072d2f32967501edb3@kernel.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 On 04/05, Masami Hiramatsu wrote: > > Can we make this syscall and uprobe behavior clearer? As you said, if > the application use sigreturn or longjump, it may skip returns and > shadow stack entries are left in the kernel. In such cases, can uretprobe > detect it properly, or just crash the process (or process runs wrongly)? Please see the comment in handle_trampoline(), it tries to detect this case. This patch should not make any difference. Oleg.