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] [day] [month] [year] [list]
Message-ID: <20230726172247.021045e7@kernel.org>
Date: Wed, 26 Jul 2023 17:22:47 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Stanislav Fomichev <sdf@...gle.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
 pabeni@...hat.com
Subject: Re: [PATCH net-next 3/4] ynl: regenerate all headers

On Wed, 26 Jul 2023 16:55:07 -0700 Stanislav Fomichev wrote:
> Oh, didn't know about this. Something like this maybe? Ugly?
> 
> diff --git a/tools/net/ynl/Makefile b/tools/net/ynl/Makefile
> index d664b36deb5b..c36380bf1536 100644
> --- a/tools/net/ynl/Makefile
> +++ b/tools/net/ynl/Makefile
> @@ -3,6 +3,7 @@
>  SUBDIRS = lib generated samples
> 
>  all: $(SUBDIRS)
> +       (cd ../../../ && ./tools/net/ynl/ynl-regen.sh -f)

Hm, I thought the script itself would handle this. I guess I did a
stupid. How about we extend the script to default to the full tree:

diff --git a/tools/net/ynl/ynl-regen.sh b/tools/net/ynl/ynl-regen.sh
index 8d4ca6a50582..bdba24066cf1 100755
--- a/tools/net/ynl/ynl-regen.sh
+++ b/tools/net/ynl/ynl-regen.sh
@@ -4,15 +4,18 @@
 TOOL=$(dirname $(realpath $0))/ynl-gen-c.py
 
 force=
+search=
 
 while [ ! -z "$1" ]; do
   case "$1" in
     -f ) force=yes; shift ;;
+    -p ) search=$2; shift 2 ;;
     * )  echo "Unrecognized option '$1'"; exit 1 ;;
   esac
 done
 
 KDIR=$(dirname $(dirname $(dirname $(dirname $(realpath $0)))))
+pushd ${search:-$KDIR} >>/dev/null
 
 files=$(git grep --files-with-matches '^/\* YNL-GEN \(kernel\|uapi\|user\)')
 for f in $files; do
@@ -30,3 +33,5 @@ for f in $files; do
     $TOOL --mode ${params[2]} --${params[3]} --spec $KDIR/${params[0]} \
 	  $args -o $f
 done
+
+popd >>/dev/null

>  $(SUBDIRS):
>         @if [ -f "$@...kefile" ] ; then \
> 
> Or, now that I know about the script I can actually run it manually.
> But with a makefile imo a bit easier to discover..

Yea, agreed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ