From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 033D626AF6; Mon, 31 Mar 2025 20:04:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743451456; cv=none; b=fLZoGvHIPZEpqvuMTi2cwxiY/upv4faoxlwToS37PUfDXjuq9G/j/lnjsKoQUtw1kQF6q+8vRaJPv3r/iHKIOMZ1Fxu0PXMFZsokCLh0qnf1GxO3byrrxAxJXay48aP54xHNyIGS8D8CgbMB95B9Y9+yWez0uKmJvV3TW9F1y54= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743451456; c=relaxed/simple; bh=NqtQdTTKBk90PE6rOvmIiG6SuLyKZuY/iKiGQK5aPzU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=l/ax7MqkEUrtVxOkW6RCHC9KVcU5/JbInQsTWCgsUN2GvhuaH8zO4e/1I+bCm3P1RQDYyRkqPxBuUmB9Zjt7i1wqZ/e5XIAKoYJd9itecY55aTgbp3g+JJEaP9x4Q2m0erJCqLhfjjsSJaPyhPMffWiqT/CBtutM0dpzhwc/koY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=p7xFmnsw; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="p7xFmnsw" Received: from narnia (unknown [167.220.2.28]) by linux.microsoft.com (Postfix) with ESMTPSA id 42BE7210237F; Mon, 31 Mar 2025 13:04:05 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 42BE7210237F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1743451454; bh=XJ3cM3fyOzY7C4trpXWA3EuNua3sgvIg+XAA9hZ/OFI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=p7xFmnswoUHz+XdMufJMEpyfgvmZqESS1BFeAQ6xLjy2deSBmYumgYo3pbZMX1XLm 0fe5BMwk1AM0TVr3OsCkt51s6d699+sxxml52LdZp1kDm7LiDQPWOQDeB/kMvXe8Uk D4Dl4BkmVAckQkheMYpHa+IbwwlUu8slKPjIdfQw= From: Blaise Boscaccy To: Jarkko Sakkinen Cc: Jonathan Corbet , David Howells , Herbert Xu , "David S. Miller" , Paul Moore , James Morris , "Serge E. Hallyn" , Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Shuah Khan , =?utf-8?Q?Mick?= =?utf-8?Q?a=C3=ABl_Sala=C3=BCn?= , =?utf-8?Q?G=C3=BCnther?= Noack , Nick Desaulniers , Bill Wendling , Justin Stitt , Jan Stancek , Neal Gompa , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, keyrings@vger.kernel.org, linux-crypto@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kselftest@vger.kernel.org, bpf@vger.kernel.org, llvm@lists.linux.dev, nkapron@google.com, teknoraver@meta.com, roberto.sassu@huawei.com, xiyou.wangcong@gmail.com Subject: Re: [RFC PATCH security-next 3/4] hornet: Add an example lskel data extactor script In-Reply-To: References: <20250321164537.16719-1-bboscaccy@linux.microsoft.com> <20250321164537.16719-4-bboscaccy@linux.microsoft.com> Date: Mon, 31 Mar 2025 13:04:02 -0700 Message-ID: <87a5916k7h.fsf@microsoft.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Jarkko Sakkinen writes: > On Fri, Mar 21, 2025 at 09:45:05AM -0700, Blaise Boscaccy wrote: >> This script eases lskel developments against hornet by generating the > > 1. What iskel? It's a "light-skeleton". I'll remove the abbreviations from this patchset's commit messages. The jargon is hard enough to grok as-is. > 2. Why hornet is here in lower case? > Typo. Thanks for finding that. >> data payload used for code signing. It extracts the data out of the >> autogenerated lskel header that gets created via bpftool. >> >> Signed-off-by: Blaise Boscaccy >> --- >> scripts/hornet/extract-skel.sh | 29 +++++++++++++++++++++++++++++ >> 1 file changed, 29 insertions(+) >> create mode 100755 scripts/hornet/extract-skel.sh >> >> diff --git a/scripts/hornet/extract-skel.sh b/scripts/hornet/extract-skel.sh >> new file mode 100755 >> index 0000000000000..9ace78794b85e >> --- /dev/null >> +++ b/scripts/hornet/extract-skel.sh >> @@ -0,0 +1,29 @@ >> +#!/bin/bash >> +# SPDX-License-Identifier: GPL-2.0 >> +# >> +# Copyright (c) 2025 Microsoft Corporation >> +# >> +# This program is free software; you can redistribute it and/or >> +# modify it under the terms of version 2 of the GNU General Public >> +# License as published by the Free Software Foundation. >> + >> +function usage() { >> + echo "Sample script for extracting instructions and map data out of" >> + echo "autogenerated eBPF lskel headers" >> + echo "" >> + echo "USAGE: header_file output_file" >> + exit >> +} >> + >> +ARGC=$# >> + >> +EXPECTED_ARGS=2 >> + >> +if [ $ARGC -ne $EXPECTED_ARGS ] ; then >> + usage >> +else >> + printf $(gcc -E $1 | grep "static const char opts_insn" | \ >> + awk -F"=" '{print $2}' | sed 's/;\+$//' | sed 's/\"//g') > $2 >> + printf $(gcc -E $1 | grep "static const char opts_data" | \ >> + awk -F"=" '{print $2}' | sed 's/;\+$//' | sed 's/\"//g') >> $2 >> +fi >> -- >> 2.48.1 >> > > BR, Jarkko