Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp630553lqb; Wed, 17 Apr 2024 06:47:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXC7+yIzeYSLSZDFz62pkWavOAO3H2zyXK2SyNgAm6C4q/m3LeFg0+G9JPecA93Wve8dnHR7On5DY0mTczENny6bVTGdKy1tZpHqtDi2A== X-Google-Smtp-Source: AGHT+IFDlLS4P1DW8PRgXMg/J9eI3b0fYfQ6BhICkGI9ZMyPKl2BVLaJfdphhYZNtAyGc1VxHm7M X-Received: by 2002:a05:6a00:ad2:b0:6ed:4b2d:a764 with SMTP id c18-20020a056a000ad200b006ed4b2da764mr7974630pfl.11.1713361668261; Wed, 17 Apr 2024 06:47:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713361668; cv=pass; d=google.com; s=arc-20160816; b=L9iWLk0Ub57V4gifijlXprpZcc1yOfqRJei7OLUoKVq7/zpv1u7v+QOptPZHpdG5Bp vEx+NTiRhVY+RJkHs14Y7WmlIdwHGrgCGeiTMWMPaRYjjxT/N/8WD/R2tohf1fOT+XNx dxq/tSoNylC05zkFyhZG7SAzU6GkoZob9kKwUipe/eXKJ9FNMDIppjHF55smxcUIheP/ TQ+Z3ssH/VYKmIbkiqb8A5oQ6tmd3JUNCwkrWDbXpa9UwoOe/+MuJI8lezjKm+9CFaBQ YfeL9ePCh8HiHNR/Rx1J4wW53uIgc8iX886JTj4TjMoxU14luMP5OLZTcblmPuuUGUtc Y5AA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=VcrNSrz5YLClgt1xG63PmPWKiBsRQeXJ1J9K7AmHYFI=; fh=VnnTSX+jScWxqmkxOUYZno7FgWRhgcCcgUheR/NKL+s=; b=xry9BbgMKiw1wnP4DxLylCIVGttxODrFS6iiAUsrFRI6YZuI16IqwEpNBZ3sNNbLGK ZSVO129P2JGlfA3dlJwp5tdGyrA4LZm0IB1W2+rgaPHFEhGbAypPcwbJfWv5jMhsqmak SxNwVVO5pdN8R5D7Z8stMn5E5qJeWMJxGNLC1PgbMpJqaqVAfDbvGWkN7pKYfBH8e5c4 GSG1aUmG3pi21Jc+x9yaPyCYeysNBSDpYKWtoSwWdX8/i+38PZvZEcE4lZ1d0zwOdAvp +rYOT3uklCGGvGmbJe2PmtKZYX+4uxfasU7cylNDmk0Kd+sELoI0iiV7AYp8g15Dw0lk 00Kw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XD0fiL0X; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-148620-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148620-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id x47-20020a056a000bef00b006ede4553cf8si11498351pfu.106.2024.04.17.06.47.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 06:47:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-148620-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XD0fiL0X; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-148620-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148620-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id F318F2836EC for ; Wed, 17 Apr 2024 13:47:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5D842140399; Wed, 17 Apr 2024 13:47:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XD0fiL0X" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 811F713F451; Wed, 17 Apr 2024 13:47:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713361627; cv=none; b=GIBIJNmiat3aUACh/BIsSFhGty2SwETZQjD6Zk8I3iQ3SIjq/iu8XVElONWMkZdeBGRyln38Tn7fGlr8mK1M4w40AK71i7S0EzuyWxSib+SVcghKp7sBY5uyjfnPNEACKCPdvr4wrjsd1/mBrGwUOwuxWYn8Qxy4z6zi/A+4TA0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713361627; c=relaxed/simple; bh=DUxy/imxBqBdg5Gh+AUaXN8SG6ZWyJhrBrb/iBQMZTQ=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=Qpnlc/rrNCWzP/eF8RnwyOskHIcVz5LsB9HeIJ2lawJwMOr3myD2qZSfZjllgKcZ3MraUPIlyIs+grz1ATnjdhYjWHf7DdQnyZCi5W4pmcv/opL/zzvMDqPzamxnpwgxW92uap0GooZaxmNMVz49zdPj/emugxgO2lhjab3cnHo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XD0fiL0X; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4E54EC072AA; Wed, 17 Apr 2024 13:47:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713361626; bh=DUxy/imxBqBdg5Gh+AUaXN8SG6ZWyJhrBrb/iBQMZTQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=XD0fiL0XH29HnulrmqFq6SVORlyGrEz/tTMwd+xV6QuU3Ee/LBgDmXvaAo90Aljrr r0oLGrfUAGII7kW5VrRQJH+T2iZMLARbz/p5Lgvqs7A11VS2ClCKlPmB8HPcBE+06D amz20Qoa2QHYRVGvWrm/ywKSYkGvZIIrK9LK8PhXeq6sJy1KNXEo7bbaLso+mNZ+OX 2z7y69RQtjRwJKdDJelgyzXx/MY/pz5/KD1HRtR+U9T6hSjkzc/fa/TUeHoTOFHm7X dXj8RAXPPRFRH4VvJ9m/BC6kM8+BaiygE3e3bDTkqYxyXqUJPu0jh0mQo9jTgWeaBk ivVQd3hCZEZ8A== Date: Wed, 17 Apr 2024 22:47:03 +0900 From: Masami Hiramatsu (Google) To: Steven Rostedt Cc: LKML , Linux trace kernel , Andrii Nakryiko , Francis Laniel Subject: Re: [PATCH for-next v2] tracing/kprobes: Add symbol counting check when module loads Message-Id: <20240417224703.c011b4ebbef9e8375450dd39@kernel.org> In-Reply-To: <20240416004726.792b8158@rorschach.local.home> References: <171317402290.228024.13465974857683559752.stgit@devnote2> <20240416004726.792b8158@rorschach.local.home> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 16 Apr 2024 00:47:26 -0400 Steven Rostedt wrote: > On Mon, 15 Apr 2024 18:40:23 +0900 > "Masami Hiramatsu (Google)" wrote: > > > Check the number of probe target symbols in the target module when > > the module is loaded. If the probe is not on the unique name symbols > > in the module, it will be rejected at that point. > > > > Note that the symbol which has a unique name in the target module, > > it will be accepted even if there are same-name symbols in the > > kernel or other modules, > > This says what it does, but doesn't explain why it is doing it. > What's the purpose of this patch? Thank you for pointing it out, I just reused the description which I sent last year. It needs to be updated. ----- Currently, kprobe event checks whether the target symbol name is unique, so that it does not put a probe on unexpected place. But this skips the check if the target is on a module. This fixes the issue by checking the symbol is unique in the target module if the target is on a module. ----- Thanks! > > -- Steve -- Masami Hiramatsu (Google)