<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Linux Kernel on Marcus Folkesson</title>
    <link>https://www.marcusfolkesson.se/tags/linux-kernel/</link>
    <description>Recent content in Linux Kernel on Marcus Folkesson</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 07 May 2026 12:07:34 +0100</lastBuildDate>
    <atom:link href="https://www.marcusfolkesson.se/tags/linux-kernel/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Rooting a VMC2040 security camera part 7: Conclusion and summary</title>
      <link>https://www.marcusfolkesson.se/blog/arlo-vmc2040-part7/</link>
      <pubDate>Thu, 07 May 2026 12:07:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/arlo-vmc2040-part7/</guid>
      <description>Rooting a VMC2040 security camera part 7: Conclusion and summary Brief In this part we are going to give some thoughts about the security of the camera and what to do to prevent this kind of attack.&#xA;The other parts of the series are:&#xA;Part1: Basic examination Part2: Extract the firmware Part3: Analyse the boot sequence Part4: Deeper analysis Part5: What didn&#39;t work Part6: What did work Part7: Conclusion and summary Lets talk a bit about security Often when I talk with my clients about security of their products, I urge them to analyze what threat they want to protect against.</description>
    </item>
    <item>
      <title>Rooting a VMC2040 security camera part 6: What did work</title>
      <link>https://www.marcusfolkesson.se/blog/arlo-vmc2040-part6/</link>
      <pubDate>Thu, 07 May 2026 12:06:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/arlo-vmc2040-part6/</guid>
      <description>Rooting a VMC2040 security camera part 6: What did work Brief In this part I will show how I finally got root access to the camera.&#xA;The other parts of the series are:&#xA;Part1: Basic examination Part2: Extract the firmware Part3: Analyse the boot sequence Part4: Deeper analysis Part5: What didn&#39;t work Part6: What did work Part7: Conclusion and summary What about those symlinks in /config? startSPARROW creates three symlinks that points to an executable binary in the rootfs:</description>
    </item>
    <item>
      <title>Rooting a VMC2040 security camera part 5: What didn&#39;t work</title>
      <link>https://www.marcusfolkesson.se/blog/arlo-vmc2040-part5/</link>
      <pubDate>Thu, 07 May 2026 12:05:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/arlo-vmc2040-part5/</guid>
      <description>Rooting a VMC2040 security camera part 5: What didn&#39;t work Brief In this part I will write down the things I tried that didn&#39;t work.&#xA;The other parts of the series are:&#xA;Part1: Basic examination Part2: Extract the firmware Part3: Analyse the boot sequence Part4: Deeper analysis Part5: What didn&#39;t work Part6: What did work Part7: Conclusion and summary U-Boot Environment The first thing I tried was to modify the U-Boot environment variables as those were not verified against any signature.</description>
    </item>
    <item>
      <title>Rooting a VMC2040 security camera part 4: Deeper analysis</title>
      <link>https://www.marcusfolkesson.se/blog/arlo-vmc2040-part4/</link>
      <pubDate>Thu, 07 May 2026 12:04:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/arlo-vmc2040-part4/</guid>
      <description>Rooting a VMC2040 security camera part 4: Deeper analysis Brief This part will focus on gather as much information as possible about the system. As I in this stage don&#39;t know what I&#39;m looking for, I will just try to document everything I find interesting.&#xA;The other parts of the series are:&#xA;Part1: Basic examination Part2: Extract the firmware Part3: Analyse the boot sequence Part4: Deeper analysis Part5: What didn&#39;t work Part6: What did work Part7: Conclusion and summary U-Boot environment I used dd to extract the U-Boot environment from the NAND dump.</description>
    </item>
    <item>
      <title>Rooting a VMC2040 security camera part 3: Analyze the boot sequence</title>
      <link>https://www.marcusfolkesson.se/blog/arlo-vmc2040-part3/</link>
      <pubDate>Thu, 07 May 2026 12:03:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/arlo-vmc2040-part3/</guid>
      <description>Rooting a VMC2040 security camera part 3: Analyze the boot sequence Brief In this part we will go through the init script to see what (and how!) services are started during the boot.&#xA;The other parts of the series are:&#xA;Part1: Basic examination Part2: Extract the firmware Part3: Analyse the boot sequence Part4: Deeper analysis Part5: What didn&#39;t work Part6: What did work Part7: Conclusion and summary Boot sequence I&#39;ve tried to summarize the boot sequence in the diagram below.</description>
    </item>
    <item>
      <title>Rooting a VMC2040 security camera part 2: Extract the firmware</title>
      <link>https://www.marcusfolkesson.se/blog/arlo-vmc2040-part2/</link>
      <pubDate>Thu, 07 May 2026 12:02:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/arlo-vmc2040-part2/</guid>
      <description>Rooting a VMC2040 security camera part 2: Extract the firmware Brief As there were no exposed vulnerabilities via UART (no TX, only RX) or network (no open ports that could be exploited), I decided to extract the firmware from the SPINAND flash.&#xA;This part of the series is about the process of extracting the firmware and analyzing it.&#xA;The other parts of the series are:&#xA;Part1: Basic examination Part2: Extract the firmware Part3: Analyse boot sequence Part4: Deeper analysis Part5: What didn&#39;t work Part6: What did work Part7: Conclusion and summary Extract the firmware I have a XGECU-T48 programmer for such tasks.</description>
    </item>
    <item>
      <title>Rooting a VMC2040 security camera part 1: Basic examination</title>
      <link>https://www.marcusfolkesson.se/blog/arlo-vmc2040-part1/</link>
      <pubDate>Thu, 07 May 2026 12:00:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/arlo-vmc2040-part1/</guid>
      <description>Rooting a VMC2040 security camera part 1: Basic examination Brief My friend had a Arlo VMC2040 security camera [1] on his shelf. He bought it a while ago, but never really used it as it required a subscription to work properly. The only feature that he wanted was to get the video stream out from the camera without any cloud involvement, but that was unfortunately not possible.&#xA;Here in Sweden we have a long holiday due to Easter, so I decided to take a look at the camera and see what&#39;s possible.</description>
    </item>
    <item>
      <title>I2C Bus Recovery</title>
      <link>https://www.marcusfolkesson.se/blog/i2c-bus-recovery/</link>
      <pubDate>Sat, 04 Oct 2025 10:00:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/i2c-bus-recovery/</guid>
      <description>I2C Bus Recovery Brief I was working on a project where we had a problem with an I2C bus that was sporadically hanging during communication with a certain device. I2C works with open-drain lines, which means that devices can only pull the lines low, and a pull-up resistor is used to pull the line high. If a device misbehaves and holds one of the lines low, the bus will be stuck, and no further communication can take place.</description>
    </item>
    <item>
      <title>Mutex guards in the Linux kernel</title>
      <link>https://www.marcusfolkesson.se/blog/mutex-guards-in-the-linux-kernel/</link>
      <pubDate>Fri, 01 Dec 2023 12:00:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/mutex-guards-in-the-linux-kernel/</guid>
      <description>Mutex guards in the Linux kernel I found an interresting thread [1] while searching my inbox for something completely unrelated.&#xA;Peter Zijistra has written a few cleanup functions that where introduced in v6.4 with this commit:&#xA;commit 54da6a0924311c7cf5015533991e44fb8eb12773 Author: Peter Zijlstra &amp;lt;peterz&amp;#64;infradead.org&amp;gt; Date: Fri May 26 12:23:48 2023 +0200 locking: Introduce __cleanup() based infrastructure Use __attribute__((__cleanup__(func))) to build: - simple auto-release pointers using __free() - &#39;classes&#39; with constructor and destructor semantics for scope-based resource management.</description>
    </item>
    <item>
      <title>Use b4 for kernel contributions</title>
      <link>https://www.marcusfolkesson.se/blog/use-b4-for-kernel-contributions/</link>
      <pubDate>Wed, 23 Aug 2023 12:00:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/use-b4-for-kernel-contributions/</guid>
      <description>Use b4 for kernel contributions There is a little tool called b4 [1] that has been part of my workflow with the Linux kernel for a while. It&#39;s developed to be a tool used to simplify the work of the maintainers, but my main use of the tool has been to fetch patch series from the mailing list and apply them to my local git repository during reviews. I recently noticed that it got a lot of handy features (experimental though) for the contributors as well, which I now want to test!</description>
    </item>
    <item>
      <title>Linux wireless regulatory domains</title>
      <link>https://www.marcusfolkesson.se/blog/linux-wireless-regulatory/</link>
      <pubDate>Mon, 14 Aug 2023 12:00:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/linux-wireless-regulatory/</guid>
      <description>Linux wireless regulatory domains I had a case where I had an embedded system that should act as a WiFi Access Point on the 5GHz band. The HW was capable and the system managed to act as a client to 5GHz networks, so everything looked good.&#xA;However, the system could not create an access point on some frequencies. How is it that? It&#39;s all about regulatory domains!&#xA;Regulatory domains Radio regulations is something that applies to all devices that make transmissions in the radio spectrum.</description>
    </item>
    <item>
      <title>Add support for MCP39XX in Linux kernel</title>
      <link>https://www.marcusfolkesson.se/blog/add-support-for-mcp39xx/</link>
      <pubDate>Fri, 04 Aug 2023 12:00:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/add-support-for-mcp39xx/</guid>
      <description>Add support for MCP39XX in Linux kernel I&#39;ve maintained the MCP3911 driver in the Linux kernel for some time and continuously add support for new features [1] upon requests from people and companies.&#xA;Microchip has several IC:s in this series of ADC:s that works similar to MCP3911. Actually, all other IC:s are register compatible but MCP3911. The IC:s I&#39;ve extended support for is MCP3910, MCP3912, MCP3913, MCP3914, MCP3918 and MCP3919.</description>
    </item>
    <item>
      <title>Contiguous Memory Allocator</title>
      <link>https://www.marcusfolkesson.se/blog/contiguous-memory-allocator/</link>
      <pubDate>Mon, 06 Feb 2023 10:00:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/contiguous-memory-allocator/</guid>
      <description>Contiguous Memory Allocator Introduction I do find memory management as one of the most fascinating subsystem in the Linux kernel, and I take every chance I see to talk about it. This post is inspired by a project I&#39;m currently working on; an embedded Linux platform with a camera connected to the CSI-2 bus.&#xA;Before we dig into which problems we could trip over, lets talk briefly about how the kernel handles memory.</description>
    </item>
    <item>
      <title>Audio and Embedded Linux</title>
      <link>https://www.marcusfolkesson.se/blog/audio-and-embedded-linux/</link>
      <pubDate>Fri, 23 Dec 2022 12:00:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/audio-and-embedded-linux/</guid>
      <description>Audio and Embedded Linux Brief Last time I used wrote kernel drivers for the ASoC (ALSA System on Chip) subsystem, the functionality was split up into these parts:&#xA;Platform class driver that defines the SoC audio interface for the actual CPU itself. This includes both the DAI (Digital Audio Interface) and any potential audio muxes (e.g. i.MX6 has its AUDMUX). CODEC class driver that controls the actual CODEC. Machine drivers that are the magic glue between the SoC and the CODEC which connects both interfaces.</description>
    </item>
    <item>
      <title>Debug kernel with KGDB</title>
      <link>https://www.marcusfolkesson.se/blog/debug-kernel-with-kgdb/</link>
      <pubDate>Sat, 17 Dec 2022 12:00:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/debug-kernel-with-kgdb/</guid>
      <description>Debug kernel with KGDB What is KGDB? KGDB intend to be used as a source code level debugger on a running Linux kernel. It works with GDB and allows the user to inspect memory, variables, setup breakpoints, step lines and instructions. Pretty much the same that all application developers are used to, but for the kernel itself.&#xA;Almost every embedded Linux system does have a serial port available, and that is all that you need to connect GDB to your kernel.</description>
    </item>
    <item>
      <title>What is libcamera and why should you use it?</title>
      <link>https://www.marcusfolkesson.se/blog/libcamera/</link>
      <pubDate>Fri, 25 Nov 2022 12:00:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/libcamera/</guid>
      <description>What is libcamera and why should you use it Read out a picture from camera Once in a time, video devices was not that complex. To use a camera back then, your application software could iterated through /dev/video* devices and pick the camera that you want and then immediately start using it. You could query which pixel formats, frame rates, resolutions and all other properties that are supported by the camera.</description>
    </item>
    <item>
      <title>HID report descriptors and Linux</title>
      <link>https://www.marcusfolkesson.se/blog/hid-report-descriptors/</link>
      <pubDate>Sat, 15 Oct 2022 12:00:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/hid-report-descriptors/</guid>
      <description>HID report descriptors and Linux HID Devices USB HID (Human Interface Device) device class is the type of computer peripherals that human interacts with, such as keyboards, mice, game controllers and touchscreens. The protocol is probably one of the most simple protocols in the USB specification. Even if HID was originally written for USB in mind, it works with several other transport layers. Your mouse and keyboard do probably use HID over USB, the touchscreen in your smartphone could use HID over I2C.</description>
    </item>
    <item>
      <title>Industrial I/O and triggers</title>
      <link>https://www.marcusfolkesson.se/blog/industrial-io-triggers/</link>
      <pubDate>Thu, 18 Aug 2022 12:00:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/industrial-io-triggers/</guid>
      <description>Industrial I/O and triggers I&#39;ve maintained a couple of IIO-drivers (MCP3911 [4] and LTC1660 [5]) for some time now and it&#39;s time to give at least the MCP3911 a face-lift.&#xA;This time the face lift includes support for:&#xA;Buffers Triggers Make the driver interrupt driven Add support for setting Oversampling Ratio Add support for setting PGA (Pre Gain Amplifier) Also clean it up a bit by only using device managed resources.</description>
    </item>
    <item>
      <title>GPLv2 and GPLv3</title>
      <link>https://www.marcusfolkesson.se/blog/gplv3/</link>
      <pubDate>Thu, 10 Feb 2022 09:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/gplv3/</guid>
      <description>Open Source &amp;quot;Free as in freedom - not as in free beer&amp;quot;. Free beer is nice, but freedom is even nicer.&#xA;I have been working with companies from different sections including consumer electronics, military applications, automotive and aeronautics. One common question, regardless of section, is &amp;quot;Can we really use Open Source in our product?&amp;quot;. The answer is usually Yes, you can, but....&#xA;One common misunderstanding is to interpret Open Source as in free beer.</description>
    </item>
    <item>
      <title>ath10k QCA6584 and Wireless network stack</title>
      <link>https://www.marcusfolkesson.se/blog/qca6584-and-wireless-network-stack/</link>
      <pubDate>Wed, 04 Apr 2018 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/qca6584-and-wireless-network-stack/</guid>
      <description>ath10k QCA6584 and Wireless network stack ATH10K is the mac80211 wireless driver for Qualcomm Atheros QCA988x family of chips, and I&#39;m currently working [1] with the QCA6584 chip which is an automotive graded radio chip with PHY support for the abgn+ac modes. The connection interface to the chip is SDIO which is hardly supported for now, but my friend and kernelhacker, Erik Strömdahl [2] , has got his hands dirty and is currently working on it.</description>
    </item>
    <item>
      <title>Linux driver for PhoenixRC adapter</title>
      <link>https://www.marcusfolkesson.se/blog/driver-for-phoenixrc-adapter/</link>
      <pubDate>Sat, 17 Mar 2018 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/driver-for-phoenixrc-adapter/</guid>
      <description>Linux driver for PhoenixRC adapter Update: Michael Larabel on Phoronix has written a post [3] about this driver. Go ahead and read it as well!&#xA;A few years ago I used to build multi rotors, mostly quad copters and tricopters. It&#39;s a fun hobby, both building and flying is incredible satisfying. The first multi rotors i built was nicely made with CNC cutted details. They looked really nice and robust.</description>
    </item>
    <item>
      <title>get_maintainers and git send-email</title>
      <link>https://www.marcusfolkesson.se/blog/get_maintainers-and-git-send-email/</link>
      <pubDate>Sun, 07 Jan 2018 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/get_maintainers-and-git-send-email/</guid>
      <description>get_maintainers and git send-email Many with me prefer email as communication channel, especially for patches. Github, Gerrit and all other &amp;quot;nice&amp;quot; and &amp;quot;user friendly&amp;quot; tools that tries to &amp;quot;help&amp;quot; you to manage your submissions does not simply fit my workflow.&#xA;As you may already know, all patches to the Linux kernel is by email. scripts/get_maintainer.pl (see [1] for more info about the process) is a handy tool that takes a patch as input and gives back a bunch of emails addresses.</description>
    </item>
    <item>
      <title>OOM-killer</title>
      <link>https://www.marcusfolkesson.se/blog/oom-killer/</link>
      <pubDate>Fri, 01 Dec 2017 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/oom-killer/</guid>
      <description>OOM-killer When the system is running out of memory, the Out-Of-Memory (OOM) killer picks a process to kill based on the current memory footprint. In case of OOM, we will calculate a badness score between 0 (never kill) and 1000 for each process in the system. The process with the highest score will be killed. A score of 0 is reserved for unkillable tasks such as the global init process (see [1]) or kernel threads (processes with PF_KTHREAD flag set).</description>
    </item>
    <item>
      <title>printk()</title>
      <link>https://www.marcusfolkesson.se/blog/printk/</link>
      <pubDate>Thu, 02 Nov 2017 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/printk/</guid>
      <description>printk() So, a week in Prague has come to its end. The Embedded Linux Conference Europe was this year co-located with Open Source Summit and offered a lot of interesting talks on various topics.&#xA;One of the hottest topics this year was about our most beloved debugging function - prink(). What is so hard with printing? It turns out that printk is quite deadlock-prone and that is not an easy thing to work around in the current infrastructure of the kernel.</description>
    </item>
    <item>
      <title>Memory management in the kernel</title>
      <link>https://www.marcusfolkesson.se/blog/memory-management-in-the-kernel-1/</link>
      <pubDate>Wed, 27 Sep 2017 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/memory-management-in-the-kernel-1/</guid>
      <description>Memory management in the kernel Memory management is among the most complex parts in the Linux kernel. There is so many critical parts such as page allocator, slab allocator, virtual memory handling, memory mapping, MMU, IOMMU and so on.&#xA;All these parts have to work perfect (or at least almost perfect :-) ) because all systems do use them whether they want to or not.&#xA;If there is a bug or performance issue you will be noticed quite soon.</description>
    </item>
    <item>
      <title>MMAP memory between kernel and userspace</title>
      <link>https://www.marcusfolkesson.se/blog/mmap-memory-between-kernel-and-userspace/</link>
      <pubDate>Wed, 27 Sep 2017 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/mmap-memory-between-kernel-and-userspace/</guid>
      <description>MMAP memory between kernel and userspace Allocate memory in kernel space and then let the userspace map it to their virtual address space sounds like an easy task, and sure it&#39;s.&#xA;There are just a few things that is good to know about page mapping.&#xA;The MMU (Memory Management Unit) contains page tables with entries for mapping between virtual and physical addresses. These pages is the smallest units that the MMU deals with.</description>
    </item>
    <item>
      <title>PID1 in containers</title>
      <link>https://www.marcusfolkesson.se/blog/pid1-in-containers/</link>
      <pubDate>Wed, 27 Sep 2017 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/pid1-in-containers/</guid>
      <description>PID1 in containers What is PID 1 The top-most process in a UNIX system has PID (Process ID) 1 and is usually the init process. The Init process is the first userspace application started on a system and is started by the kernel at boottime. The kernel is looking in a few predefined paths (and the init kernel parameter). If no such application is found, the system will panic().</description>
    </item>
    <item>
      <title>2.2&#34; TFT display on Beaglebone</title>
      <link>https://www.marcusfolkesson.se/blog/tft_beaglebone/</link>
      <pubDate>Sun, 27 Aug 2017 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/tft_beaglebone/</guid>
      <description>2.2&amp;quot; TFT display on Beaglebone I recently bought a 2.2&amp;quot; TFT display on Ebay (come on, 7 bucks...) and was up to use it with my BeagleBone. Luckily for me there was no Linux driver for the ILI9341 controller so it&#39;s just to roll up my sleeves and get to work. Boot up the BeagleBone I haven&#39;t booted up my bone for a while and support for the board seems</description>
    </item>
    <item>
      <title>High resolution timers</title>
      <link>https://www.marcusfolkesson.se/blog/high-resolution-timers/</link>
      <pubDate>Thu, 27 Jul 2017 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/high-resolution-timers/</guid>
      <description>High resolution timers Nearly all systems have some kind of Programmable Interrupt Timer (PIT) or High Precision Event Timer (HPET) that is programmed to periodically interrupt the operating system (if not configured with CONFIG_NO_HZ).&#xA;The kernel performs several tasks in these ticks such as timekeeping, calculate statistics for the currently running process, schedule a new process and so on. The interrupt occurs at regular intervals - exactly HZ times per second.</description>
    </item>
    <item>
      <title>Modules with parameters</title>
      <link>https://www.marcusfolkesson.se/blog/modules-with-parameters/</link>
      <pubDate>Tue, 27 Jun 2017 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/modules-with-parameters/</guid>
      <description>Modules with parameters Everybody knows that modules can take parameters, either via /sys/modules/&amp;lt;module&amp;gt;/parameters, sysctl or via cmdline to the kernel, but how are these parameters created?&#xA;Parameters without callbacks The Linux kernel provides the module_param() macro. The syntax is:&#xA;1module_param(name, type, perm) Which will simply create the module parameter and expose it as an entry in /sys/modules/&amp;lt;module&amp;gt;/parameters.&#xA;Code example 1int debug_flag; 2module_param(debug_flag, bool, S_IRUSR | S_IWUSR | S_IRGRP) 3MODULE_PARM_DESC(debug_flag, &amp;#34;Set to 1 if debug should be enabled, 0 otherwise&amp;#34;); MODULE_PARM_DESC() is a short description of the parameter.</description>
    </item>
  </channel>
</rss>
