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
| ||
|
Date: Fri, 29 Jan 2016 03:34:23 -0800 From: tip-bot for Andy Lutomirski <tipbot@...or.com> To: linux-tip-commits@...r.kernel.org Cc: brgerst@...il.com, torvalds@...ux-foundation.org, mingo@...nel.org, tglx@...utronix.de, luto@...nel.org, dvlasenk@...hat.com, fweisbec@...il.com, linux-kernel@...r.kernel.org, luto@...capital.net, peterz@...radead.org, hpa@...or.com, bp@...en8.de Subject: [tip:x86/asm] x86/syscalls: Refactor syscalltbl.sh Commit-ID: fba324744bfd2a7948a7710d7a021d76dafb9b67 Gitweb: http://git.kernel.org/tip/fba324744bfd2a7948a7710d7a021d76dafb9b67 Author: Andy Lutomirski <luto@...nel.org> AuthorDate: Thu, 28 Jan 2016 15:11:21 -0800 Committer: Ingo Molnar <mingo@...nel.org> CommitDate: Fri, 29 Jan 2016 09:46:37 +0100 x86/syscalls: Refactor syscalltbl.sh This splits out the code to emit a syscall line. Signed-off-by: Andy Lutomirski <luto@...nel.org> Cc: Andy Lutomirski <luto@...capital.net> Cc: Borislav Petkov <bp@...en8.de> Cc: Brian Gerst <brgerst@...il.com> Cc: Denys Vlasenko <dvlasenk@...hat.com> Cc: Frederic Weisbecker <fweisbec@...il.com> Cc: H. Peter Anvin <hpa@...or.com> Cc: Linus Torvalds <torvalds@...ux-foundation.org> Cc: Peter Zijlstra <peterz@...radead.org> Cc: Thomas Gleixner <tglx@...utronix.de> Link: http://lkml.kernel.org/r/1bfcbba991f5cfaa9291ff950a593daa972a205f.1454022279.git.luto@kernel.org Signed-off-by: Ingo Molnar <mingo@...nel.org> --- arch/x86/entry/syscalls/syscalltbl.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/arch/x86/entry/syscalls/syscalltbl.sh b/arch/x86/entry/syscalls/syscalltbl.sh index 0e7f8ec..167965e 100644 --- a/arch/x86/entry/syscalls/syscalltbl.sh +++ b/arch/x86/entry/syscalls/syscalltbl.sh @@ -3,13 +3,21 @@ in="$1" out="$2" +emit() { + abi="$1" + nr="$2" + entry="$3" + compat="$4" + if [ -n "$compat" ]; then + echo "__SYSCALL_${abi}($nr, $entry, $compat)" + elif [ -n "$entry" ]; then + echo "__SYSCALL_${abi}($nr, $entry, $entry)" + fi +} + grep '^[0-9]' "$in" | sort -n | ( while read nr abi name entry compat; do abi=`echo "$abi" | tr '[a-z]' '[A-Z]'` - if [ -n "$compat" ]; then - echo "__SYSCALL_${abi}($nr, $entry, $compat)" - elif [ -n "$entry" ]; then - echo "__SYSCALL_${abi}($nr, $entry, $entry)" - fi + emit "$abi" "$nr" "$entry" "$compat" done ) > "$out"
Powered by blists - more mailing lists