Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C1B5C433F5 for ; Wed, 5 Jan 2022 23:35:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245432AbiAEXfN (ORCPT ); Wed, 5 Jan 2022 18:35:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245409AbiAEXfE (ORCPT ); Wed, 5 Jan 2022 18:35:04 -0500 Received: from zeniv-ca.linux.org.uk (zeniv-ca.linux.org.uk [IPv6:2607:5300:60:148a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33F54C061245; Wed, 5 Jan 2022 15:35:04 -0800 (PST) Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5Fo3-00HaHI-UG; Wed, 05 Jan 2022 23:35:00 +0000 Date: Wed, 5 Jan 2022 23:34:59 +0000 From: Al Viro To: Linus Torvalds Cc: "Eric W. Biederman" , Linux Kernel Mailing List , linux-arch , Alexey Gladkov , Kyle Huey , Oleg Nesterov , Kees Cook , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Alexander Gordeev , Martin Schwidefsky , Chris Zankel , Max Filippov Subject: Re: [PATCH 02/10] exit: Add and use make_task_dead. Message-ID: References: <87a6ha4zsd.fsf@email.froward.int.ebiederm.org> <20211208202532.16409-2-ebiederm@xmission.com> <871r1l9ai5.fsf@email.froward.int.ebiederm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 05, 2022 at 02:51:05PM -0800, Linus Torvalds wrote: > On Wed, Jan 5, 2022 at 1:53 PM Al Viro wrote: > > > > On Wed, Jan 05, 2022 at 02:46:10PM -0600, Eric W. Biederman wrote: > > > > > > Being in assembly it did not have anything after the name do_exit so it > > > hid from my regex "[^A-Za-z0-9_]do_exit[^A-Za-z0-9]". Thank you for > > > finding that. > > > > Umm... What's wrong with '\'? > > Christ people, you both make it so complicated. > > If you want to search for 'do_exit', just do > > git grep -w do_exit > > where that '-w' does exactly that "word boundary" thing. Sure. > I thought everybody knew about this, because it's such a common thing > to do - checking my shell history, more than a third of my "git grep" > uses use '-w', exactly because it's very convenient for identifier > lookup > > But yes, in more complex cases where you have other parts to the > pattern (ie you're not looking *just* for a single word), by all means > use '\<' and/or '\>'. Yep. I wanted to make it clear that you really don't need that kind of horrors ([^A-Za-z0-9_]); sure, on the ends of regex you just need -w and that's it, but it's not needed in more convoluted cases either. BTW, it doesn't have to be "have other parts of pattern" - IME the typical case when -w is not enough is something like git grep -n '\