{"id":13314211,"url":"https://github.com/fishilico/linux-patches","last_synced_at":"2026-04-06T04:32:34.969Z","repository":{"id":146801780,"uuid":"54279732","full_name":"fishilico/linux-patches","owner":"fishilico","description":"Patches for GNU/Linux","archived":false,"fork":false,"pushed_at":"2023-08-08T19:21:54.000Z","size":4534,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T23:51:37.373Z","etag":null,"topics":["kernel","linux","patch"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fishilico.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-03-19T17:58:59.000Z","updated_at":"2024-10-31T09:27:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"a450fcef-30e9-4e7c-899e-266eed7508f2","html_url":"https://github.com/fishilico/linux-patches","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fishilico/linux-patches","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fishilico%2Flinux-patches","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fishilico%2Flinux-patches/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fishilico%2Flinux-patches/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fishilico%2Flinux-patches/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fishilico","download_url":"https://codeload.github.com/fishilico/linux-patches/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fishilico%2Flinux-patches/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31460103,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kernel","linux","patch"],"created_at":"2024-07-29T18:11:27.295Z","updated_at":"2026-04-06T04:32:34.964Z","avatar_url":"https://github.com/fishilico.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Some patches to GNU/Linux kernel\n================================\n\nHere are some patches to GNU/Linux which aims to:\n\n* Fix some bugs in the kernel.\n* Make it possible to compile the kernel with many compiler warnings flags, because several compiler warnings are useful but can't be used in vanilla kernel code because of \"false-positives\". The compiler-flag configuration is in ``make_allmodconfig.sh`` script.\n* Enable using clang to compile the kernel, which reports different warnings from gcc, by using LLVMLinux patches (http://llvm.linuxfoundation.org/index.php/Main_Page). NB: according to https://github.com/ClangBuiltLinux/linux/issues/219 LLVMLinux seems to be now deprecated. A list of issues of building Linux with clang is available at https://github.com/ClangBuiltLinux/linux/issues.\n\nHow to build a kernel with these patches?\n-----------------------------------------\n\nShort answer, in a terminal::\n\n    ./apply_patches.sh \u0026\u0026 ./make_allmodconfig.sh \"-j$(nproc)\"\n\nThis command line will clone GNU/Linux git repository, apply patches and build a kernel with clang using a parallel build.\n\n\nIn order to explain what each script does, here is a workflow when updating the patches with a more recent version of GNU/Linux:\n\n* ``./apply_patches.sh`` : clone GNU/Linux git repository in ``linux/`` and apply patches from ``patches/`` directory\n* ``cd linux \u0026\u0026 git fetch origin \u0026\u0026 git rebase origin/master`` : update GNU/Linux to latest master branch and rebase the patches on top of it\n* ``JOBS=\"$(nproc)\" ./test_make_gcc_clang.sh`` : compile the GNU/Linux once with gcc, then with clang, and if both succeed, record the output in a file named ``make.log_clang_YYY-MM-DD`` (with the current date).\n\n    * If there were errors during the build, fix them in new patches and build again\n    * It is possible to use ``make_allmodconfig.sh`` script to make debugging some issues easier. All parameters given to this script are transmitted to the underlying ``make`` command::\n\n        # Build files in kernel/ directory using gcc\n        HOSTCC=gcc CC=gcc ./make_allmodconfig.sh kernel/\n\n        # Build init/main.o using clang (which is the default compiler)\n        HOSTCC=clang CC=clang ./make_allmodconfig.sh init/main.o\n\n* ``./export_patches.sh`` : export the patches back to ``patches/`` directory, using ``reorganize_patches.py`` to organize them in sub-directories.\n\n\nHow are the patches organized?\n------------------------------\n\nAll the patches lies in subdirectories inside ``patches/``:\n\n* ``patches/bug/`` patches fix some bugs which make the compiling fail.\n* ``patches/constify/`` patches add ``const`` keyword in some places.\n* ``patches/frama-c/`` patches modify the kernel so that Frama-C can be used.\n* ``patches/llvmlinux/`` patches are related to clang compatibility (c.f. http://llvm.linuxfoundation.org/ ).\n* ``patches/maybe_upstreamable/`` patches have a very low priority of being sent upstream.\n* ``patches/not_upstreamble/`` patches have no chance to go upstream (they do not comply with coding rules, introduce dirty code, etc.).\n* ``patches/plugin/`` patches implement some GCC plugins to analyze the code at compile time.\n* ``patches/pragma/`` patches introduce ``#pragma`` statement, mostly to ignore warnings when it is expected.\n* ``patches/printf/`` patches add ``__printf`` attribute to printf-like functions so that potential format string vulnerabilities are detected at build time.\n* ``patches/rejected/`` patches were rejected (sometimes silently) by kernel developers.\n* ``patches/sent-upstream/`` patches have already been sent upstream even though they were not yet applied.\n* ``patches/typo/`` patches fix typos which are sprinkled all around in the kernel.\n\nMoreover there are two important files to apply the patches:\n\n* ``patches/series`` define the order used to apply the patches\n* ``patches/upstream-commit.hash`` contains the GNU/Linux commit ID which is used as the base to apply the patches on.\n\n\nUpstreamed patches\n------------------\n\nPatches are occasionally sent upstream. Here are some which got successfully applied:\n\n* https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c680e41b3a2e944185c74bf60531e3d316d3ecc4\n  \"eventpoll: fix uninitialized variable in epoll_ctl\"\n* https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ea6edfbcefec1fcfdb826a1d5a054f402dfbfb24\n  \"mac802154: fix typo in header guard\"\n* https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d43698e8abb58a6ac47d16e0f47bb55f452e4fc4\n  \"firmware/ihex2fw.c: restore missing default in switch statement\"\n* https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5202efe544c279be152f44f2821010ff7b2d7e5b\n  \"coredump: use from_kuid/kgid when formatting corename\"\n* https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=3958b79266b14729edd61daf9dfb84de45f4ec6d\n  \"configfs: fix kernel infoleak through user-controlled format string\"\n* https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=0fd64291031d3587753b8adc53123b277855c777\n  \"drm/amdgpu: increment queue when iterating on this variable.\"\n\nOther upstreamed patches can be found using for example\nhttps://github.com/torvalds/linux/commits/master?author=fishilico\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffishilico%2Flinux-patches","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffishilico%2Flinux-patches","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffishilico%2Flinux-patches/lists"}