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 42A9D260A29 for ; Tue, 11 Feb 2025 17:00:33 +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=1739293235; cv=none; b=n/0FEFcUvKEwOMXt9AAaQERsl/rcR8F6Ogv6zH/vHEuJ5Xmvvvg9a2w5CAuNiWLDt2jK/thucgMA1TRp8ipq7ZttqmbSNXrF3dSjOhcRS3PjHsfjKYwZoWfyAlHSsjoFUptl7/I/1kc3w5xGgOaHeiMMzhB6tCh/F0MMq3LvWmI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739293235; c=relaxed/simple; bh=Ijl1870gwz6IX+/MESbsYzIdZlpRJGmSg/J77w9i4U4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bZCK3M3h4nRxgWegzAAsLzs7iSFXiB80A6fMv+0EcIlNKWyVSj1yogKMa4Mdx5Z77loH9ETFjsbxSCOXcJW9mMrhoNF0Wnc6b4uFx9gSqqTyz8KT3BxnAwqjHAr8A7wxHl+OK/fTO/Yq0fU4wk2Hi2mvyzXOG8Py/AFDII1Ulqc= 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=gJEeZBJl; 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="gJEeZBJl" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1739293233; 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=Ijl1870gwz6IX+/MESbsYzIdZlpRJGmSg/J77w9i4U4=; b=gJEeZBJlRP9T2mgDzXkOfToTk0lBBUP0fPNnC2TKzkC5DMuX6RhU6tzJdme/ZYzkz804jI FE4h70UhzNfRCFR1f8axcg2Ol2iIWLUbpZff80U+eXoVzliXRbgxKZ9mAN2md1S/+zuOdY jqfMTtMrHClEPM8KzT0Nt+jS49qfA/4= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-359-DUCuPesZNGyoR9XuI7pEIQ-1; Tue, 11 Feb 2025 12:00:29 -0500 X-MC-Unique: DUCuPesZNGyoR9XuI7pEIQ-1 X-Mimecast-MFC-AGG-ID: DUCuPesZNGyoR9XuI7pEIQ Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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 mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D32C91800872; Tue, 11 Feb 2025 17:00:17 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.44.32.197]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id 5438019560A3; Tue, 11 Feb 2025 17:00:09 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Tue, 11 Feb 2025 17:59:51 +0100 (CET) Date: Tue, 11 Feb 2025 17:59:41 +0100 From: Oleg Nesterov To: Alexei Starovoitov Cc: Andrii Nakryiko , Jiri Olsa , Steven Rostedt , Masami Hiramatsu , Peter Zijlstra , Andrii Nakryiko , Kees Cook , Eyal Birger , stable , Jann Horn , LKML , linux-trace-kernel , Linux API , X86 ML , bpf , Thomas Gleixner , Ingo Molnar , Andy Lutomirski , Deepak Gupta , Stephen Rothwell Subject: Re: [PATCHv2 perf/core] uprobes: Harden uretprobe syscall trampoline check Message-ID: <20250211165940.GB9174@redhat.com> References: <20250211111559.2984778-1-jolsa@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: User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 On 02/11, Alexei Starovoitov wrote: > > > > +#define UPROBE_NO_TRAMPOLINE_VADDR ((unsigned long)-1) > > If you respin anyway maybe use ~0UL instead? > In the above and in > uprobe_get_trampoline_vaddr(), > since > > unsigned long trampoline_vaddr = -1; ... or -1ul in both cases. I agree, UPROBE_NO_TRAMPOLINE_VADDR has a single user, looks a bit strange... Oleg.