clang/LLVM

Introduction to using libFuzzer with llvm-toolset

Introduction to using libFuzzer with llvm-toolset

“Fuzzing” an application is a great way to find bugs that may be missed by other testing methods. Fuzzers test programs by generating random string inputs and feeding them into an application. Any program that accepts arbitrary inputs from its users is a good candidate for fuzzing. This includes compilers, interpreters, web applications, JSON or YAML parsers, and many more types of programs.

libFuzzer is a library to assist with the fuzzing of applications and libraries. It is integrated into the Clang C compiler and can be enabled for your application with the addition of a compile flag and by adding a fuzzing target to your code. libFuzzer has been used successfully to find bugs in many programs, and in this article, I will show how you can integrate libFuzzer into your own applications.

Continue reading “Introduction to using libFuzzer with llvm-toolset”

Share
How to install GCC 8 and Clang/LLVM 6 on Red Hat Enterprise Linux 7

How to install GCC 8 and Clang/LLVM 6 on Red Hat Enterprise Linux 7

There has been a lot of work to improve C/C++ compilers in recent years. A number of articles have been posted by Red Hat engineers working on the compilers themselves covering usability improvements, features to detect possible bugs, and security issues in your code.

Red Hat Enterprise Linux 8 Beta ships with GCC 8 as the default compiler. This article shows you how to install GCC 8 as well as Clang/LLVM 6 on Red Hat Enterprise Linux 7. You’ll be able to use the same updated (and supported) compilers from Red Hat on both RHEL 7 and 8.

If you want your default gcc to always be GCC 8, or you want clang to always be in your path, this article shows how to permanently enable a software collection by adding it to the profile (dot files) for your user account. A number of common questions about software collections are also answered.

Continue reading “How to install GCC 8 and Clang/LLVM 6 on Red Hat Enterprise Linux 7”

Share
Using eXpress Data Path (XDP) maps in RHEL 8 Beta: Part 2

Using eXpress Data Path (XDP) maps in RHEL 8 Beta: Part 2

Diving into XDP

In the first part of this series on XDP, I introduced XDP and discussed the simplest possible example. Let’s now try to do something less trivial, exploring some more-advanced eBPF features—maps—and some common pitfalls.

XDP is available in Red Hat Enterprise Linux 8 Beta, which you can download and run now.

Continue reading “Using eXpress Data Path (XDP) maps in RHEL 8 Beta: Part 2”

Share
Achieving high-performance, low-latency networking with XDP: Part I

Achieving high-performance, low-latency networking with XDP: Part I

XDP: From zero to 14 Mpps

In past years, the kernel community has been using different approaches in the quest for ever-increasing networking performance. While improvements have been measurable in several areas, a new wave of architecture-related security issues and related counter-measures has undone most of the gains, and purely in-kernel solutions for some packet-processing intensive workloads still lag behind the bypass solution, namely Data Plane Development Kit (DPDK), by almost an order of magnitude.

But the kernel community never sleeps (almost literally) and the holy grail of kernel-based networking performance has been found under the name of XDP: the eXpress Data Path. XDP is available in Red Hat Enterprise Linux 8 Beta, which you can download and run now.

Continue reading “Achieving high-performance, low-latency networking with XDP: Part I”

Share
Network debugging with eBPF (RHEL 8 Beta)

Network debugging with eBPF (RHEL 8 Beta)

Introduction

Networks are fun to work with, but often they are also a source of trouble. Network troubleshooting can be difficult, and reproducing the bad behavior that is happening in the field can be painful as well.

Luckily, there are some tools that come to the aid: network namespaces, virtual machines, tc, and netfilter. Simple network setups can be reproduced with network namespaces and veth devices, while more-complex setups require interconnecting virtual machines with a software bridge and using standard networking tools, like iptables or tc, to simulate the bad behavior. If you have an issue with ICMP replies generated because an SSH server is down, iptables -A INPUT -p tcp --dport 22 -j REJECT --reject-with icmp-host-unreachable in the correct namespace or VM can do the trick.

This article describes using eBPF (extended BPF), an extended version of the Berkeley Packet Filter, to troubleshoot complex network issues. eBPF is a fairly new technology and the project is still in an early stage, with documentation and the SDK not yet ready. But that should improve, especially with XDP (eXpress Data Path) being shipped in Red Hat Enterprise Linux 8 Beta, which you can download and run now.

Continue reading “Network debugging with eBPF (RHEL 8 Beta)”

Share
Support Lifecycle for Clang/LLVM, Go, and Rust

Support Lifecycle for Clang/LLVM, Go, and Rust

On the heels of our recently announcement, General Availability of Clang/LLVM 6.0, Go 1.10, and Rust 1.29, I want to share how we’ll be supporting them going forward. Previously, these packages had been in “Technology Preview” status, which means that they were provided for “you to test functionality and provide feedback during the development process”, and were “not fully supported under Red Hat Subscription Level Agreements, may not be functionally complete, and are not intended for production use”.

So now that we’ve promoted them to fully supported status, what does that mean? In the simplest terms, General Availability (GA) means that these packages have officially entered the “Full Support Phase” of their lifecycle:

Continue reading “Support Lifecycle for Clang/LLVM, Go, and Rust”

Share
Clang/LLVM 6.0, Go 1.10, and Rust 1.29 NOW GA for RHEL

Clang/LLVM 6.0, Go 1.10, and Rust 1.29 NOW GA for RHEL

We are pleased to announce general availability of these 3 compiler toolsets for Red Hat Enterprise Linux 7. These versions are now officially supported Red Hat offerings:

  • Clang/LLVM 6.0
  • Go 1.10
  • Rust 1.29

These toolsets can be installed from the Red Hat Enterprise Linux 7 Devtools channel.  See the “New compiler details” below to learn about the new features.

Continue reading “Clang/LLVM 6.0, Go 1.10, and Rust 1.29 NOW GA for RHEL”

Share
Clang/LLVM 6.0, Go 1.10, and Rust 1.29 now in beta for Red Hat Enterprise Linux

Clang/LLVM 6.0, Go 1.10, and Rust 1.29 now in beta for Red Hat Enterprise Linux

We are pleased to announce the immediate availability of these three compiler toolsets now in beta for Red Hat Enterprise Linux 7.  Upon the GA release, these versions will become officially supported Red Hat offerings:

  • Clang/LLVM 6.0
  • Go 1.10
  • Rust 1.29

These toolsets can be installed from the Red Hat Enterprise Linux 7 Devtools channel.  See the “New compiler details” below to learn about the new features.

Continue reading “Clang/LLVM 6.0, Go 1.10, and Rust 1.29 now in beta for Red Hat Enterprise Linux”

Share
How to install Clang/LLVM 5 and GCC 7 on RHEL

How to install Clang/LLVM 5 and GCC 7 on RHEL

A newer version of this article is available:  How to install GCC 8 and Clang/LLVM 6 on Red Hat Enterprise Linux 7.

If you are developing with C/C++, Clang tools and newer versions of GCC can be quite helpful for checking your code and giving you better warnings and error messages to help avoid bugs. The newer compilers have better optimizations and code generation.

You can easily install the latest-supported Clang and GCC compilers for C, C++, Objective-C, and FORTRAN using yum on Red Hat Enterprise Linux.  These compilers are available as software collections that are typically updated twice a year. The May 2018 update included Clang/LLVM 5 and GCC 7.3, as well as Go and Rust.

If you want your default gcc to always be GCC 7, or you want clang to always be in your path, this article shows how to permanently enable a software collection by adding it to the profile (dot files) for your user account. A number of common questions about software collections are also answered.

Continue reading “How to install Clang/LLVM 5 and GCC 7 on RHEL”

Share
Announcing GA for latest Software Collections, Developer Toolset, Compilers

Announcing GA for latest Software Collections, Developer Toolset, Compilers

We are pleased to announce the general availability of:

  • Red Hat Software Collections 3.1 (including Ruby 2.5, Perl 2.26, PHP 7.0.27, PostgreSQL 10, MongoDB 3.6, Varnish 5, HAProxy 1.8, Apache 2.4 update)
  • Red Hat Developer Toolset 7.1 (GCC 7.3)
  • Clang/LLVM 5.0, Go 1.8.7, Rust 1.25.0

Continue reading “Announcing GA for latest Software Collections, Developer Toolset, Compilers”

Share