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>] [day] [month] [year] [list]
Message-ID: <20190206183214.GA3562@roeck-us.net>
Date:   Wed, 6 Feb 2019 10:32:14 -0800
From:   Guenter Roeck <linux@...ck-us.net>
To:     Firoz Khan <firoz.khan@...aro.org>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sh: generate uapi header and syscall table header files

On Tue, Feb 05, 2019 at 01:04:14PM +1100, Firoz Khan wrote:
> Unified system call table generation script must be run to generate
> unistd_32.h and syscall_table.h files.  This patch will have changes which
> will invokes the script.
> 
> This patch will generate unistd_32.h and syscall_table.h files by the
> syscall table generation script invoked by sh/Makefile and the generated
> files against the removed files must be identical.
> 
> The generated uapi header file will be included in uapi/- asm/unistd.h and
> generated system call table header file will be included by
> kernel/syscall_32.S file.
> 

All "sh" builds in -next fail with:

make[1]: *** No rule to make target 'scripts/syscalltbl.sh', needed by
'arch/sh/include/generated/asm/syscall_table.h'.  Stop.
make: *** [archheaders] Error 2

Bisect points to this patch.

Guenter

> Link: http://lkml.kernel.org/r/1546443445-21075-3-git-send-email-firoz.khan@linaro.org
> Signed-off-by: Firoz Khan <firoz.khan@...aro.org>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: Kate Stewart <kstewart@...uxfoundation.org>
> Cc: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
> Cc: Philippe Ombredanne <pombredanne@...b.com>
> Cc: Rich Felker <dalias@...c.org>
> Cc: Simon Horman <horms+renesas@...ge.net.au>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Yoshinori Sato <ysato@...rs.sourceforge.jp>
> Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
> Signed-off-by: Stephen Rothwell <sfr@...b.auug.org.au>
> ---
>  arch/sh/kernel/syscalls/Makefile      | 11 +++++++++--
>  arch/sh/kernel/syscalls/syscallhdr.sh | 36 -----------------------------------
>  arch/sh/kernel/syscalls/syscalltbl.sh | 32 -------------------------------
>  3 files changed, 9 insertions(+), 70 deletions(-)
>  delete mode 100644 arch/sh/kernel/syscalls/syscallhdr.sh
>  delete mode 100644 arch/sh/kernel/syscalls/syscalltbl.sh
> 
> diff --git a/arch/sh/kernel/syscalls/Makefile b/arch/sh/kernel/syscalls/Makefile
> index 659faefdcb1d..75c742157fac 100644
> --- a/arch/sh/kernel/syscalls/Makefile
> +++ b/arch/sh/kernel/syscalls/Makefile
> @@ -6,8 +6,9 @@ _dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)')	\
>  	  $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)')
>  
>  syscall := $(srctree)/$(src)/syscall.tbl
> -syshdr := $(srctree)/$(src)/syscallhdr.sh
> -systbl := $(srctree)/$(src)/syscalltbl.sh
> +syshdr := $(srctree)/scripts/syscallhdr.sh
> +sysnr := $(srctree)/scripts/syscallnr.sh
> +systbl := $(srctree)/scripts/syscalltbl.sh
>  
>  quiet_cmd_syshdr = SYSHDR  $@
>        cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@'	\
> @@ -15,6 +16,12 @@ quiet_cmd_syshdr = SYSHDR  $@
>  		   '$(syshdr_pfx_$(basetarget))'		\
>  		   '$(syshdr_offset_$(basetarget))'
>  
> +quiet_cmd_sysnr = SYSNR  $@
> +      cmd_sysnr = $(CONFIG_SHELL) '$(sysnr)' '$<' '$@'		\
> +		  '$(sysnr_abis_$(basetarget))'			\
> +		  '$(sysnr_pfx_$(basetarget))'			\
> +		  '$(sysnr_offset_$(basetarget))'
> +
>  quiet_cmd_systbl = SYSTBL  $@
>        cmd_systbl = $(CONFIG_SHELL) '$(systbl)' '$<' '$@'	\
>  		   '$(systbl_abis_$(basetarget))'		\
> diff --git a/arch/sh/kernel/syscalls/syscallhdr.sh b/arch/sh/kernel/syscalls/syscallhdr.sh
> deleted file mode 100644
> index 1de0334e577f..000000000000
> --- a/arch/sh/kernel/syscalls/syscallhdr.sh
> +++ /dev/null
> @@ -1,36 +0,0 @@
> -#!/bin/sh
> -# SPDX-License-Identifier: GPL-2.0
> -
> -in="$1"
> -out="$2"
> -my_abis=`echo "($3)" | tr ',' '|'`
> -prefix="$4"
> -offset="$5"
> -
> -fileguard=_UAPI_ASM_SH_`basename "$out" | sed \
> -	-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
> -	-e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'`
> -grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
> -	printf "#ifndef %s\n" "${fileguard}"
> -	printf "#define %s\n" "${fileguard}"
> -	printf "\n"
> -
> -	nxt=0
> -	while read nr abi name entry ; do
> -		if [ -z "$offset" ]; then
> -			printf "#define __NR_%s%s\t%s\n" \
> -				"${prefix}" "${name}" "${nr}"
> -		else
> -			printf "#define __NR_%s%s\t(%s + %s)\n" \
> -				"${prefix}" "${name}" "${offset}" "${nr}"
> -		fi
> -		nxt=$((nr+1))
> -	done
> -
> -	printf "\n"
> -	printf "#ifdef __KERNEL__\n"
> -	printf "#define __NR_syscalls\t%s\n" "${nxt}"
> -	printf "#endif\n"
> -	printf "\n"
> -	printf "#endif /* %s */" "${fileguard}"
> -) > "$out"
> diff --git a/arch/sh/kernel/syscalls/syscalltbl.sh b/arch/sh/kernel/syscalls/syscalltbl.sh
> deleted file mode 100644
> index 904b8e6e625d..000000000000
> --- a/arch/sh/kernel/syscalls/syscalltbl.sh
> +++ /dev/null
> @@ -1,32 +0,0 @@
> -#!/bin/sh
> -# SPDX-License-Identifier: GPL-2.0
> -
> -in="$1"
> -out="$2"
> -my_abis=`echo "($3)" | tr ',' '|'`
> -my_abi="$4"
> -offset="$5"
> -
> -emit() {
> -	t_nxt="$1"
> -	t_nr="$2"
> -	t_entry="$3"
> -
> -	while [ $t_nxt -lt $t_nr ]; do
> -		printf "__SYSCALL(%s,sys_ni_syscall)\n" "${t_nxt}"
> -		t_nxt=$((t_nxt+1))
> -	done
> -	printf "__SYSCALL(%s,%s)\n" "${t_nxt}" "${t_entry}"
> -}
> -
> -grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
> -	nxt=0
> -	if [ -z "$offset" ]; then
> -		offset=0
> -	fi
> -
> -	while read nr abi name entry ; do
> -		emit $((nxt+offset)) $((nr+offset)) $entry
> -		nxt=$((nr+1))
> -	done
> -) > "$out"
> -- 
> 2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ