惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Application and Cybersecurity Blog
Application and Cybersecurity Blog
A
About on SuperTechFans
S
SegmentFault 最新的问题
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Help Net Security
Help Net Security
有赞技术团队
有赞技术团队
博客园 - 【当耐特】
O
OpenAI News
美团技术团队
月光博客
月光博客
Apple Machine Learning Research
Apple Machine Learning Research
Schneier on Security
Schneier on Security
Webroot Blog
Webroot Blog
Cyberwarzone
Cyberwarzone
Hacker News - Newest:
Hacker News - Newest: "LLM"
Google Online Security Blog
Google Online Security Blog
T
Tenable Blog
S
Security Affairs
博客园_首页
S
Schneier on Security
Security Latest
Security Latest
T
Threat Research - Cisco Blogs
T
Tailwind CSS Blog
大猫的无限游戏
大猫的无限游戏
Spread Privacy
Spread Privacy
量子位
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
K
Kaspersky official blog
Hugging Face - Blog
Hugging Face - Blog
TaoSecurity Blog
TaoSecurity Blog
博客园 - 聂微东
Vercel News
Vercel News
M
MIT News - Artificial intelligence
T
Troy Hunt's Blog
B
Blog
MongoDB | Blog
MongoDB | Blog
Martin Fowler
Martin Fowler
Attack and Defense Labs
Attack and Defense Labs
L
LINUX DO - 最新话题
D
DataBreaches.Net
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Stack Overflow Blog
Stack Overflow Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
博客园 - Franky
W
WeLiveSecurity
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
F
Fortinet All Blogs
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
Check Point Blog
H
Hacker News: Front Page

Blog

MAAS installation: bare metal provisioning is easier than ever | Canonical Januscape vulnerability CVE-2026-53359 mitigations available | Canonical Managing Ubuntu on bare metal at scale | Canonical Ubuntu Server: a platform made for enterprise scale | Canonical Building an open source chain of trust: new research uncovers key blockers and ways forward | Canonical Beyond safety and security: Why automotive open source demands dependability  | Canonical DirtyClone Linux kernel local privilege escalation vulnerability fixes available | Canonical pedit COW kernel local privilege escalation vulnerability mitigations | Canonical Canonical becomes Gold Sponsor of Trifecta Tech Foundation | Canonical Challenges designers face in open source (and how to fix them) | Canonical Hunting a 16-year-old SQLite bug with TLA+: is dqlite affected? | Canonical Anbox Cloud on C4A metal: Android, at scale, without friction | Canonical Canonical announces live kernel patching for Arm64 | Canonical Ubuntu Summit 26.04: connected by open source | Canonical So you need to add microcontrollers to your fleet: now what? | Canonical Validating real-world skills through Canonical Academy | Canonical Virtualized Android comes to Anbox Cloud | Canonical Template: Streamlining open source design contributions | Canonical Beyond Mythos: responding to a new threat landscape | Canonical A look into Ubuntu Core 26: Building a local AI inference appliance in a virtual machine | Canonical This year we celebrate a decade of Ubuntu Server support on the s390x architecture: marking a long-standing collaboration between Canonical and IBM that began at LinuxCon 2015. The first release happened on April 21, 2016, bringing Ubuntu 16.04 LTS (Xenial Xerus) to IBM Z and IBM LinuxONE platforms.  A first for Ubuntu on IBM That […] AI at the edge: simplifying infrastructure with Cisco and Canonical | Canonical The next era of telco clouds: get open infrastructure choice with Sylva and Canonical Kubernetes | Canonical What is RDMA over Converged Ethernet (RoCE)? | Canonical Beyond tokens per watt – using Ubuntu 26.04 LTS for AI | Canonical A look into Ubuntu Core 26: Deploying AI models on Renesas RZ/V series for production | Canonical RISC-V profiles – why is RVA23 significant? | Canonical AI with AMD ROCm on Ubuntu: your questions answered | Canonical When distributed workloads stall because nodes cannot exchange small messages quickly and consistently, the network is the limiting factor. How do you solve that problem? InfiniBand offers one solution. InfiniBand is an interconnect, meaning the end-to-end communication system that links compute, storage, and accelerator nodes. It is impl […] Microsoft has announced the preview of Azure Cobalt 200, its second-generation custom Arm silicon. Learn how Ubuntu and Ubuntu Pro support these new VMs from day one, offering seamless deployment, long-term security maintenance, and Kernel Livepatch without requiring engineering or platform changes […] How Canonical Support solves hard Linux performance bugs  – even in 12-year old code | Canonical Securing AI agent workflows on Ubuntu with the new NVIDIA OpenShell snap | Canonical Canonical announces optimized Ubuntu images for TPU virtual machines by Google Cloud | Canonical VMware hypervisor deployment using MAAS | Canonical Migrating from Apache Spark 3 to Spark 4 | Canonical Introducing Workshop: launch sandboxed development environments on Ubuntu with a single command | Canonical Run agentic workloads on Arm and Ubuntu | Canonical Decoding design: How design and engineering thrive together in open source | Canonical Developing web apps with local LLM inference | Canonical A local privilege escalation (LPE) security vulnerability in the Linux kernel, codename “PinTheft,” was publicly disclosed on May 19, 2026. The vulnerability was fixed in the mainline Linux kernel tree. A proof-of-concept exploit was published along with public disclosure. This has been assigned the CVE ID CVE-2026-43494; other discoverin […] Canonical has announced the general availability of Managed Kubeflow on the Microsoft Azure Marketplace. This fully managed MLOps platform allows enterprise AI teams to deploy a production-ready environment in under an hour, eliminating infrastructure maintenance. […] A look into Ubuntu Core 26: Cloud-powered edge computing with AWS IoT Greengrass and Azure IoT Edge | Canonical CVE-2026-46333 (ssh-keysign-pwn) Linux kernel vulnerability mitigations | Canonical
How to use RISC-V custom instructions with Ubuntu | Canonical
Jon Taylor · 2026-06-23 · via Blog

Introduction

My previous blog talked about the importance of instruction set standardization for ecosystem stability and growth through the use of profiles. And standardization is indeed important, but since one of RISC-V’s great benefits is the ability to customize the instruction set, we should also consider how to support that ability.

This blog looks at what is needed in the software layer to support hardware custom instructions and how you can make that work with Ubuntu.

What is a custom instruction?

A custom instruction is simply an instruction that is not part of the base instruction set definition or ratified extensions. When RISC-V was created, there was an explicit desire to support innovation at the level of CPU architecture. While much innovation has been done at the microarchitecture level (for example, speculative execution, superscalar pipelines, and so forth), there are very few ISAs that allow for novelty at the architecture level itself. To support this, RISC-V created explicit instruction encoding space for instructions that are not part of the standard ISA or standard extensions. 

Why customize?

In an embedded microcontroller, it’s easy to imagine the benefits of custom instructions. For example in security operations it might be accelerating specific cryptographic operations, or for audio it might be custom DSP acceleration. For example Espressif’s ESP32-P4 provides custom extensions for SIMD DSP.

In these systems the implementor usually controls both hardware and software – or at least software toolchain. However when we think of Linux based systems, it is usually a richer environment, with user deployed applications distributed in binary form. Linux can be used for embedded systems where the software is still tightly controlled, and there are increasing numbers of applications where the scale of deployment makes custom silicon viable.

In a world where software and hardware codesign becomes more common and companies are creating vertically integrated solutions comprising both hardware and software, customized silicon can address opportunities that may not have been possible before. The most well known example in recent years is probably Apple creating their own laptop silicon, but here are a couple of simple examples too:

  1. Custom data types. With machine learning evolving at a very fast pace, using custom data types for a specific application might provide significant benefits in performance or power efficiency
  2. Control and data flow to an external accelerator. RISC-V CPUs are often used alongside custom accelerators, where custom instructions in the host CPU can be used to more efficiently manage the accelerator than connecting it as a simple memory mapped peripheral

While software compiled for custom hardware will only run on that hardware, it can still be worthwhile for the performance or power benefits.

These custom instructions are unlikely to be used by the operating system (OS), but there are situations where the OS needs to know about them. Specifically if the instructions require additional processor state, the OS needs to know about it. Let’s explain that a little further.

What is state space?

State space is things that persist over time – for example, registers containing data values and status flags reporting on the output of instructions. At the OS level, these are important because the OS needs to be able to save and restore this state across events like interrupts. It is also common that registers need to be enabled by the OS. This can either be at boot time, or on a per-process basis at runtime For example, floating point and vector register files (where implemented) are disabled by default, and it is only after enabling them in the OS that application code can make use of them. Even if an implementation didn’t require the OS to enable user access to a particular state, failing to account for it in the OS is likely to cause data corruption or execution problems. 

How to support custom data processing instructions

Where a custom instruction only impacts data processing, but does not require any additional state space, it can be managed without having to modify the OS code. For example, instructions that treat data as a 4-bit datatype but only using the normal integer register file and status registers could be implemented without needing the OS to be aware of them.

Building applications to use these instructions needs either precompiled libraries with them implemented, or a custom toolchain that can target those instructions. Ubuntu’s launchpad.net build infrastructure supports custom toolchains using Private Package Archives (PPA). The toolchain can either be built in its own right in its own PPA, or a pre-built binary toolchain can be included as part of the application code source tree. In either case, the application code is then built in turn and made available in the PPA.

By combining PPAs to manage customizations with an Ubuntu kernel and general package distribution, users can benefit both from security and maintenance patches from Canonical as well as the performance gains from customized hardware

How to support custom instructions that need state space

As discussed above, custom instructions that require state space are more complex since they need a custom kernel to handle saving and restoring the context around interrupts or permit access from user space to the extra state. Therefore, you will need more than a custom toolchain and application code: you will also need to create a custom kernel. Even here, the launchpad.net infrastructure can still be used to help. Again, the first step is making the custom toolchain available. 

Canonical has worked with several RISC-V partners and developed an image cookbook which walks through the steps needed to create a custom kernel package. If you’re thinking of building a custom kernel, this should be your starting point.

Once your custom kernel is ready, you can proceed as above, building the toolchain, kernel, and user packages.

The downside of a custom kernel is that it won’t be maintained by Canonical, so security updates and patches are something you will have to manage yourself for the packages in the PPAs (any standard packages from our main repositories will of course still be supported and updated by Canonical).

Best practices for portability

So far we have assumed that the software will only ever be run on hardware with the related custom instruction support. While this might be true in embedded systems, for engineers building Linux binary packages this creates software that isn’t portable. Running a binary that assumed a given custom instruction was available will cause an illegal instruction trap on hardware that doesn’t support it.

What would be more useful is to write the software in a way that detects at runtime whether the custom instructions are available, and then calls the appropriate code path. This can also be used for standard extensions – for example detecting whether floating point instructions are implemented. If they are, then hardware floating point can be used; if not, then the software can still use a soft floating point implementation, rather than crashing or refusing to run.

The mechanism to do this within linux is hwprobe. It’s beyond the scope of this blog to explain all the details, but in short, it provides a mechanism for user-level code to query the kernel and ask what extensions are supported. In turn the kernel will learn from the boot firmware what instructions are implemented on the specific hardware it is running on.

Earlier I argued that it’s for stateless instructions it’s not strictly necessary for the kernel to know about them. While true, it would mean this binary code may no longer be portable between different CPU implementations which have different extensions implemented. Using descriptions of the extensions in the firmware with a kernel that can identify them and hwprobe provides a more scalable way to support both stateful and stateless custom instructions. 

Conclusion

We have discussed how Ubuntu’s launchpad.net infrastructure can be used to support custom instructions, whether simpler data processing only, or more complex ones involving state space. This shows how RISC-V’s promise of allowing innovation through customization works in a complex Linux environment. 

While chips with custom instructions are less likely to be generally available to developers than vanilla RVA23 designs, it is almost certain there will be applications where Linux + custom RISC-V provides benefits to justify the investment. These will be high volume, high performance applications – for example networking, storage management or AI inference.

Canonical works directly with silicon companies to provide optimized open source solutions. Our Silicon partner page describes more about our partner program or if you’re ready to work with us please get in touch  

Further reading

Related posts


Ubuntu Summit 26.04: connected by open source

Ubuntu Ubuntu tech blog

What an incredible experience! Ubuntu Summit 26.04 has officially drawn to a close, but the energy from our global community is still buzzing – in the comments section, on social media, and in news reports. Whether you joined us in person or tuned in from across the globe, you helped make this edition our most ...


So you need to add microcontrollers to your fleet: now what?

Ubuntu Article

Your Ubuntu Core fleet is running beautifully. OTA updates roll out in minutes. Every device is strictly confined, cryptographically attested, and carrying a 10 to 15 year long term support (LTS) commitment. The operational team sleeps soundly. Then the product roadmap meeting happens. The industrial floor needs vibration sensors on every ...


Validating real-world skills through Canonical Academy

Ubuntu Community

In an increasingly volatile job market, standing out from the competition is vital. For many in the open source community, formal recognition for self-taught skills is a significant challenge. These skills are often built through hands-on hobbies, side projects, and deep community contributions. While the market is flooded with certificat ...