ROOT and X32-ABI

Total Page:16

File Type:pdf, Size:1020Kb

ROOT and X32-ABI ROOT and x32-ABI Nathalie Rauschmayr On behalf of LHCb collaboration March 13, 2013 Rauschmayr (CERN) ROOT and x32-ABI March 13, 2013 1 / 20 Outline 1 History of application binary interfaces Why is a new binary interface necessary? x32-ABI - A new 32-bit ABI for x86-64 Preconditions 2 How ROOT can profit Results within other CERN applications Results within ROOT-Benchmarks Reasons for performance differences 3 Support of x32-ABI 4 Conclusion Rauschmayr (CERN) ROOT and x32-ABI March 13, 2013 1 / 20 History of application binary interfaces x86: 32-bit word size ! 4GB addressable x86 64 as an extension of x86: runs 32-bit as well as 64-bit applications 64-bit mode supports new hardware features Number of CPU registers Floating-point performance Function parameters passed via registers Syscall instruction ... Rauschmayr (CERN) ROOT and x32-ABI March 13, 2013 2 / 20 Why is a new binary interface necessary? x86-64 (64-bit mode): new hardware features no memory limit slowdown due to memory issues contention page faults paging ... x86: very low memory footprint performance issues Rauschmayr (CERN) ROOT and x32-ABI March 13, 2013 3 / 20 x32-ABI - A new 32-bit ABI for x86-64 Application Binary Interface based on 64-bit x86 architecture Reduces size of pointers and C-datatype long to 32-bit Takes advantage of all x64-features Avoids memory overhead advantages of 64-bit instruction set + memory footprint of a 32-bit application Rauschmayr (CERN) ROOT and x32-ABI March 13, 2013 4 / 20 x32-ABI - A new 32-bit ABI for x86-64 Developed by H.J. Lu (Intel) Introduced in Linux-Kernel 3.4 (released in summer 2012) http://www.linuxplumbersconf.org/2011/ocw/sessions/531 Opinions in Linux-community differ quite a lot 32-bit time values will overflow adressable memory ... Rauschmayr (CERN) ROOT and x32-ABI March 13, 2013 5 / 20 x32-ABI - A new 32-bit ABI for x86-64 Impressive results from x32-developers: 181.mcf from SPEC CPU 2000 (memory bound): Intel Core i7 ∼ 40% faster than x86-64 ∼ 2% slower than ia32 Intel Atom ∼ 40% faster than x86-64 ∼ 1% faster than ia32 Rauschmayr (CERN) ROOT and x32-ABI March 13, 2013 6 / 20 x32-ABI - A new 32-bit ABI for x86-64 186.crafty from SPEC CPU 2000 (64bit integer): Intel Core i7 ∼ 3 % faster than x86-64 ∼ 40% faster than ia32 Intel Atom ∼ 4 % faster than x86-64 ∼ 26% faster than ia32 =) CERN applications will definitely reduce memory footprint and very likely CPU-time Rauschmayr (CERN) ROOT and x32-ABI March 13, 2013 7 / 20 Preconditions x32-ABI requires: Linux Kernel 3.4 compiled with CONFIG X86 X32=y Gcc 4.7 Binutils 2.22 Glibc 2.16 Recompiling all system libraries, required by an application, with gcc -mx32 ELF 32-bit LSB shared object, x86-64, version 1 (SYSV) Rauschmayr (CERN) ROOT and x32-ABI March 13, 2013 8 / 20 How ROOT can profit CERN applications use millions of pointers GAUDI framework stores all events as pointers Many virtual functions (virtual tables: function pointers and hidden pointers) ROOT (histogram as a tree of pointers ...) ... Rauschmayr (CERN) ROOT and x32-ABI March 13, 2013 9 / 20 Results within other CERN applications Memory Time 30 30 25 20 20 10 15 0 10 −10 5 Reduction of time in % Memory reduction in % −20 0 −30 −5 namd dealII soplex povray omnetpp astar xalancbmk namd dealII soplex povray omnetpp astar xalancbmk Resident Size (32 vs x32) Resident Size (64 vs x32) CPU Time (32 vs x32) CPU Time (64 vs x32) Figure : Comparison of memory consumption and CPU-time within the HEPSPEC-benchmarks Rauschmayr (CERN) ROOT and x32-ABI March 13, 2013 10 / 20 Results within other CERN applications LHCb Reconstruction with Gaudiv23r3 and ROOT 5.34.00 Reconstruction of 1000 Events: Physical Memory: -20 % Total elapsed: -2 % reduction LHCb Analysis with Gaudiv23r3 and ROOT 5.34.00 Analysis of 10000 Events: Physical Memory: -21 % Total elapsed: 1.5 % increase Rauschmayr (CERN) ROOT and x32-ABI March 13, 2013 11 / 20 Results within ROOT-Benchmarks Following ROOT-benchmarks: stressHistogram stress 1000 stressHepix IO linear algebra vector sparse matrix Rauschmayr (CERN) ROOT and x32-ABI March 13, 2013 12 / 20 Results within ROOT-Benchmarks Memory Time 30 60 25 50 20 40 15 30 10 20 Reduction of time in % Memory reduction in % 5 10 0 0 Histogram Events Spectrum Linear Fit Histogram Events Spectrum Linear Fit Resident Size (64 vs x32) Real Time (64 vs x32) CPU Time (64 vs x32) Figure : Comparison of memory consumption and CPU-time within the ROOT-benchmarks Rauschmayr (CERN) ROOT and x32-ABI March 13, 2013 13 / 20 Results within ROOT-Benchmarks stress 1000: Memory ·106 100 1 0:8 80 0:6 60 40 Memory in kB 0:4 Memory reduction in % 0:2 20 0 0 0 200 400 600 800 1;000 1;200 Histogram Events Spectrum Linear Fit Snapshots RSS m64 VSS m64 RSS x32 VSS x32 heap - profiling (64 vs x32) heap - maps (64 vs x32) Rauschmayr (CERN) ROOT and x32-ABI March 13, 2013 14 / 20 Reasons for performance differences Memory seen by system and by process are different Default thresholds of malloc: t = 4 · 1024 · 1024 · sizeof (long) if x > t: malloc uses mmap if x < t: malloc uses sbrk mmap: memory blocks can be independently given back anonymous memory blocks as an extension of the heap sbrk: memory blocks cannot be returned to the operating system Rauschmayr (CERN) ROOT and x32-ABI March 13, 2013 15 / 20 Reasons for performance differences Looking into dealII, omnetpp, ROOT stress: dealII : page faults reduced by 10% omnetpp: page faults reduced by 38% stress: difference in CPU-time likely caused by memory issues Further Issues: code and data alignment x32 loop unrolling needs some tuning zero-extensions for pointer conversion =) x32-ABI still under development and there are possiblities for optimization Rauschmayr (CERN) ROOT and x32-ABI March 13, 2013 16 / 20 Outline 1 History of application binary interfaces Why is a new binary interface necessary? x32-ABI - A new 32-bit ABI for x86-64 Preconditions 2 How ROOT can profit Results within other CERN applications Results within ROOT-Benchmarks Reasons for performance differences 3 Support of x32-ABI 4 Conclusion Rauschmayr (CERN) ROOT and x32-ABI March 13, 2013 16 / 20 Support of x32-ABI Ubuntu: Ongoing work, support planned for 13.04: https://blueprints.launchpad.net/ubuntu/+spec/ foundations-r-x32-planning Gentoo: Release candidate available since summer 2012: http://www.gentoo.org/news/20120608-x32_abi.xml Red Hat: No plans according to: http://comments.gmane.org/ gmane.linux.redhat.fedora.devel/164019 LLVM-compiler: supports x32-ABI since summer 2012 http: //www.phoronix.com/scan.php?page=news_item&px=MTI3NTk Rauschmayr (CERN) ROOT and x32-ABI March 13, 2013 17 / 20 Outline 1 History of application binary interfaces Why is a new binary interface necessary? x32-ABI - A new 32-bit ABI for x86-64 Preconditions 2 How ROOT can profit Results within other CERN applications Results within ROOT-Benchmarks Reasons for performance differences 3 Support of x32-ABI 4 Conclusion Rauschmayr (CERN) ROOT and x32-ABI March 13, 2013 17 / 20 Conclusion New room for improvement, ( CERN ) applications can profit substantially Computing Grid limits memory anyway to 4 GB per process Gain in performance is for FREE Rauschmayr (CERN) ROOT and x32-ABI March 13, 2013 18 / 20 Conclusion Recompilation: Cast from time values to long (...) will produce wrong results (xrootd) New pointer size required modifications in CINT (function and data pattern) Getting a working environment: does not work out of the box building gcc fails due to missing glibc x32 building glibc x32 with a partly built gcc Rauschmayr (CERN) ROOT and x32-ABI March 13, 2013 19 / 20 Any questions? Rauschmayr (CERN) ROOT and x32-ABI March 13, 2013 20 / 20.
Recommended publications
  • Ausgabe 05/2012 Als
    freiesMagazin Mai 2012 Topthemen dieser Ausgabe Selbstgebacken 3: make Seite 3 Das Bauen eines Kernels und das Aktualisieren der Quellen ist keine große Zauberkunst und, sofern man keine besonderen Extras haben möchte, mit ein paar make-Kommandos recht schnell erledigt, wobei make den Löwenanteil der Arbeit verrichtet. Es bekommt gesagt, was man möchte, den Rest erledigt es dann von alleine. Der Artikel soll das Geheimnis von make etwas lüften. (weiterlesen) Kollaboratives Schreiben mit LATEX Seite 14 Ob im wissenschaftlichen oder privaten Bereich: Möchte man die volle Kontrolle über das Aus- sehen seiner erstellten Dokumente behalten, führt oft kein Weg an LATEX vorbei. Die Standard TEX-Distribution zeigt jedoch ein paar Restriktionen auf. Sowohl die Online-Verfügbarkeit des Dokuments von jedem Ort aus sowie der kollaborative Ansatz, dass mehrere Personen zeit- gleich an einem Dokument arbeiten können, ist mit den Standardmitteln der Desktopinstallation nicht zu erreichen. Die im Artikel vorgestellten Lösungen versuchen, die gewünschten Zusatz- funktionen bereitzustellen. (weiterlesen) Astah – Kurzvorstellung des UML-Programms Seite 23 Die Februar-Ausgabe von freiesMagazin enthielt einen kleinen Test diverser UML-Programme. Dabei wurde aber das UML- und Mindmap-Programm Astah übersehen. In dem Artikel soll gezeigt werden, ob das Programm mit den zuvor getesteten mithalten kann. (weiterlesen) © freiesMagazin CC-BY-SA 3.0 Ausgabe 05/2012 ISSN 1867-7991 MAGAZIN Editorial Fünfter Programmierwettbewerb be- Abschied Inhalt Linux allgemein endet Im April hieß es Abschied nehmen von einem Selbstgebacken 3: make S. 3 Der am 1. März 2012 gestartete fünfte langjährigen Teammitglied. Thorsten Schmidt, Der April im Kernelrückblick S. 8 freiesMagazin-Programmierwettbewerb [1] ging seit 2007 als Autor, danach als Korrektor und offiziell am 15.
    [Show full text]
  • The Kernel Report
    The kernel report (ELC 2012 edition) Jonathan Corbet LWN.net [email protected] The Plan Look at a year's worth of kernel work ...with an eye toward the future Starting off 2011 2.6.37 released - January 4, 2011 11,446 changes, 1,276 developers VFS scalability work (inode_lock removal) Block I/O bandwidth controller PPTP support Basic pNFS support Wakeup sources What have we done since then? Since 2.6.37: Five kernel releases have been made 59,000 changes have been merged 3069 developers have contributed to the kernel 416 companies have supported kernel development February As you can see in these posts, Ralink is sending patches for the upstream rt2x00 driver for their new chipsets, and not just dumping a huge, stand-alone tarball driver on the community, as they have done in the past. This shows a huge willingness to learn how to deal with the kernel community, and they should be strongly encouraged and praised for this major change in attitude. – Greg Kroah-Hartman, February 9 Employer contributions 2.6.38-3.2 Volunteers 13.9% Wolfson Micro 1.7% Red Hat 10.9% Samsung 1.6% Intel 7.3% Google 1.6% unknown 6.9% Oracle 1.5% Novell 4.0% Microsoft 1.4% IBM 3.6% AMD 1.3% TI 3.4% Freescale 1.3% Broadcom 3.1% Fujitsu 1.1% consultants 2.2% Atheros 1.1% Nokia 1.8% Wind River 1.0% Also in February Red Hat stops releasing individual kernel patches March 2.6.38 released – March 14, 2011 (9,577 changes from 1198 developers) Per-session group scheduling dcache scalability patch set Transmit packet steering Transparent huge pages Hierarchical block I/O bandwidth controller Somebody needs to get a grip in the ARM community.
    [Show full text]
  • Demarinis Kent Williams-King Di Jin Rodrigo Fonseca Vasileios P
    sysfilter: Automated System Call Filtering for Commodity Software Nicholas DeMarinis Kent Williams-King Di Jin Rodrigo Fonseca Vasileios P. Kemerlis Department of Computer Science Brown University Abstract This constant stream of additional functionality integrated Modern OSes provide a rich set of services to applications, into modern applications, i.e., feature creep, not only has primarily accessible via the system call API, to support the dire effects in terms of security and protection [1, 71], but ever growing functionality of contemporary software. How- also necessitates a rich set of OS services: applications need ever, despite the fact that applications require access to part of to interact with the OS kernel—and, primarily, they do so the system call API (to function properly), OS kernels allow via the system call (syscall) API [52]—in order to perform full and unrestricted use of the entire system call set. This not useful tasks, such as acquiring or releasing memory, spawning only violates the principle of least privilege, but also enables and terminating additional processes and execution threads, attackers to utilize extra OS services, after seizing control communicating with other programs on the same or remote of vulnerable applications, or escalate privileges further via hosts, interacting with the filesystem, and performing I/O and exploiting vulnerabilities in less-stressed kernel interfaces. process introspection. To tackle this problem, we present sysfilter: a binary Indicatively, at the time of writing, the Linux
    [Show full text]
  • GNU MP the GNU Multiple Precision Arithmetic Library Edition 6.0.0 25 March 2014
    GNU MP The GNU Multiple Precision Arithmetic Library Edition 6.0.0 25 March 2014 by Torbj¨orn Granlund and the GMP development team This manual describes how to install and use the GNU multiple precision arithmetic library, version 6.0.0. Copyright 1991, 1993-2014 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being “A GNU Manual”, and with the Back-Cover Texts being “You have freedom to copy and modify this GNU Manual, like GNU software”. A copy of the license is included in Appendix C [GNU Free Documentation License], page 127. i Table of Contents GNU MP Copying Conditions ................................... 1 1 Introduction to GNU MP .................................... 2 1.1 How to use this Manual ........................................................... 2 2 Installing GMP ................................................ 3 2.1 Build Options ..................................................................... 3 2.2 ABI and ISA ...................................................................... 8 2.3 Notes for Package Builds ......................................................... 11 2.4 Notes for Particular Systems ..................................................... 12 2.5 Known Build Problems ........................................................... 14 2.6 Performance optimization .......................................................
    [Show full text]
  • Toward a Unified Framework for the Heterogeneous Cloud Utilizing Bytecode Containers
    Toward a Unified Framework for the Heterogeneous Cloud Utilizing Bytecode Containers by David Andrew Lloyd Tenty Bachelor of Science (Honours), Ryerson University, 2016 A thesis presented to Ryerson University in partial fulfillment of the requirements for the degree of Master of Science in the program of Computer Science Toronto, Ontario, Canada, 2019 ©David Andrew Lloyd Tenty, 2019 AUTHOR'S DECLARATION FOR ELECTRONIC SUBMISSION OF A THESIS I hereby declare that I am the sole author of this thesis. This is a true copy of the thesis, including any required final revisions, as accepted by my examiners. I authorize Ryerson University to lend this thesis to other institutions or individuals for the purpose of scholarly research. I further authorize Ryerson University to reproduce this thesis by photocopying or by other means, in total or in part, at the request of other institutions or individuals for the purpose of scholarly research. I understand that my dissertation may be made electronically available to the public. iii Toward a Unified Framework for the Heterogeneous Cloud Utilizing Bytecode Containers Master of Science 2019 David Andrew Lloyd Tenty Computer Science Ryerson University Abstract As we approach the limits of Moore's law the Cloud computing landscape is becoming ever more hetero- geneous in order to extract more performance from available resources. Meanwhile, the container-based cloud is of growing importance as a lightweight way to deploy applications. A unified heterogeneous systems framework for use with container-based applications in the heterogeneous cloud is required. We present a bytecode-based framework and it's implementation called Man O' War, which allows for the creation of novel, portable LLVM bitcode-based containers for use in the heterogeneous cloud.
    [Show full text]
  • Freiesmagazin 06/2012
    freiesMagazin Juni 2012 Topthemen dieser Ausgabe Ubuntu und Kubuntu 12.04 LTS Seite 3 Als äußerst geschliffenes Produkt präsentiert sich das neue Ubuntu 12.04 LTS „Precise Pango- lin“, wie es sich für eine Distribution mit mehrjähriger Stabilitätsgarantie gehört. Der Artikel soll einen Überblick über die Neuerungen der beiden Version mit Unity und KDE als Desktopmana- ger geben. (weiterlesen) Routino Seite 22 Kaum ein Gemeinschaftsprojekt hat in kurzer Zeit soviel Zuspruch und Unterstützung erhalten wie OpenStreetMap. Die weltweite Karte hat in vielen Ländern, darunter auch Deutschland, einen Detailreichtum erlangt, der kommerzielle Kartenanbieter schlecht aussehen lässt. Ein anderes, zunehmend interessantes Anwendungsgebiet ist die Navigation auf Basis der OSM- Daten. Im Wiki von OSM werden verschiedene Programme und Web-Seiten vorgestellt. Dieser Artikel greift ein Programm heraus, das etwas unglücklich im Wiki als „web-based router“ be- zeichnet wird: Routino. (weiterlesen) Trine 2 Seite 28 Genau ein Jahr, nachdem das Erfolgsspiel Trine im Humble Frozenbyte Bundle erschienen ist, hat der finnische Spieleentwickler Frozenbyte den zweiten Teil für Linux im April 2012 vorgestellt. Der Artikel wirft einen Blick auf Trine 2 und vergleicht ihn mit seinem Vorgän- ger. (weiterlesen) © freiesMagazin CC-BY-SA 3.0 Ausgabe 06/2012 ISSN 1867-7991 MAGAZIN Editorial Spielen unter Linux sicherlich ihre Vorteile, wie der Artikel zu Trine 2 Inhalt Linux allgemein Vor wenigen Tagen erschien das Humble Indie zeigt, kostet aber natürlich auch viel Know How Ubuntu und Kubuntu 12.04 LTS S. 3 Bundle V [1] und wirft damit wieder einmal die sowie natürlich Geld und noch mehr Zeit. Oder Frage nach Linux als Spieleplattform auf.
    [Show full text]
  • Yocto Project Reference Manual Is for the 1.4.3 Release of the Yocto Project
    Richard Purdie, Linux Foundation <[email protected]> by Richard Purdie Copyright © 2010-2014 Linux Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the Creative Commons Attribution-Share Alike 2.0 UK: England & Wales [http://creativecommons.org/licenses/by-sa/2.0/uk/] as published by Creative Commons. Manual Notes • This version of the Yocto Project Reference Manual is for the 1.4.3 release of the Yocto Project. To be sure you have the latest version of the manual for this release, go to the Yocto Project documentation page [http://www.yoctoproject.org/documentation] and select the manual from that site. Manuals from the site are more up-to-date than manuals derived from the Yocto Project released TAR files. • If you located this manual through a web search, the version of the manual might not be the one you want (e.g. the search might have returned a manual much older than the Yocto Project version with which you are working). You can see all Yocto Project major releases by visiting the Releases [https://wiki.yoctoproject.org/wiki/Releases] page. If you need a version of this manual for a different Yocto Project release, visit the Yocto Project documentation page [http://www.yoctoproject.org/ documentation] and select the manual set by using the "ACTIVE RELEASES DOCUMENTATION" or "DOCUMENTS ARCHIVE" pull-down menus. • To report any inaccuracies or problems with this manual, send an email to the Yocto Project discussion group at [email protected] or log into the freenode #yocto channel.
    [Show full text]
  • Bitbake Problems
    Richard Purdie, Linux Foundation <[email protected]> by Richard Purdie Copyright © 2010-2015 Linux Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the Creative Commons Attribution-Share Alike 2.0 UK: England & Wales [http://creativecommons.org/licenses/by-sa/2.0/uk/] as published by Creative Commons. Note For the latest version of this manual associated with this Yocto Project release, see the Yocto Project Reference Manual [http://www.yoctoproject.org/docs/1.7.2/ref-manual/ref-manual.html] from the Yocto Project website. Table of Contents 1. Introduction ............................................................................................................................ 1 1.1. Introduction ................................................................................................................. 1 1.2. Documentation Overview ............................................................................................. 1 1.3. System Requirements .................................................................................................. 2 1.3.1. Supported Linux Distributions ........................................................................... 2 1.3.2. Required Packages for the Host Development System ....................................... 3 1.3.3. Required Git, tar, and Python Versions .............................................................. 5 1.4. Obtaining the Yocto Project .........................................................................................
    [Show full text]
  • Linux on System Z
    What's New in Linux on System z Martin Schwidefsky IBM Lab Böblingen, Germany August 8 2012 1 © 2012 IBM Corporation IBM Share August 2012 Anaheim Trademarks & Disclaimer The following are trademarks of the International Business Machines Corporation in the United States and/or other countries. For a complete list of IBM Trademarks, see www.ibm.com/legal/copytrade.shtml: IBM, the IBM logo, BladeCenter, Calibrated Vectored Cooling, ClusterProven, Cool Blue, POWER, PowerExecutive, Predictive Failure Analysis, ServerProven, System p, System Storage, System x , System z, WebSphere, DB2 and Tivoli are trademarks of IBM Corporation in the United States and/or other countries. For a list of additional IBM trademarks, please see http://ibm.com/legal/copytrade.shtml. The following are trademarks or registered trademarks of other companies: Java and all Java based trademarks and logos are trademarks of Sun Microsystems, Inc., in the United States and other countries or both Microsoft, Windows,Windows NT and the Windows logo are registered trademarks of Microsoft Corporation in the United States, other countries, or both. Intel, Intel logo, Intel Inside, Intel Inside logo, Intel Centrino, Intel Centrino logo, Celeron, Intel Xeon, Intel SpeedStep, Itanium, and Pentium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. UNIX is a registered trademark of The Open Group in the United States and other countries or both. Linux is a trademark of Linus Torvalds in the United States, other countries, or both. Cell Broadband Engine is a trademark of Sony Computer Entertainment Inc. InfiniBand is a trademark of the InfiniBand Trade Association.
    [Show full text]
  • Linux Kernel Series
    Linux Kernel Series By Devyn Collier Johnson More Linux Related Stuff on: http://www.linux.org Linux Kernel – The Series by Devyn Collier Johnson (DevynCJohnson) [email protected] Introduction In 1991, a Finnish student named Linus Benedict Torvalds made the kernel of a now popular operating system. He released Linux version 0.01 on September 1991, and on February 1992, he licensed the kernel under the GPL license. The GNU General Public License (GPL) allows people to use, own, modify, and distribute the source code legally and free of charge. This permits the kernel to become very popular because anyone may download it for free. Now that anyone can make their own kernel, it may be helpful to know how to obtain, edit, configure, compile, and install the Linux kernel. A kernel is the core of an operating system. The operating system is all of the programs that manages the hardware and allows users to run applications on a computer. The kernel controls the hardware and applications. Applications do not communicate with the hardware directly, instead they go to the kernel. In summary, software runs on the kernel and the kernel operates the hardware. Without a kernel, a computer is a useless object. There are many reasons for a user to want to make their own kernel. Many users may want to make a kernel that only contains the code needed to run on their system. For instance, my kernel contains drivers for FireWire devices, but my computer lacks these ports. When the system boots up, time and RAM space is wasted on drivers for devices that my system does not have installed.
    [Show full text]
  • Evaluation of X32 ABI for Virtualization and Cloud
    Evaluation of X32 ABI for Virtualization and Cloud Jun Nakajima Intel Corporation 1 Wednesday, August 29, 12 1 Agenda • What is X32 ABI? • Benefits for Virtualization & Cloud • Evaluation of X32 • Summary 2 Wednesday, August 29, 12 2 x32 ABI Basics • x86-64 ABI but with 32-bit longs and pointers • 64-bit arithmetic • Fully utilize modern x86 • 8 additional integer registers (16 total) • 8 additional SSE registers • SSE for FP math • 64-bit kernel is required - Linux kernel 3.4 has support for x32 Same memory footprint as x86 with advantages of x86-64. No hardware changes are required. 3 Wednesday, August 29, 12 3 ABI Comparison i386 x86-64 x32 Integer registers 6 15 15 FP registers 8 16 16 Pointers 4 bytes 8 bytes 4 bytes 64-bit arithmetic No Yes Yes Floating point x87 SSE SSE Calling convention Memory Registers Registers PIC prologue 2-3 insn None None 4 Wednesday, August 29, 12 4 The x32 Performance Advantage • In the order of Expected Contribution: - Efficient Position Independent Code - Efficient Function Parameter Passing - Efficient 64-bit Arithmetic - Efficient Floating Point Operations X32 is expected to give a 10-20% performance boost for C, C++ 5 Wednesday, August 29, 12 5 Efficient Position Independent Code extern int x, y, z; void foo () { z = x * y; } i386 psABI x32 psABI call __i686.get_pc_thunk.cx movl x@GOTPCREL(%rip), %edx addl $_GLOBAL_OFFSET_TABLE_, %ecx movl y@GOTPCREL(%rip), %eax movl!y@GOT(%ecx), %eax movl (%rax), %rax movl!x@GOT(%ecx), %edx imull (%rdx), %rax movl!(%eax), %eax movl z@GOTPCREL(%rip), %edx imull!(%edx),
    [Show full text]
  • Sysfilter: Automated System Call Filtering for Commodity Software
    sysfilter: Automated System Call Filtering for Commodity Software Nicholas DeMarinis Kent Williams-King Di Jin Rodrigo Fonseca Vasileios P. Kemerlis Department of Computer Science Brown University Abstract This constant stream of additional functionality integrated Modern OSes provide a rich set of services to applications, into modern applications, i.e., feature creep, not only has primarily accessible via the system call API, to support the dire effects in terms of security and protection [1, 71], but ever growing functionality of contemporary software. How- also necessitates a rich set of OS services: applications need ever, despite the fact that applications require access to part of to interact with the OS kernel—and, primarily, they do so the system call API (to function properly), OS kernels allow via the system call (syscall) API [52]—in order to perform full and unrestricted use of the entire system call set. This not useful tasks, such as acquiring or releasing memory, spawning only violates the principle of least privilege, but also enables and terminating additional processes and execution threads, attackers to utilize extra OS services, after seizing control communicating with other programs on the same or remote of vulnerable applications, or escalate privileges further via hosts, interacting with the filesystem, and performing I/O and exploiting vulnerabilities in less-stressed kernel interfaces. process introspection. To tackle this problem, we present sysfilter: a binary Indicatively, at the time of writing, the Linux
    [Show full text]