Following Linus Torvalds’ scathing rejection of "untested crap" from the Linux MMC subsystem, the Linux 7.0 merge window closes its doors to storage hardware patches. This analysis dissects the failed eMMC pull request, the specific kernel build errors involving CONFIG_MULTIPLEXER, and the stringent linux-next compliance required for Linux 7.1 resubmission.
The Linux Kernel’s rigorous quality assurance protocols have reached a boiling point. In a move that underscores the non-negotiable standards of open-source governance, Linus Torvalds has outright rejected the entirety of the MultiMediaCard (MMC) subsystem changes slated for Linux 7.0.
The decision, communicated with trademark candor, cites a fundamental breakdown in the pre-merge vetting process via linux-next, resulting in code that Torvalds described as "complete garbage" and "untested crap."
This incident serves as a critical case study in kernel development lifecycle management, dependency resolution, and the severe consequences of bypassing established integration testing frameworks.
The Context: What Was Planned for MMC in Linux 7.0?
Prior to the rejection, the MMC pull request submitted by maintainer Ulf Hansson presented a roadmap of significant enhancements. These updates targeted storage efficiency, hardware compatibility, and technical debt reduction. The proposed patches aimed to address:
Storage Media Longevity: Optimized secure erase and TRIM command support for specific Kingstom eMMC products, intended to extend the lifecycle of embedded storage.
Hardware Enablement: Introduction of NXP IW61x device IDs facilitating WiFi chipsets over SDIO, alongside Mediatek MT8189 SoC integration within the
mtk-sdcontroller driver.
Codebase Modernization: Clean-up operations within the DW_MMC driver and miscellaneous updates to the SHDCI driver stack.
Future-Proofing: Support for manufacturing date codes post-2025, addressing Y2K-like epoch limitations in current eMMC firmware parsing.
The Rejection: Anatomy of a Failed Pull Request
Despite the technical merit of the proposed features, the submission failed the most fundamental prerequisite for integration: compilation. Linus Torvalds’ response was not merely a rejection; it was an indictment of the development workflow employed.
The Specific Failure Point: CONFIG_MULTIPLEXER Mismatch
Torvalds pinpointed a critical build error rooted in commit ad314348ceb4 ("mux: Add helper functions for getting optional and selected mux-state"). The issue arose from a mismatch between the Kconfig build system and the header file definitions:
The Problem: When
CONFIG_MULTIPLEXERis set to=m(module), the build system compilesmux-core.o. However, the headerinclude/linux/mux/consumer.hconditionally defines functions only if#ifdef CONFIG_MULTIPLEXERis true.
The Result: Since the kernel build defines
CONFIG_MULTIPLEXER_MODULEand notCONFIG_MULTIPLEXER, the header defaults to providing dummy stub functions. Simultaneously, the compiler attempts to build the real implementations fromdrivers/mux/core.c.
The Error: This collision caused a "redefinition of ‘mux_control_states’" error, rendering the entire patch set uncompilable.
This is a classic failing of conditional compilation in C preprocessor logic. It indicates that the patch series was not subjected to an allmodconfig or allyesconfig build test, which would have immediately exposed the module versus built-in discrepancy.
The Linux-Next Mandate: A Non-Negotiable Gate
The takeaway from the Linux 7.0 MMC incident is unequivocal: linux-next is not optional.
For patches to be considered for mainline inclusion, they must reside in linux-next for a minimum duration—typically 24-48 hours, though best practices suggest several days. This allows the 0-day bot and various kernel test robots to compile the code against hundreds of configurations.
What does this mean for the MMC subsystem?
All proposed changes must now wait for the Linux 7.1 merge window, which opens in mid-April following the stable release of Linux 7.0.Strategic Recommendation for Maintainers
To avoid future rejection:
1. **Automate Build Testing:** Integrate `make randconfig` and `make allyesconfig` into CI pipelines.
2. **Leverage Kernel CI:** Utilize resources like kernelci.org to validate against real hardware prior to submission.
3. **Header Hygiene:**
Conduct audits of `#ifdef` vs `#if IS_ENABLED()` macros.
In the case of modular code, `IS_ENABLED(CONFIG_MULTIPLEXER)` is superior to a raw `#ifdef`.
Frequently Asked Questions (FAQs)
Q1: What specific hardware is affected by this Linux 7.0 MMC rejection?
A: Hardware enablement patches for NXP IW61x WiFi chips and Mediatek MT8189 SoCs are delayed. Users requiring these drivers must utilize out-of-tree patches or wait for the Linux 7.1 cycle.Q2: What is the difference between eMMC secure erase and TRIM?
A: Both commands inform the storage controller that data pages are invalid. Secure erase typically involves cryptographic deletion or overwriting, while TRIM simply marks blocks as unused for garbage collection. The rejected patch optimized these routines for specific Kingstom hardware.Q3: How does the CONFIG_MULTIPLEXER error affect end-users?
A: End-users will not encounter this error in released kernels because the faulty code was rejected. The impact is developmental; it prevents the new MMC features from reaching the stable kernel.Q4: Can I manually apply the rejected MMC patches to my custom kernel?
A: Technically yes, but it is strongly discouraged. The patches lack basic build validation; applying them without fixing the underlying Kconfig/header mismatch will result in a broken kernel.Conclusion: The High Cost of Cutting Corners
The Linux 7.0 MMC rejection is a masterclass in open-source governance. It demonstrates that even well-intentioned feature development cannot circumvent the foundational pillars of stability and testing.
For the maintainers, the path forward is clear: rigorous linux-next integration and exhaustive build testing are prerequisites, not afterthoughts.
Action
For kernel engineers and embedded systems developers, now is the time to audit your patch submission workflows. Review your current CI/CD integration with linux-next today. Do not let your code become the next statistic in Linus’ rejection log.

Nenhum comentário:
Postar um comentário