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]
Date: Sat, 28 Oct 2023 10:26:30 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
	pabeni@...hat.com
Subject: Re: [PATCH net-next] tools: ynl-gen: don't touch the output file if
 content is the same

Sat, Oct 28, 2023 at 12:34:08AM CEST, kuba@...nel.org wrote:
>I often regenerate all YNL files in the tree to make sure they
>are in sync with the codegen and specs. Generator rewrites
>the files unconditionally, so since make looks at file modification
>time to decide what to rebuild - my next build takes longer.
>
>We already generate the code to a tempfile most of the time,
>only overwrite the target when we have to.
>
>Before:
>
>  $ stat include/uapi/linux/netdev.h
>    File: include/uapi/linux/netdev.h
>    Size: 2307      	Blocks: 8          IO Block: 4096   regular file
>  Access: 2023-10-27 15:19:56.347071940 -0700
>  Modify: 2023-10-27 15:19:45.089000900 -0700
>  Change: 2023-10-27 15:19:45.089000900 -0700
>   Birth: 2023-10-27 15:19:45.088000894 -0700
>
>  $ ./tools/net/ynl/ynl-regen.sh -f
>  [...]
>
>  $ stat include/uapi/linux/netdev.h
>    File: include/uapi/linux/netdev.h
>    Size: 2307      	Blocks: 8          IO Block: 4096   regular file
>  Access: 2023-10-27 15:19:56.347071940 -0700
>  Modify: 2023-10-27 15:22:18.417968446 -0700
>  Change: 2023-10-27 15:22:18.417968446 -0700
>   Birth: 2023-10-27 15:19:45.088000894 -0700
>
>After:
>
>  $ stat include/uapi/linux/netdev.h
>    File: include/uapi/linux/netdev.h
>    Size: 2307      	Blocks: 8          IO Block: 4096   regular file
>  Access: 2023-10-27 15:22:41.520114221 -0700
>  Modify: 2023-10-27 15:22:18.417968446 -0700
>  Change: 2023-10-27 15:22:18.417968446 -0700
>   Birth: 2023-10-27 15:19:45.088000894 -0700
>
>  $ ./tools/net/ynl/ynl-regen.sh -f
>  [...]
>
>  $ stat include/uapi/linux/netdev.h
>    File: include/uapi/linux/netdev.h
>    Size: 2307      	Blocks: 8          IO Block: 4096   regular file
>  Access: 2023-10-27 15:22:41.520114221 -0700
>  Modify: 2023-10-27 15:22:18.417968446 -0700
>  Change: 2023-10-27 15:22:18.417968446 -0700
>   Birth: 2023-10-27 15:19:45.088000894 -0700
>
>Signed-off-by: Jakub Kicinski <kuba@...nel.org>

Reviewed-by: Jiri Pirko <jiri@...dia.com>

Powered by blists - more mailing lists