From nobody Mon Apr 6 18:55:58 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 832F637DEBF; Wed, 18 Mar 2026 08:25:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773822324; cv=none; b=DdAzJb6Sq/GSudlQ5MvRNi1egCtNO7I7sxjnfCr2gR84/jekVP9A9O4LdgPLn/q74MTTDSb8utjzQIzjfPIT/dmw9l13cF4JZIhSsBlB5JbBW46FEN//7q56mw3lEBUGRkyxT9EusmTFfrsdv+sEpFjyd6r0DgH582PHWLV5/T8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773822324; c=relaxed/simple; bh=89ES3i7r0WPB5j1AhiQeX2sGwTLahJ0urY99N6LyCE4=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=YndeXRF/v4r99b3NI1iSQtANdBsB0ePDZTV99Zb9WXn6CdXOaO0+kiEcrLntD81w0Cd1W8JKcxS+7ocodgxHqnpE/FNunQYtPc/krZSbO3T9f0+b57riYnLSVeIE8rCSCHoK4q0Yceu+hb1c0j3hbkdoycoW8P86Gy/BV2bu8U4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=kI7PPdWO; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=d4umwthS; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="kI7PPdWO"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="d4umwthS" Date: Wed, 18 Mar 2026 08:25:18 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773822319; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=C/n2FRzdAe07lBWRwu95Z4wr22H0vn08ASXzRoCQjYU=; b=kI7PPdWO/pz90vdswgNt5BYYygFrR8CD7I8HryAm1pAujX0K5SHZxE8MtJLnHbGgo14YNy 3cUe6+GsV/3rpfxR1mtwyRVi8yGuBIBXy7GyzuXwsvrrG3NXe+VYVW7A8BZ2L0tt6s/zeG gizi9MZDcymG5Qlzr/DCvf2Rhbvm6I5OlAAQSnhrbFOVFh7zJQrMYpXrx5+eSZpEKn82vd Vf8yQGNEXN5cBbenEdgQ1cFPJCY5Iso74S1Ny5Wnpu3cU8viTmfXww26rIf0lk4ZHWfldm 1uqTZNSSJcl0MNdfn81jzMLFa7C5P6HKDW1j25SWWAxLLXcICdHXgyyHS+mriQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773822319; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=C/n2FRzdAe07lBWRwu95Z4wr22H0vn08ASXzRoCQjYU=; b=d4umwthS2FMChHgM4LgJo7VboEBaVyO+TqIwH4K2nf8mxLYMCshIJKqiLFrJjgUolTzNl7 3g0T0ZDJIHf5F/AQ== From: "tip-bot2 for Joe Lawrence" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: objtool/core] livepatch/klp-build: add grep-override function Cc: Song Liu , Joe Lawrence , Josh Poimboeuf , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260310203751.1479229-6-joe.lawrence@redhat.com> References: <20260310203751.1479229-6-joe.lawrence@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177382231838.1647592.3501819312496556582.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the objtool/core branch of tip: Commit-ID: e4dbf70615e52255de3ff943ac08e0bbd080dcd6 Gitweb: https://git.kernel.org/tip/e4dbf70615e52255de3ff943ac08e0bbd= 080dcd6 Author: Joe Lawrence AuthorDate: Tue, 10 Mar 2026 16:37:44 -04:00 Committer: Josh Poimboeuf CommitterDate: Mon, 16 Mar 2026 12:46:48 -07:00 livepatch/klp-build: add grep-override function Provide a custom grep() function to catch direct usage of the command. Bare grep calls are generally incompatible with pipefail and errexit behavior (where a failed match causes the script to exit). Developers can still call grep via command grep if that behavior is explicitly desired. Acked-by: Song Liu Signed-off-by: Joe Lawrence Link: https://patch.msgid.link/20260310203751.1479229-6-joe.lawrence@redhat= .com Signed-off-by: Josh Poimboeuf --- scripts/livepatch/klp-build | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/livepatch/klp-build b/scripts/livepatch/klp-build index 564985a..cf6c2bf 100755 --- a/scripts/livepatch/klp-build +++ b/scripts/livepatch/klp-build @@ -56,6 +56,13 @@ grep0() { command grep "$@" || true } =20 +# Because pipefail is enabled, the grep0 helper should be used instead of +# grep, otherwise a failed match can propagate to an error. +grep() { + echo "error: $SCRIPT: use grep0 or 'command grep' instead of bare grep" >= &2 + exit 1 +} + status() { echo "$*" }