Language Selection

English French German Italian Portuguese Spanish

Kernel: LWN Article (Outside Paywall Today) and Remembering the LAN (Way Before Wireguard)

Filed under
Linux
  • process_madvise(), pidfd capabilities, and the revenge of the PIDs

    Once upon a time, there were few ways for one process to operate upon another after its creation; sending signals and ptrace() were about it. In recent years, interest in providing ways for processes to control others has been on the increase, and the kernel's process-management API has been expanded accordingly. Along these lines, the process_madvise() system call has been proposed as a way for one process to influence how memory management is done in another. There is a new process_madvise() series which is interesting in its own right, but this series has also raised a couple of questions about how process management should be improved in general.
    The existing madvise() system call allows a process to make suggestions to the kernel about how its address space should be managed. The 5.4 kernel saw a couple of new types of advice that could be provided with madvise(): MADV_COLD and MADV_PAGEOUT. The former requests that the kernel place the indicated range of pages onto the inactive list, essentially saying that they have not been used in a long time. Those pages will thus be among the first considered for reclaim if the kernel needs memory for other purposes. MADV_PAGEOUT, instead, is a stronger statement that the indicated pages are no longer needed; it will cause them to be reclaimed immediately.

    These new requests are useful for processes that know what their future access patterns will be. But it seems that in certain environments — Android, in particular — processes lack that knowledge, but the management system does know when certain memory ranges are no longer needed. The bulk of a process's address space could be marked as MADV_COLD when that process is moved out of the foreground, for example. In such settings, letting one process call madvise() on behalf of another helps the system as a whole make the best use of its memory resources. That is the purpose behind the process_madvise() proposal.

  • KRSI and proprietary BPF programs

    The "kernel runtime security instrumentation" (or KRSI) patch set enables the attachment of BPF programs to every security hook in the kernel; LWN covered this work in December. That article focused on ABI issues, but it deferred another potential problem to our 2020 predictions: the possibility that vendors could start shipping proprietary BPF programs for use with frameworks like KRSI. Other developers did pick up on the possibility that KRSI could be abused this way, though, leading to a discussion on whether KRSI should continue to allow the loading of BPF programs that do not carry a GPL-compatible license.
    It may be surprising to some that the kernel, while allowing BPF programs to declare their license, is entirely happy to load programs that have a proprietary license. This behavior, though, is consistent with how the kernel handles loadable modules: any module can be loaded, but modules without a GPL-compatible license will not have access to many kernel symbols (any that are exported with EXPORT_SYMBOL_GPL()). BPF programs interact with the kernel through special "helper functions", each of which must be explicitly exported; these, too, can have a "GPL only" marking on them. In current kernels, about 25% of the defined helpers are restricted to GPL-licensed code.

  • Scheduling for the Android display pipeline

    The default CPU-frequency governor used by Android is schedutil, which relies on the CPU utilization of the runnable tasks to select the frequency of the CPU they execute on: the higher the utilization, the higher the frequency of the CPU when they are runnable. This governor fits so well with the needs of mobile Android devices that, in Android, it also takes care of the SCHED_RT tasks, which are normally run at the maximum frequency in mainline Linux kernels.

    Schedutil chooses the lowest frequency sufficient not to overload the system, based on the measurement of the system utilization. This solution works well when tasks are independent and are able to run in parallel. But, whenever there is a dependency — tasks that are blocked on the completion of others — the single-task utilization accounting mechanism is no longer sufficient to define the requirements of the whole task set.

    For example, in the scenario shown below, schedutil sees that RenderThread only requires 50% of a CPU's capacity, so it sets the CPU frequency to 50% of the maximum. But RenderThread cannot run until the UI thread has done its work — the two tasks cannot run in parallel — so it misses its deadline.

  • Control-flow integrity for the kernel

    Control-flow integrity (CFI) is a technique used to reduce the ability to redirect the execution of a program's code in attacker-specified ways. The Clang compiler has some features that can assist in maintaining control-flow integrity, which have been applied to the Android kernel. Kees Cook gave a talk about CFI for the Linux kernel at the recently concluded linux.conf.au in Gold Coast, Australia.

    Cook said that he thinks about CFI as a way to reduce the attack, or exploit, surface of the kernel. Most compromises of the kernel involve an attacker gaining execution control, typically using some kind of write flaw to change system memory. These write flaws come in many flavors, generally with some restrictions (e.g. can only write a single zero or only a set of fixed byte values), but in the worst case, they can be a "write anything anywhere at any time" flaw. The latter, thankfully, is relatively rare.

  • Remembering the LAN

    We can have the LAN-like experience of the 90's back again, and we can add the best parts of the 21st century internet. A safe small space of people we trust, where we can program away from the prying eyes of the multi-billion-person internet. Where the outright villainous will be kept at bay by good identity services and good crypto.

    The broader concept of virtualizing networks has existed forever: the Virtual Private Network. New protocols make VPNs better than before, Wireguard is pioneering easy and efficient tunneling between peers. Marry the VPN to identity, and make it work anywhere, and you can have a virtual 90s-style LAN made up of all your 21st century devices. Let the internet be the dumb pipe, let your endpoints determine who they will talk to based on the person at the other end.

Linux Kernel 5.6 Source Tree Includes WireGuard VPN

  • Linux Kernel 5.6 Source Tree Includes WireGuard VPN

    The lean-coded, fast, modern, and secure WireGuard VPN protocol has made it into the Linux kernel as Linus Torvalds merged it into his source tree for version 5.6.

    The wait is closely coming to an end, with the next Linux kernel expected to be released in just a few months, considering that the latest refresh occurred on January 26.

    [...]

    Jason Donenfeld himself was excited about this step and shared that he tried to stay awake to see it happen, "refreshing Linus' git repo on my phone until I was dreaming."

    "I look forward to start refining some of rougher areas of WireGuard now," announced the original author and developer of the project.

    Torvalds is a supporter of the WireGuard project. When Donenfeld made the pull request in 2018 to have it integrated into the Linux kernel, Torvalds expressed hope that the merge would happen soon.

WireGuard VPN protocol will ship with Linux kernel 5.6

  • WireGuard VPN protocol will ship with Linux kernel 5.6

    The WireGuard VPN protocol will be included into the next Linux kernel as Linus Torvalds has merged it into his source tree for version 5.6.

    There is no set date for Linux kernel releases and being as version 5.5 was released this month, the next version will likely be released in a few months time.

    The addition of WireGurd in the next Linux kernel does also not come as a surprise as the code had already been merged into Dave Miller's repository back in December. However, the code was just recently pulled into Torvalds' source tree.

WireGuard is Now in Linus! WireGuard is Merged with Linux 5.3

  • WireGuard is Now in Linus! WireGuard is Merged with Linux 5.3 Kernel!

    WireGuard is now in Linus Tree: Recently, WireGuard founder said that he gonna merge the WireGuard with main line Linux Kernel 5.6. Yesterday (29-Jan-2020), Linus Torvalds announced the Wireguard & Linux Kernel 5.6 will be merged! You can found this message on his blog.

    [...]

    WireGuard is a simple open-source application that provides Virtual Private Network techniques to create a secure point connection!

    Many VPN providers adopting the Wireguard technique to provide the most secure VPN service!.

Ubuntu 20.04 LTS Adds WireGuard Support

  • Ubuntu 20.04 LTS Adds WireGuard Support

    While WireGuard was merged into Linux 5.6, the Ubuntu 20.04 LTS release is currently tracking Linux 5.4 and for the April release is likely to be shipping with Linux 5.5 as the 5.6 release will be cutting it too close. But Ubuntu 20.04's kernel has now back-ported WireGuard.

    There has been the talk in recent weeks over shipping Ubuntu 20.04 LTS with WireGuard support and indeed with Ubuntu's latest kernel in the Focal repository is the WireGuard module back-ported for this secure VPN tunnel.

Linus Torvalds Pulls WireGuard VPN into Linux 5.6 Kernel Source

  • Linus Torvalds Pulls WireGuard VPN into Linux 5.6 Kernel Source Tree
  • Linus Torvalds pulled WireGuard VPN into the 5.6 kernel source tree

    Yesterday, Linux creator Linus Torvalds merged David Miller's net-next into his source tree for the Linux 5.6 kernel. This merger added plenty of new network-related drivers and features to the upcoming 5.6 kernel, with No.1 on the list being simply "Add WireGuard."

    As previously reported, WireGuard was pulled into net-next in December—so its inclusion into Linus' 5.6 source tree isn't exactly a surprise. It does represent clearing another potential hurdle for the project; there is undoubtedly more refinement work to be done before the kernel is finalized, but with Linus having pulled it in-tree, the likelihood that it will disappear between now and 5.6's final release (expected sometime in May or early June) is vanishingly small.

Isolated clients with Wireguard

VPNs will change forever with the arrival of WireGuard

  • VPNs will change forever with the arrival of WireGuard into Linux

    After years of development WireGuard, a revolutionary approach to Virtual Private Networks (VPN) was finally fast-tracked to the Linux kernel. Now, at long last, WireGuard is in Linus Torvald's code tree. That means WireGuard should appear in the Linux kernel 5.6 release. This may be as early as April 2020.

    This has the potential to change everything about VPNs -- not just in Linux, but in the entire VPN world. That's because essentially all VPN services run off Linux servers. Some VPN services, such as StrongVPN and Mullvad VPN, have already seen the writing on the wall and are moving their software stacks to WireGuard.

What is WireGuard? Why Linux Users Going Crazy Over it?

  • What is WireGuard? Why Linux Users Going Crazy Over it?

    WireGuard is an easy to configure, fast, and secure open source VPN that utilizes state-of-the-art cryptography. It’s aim is to provide a faster, simpler and leaner general purpose VPN that can be easily deployed on low-end devices like Raspberry Pi to high-end servers.

    Most of the other solutions like IPsec and OpenVPN were developed decades ago. Security researcher and kernel developer Jason Donenfeld realized that they were slow and difficult to configure and manage properly.

    This made him create a new open source VPN protocol and solution which is faster, secure easier to deploy and manage.

    WireGuard was originally developed for Linux but it is now available for Windows, macOS, BSD, iOS and Android. It is still under heavy development.

WireGuard will make your VPN connection much faster

  • WireGuard will make your VPN connection much faster — here's how

    VPN services may soon be a lot faster, thanks to a promising protocol called WireGuard that is now being incorporated into the mainstream Linux kernel.

    Linux isn't used much on the desktop, at least not obviously. But it's what underpins both Android and Chrome OS, and it powers most of the web's servers, including nearly all of Google's servers and those of many of the best VPN services.

    And WireGuard is smaller, simpler and faster than either OpenVPN or IKEv2/IPsec, the prevalent VPN protocols used by commercial VPN services like ExpressVPN, NordVPN and Private Internet Access. Yet only a few services, including Mullvad, IVPN, NordVPN and StrongVPN offer WireGuard as an option yet.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

More in Tux Machines

digiKam 7.7.0 is released

After three months of active maintenance and another bug triage, the digiKam team is proud to present version 7.7.0 of its open source digital photo manager. See below the list of most important features coming with this release. Read more

Dilution and Misuse of the "Linux" Brand

Samsung, Red Hat to Work on Linux Drivers for Future Tech

The metaverse is expected to uproot system design as we know it, and Samsung is one of many hardware vendors re-imagining data center infrastructure in preparation for a parallel 3D world. Samsung is working on new memory technologies that provide faster bandwidth inside hardware for data to travel between CPUs, storage and other computing resources. The company also announced it was partnering with Red Hat to ensure these technologies have Linux compatibility. Read more

today's howtos

  • How to install go1.19beta on Ubuntu 22.04 – NextGenTips

    In this tutorial, we are going to explore how to install go on Ubuntu 22.04 Golang is an open-source programming language that is easy to learn and use. It is built-in concurrency and has a robust standard library. It is reliable, builds fast, and efficient software that scales fast. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel-type systems enable flexible and modular program constructions. Go compiles quickly to machine code and has the convenience of garbage collection and the power of run-time reflection. In this guide, we are going to learn how to install golang 1.19beta on Ubuntu 22.04. Go 1.19beta1 is not yet released. There is so much work in progress with all the documentation.

  • molecule test: failed to connect to bus in systemd container - openQA bites

    Ansible Molecule is a project to help you test your ansible roles. I’m using molecule for automatically testing the ansible roles of geekoops.

  • How To Install MongoDB on AlmaLinux 9 - idroot

    In this tutorial, we will show you how to install MongoDB on AlmaLinux 9. For those of you who didn’t know, MongoDB is a high-performance, highly scalable document-oriented NoSQL database. Unlike in SQL databases where data is stored in rows and columns inside tables, in MongoDB, data is structured in JSON-like format inside records which are referred to as documents. The open-source attribute of MongoDB as a database software makes it an ideal candidate for almost any database-related project. This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the MongoDB NoSQL database on AlmaLinux 9. You can follow the same instructions for CentOS and Rocky Linux.

  • An introduction (and how-to) to Plugin Loader for the Steam Deck. - Invidious
  • Self-host a Ghost Blog With Traefik

    Ghost is a very popular open-source content management system. Started as an alternative to WordPress and it went on to become an alternative to Substack by focusing on membership and newsletter. The creators of Ghost offer managed Pro hosting but it may not fit everyone's budget. Alternatively, you can self-host it on your own cloud servers. On Linux handbook, we already have a guide on deploying Ghost with Docker in a reverse proxy setup. Instead of Ngnix reverse proxy, you can also use another software called Traefik with Docker. It is a popular open-source cloud-native application proxy, API Gateway, Edge-router, and more. I use Traefik to secure my websites using an SSL certificate obtained from Let's Encrypt. Once deployed, Traefik can automatically manage your certificates and their renewals. In this tutorial, I'll share the necessary steps for deploying a Ghost blog with Docker and Traefik.