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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2d7a896b-bbee-4285-9b2b-3edfab6797d3@p183>
Date: Sun, 14 Apr 2024 14:41:34 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: Chaitanya S Prakash <ChaitanyaS.Prakash@....com>
Cc: linux-perf-users@...r.kernel.org, anshuman.khandual@....com,
	james.clark@....com, Josh Poimboeuf <jpoimboe@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Suzuki K Poulose <suzuki.poulose@....com>,
	Mike Leach <mike.leach@...aro.org>,
	John Garry <john.g.garry@...cle.com>, Will Deacon <will@...nel.org>,
	Leo Yan <leo.yan@...aro.org>, Ingo Molnar <mingo@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Namhyung Kim <namhyung@...nel.org>,
	Mark Rutland <mark.rutland@....com>,
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
	Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Chenyuan Mi <cymi20@...an.edu.cn>,
	Masami Hiramatsu <mhiramat@...nel.org>,
	Ravi Bangoria <ravi.bangoria@....com>,
	Ahelenia Ziemiańska <nabijaczleweli@...ijaczleweli.xyz>,
	Colin Ian King <colin.i.king@...il.com>,
	Changbin Du <changbin.du@...wei.com>,
	Kan Liang <kan.liang@...ux.intel.com>,
	Athira Rajeev <atrajeev@...ux.vnet.ibm.com>,
	Tiezhu Yang <yangtiezhu@...ngson.cn>,
	Georg Müller <georgmueller@....net>,
	Liam Howlett <liam.howlett@...cle.com>, bpf@...r.kernel.org,
	coresight@...ts.linaro.org, linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2 0/8] perf tools: Fix test "perf probe of function from
 different CU"

On Thu, Apr 11, 2024 at 05:40:04PM +0530, Chaitanya S Prakash wrote:
> 
> On 4/9/24 11:02, Alexey Dobriyan wrote:
> > On Mon, Apr 08, 2024 at 11:52:22AM +0530, Chaitanya S Prakash wrote:
> > > - Add str_has_suffix() and str_has_prefix() to tools/lib/string.c
> > > - Delete ends_with() and replace its usage with str_has_suffix()
> > > - Delete strstarts() from tools/include/linux/string.h and replace its
> > >    usage with str_has_prefix()
> > It should be the other way: starts_with is normal in userspace.
> > C++, Python, Java, C# all have it. JavaScript too!
> 
> This is done in accordance with Ian's comments on V1 of this patch
> series. Please find the link to the same below.

Yes, but str_has_suffix() doesn't make sense in the wider context.

> https://lore.kernel.org/all/CAP-5=fUFmeoTjLuZTgcaV23iGQU1AdddG+7Rw=d6buMU007+1Q@mail.gmail.com/

	The naming ends_with makes sense but there is also strstarts and
	str_has_prefix, perhaps str_has_suffix would be the most consistent
	and intention revealing name?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ