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]
Message-ID: <20250916074155.48794eae@hermes.local>
Date: Tue, 16 Sep 2025 07:41:55 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Kory Maincent <kory.maincent@...tlin.com>
Cc: David Ahern <dsahern@...il.com>, netdev@...r.kernel.org, Thomas
 Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH iproute2-next 1/2] scripts: Add uapi header import
 script

On Tue, 09 Sep 2025 15:21:42 +0200
Kory Maincent <kory.maincent@...tlin.com> wrote:

> Add a script to automate importing Linux UAPI headers from kernel source.
> The script handles dependency resolution and creates a commit with proper
> attribution, similar to the ethtool project approach.
> 
> Usage:
>     $ LINUX_GIT="$LINUX_PATH" iproute2-import-uapi [commit]
> 
> Signed-off-by: Kory Maincent <kory.maincent@...tlin.com>
> ---

Script I use is much simpler.

#! /bin/bash
# script to copy sanitized kernel headers

if [ $# -ne 1 ]; then
   echo "Usage: $0 kernel-directory"
   exit 1
fi

SRC=$1
if [ ! -r $SRC/usr/include/linux/rtnetlink.h ]; then
   echo "$SRC is missing headers"
   exit 1
fi

if [ ! -r include/uapi/linux/rtnetlink.h ]; then
    echo "$PWD is not iproute2 source"
    exit 1
fi

for subdir in . rdma vdpa
do	   
    DST=$subdir/include/uapi
    echo Checking $DST

    (cd $DST; find . -type f) | \
	while read f
	do
	    from=$SRC/usr/include/$f
	    to=$DST/$f
	    if ! cmp -s $from $to
	    then
		echo Updating $f
		cp $from $to
	    fi
	done
done

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ