Category: Linux

  • The Light Display Manager doesn’t start on Odroid XU4 on the recent mainline kernels with exynos_defconfig. I first noticed this problem during the Linux 4.8 rc testing and this problem persists in 4.9-rc1. I want to share the root-cause, and a work-around in this post. I’m running kernel 4.9.0-rc1 with exynos_defconfig on Ubuntu 16.04 with HDMI. Light Display Manager (lightdm) fails with the following errors.

    This block repeats a few times until systemd gives up on starting lightdm. The system is operational with functioning serial console and networking, however the display doesn’t work. What Causes this problem? The following sequence of events is what leads to this problem The user space calls exynos_drm_gem_create_ioctl() with the EXYNOS_BO_NONCONTIG request to allocate GEM buffers. exynos_drm_gem_create() creates non-contiguous GEM buffers as requested. exynos_user_fb_create() comes along later and validates the GEM buffers to associate them to frame-buffer. The validation in check_fb_gem_memory_type() detects non-contiguous buffers […]

    Read More
  • October 20, 2016 - Mauro Carvalho Chehab

    Creating a Linux Kernel User’s Manual

    This article is part of a series on improvements being made to Linux kernel documentation. This article will discuss the efforts that are underway for kernel 4.10 to produce a Linux User’s Manual that groups the existing user-focused documents. What Defines a Linux Kernel User? It’s not an easy task to identify the documents that contain useful information for Linux kernel users because there are a large number of documentation files inside the kernel tree and these documents are mixed with development documents. Furthermore, who exactly are the Linux kernel tree users? Are they the end users who run various Linux distributions, the distribution packagers that package the kernel tree, or the advanced Linux users and system administrators that opt to compile the kernel themselves? In other words, depending on what definition of users we use, the contents of a Linux user’s manual varies. For the scope of this work, […]

    Read More
  • October 13, 2016 - Mauro Carvalho Chehab

    Finishing the Conversion of Linux Media Documentation to ReST

    This article is part of a series on improvements to Linux Kernel documentation; this article will describe the effort to convert the remaining Linux Media subsystem documentation. The Linux Media Subsystem Documentation Before Kernel 4.8, the Linux Media documentation was splt into the Linux Media Infrastructure userspace API (uAPI), which described the system calls and sysfs devices the media subsystem uses. The conversion of this book was already explained in a previous article from this series, the Media subsystem kernel internal API (kAPI), which described the functions and data structures a media driver should use to implement drivers, some text files describing how to use the kAPI, these are spread inside the Documentation/ directory at the Kernel tree, a set of files that document some V4L drivers under Documentation/video4linux, and a set of files that document some DVB drivers, under Documentation/dvb. Converting the kAPI Book The kAPI book is actually […]

    Read More
  • You probably saw the announcement on October 10, 2016 that the Open Connectivity Foundation and the AllSeen Alliance will merge and create a ‘best of both’ IoT framework. To recap briefly, the Board of Directors from both organizations have agreed to consolidate operations under the Open Connectivity Foundation (OCF), while the open source projects will continue to be hosted at the Linux Foundation. I’ve noticed some confusion about what exactly happened, so I thought I would clarify some things in this article. To start, OCF and the AllSeen Alliance are each non-profit entities that are responsible for the business operations of each project. In addition, OCF hosts development of the specification. Each organization has their own bylaws, membership agreement, IPR policy, and charter. By law they must be governed by a board of directors, which consists of representatives from member organizations. One of the major differences between the two is that […]

    Read More
  • October 6, 2016 - Javier Martinez Canillas

    Samsung OSG Contributions to Linux Kernel 4.8

    Linux 4.8 was released on September 25, and in this release the Samsung Open Source Group (OSG) contributed 432 patches that modified 110,741 lines of code. Although 4 engineers contributed to different Kernel subsystems, almost all of these changes comes from Mauro Carvalho Chehab’s work to improve the media subsystem documentation. One noteworthy news item in this release is that another OSG member has been honored with a maintainer role, now that Luis de Bethencourt is taking maintainership of the BeFS filesystem. Javier Martinez Canillas is now listed as a reviewer for the Samsung Exynos ARM architecture. The following list is all of the OSG engineers that contributed to this release and the number of changesets and lines of code, as reported by Jonathan Corbet and Greg Kroah-Hartman’s gitdm tool. OSG developers by changesets Mauro Carvalho Chehab 347 80.3% Javier Martinez Canillas 69 16.0% Shuah Khan 11 2.5% Luis de Bethencourt […]

    Read More
  • BUG_ON() has been discouraged for debugging kernel problems for a very long time. However, there are still several BUG_ON() usages in the Linux Kernel. A late commit to Kernel 4.8 is one such case, and is now causing a lot of headaches with the release that came out on October 2nd, 2016. This BUG_ON() is triggered when CONFIG_DEBUG_VM is enabled. Some distributions such as the standard Fedora Kernel config enable it by default. Linus Torvalds has discovered that once this BUG_ON() triggers, the machine will have problems handling kernel paging requests and report that a reboot is required to fix a recursive fault from which the machine will never recover! Here’s his direct quote The reason the machine *dies* from that thing is that we end up then immediately having a

    and then a

    and the machine will never recover. Fixing this bug is number one priority for Linus […]

    Read More
  • This article is a part of a series that covers improvements that are being made to the Linux Kernel documentation; this article will begin to explain how we handled the conversion of the Linux Media subsystem documentation. The Linux Media Subsystem The Linux Media subsystem is actually a set of subsystems; each subsystem has its own particularities: Video4Linux –  API and core provide functions for video stream capture and output. It also provides support for video codecs, analog TV, AM/FM radio receivers and transmitters and for software digital radio (SDR) receivers and transmitters. Linux DVB – provides support for digital TV. Despite its name, it supports worldwide standards, including DVB, ATSC, ISDB, and CDDB, as well remote controllers and infra-red devices. Media Controller – provides pipeline control and reconfiguration inside the hardware. HDMI CEC – provides support for the HDMI Consumers Electronic Control (CEC): a system to pass remote controller […]

    Read More
  • September 29, 2016 - Stephen Houston

    A Venture Into Enlightenment’s Gadget API

    In my last post, I mentioned that my internship would revolve around creating gadgets using the new Enlightenment gadget API. After several conversations with Mike Blumenkrantz, the creator of the gadget API and my mentor for this internship, we determined the Pager module is in a state that requires minimal work to be converted to the new gadget API. Therefore, converting Pager to the new API would allow me to focus on learning how the new gadget system works better than writing a gadget from the ground up. Mentors are a Great Resource for Learning Something New Before I continue with details about the Pager API conversion, I think it would be prudent to explain how this internship works behind the scenes. Mike and I have known each other for quite a while as we’ve both worked on Enlightenment and EFL for years. In fact, when Mike joined the project, […]

    Read More
  • Embedded data structures are a common occurrence in Linux Kernel code. Use-after-free errors can easily creep in when they include multiple ref-counted objects with different lifetimes if the data structure is released prematurely. This article will explore some of the problems commonly encountered with lifetime management of embedded data structures when writing Kernel code, and it will cover some essential steps you can follow to prevent these issues from creeping into your own code. What Makes Embedded Structure Lifetime so Complicated? Let’s look at  a few examples of embedded structures. Structure A embeds structure B, structure B embeds structure C, and structure C embeds structures D and E. There is no problem as long as all these structures have identical lifespans and the structure memory can be released all at once. If structure D has a different lifespan overall or in some scenarios, then when structure A goes away, structure […]

    Read More
  • This article is the first in a series on improvements to Linux Kernel documentation. The Linux Kernel has one of the biggest communities in the open source world; the numbers are impressive: over 4,000 contributors per year, resulting in about 8 changes per hour. That results in 4,600 lines of code added every day and a major release every 9-10 weeks. With these impressive numbers, it’s impossible for a traditional printed book to follow the changes because by the time the book is finally written, reviewed and published, a lot of changes have already merged upstream. So, the best way to maintain updated documentation is to keep it close to the source code. This way, when some changes happen, the developer that wrote such changes can also update the corresponding documents. That works great in theory, but it is not as effective as one might think. The Old Methods of […]

    Read More