Compare commits

..

3 Commits

Author SHA1 Message Date
Sravan Balaji
4dce7e439c Switch back to PDS Scheduler 2023-07-11 15:34:57 -04:00
Sravan Balaji
4b31006527 Switch to BMQ Scheduler
- Change yield type and rr interval to BMQ defaults
- Disable PDS specific smt nice priority support
- Disable setting kernel parameters (handled by grub)
2023-07-11 15:34:57 -04:00
Sravan Balaji
289adec115 PDS Kernel Configuration 2023-07-11 15:34:57 -04:00
31 changed files with 1150 additions and 212355 deletions

View File

@@ -6,13 +6,10 @@ on:
env:
_waydroid: "true"
_anbox: "true"
_processor_opt: "generic"
PKGDEST: "/tmp/linux-tkg"
_debugdisable: "true"
_noccache: "true"
_STRIP: "true"
_kernel_on_diet: "true"
_kernel_work_folder: "/tmp"
_kernel_source_folder: "/tmp"
# _modprobeddb: "true"
@@ -49,43 +46,27 @@ jobs:
run: |
./.github/get_latest_kver.sh
latest_kernel="$(cat .github/latest-kernel)"
echo "latest_kernel=$latest_kernel" >> $GITHUB_OUTPUT
echo "::set-output name=latest_kernel::$latest_kernel"
new_kernel=0
[[ "$latest_kernel" != "$latest_release" ]] || new_kernel=$?
echo "new_kernel=$new_kernel" >> $GITHUB_OUTPUT
echo "::set-output name=new_kernel::$new_kernel"
env:
latest_release: ${{ steps.latest_release.outputs.release }}
cleanup-ubuntu:
runs-on: ubuntu-latest
needs: [check-for-newer-kernel]
steps:
- name: Free Disk Space (Ubuntu)
uses: hirnidrin/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: false
swap-storage: true
build-cfs:
build-pds:
env:
_cpusched: "cfs"
_cpusched: "pds"
# The following code is repeated in each build job
# Can be factorized once YAML anchors get implemented in Github
# See https://github.com/actions/runner/issues/1182 for status
runs-on: ubuntu-latest
container: archlinux:latest
needs: [check-for-newer-kernel, cleanup-ubuntu]
needs: ["check-for-newer-kernel"]
# the == 0 test is for "true" because it tests the exit code of a bash test
if: |
github.ref == 'refs/heads/master' &&
needs.check-for-newer-kernel.outputs.new_kernel == '0'
@@ -125,14 +106,61 @@ jobs:
name: kernel-packages-${{ env._cpusched }}
path: ${{ env.PKGDEST }}/linux*.pkg.tar.zst
build-bore-eevdf:
build-cfs:
env:
_cpusched: "bore-eevdf"
_cpusched: "cfs"
runs-on: ubuntu-latest
container: archlinux:latest
needs: [check-for-newer-kernel, cleanup-ubuntu]
needs: ["check-for-newer-kernel"]
if: |
github.ref == 'refs/heads/master' &&
needs.check-for-newer-kernel.outputs.new_kernel == '0'
steps:
# We need to install git so the checkout is done with it
- name: Install git
run: pacman -Syu --noconfirm git
- name: Checkount linux-tkg
uses: actions/checkout@v3.0.2
# 1. Install deps needed for building and sudo
# 2. create a user "user" and give it passwordless sudo
# and necessary permissions
# because makepkg absolutely refuses to run as root
- name: Prepare for makepkg
run: |
pacman -Syu --noconfirm base-devel sudo
useradd user -G wheel && echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
chown user -R ..
chown user -R /tmp
# - name: "[debug] make dummy modprobed-db file for faster ci"
# run: |
# touch "${_modprobeddb_db_path}"
# echo "${_modprobeddb_db_path}"
- name: Compile Kernel
run: su user -c "yes '' | makepkg --noconfirm -s"
# run: |
# mkdir -p "$PKGDEST"
# echo "test" > "$PKGDEST"/linux-$_cpusched.pkg.tar.zst
- uses: actions/upload-artifact@v3
with:
name: kernel-packages-${{ env._cpusched }}
path: ${{ env.PKGDEST }}/linux*.pkg.tar.zst
build-bmq:
env:
_cpusched: "bmq"
runs-on: ubuntu-latest
container: archlinux:latest
needs: ["check-for-newer-kernel"]
if: |
github.ref == 'refs/heads/master' &&
needs.check-for-newer-kernel.outputs.new_kernel == '0'
@@ -176,7 +204,7 @@ jobs:
runs-on: ubuntu-latest
needs: [check-for-newer-kernel, cleanup-ubuntu, "build-cfs", "build-bore-eevdf"]
needs: [check-for-newer-kernel, "build-pds", "build-cfs", "build-bmq"]
steps:
- name: Download release artifacts
uses: actions/download-artifact@v3
@@ -189,6 +217,6 @@ jobs:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ needs.check-for-newer-kernel.outputs.latest_kernel }}
prerelease: false
title: "[experimental] ${{ needs.check-for-newer-kernel.outputs.latest_kernel }}"
title: "${{ needs.check-for-newer-kernel.outputs.latest_kernel }}"
files: |
${{ env.PKGDEST }}/kernel-packages-*/*

3
.gitignore vendored
View File

@@ -24,6 +24,3 @@ logs/*
kernel_updates
gnupg/
*sha256sum*
current_env
linux-kernel.git/
linux-src-git/

View File

@@ -123,11 +123,7 @@ build() {
CFLAGS+=" ${_compileropt}"
# build!
if pacman -Qq schedtool &> /dev/null; then
msg2 "Using schedtool"
_schedtool="schedtool -B -n 1 -e ionice -n 1"
fi
_runtime=$( time ( $_schedtool make ${_force_all_threads} ${llvm_opt} LOCALVERSION= bzImage modules 2>&1 ) 3>&1 1>&2 2>&3 )
_runtime=$( time ( schedtool -B -n 1 -e ionice -n 1 make ${_force_all_threads} ${llvm_opt} LOCALVERSION= bzImage modules 2>&1 ) 3>&1 1>&2 2>&3 ) || _runtime=$( time ( make ${_force_all_threads} ${llvm_opt} LOCALVERSION= bzImage modules 2>&1 ) 3>&1 1>&2 2>&3 )
}
hackbase() {

View File

@@ -43,14 +43,46 @@ The `customization.cfg` file offers many toggles for extra tweaks:
- Using [Modprobed-db](https://github.com/graysky2/modprobed-db)'s database can reduce the compilation time and produce a smaller kernel which will only contain the modules listed in it. **NOT recommended**
- **Warning**: make sure to read [thoroughly about it first](https://wiki.archlinux.org/index.php/Modprobed-db) since it comes with caveats that can lead to an unbootable kernel.
- "Zenify" patchset using core blk, mm and scheduler tweaks from Zen
- [Anbox](https://wiki.archlinux.org/title/Anbox) support (See [Anbox usage](https://github.com/Frogging-Family/linux-tkg#anbox-usage))
- `ZFS` FPU symbols (<5.9)
- Overrides for missing ACS capabilities
- [Waydroid](https://wiki.archlinux.org/title/Waydroid) support
- Provide own kernel `.config` file
- ...
#### User patches
To apply your own patch files using the provided scripts, you will need to put them in a `linux<VERSION><PATCHLEVEL>-tkg-userpatches` folder -- where _VERSION_ and _PATCHLEVEL_ are the kernel version and patch level, as specified in [linux Makefile](https://github.com/torvalds/linux/blob/master/Makefile), the patch works on, _e.g_ `linux65-tkg-userpatches` -- at the same level as the `PKGBUILD` file, with the `.mypatch` extension. The script will by default ask if you want to apply them, one by one. The option `_user_patches` should be set to `true` in the `customization.cfg` file for this to work.
To apply your own patch files using the provided scripts, you will need to put them in a `linux5y-tkg-userpatches` folder -- `y` needs to be changed with the kernel version the patch works on, _e.g_ `linux510-tkg-userpatches` -- at the same level as the `PKGBUILD` file, with the `.mypatch` extension. The script will by default ask if you want to apply them, one by one. The option `_user_patches` should be set to `true` in the `customization.cfg` file for this to work.
#### Anbox usage
**As of kernel 5.18, ashmem was dropped, breaking anbox. Their old Android 7 base doesn't allow moving to memfd so it might take a while to fix. The newer WayDroid alternative moved to using memfd thanks to an easier to work with Android 10 base. It still depends on binderfs, which is supported on 5.18+, but ashmem isn't a requirement for it anymore. An ashmem dkms driver can be used to circumvent the issue, but it currently is problematic on 5.19 and is likely to require active maintenance going forward. If you can, consider moving to WayDroid.**
When enabling the anbox support option, the `binder` and `ashmem` modules are built-in. You don't have to load them. However you'll need to mount binderfs :
```shell
sudo mkdir /dev/binderfs
sudo mount -t binder binder /dev/binderfs
```
To make this persistent, you can create `/etc/tmpfiles.d/anbox.conf` with the following content :
```
d! /dev/binderfs 0755 root root
```
After which you can add the following to your `/etc/fstab` :
```
binder /dev/binderfs binder nofail 0 0
```
Then, if needed, start the anbox service :
```shell
systemctl start anbox-container-manager.service
```
You can also enable the service for it to be auto-started on boot :
```shell
systemctl enable anbox-container-manager.service
```
You're set to run Anbox.
If you prefer automatic setup you can install `anbox-support` from AUR which will take care of everything by itself.
### Install procedure

View File

@@ -5,7 +5,7 @@
# If left empty, the script will prompt
_distro="Arch"
# Kernel Version - x.x format without the subversion (will always grab latest available subversion) is recommended
# Kernel Version - Options are "5.4", and from "5.7" to "5.19"
# you can also set a specific kernel version, e.g. "6.0-rc4" or "5.10.51",
# -> note however that a "z" too small on a "x.y.z" version may make patches fail
# as they got adapted for newer "z" values.
@@ -51,12 +51,6 @@ _force_all_threads="false"
# Set to true to prevent ccache from being used and set CONFIG_GCC_PLUGINS=y (which needs to be disabled for ccache to work properly)
_noccache="false"
# [Experimental] Build only a subset of the default kernel modules list to speedup compile time and lower needed space to build kernel
# Notes:
# - If the kernel fails to boot with this option active, disable it and rebuild
# - This option cannot be used with _modprobeddb="true"
_kernel_on_diet="false"
# Set to true to use modprobed db to clean config from unneeded modules. Speeds up compilation considerably. Requires root - https://wiki.archlinux.org/index.php/Modprobed-db
# Using this option can trigger user prompts if the config doesn't go smoothly.
# !!!! Make sure to have a well populated db !!!! - Leave empty to be asked about it at build time
@@ -83,7 +77,7 @@ _dracut_options="--lz4"
# Default (empty) : "config.x86_64" from the linux-tkg-config/5.y folder.
# "running-kernel" : Picks the .config file from the currently running kernel.
# It is recommended to be running an official kernel before running this script, to pick off a correct .config file
# "config_hardened.x86_64" : config file for a hardened kernel, available for kernel version "5.15", "5.13", "5.11", "5.10", "5.7", "5.4".
# "config_hardened.x86_64" : config file for a hardened kernel, available for kernel version "5.13", "5.10" and "5.4" .
# To get a complete hardened setup, you have to use "cfs" as _cpusched.
# User provided value : custom user provided file, the given path should be relative to the PKGBUILD file. This enables for example to use a user stripped down .config file.
# If the .config file isn't up to date with the chosen kernel version, any extra CONFIG_XXXX is set to its default value.
@@ -102,8 +96,7 @@ _STRIP="true"
# LEAVE AN EMPTY VALUE TO BE PROMPTED ABOUT FOLLOWING OPTIONS AT BUILD TIME
# CPU scheduler - Options are "pds", "bmq", "cacule", "tt", "bore", "bore-eevdf", "eevdf" or "cfs" (kernel's default)
# "upds" (TkG's Undead PDS) and "muqss" are also available on legacy kernel revisions
# CPU scheduler - Options are "upds" (TkG's Undead PDS), "pds", "bmq", "muqss", "cacule", "tt", "bore" or "cfs" (kernel's default)
_cpusched="pds"
# Compiler to use - Options are "gcc" or "llvm".
@@ -174,14 +167,10 @@ _bcachefs="false"
# ! Can't be used on multiple kernels installed side-by-side, which will require https://aur.archlinux.org/packages/winesync-dkms/ instead of this option !
_winesync="false"
# Set to "true" to enable Binder modules to use Waydroid Android containers
_waydroid="false"
# Various patches and tweaks from Zen/Liquorix, Xanmod and the community - Default is "true"
_glitched_base="true"
# Set to "true" to enable Binder and Ashmem, the kernel modules required to use the android emulator Anbox. ! This doesn't apply to 5.4.y !
_anbox="false"
# A selection of patches from Zen/Liquorix kernel and additional tweaks for a better gaming experience (ZENIFY) - Default is "true"
# ! depends on _glitched_base="true" !
_zenify="true"
# compiler optimization level - 1. Optimize for performance (-O2); 2. Optimize harder (-O3); 3. Optimize for size (-Os) - Kernel default is "1"
@@ -242,14 +231,12 @@ _clear_patches="true"
#### SPESHUL OPTION ####
# [Arch only] If you want to bypass the stock naming scheme and enforce something else (example : "linux") - Useful for some bootloaders requiring manual entry editing on each release.
# If you want to bypass the stock naming scheme and enforce something else (example : "linux") - Useful for some bootloaders requiring manual entry editing on each release.
# !!! It will also change pkgname - If you don't explicitely need this, don't use it !!!
# Use _kernel_localversion instead on non-Arch based distros
_custom_pkgbase=""
# [non-Arch only] Kernel localversion. Putting it to "Mario" will make for example the kernel version be 5.7.0-tkg-Mario (given by uname -r)
# [non-Arch specific] Kernel localversion. Putting it to "Mario" will make for example the kernel version be 5.7.0-tkg-Mario (given by uname -r)
# If left empty, it will use "-tkg-${_cpusched}${_compiler}" where "${_cpusched}" will be replaced by the user chosen scheduler, ${_compiler} will be replaced by "-llvm" if clang is used (nothing for GCC).
# Use _custom_pkgbase instead on Arch based distros
_kernel_localversion=""
# Set to your maximum number of CPUs (physical + logical cores) - Lower means less overhead - You can set it to "$(nproc)" to use the current host's CPU(s) core count, or leave empty to use default
@@ -294,7 +281,7 @@ _mglru="true"
# example: _community_patches="clear_nack_in_tend_isr.myrevert ffb_regression_fix.mypatch 0008-drm-amd-powerplay-force-the-trim-of-the-mclk-dpm-levels-if-OD-is-enabled.mypatch"
_community_patches=""
# You can use your own patches by putting them in a subfolder called linux<VERSION><PATCHLEVEL>-tkg-userpatches (see README.md for more info) next to the PKGBUILD and giving them the .mypatch extension.
# You can use your own patches by putting them in a subfolder called linux<version>-tkg-userpatches (e.g. linux510-tkg-userpatches) next to the PKGBUILD and giving them the .mypatch extension.
# You can also revert patches by putting them in that same folder and giving them the .myrevert extension.
# Also, userpatches variable below must be set to true for the above to work.

View File

@@ -67,13 +67,17 @@ _install_dependencies() {
fi
if [ "$_distro" = "Debian" -o "$_distro" = "Ubuntu" ]; then
msg2 "Installing dependencies"
sudo apt install bc bison build-essential ccache cpio fakeroot flex git kmod libelf-dev libncurses5-dev libssl-dev lz4 qtbase5-dev rsync schedtool wget zstd debhelper ${clang_deps} -y
sudo apt install bc bison build-essential ccache cpio fakeroot flex git kmod libelf-dev libncurses5-dev libssl-dev lz4 qtbase5-dev rsync schedtool wget zstd ${clang_deps} -y
elif [ "$_distro" = "Fedora" ]; then
msg2 "Installing dependencies"
sudo dnf install perl bison ccache dwarves elfutils-devel elfutils-libelf-devel fedora-packager fedpkg flex gcc-c++ git grubby libXi-devel lz4 make ncurses-devel openssl openssl-devel perl-devel perl-generators pesign python3-devel qt5-qtbase-devel rpm-build rpmdevtools schedtool zstd bc rsync -y ${clang_deps} -y
if [ $(rpm -E %fedora) = "32" ]; then
sudo dnf install bison ccache dwarves elfutils-libelf-devel fedora-packager fedpkg flex gcc-c++ git grubby libXi-devel lz4 ncurses-devel openssl-devel pesign qt5-devel rpm-build rpmdevtools schedtool zstd ${clang_deps} -y
else
sudo dnf install perl bison ccache dwarves elfutils-devel elfutils-libelf-devel fedora-packager fedpkg flex gcc-c++ git grubby libXi-devel lz4 make ncurses-devel openssl openssl-devel perl-devel perl-generators pesign python3-devel qt5-qtbase-devel rpm-build rpmdevtools schedtool zstd -y ${clang_deps} -y
fi
elif [ "$_distro" = "Suse" ]; then
msg2 "Installing dependencies"
sudo zypper install -y bc bison ccache dwarves elfutils flex gcc-c++ git libXi-devel libelf-devel libqt5-qtbase-common-devel libqt5-qtbase-devel lz4 make ncurses-devel openssl-devel patch pesign rpm-build rpmdevtools schedtool python3 rsync zstd ${clang_deps}
sudo zypper install -y bc bison ccache dwarves elfutils flex gcc-c++ git libXi-devel libelf-devel libqt5-qtbase-common-devel libqt5-qtbase-devel lz4 make ncurses-devel openssl-devel patch pesign rpm-build rpmdevtools schedtool ${clang_deps}
fi
}
@@ -227,9 +231,10 @@ if [ "$1" = "install" ]; then
fi
_headers_deb="linux-headers-${_kernelname}*.deb"
_image_deb="linux-image-${_kernelname}_*.deb"
_kernel_devel_deb="linux-libc-dev_${_kernelname}*.deb"
cd DEBS
sudo dpkg -i $_headers_deb $_image_deb
sudo dpkg -i $_headers_deb $_image_deb $_kernel_devel_deb
fi
elif [[ "$_distro" =~ ^(Fedora|Suse)$ ]]; then
@@ -370,6 +375,10 @@ if [ "$1" = "install" ]; then
msg2 "Installing kernel"
sudo make install
msg2 "Creating initramfs"
sudo dracut --force --hostonly ${_dracut_options} --kver $_kernelname
msg2 "Updating GRUB"
sudo grub-mkconfig -o /boot/grub/grub.cfg
if [ "$_distro" = "Gentoo" ]; then
@@ -387,13 +396,6 @@ if [ "$1" = "install" ]; then
sudo emerge @module-rebuild --keep-going
fi
else
msg2 "Creating initramfs"
sudo dracut --force --hostonly ${_dracut_options} --kver $_kernelname
msg2 "Updating GRUB"
sudo grub-mkconfig -o /boot/grub/grub.cfg
fi
fi

View File

@@ -8388,7 +8388,6 @@ CONFIG_AMILO_RFKILL=m
CONFIG_FUJITSU_LAPTOP=m
CONFIG_FUJITSU_TABLET=m
CONFIG_GPD_POCKET_FAN=m
CONFIG_X86_PLATFORM_DRIVERS_HP=y
CONFIG_HP_ACCEL=m
CONFIG_WIRELESS_HOTKEY=m
CONFIG_HP_WMI=m

View File

@@ -7366,7 +7366,6 @@ CONFIG_SND_SOC_RT1019=m
CONFIG_SND_SOC_RT1308=m
CONFIG_SND_SOC_RT1308_SDW=m
CONFIG_SND_SOC_RT1316_SDW=m
CONFIG_SND_SOC_RT1318_SDW=m
CONFIG_SND_SOC_RT5514=m
CONFIG_SND_SOC_RT5514_SPI=m
CONFIG_SND_SOC_RT5616=m
@@ -8845,7 +8844,6 @@ CONFIG_AMILO_RFKILL=m
CONFIG_FUJITSU_LAPTOP=m
CONFIG_FUJITSU_TABLET=m
CONFIG_GPD_POCKET_FAN=m
CONFIG_X86_PLATFORM_DRIVERS_HP=y
CONFIG_HP_ACCEL=m
CONFIG_WIRELESS_HOTKEY=m
CONFIG_HP_WMI=m

View File

@@ -1,15 +1,15 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 6.4.9-arch1 Kernel Configuration
# Linux/x86 6.4.1-arch2 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (GCC) 13.2.1 20230801"
CONFIG_CC_VERSION_TEXT="gcc (GCC) 13.1.1 20230429"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=130201
CONFIG_GCC_VERSION=130101
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=24100
CONFIG_AS_VERSION=24000
CONFIG_LD_IS_BFD=y
CONFIG_LD_VERSION=24100
CONFIG_LD_VERSION=24000
CONFIG_LLD_VERSION=0
CONFIG_CC_CAN_LINK=y
CONFIG_CC_CAN_LINK_STATIC=y
@@ -544,9 +544,7 @@ CONFIG_CALL_DEPTH_TRACKING=y
# CONFIG_CALL_THUNKS_DEBUG is not set
CONFIG_CPU_IBPB_ENTRY=y
CONFIG_CPU_IBRS_ENTRY=y
CONFIG_CPU_SRSO=y
CONFIG_SLS=y
# CONFIG_GDS_FORCE_MITIGATION is not set
CONFIG_ARCH_HAS_ADD_PAGES=y
CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y
@@ -796,7 +794,6 @@ CONFIG_GENERIC_SMP_IDLE_THREAD=y
CONFIG_ARCH_HAS_FORTIFY_SOURCE=y
CONFIG_ARCH_HAS_SET_MEMORY=y
CONFIG_ARCH_HAS_SET_DIRECT_MAP=y
CONFIG_ARCH_HAS_CPU_FINALIZE_INIT=y
CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y
CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT=y
CONFIG_ARCH_WANTS_NO_INSTR=y
@@ -1166,7 +1163,7 @@ CONFIG_LRU_GEN=y
CONFIG_LRU_GEN_ENABLED=y
# CONFIG_LRU_GEN_STATS is not set
CONFIG_ARCH_SUPPORTS_PER_VMA_LOCK=y
CONFIG_PER_VMA_LOCK=y
# CONFIG_PER_VMA_LOCK is not set
CONFIG_LOCK_MM_AND_FIND_VMA=y
#
@@ -2338,7 +2335,7 @@ CONFIG_ISCSI_IBFT=m
CONFIG_FW_CFG_SYSFS=m
# CONFIG_FW_CFG_SYSFS_CMDLINE is not set
CONFIG_SYSFB=y
CONFIG_SYSFB_SIMPLEFB=y
# CONFIG_SYSFB_SIMPLEFB is not set
CONFIG_FW_CS_DSP=m
CONFIG_GOOGLE_FIRMWARE=y
# CONFIG_GOOGLE_SMI is not set
@@ -11168,7 +11165,6 @@ CONFIG_PTDUMP_CORE=y
# CONFIG_PTDUMP_DEBUGFS is not set
CONFIG_HAVE_DEBUG_KMEMLEAK=y
# CONFIG_DEBUG_KMEMLEAK is not set
# CONFIG_PER_VMA_LOCK_STATS is not set
# CONFIG_DEBUG_OBJECTS is not set
CONFIG_SHRINKER_DEBUG=y
# CONFIG_DEBUG_STACK_USAGE is not set

View File

@@ -1,15 +1,15 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 6.5.0-arch1 Kernel Configuration
# Linux/x86 6.5.0-rc1 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (GCC) 13.2.1 20230801"
CONFIG_CC_VERSION_TEXT="gcc (GCC) 13.1.1 20230429"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=130201
CONFIG_GCC_VERSION=130101
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=24100
CONFIG_AS_VERSION=24000
CONFIG_LD_IS_BFD=y
CONFIG_LD_VERSION=24100
CONFIG_LD_VERSION=24000
CONFIG_LLD_VERSION=0
CONFIG_CC_CAN_LINK=y
CONFIG_CC_CAN_LINK_STATIC=y
@@ -123,7 +123,9 @@ CONFIG_BPF_JIT=y
CONFIG_BPF_JIT_ALWAYS_ON=y
CONFIG_BPF_JIT_DEFAULT_ON=y
CONFIG_BPF_UNPRIV_DEFAULT_OFF=y
# CONFIG_BPF_PRELOAD is not set
CONFIG_USERMODE_DRIVER=y
CONFIG_BPF_PRELOAD=y
CONFIG_BPF_PRELOAD_UMD=m
CONFIG_BPF_LSM=y
# end of BPF subsystem
@@ -181,7 +183,7 @@ CONFIG_RCU_NOCB_CPU=y
# CONFIG_RCU_NOCB_CPU_CB_BOOST is not set
# CONFIG_TASKS_TRACE_RCU_READ_MB is not set
CONFIG_RCU_LAZY=y
CONFIG_RCU_DOUBLE_CHECK_CB_TIME=y
# CONFIG_RCU_DOUBLE_CHECK_CB_TIME is not set
# end of RCU Subsystem
CONFIG_IKCONFIG=y
@@ -541,9 +543,7 @@ CONFIG_CALL_DEPTH_TRACKING=y
# CONFIG_CALL_THUNKS_DEBUG is not set
CONFIG_CPU_IBPB_ENTRY=y
CONFIG_CPU_IBRS_ENTRY=y
CONFIG_CPU_SRSO=y
CONFIG_SLS=y
# CONFIG_GDS_FORCE_MITIGATION is not set
CONFIG_ARCH_HAS_ADD_PAGES=y
CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y
@@ -1053,7 +1053,7 @@ CONFIG_ZPOOL=y
CONFIG_SWAP=y
CONFIG_ZSWAP=y
CONFIG_ZSWAP_DEFAULT_ON=y
CONFIG_ZSWAP_EXCLUSIVE_LOADS_DEFAULT_ON=y
# CONFIG_ZSWAP_EXCLUSIVE_LOADS_DEFAULT_ON is not set
# CONFIG_ZSWAP_COMPRESSOR_DEFAULT_DEFLATE is not set
# CONFIG_ZSWAP_COMPRESSOR_DEFAULT_LZO is not set
# CONFIG_ZSWAP_COMPRESSOR_DEFAULT_842 is not set
@@ -2343,7 +2343,7 @@ CONFIG_ISCSI_IBFT=m
CONFIG_FW_CFG_SYSFS=m
# CONFIG_FW_CFG_SYSFS_CMDLINE is not set
CONFIG_SYSFB=y
CONFIG_SYSFB_SIMPLEFB=y
# CONFIG_SYSFB_SIMPLEFB is not set
CONFIG_FW_CS_DSP=m
CONFIG_GOOGLE_FIRMWARE=y
# CONFIG_GOOGLE_SMI is not set
@@ -2637,8 +2637,6 @@ CONFIG_DW_XDATA_PCIE=m
CONFIG_PCI_ENDPOINT_TEST=m
CONFIG_XILINX_SDFEC=m
CONFIG_MISC_RTSX=m
CONFIG_TPS6594_ESM=m
CONFIG_TPS6594_PFSM=m
CONFIG_C2PORT=m
CONFIG_C2PORT_DURAMAR_2150=m
@@ -2673,7 +2671,7 @@ CONFIG_INTEL_MEI_TXE=m
CONFIG_INTEL_MEI_GSC=m
CONFIG_INTEL_MEI_HDCP=m
CONFIG_INTEL_MEI_PXP=m
CONFIG_INTEL_MEI_GSC_PROXY=m
# CONFIG_INTEL_MEI_GSC_PROXY is not set
CONFIG_VMWARE_VMCI=m
CONFIG_GENWQE=m
CONFIG_GENWQE_PLATFORM_ERROR_RECOVERY=0
@@ -3635,7 +3633,7 @@ CONFIG_CAN_8DEV_USB=m
CONFIG_CAN_EMS_USB=m
CONFIG_CAN_ESD_USB=m
CONFIG_CAN_ETAS_ES58X=m
CONFIG_CAN_F81604=m
# CONFIG_CAN_F81604 is not set
CONFIG_CAN_GS_USB=m
CONFIG_CAN_KVASER_USB=m
CONFIG_CAN_MCBA_USB=m
@@ -4041,7 +4039,7 @@ CONFIG_RTW88_8822CE=m
CONFIG_RTW88_8822CS=m
CONFIG_RTW88_8822CU=m
CONFIG_RTW88_8723DE=m
CONFIG_RTW88_8723DS=m
# CONFIG_RTW88_8723DS is not set
CONFIG_RTW88_8723DU=m
CONFIG_RTW88_8821CE=m
CONFIG_RTW88_8821CS=m
@@ -4051,11 +4049,10 @@ CONFIG_RTW88_DEBUGFS=y
CONFIG_RTW89=m
CONFIG_RTW89_CORE=m
CONFIG_RTW89_PCI=m
CONFIG_RTW89_8851B=m
CONFIG_RTW89_8852A=m
CONFIG_RTW89_8852B=m
CONFIG_RTW89_8852C=m
CONFIG_RTW89_8851BE=m
# CONFIG_RTW89_8851BE is not set
CONFIG_RTW89_8852AE=m
CONFIG_RTW89_8852BE=m
CONFIG_RTW89_8852CE=m
@@ -5127,7 +5124,7 @@ CONFIG_CHARGER_TPS65090=m
CONFIG_BATTERY_GAUGE_LTC2941=m
CONFIG_BATTERY_GOLDFISH=m
CONFIG_BATTERY_RT5033=m
CONFIG_CHARGER_RT5033=m
# CONFIG_CHARGER_RT5033 is not set
CONFIG_CHARGER_RT9455=m
CONFIG_CHARGER_RT9467=m
CONFIG_CHARGER_RT9471=m
@@ -5226,7 +5223,7 @@ CONFIG_SENSORS_MAX197=m
CONFIG_SENSORS_MAX31722=m
CONFIG_SENSORS_MAX31730=m
CONFIG_SENSORS_MAX31760=m
CONFIG_MAX31827=m
# CONFIG_MAX31827 is not set
CONFIG_SENSORS_MAX6620=m
CONFIG_SENSORS_MAX6621=m
CONFIG_SENSORS_MAX6639=m
@@ -5614,7 +5611,7 @@ CONFIG_MFD_88PM800=m
CONFIG_MFD_88PM805=m
CONFIG_MFD_88PM860X=y
CONFIG_MFD_MAX14577=m
CONFIG_MFD_MAX77541=m
# CONFIG_MFD_MAX77541 is not set
CONFIG_MFD_MAX77693=m
CONFIG_MFD_MAX77843=y
CONFIG_MFD_MAX8907=m
@@ -5660,9 +5657,8 @@ CONFIG_MFD_TPS65910=y
CONFIG_MFD_TPS65912=m
CONFIG_MFD_TPS65912_I2C=m
CONFIG_MFD_TPS65912_SPI=m
CONFIG_MFD_TPS6594=m
CONFIG_MFD_TPS6594_I2C=m
CONFIG_MFD_TPS6594_SPI=m
# CONFIG_MFD_TPS6594_I2C is not set
# CONFIG_MFD_TPS6594_SPI is not set
CONFIG_TWL4030_CORE=y
CONFIG_MFD_TWL4030_AUDIO=y
CONFIG_TWL6040_CORE=y
@@ -5732,7 +5728,6 @@ CONFIG_REGULATOR_LTC3589=m
CONFIG_REGULATOR_LTC3676=m
CONFIG_REGULATOR_MAX14577=m
CONFIG_REGULATOR_MAX1586=m
CONFIG_REGULATOR_MAX77541=m
CONFIG_REGULATOR_MAX8649=m
CONFIG_REGULATOR_MAX8660=m
CONFIG_REGULATOR_MAX8893=m
@@ -5767,7 +5762,7 @@ CONFIG_REGULATOR_PV88060=m
CONFIG_REGULATOR_PV88080=m
CONFIG_REGULATOR_PV88090=m
CONFIG_REGULATOR_PWM=m
CONFIG_REGULATOR_RAA215300=m
# CONFIG_REGULATOR_RAA215300 is not set
CONFIG_REGULATOR_RC5T583=m
CONFIG_REGULATOR_RT4801=m
CONFIG_REGULATOR_RT4803=m
@@ -6352,7 +6347,7 @@ CONFIG_VIDEO_MT9V011=m
CONFIG_VIDEO_MT9V032=m
CONFIG_VIDEO_MT9V111=m
CONFIG_VIDEO_OG01A1B=m
CONFIG_VIDEO_OV01A10=m
# CONFIG_VIDEO_OV01A10 is not set
CONFIG_VIDEO_OV02A10=m
CONFIG_VIDEO_OV08D10=m
CONFIG_VIDEO_OV08X40=m
@@ -6976,8 +6971,6 @@ CONFIG_SND_DMAENGINE_PCM=m
CONFIG_SND_HWDEP=m
CONFIG_SND_SEQ_DEVICE=m
CONFIG_SND_RAWMIDI=m
CONFIG_SND_UMP=m
# CONFIG_SND_UMP_LEGACY_RAWMIDI is not set
CONFIG_SND_COMPRESS_OFFLOAD=m
CONFIG_SND_JACK=y
CONFIG_SND_JACK_INPUT_DEV=y
@@ -7011,8 +7004,7 @@ CONFIG_SND_SEQ_MIDI_EVENT=m
CONFIG_SND_SEQ_MIDI=m
CONFIG_SND_SEQ_MIDI_EMUL=m
CONFIG_SND_SEQ_VIRMIDI=m
CONFIG_SND_SEQ_UMP=y
CONFIG_SND_SEQ_UMP_CLIENT=m
# CONFIG_SND_SEQ_UMP is not set
CONFIG_SND_MPU401_UART=m
CONFIG_SND_OPL3_LIB=m
CONFIG_SND_OPL3_LIB_SEQ=m
@@ -7022,7 +7014,7 @@ CONFIG_SND_DRIVERS=y
# CONFIG_SND_PCSP is not set
CONFIG_SND_DUMMY=m
CONFIG_SND_ALOOP=m
CONFIG_SND_PCMTEST=m
# CONFIG_SND_PCMTEST is not set
CONFIG_SND_VIRMIDI=m
CONFIG_SND_MTPAV=m
CONFIG_SND_MTS64=m
@@ -7153,7 +7145,7 @@ CONFIG_SND_INTEL_SOUNDWIRE_ACPI=m
CONFIG_SND_SPI=y
CONFIG_SND_USB=y
CONFIG_SND_USB_AUDIO=m
CONFIG_SND_USB_AUDIO_MIDI_V2=y
# CONFIG_SND_USB_AUDIO_MIDI_V2 is not set
CONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER=y
CONFIG_SND_USB_UA101=m
CONFIG_SND_USB_USX2Y=m
@@ -7241,7 +7233,7 @@ CONFIG_SND_SOC_FSL_RPMSG=m
# CONFIG_SND_SOC_IMX_AUDMUX is not set
# end of SoC Audio for Freescale CPUs
CONFIG_SND_SOC_CHV3_I2S=m
# CONFIG_SND_SOC_CHV3_I2S is not set
CONFIG_SND_I2S_HI6210_I2S=m
CONFIG_SND_SOC_IMG=y
CONFIG_SND_SOC_IMG_I2S_IN=m
@@ -7440,7 +7432,7 @@ CONFIG_SND_SOC_AW88395_LIB=m
CONFIG_SND_SOC_AW88395=m
CONFIG_SND_SOC_BD28623=m
# CONFIG_SND_SOC_BT_SCO is not set
CONFIG_SND_SOC_CHV3_CODEC=m
# CONFIG_SND_SOC_CHV3_CODEC is not set
CONFIG_SND_SOC_CROS_EC_CODEC=m
CONFIG_SND_SOC_CS35L32=m
CONFIG_SND_SOC_CS35L33=m
@@ -7510,7 +7502,7 @@ CONFIG_SND_SOC_MAX98363=m
CONFIG_SND_SOC_MAX98373=m
CONFIG_SND_SOC_MAX98373_I2C=m
CONFIG_SND_SOC_MAX98373_SDW=m
CONFIG_SND_SOC_MAX98388=m
# CONFIG_SND_SOC_MAX98388 is not set
CONFIG_SND_SOC_MAX98390=m
CONFIG_SND_SOC_MAX98396=m
CONFIG_SND_SOC_MAX9860=m
@@ -7573,7 +7565,7 @@ CONFIG_SND_SOC_RT711_SDW=m
CONFIG_SND_SOC_RT711_SDCA_SDW=m
CONFIG_SND_SOC_RT712_SDCA_SDW=m
CONFIG_SND_SOC_RT712_SDCA_DMIC_SDW=m
CONFIG_SND_SOC_RT722_SDCA_SDW=m
# CONFIG_SND_SOC_RT722_SDCA_SDW is not set
CONFIG_SND_SOC_RT715=m
CONFIG_SND_SOC_RT715_SDW=m
CONFIG_SND_SOC_RT715_SDCA_SDW=m
@@ -7604,9 +7596,7 @@ CONFIG_SND_SOC_TAS2562=m
CONFIG_SND_SOC_TAS2764=m
CONFIG_SND_SOC_TAS2770=m
CONFIG_SND_SOC_TAS2780=m
CONFIG_SND_SOC_TAS2781_COMLIB=m
CONFIG_SND_SOC_TAS2781_FMWLIB=m
CONFIG_SND_SOC_TAS2781_I2C=m
# CONFIG_SND_SOC_TAS2781_I2C is not set
CONFIG_SND_SOC_TAS5086=m
CONFIG_SND_SOC_TAS571X=m
CONFIG_SND_SOC_TAS5720=m
@@ -7667,7 +7657,7 @@ CONFIG_SND_SOC_WM8978=m
CONFIG_SND_SOC_WM8985=m
CONFIG_SND_SOC_WSA881X=m
CONFIG_SND_SOC_WSA883X=m
CONFIG_SND_SOC_WSA884X=m
# CONFIG_SND_SOC_WSA884X is not set
CONFIG_SND_SOC_ZL38060=m
CONFIG_SND_SOC_MAX9759=m
CONFIG_SND_SOC_MT6351=m
@@ -7782,7 +7772,7 @@ CONFIG_NINTENDO_FF=y
CONFIG_HID_NTI=m
CONFIG_HID_NTRIG=m
CONFIG_HID_NVIDIA_SHIELD=m
CONFIG_NVIDIA_SHIELD_FF=y
# CONFIG_NVIDIA_SHIELD_FF is not set
CONFIG_HID_ORTEK=m
CONFIG_HID_PANTHERLORD=m
CONFIG_PANTHERLORD_FF=y
@@ -8172,7 +8162,7 @@ CONFIG_USB_NET2280=m
CONFIG_USB_GOKU=m
CONFIG_USB_EG20T=m
CONFIG_USB_MAX3420_UDC=m
CONFIG_USB_CDNS2_UDC=m
# CONFIG_USB_CDNS2_UDC is not set
CONFIG_USB_DUMMY_HCD=m
# end of USB Peripheral Controller
@@ -8283,7 +8273,7 @@ CONFIG_TYPEC_MUX_FSA4480=m
CONFIG_TYPEC_MUX_GPIO_SBU=m
CONFIG_TYPEC_MUX_PI3USB30532=m
CONFIG_TYPEC_MUX_INTEL_PMC=m
CONFIG_TYPEC_MUX_NB7VPQ904M=m
# CONFIG_TYPEC_MUX_NB7VPQ904M is not set
# end of USB Type-C Multiplexer/DeMultiplexer Switch support
#
@@ -8368,8 +8358,8 @@ CONFIG_LEDS_BRIGHTNESS_HW_CHANGED=y
#
CONFIG_LEDS_88PM860X=m
CONFIG_LEDS_APU=m
CONFIG_LEDS_AW200XX=m
CONFIG_LEDS_CHT_WCOVE=m
# CONFIG_LEDS_AW200XX is not set
# CONFIG_LEDS_CHT_WCOVE is not set
CONFIG_LEDS_LM3530=m
CONFIG_LEDS_LM3532=m
CONFIG_LEDS_LM3533=m
@@ -9452,7 +9442,6 @@ CONFIG_MAX11205=m
CONFIG_MAX11410=m
CONFIG_MAX1241=m
CONFIG_MAX1363=m
CONFIG_MAX77541_ADC=m
CONFIG_MAX9611=m
CONFIG_MCP320X=m
CONFIG_MCP3422=m
@@ -9769,7 +9758,7 @@ CONFIG_ISL29125=m
CONFIG_HID_SENSOR_ALS=m
CONFIG_HID_SENSOR_PROX=m
CONFIG_JSA1212=m
CONFIG_ROHM_BU27008=m
# CONFIG_ROHM_BU27008 is not set
CONFIG_ROHM_BU27034=m
CONFIG_RPR0521=m
CONFIG_SENSORS_LM3533=m
@@ -9780,7 +9769,7 @@ CONFIG_MAX44000=m
CONFIG_MAX44009=m
CONFIG_NOA1305=m
CONFIG_OPT3001=m
CONFIG_OPT4001=m
# CONFIG_OPT4001 is not set
CONFIG_PA12203001=m
CONFIG_SI1133=m
CONFIG_SI1145=m
@@ -9872,7 +9861,7 @@ CONFIG_MCP4131=m
CONFIG_MCP4531=m
CONFIG_MCP41010=m
CONFIG_TPL0102=m
CONFIG_X9250=m
# CONFIG_X9250 is not set
# end of Digital potentiometers
#
@@ -9898,7 +9887,7 @@ CONFIG_MPL115=m
CONFIG_MPL115_I2C=m
CONFIG_MPL115_SPI=m
CONFIG_MPL3115=m
CONFIG_MPRLS0025PA=m
# CONFIG_MPRLS0025PA is not set
CONFIG_MS5611=m
CONFIG_MS5611_I2C=m
CONFIG_MS5611_SPI=m
@@ -10249,6 +10238,7 @@ CONFIG_QUOTA_TREE=m
CONFIG_QFMT_V1=m
CONFIG_QFMT_V2=m
CONFIG_QUOTACTL=y
CONFIG_AUTOFS4_FS=y
CONFIG_AUTOFS_FS=y
CONFIG_FUSE_FS=m
CONFIG_CUSE=m
@@ -11393,7 +11383,7 @@ CONFIG_FTRACE=y
CONFIG_BOOTTIME_TRACING=y
CONFIG_FUNCTION_TRACER=y
CONFIG_FUNCTION_GRAPH_TRACER=y
CONFIG_FUNCTION_GRAPH_RETVAL=y
# CONFIG_FUNCTION_GRAPH_RETVAL is not set
CONFIG_DYNAMIC_FTRACE=y
CONFIG_DYNAMIC_FTRACE_WITH_REGS=y
CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=y

View File

@@ -1,654 +0,0 @@
8021q
8250_dw
842
842_compress
842_decompress
9p
9pnet
9pnet_virtio
ac97_bus
acer_wireless
acer_wmi
acpi_cpufreq
acpi_mdio
acpi_pad
acpi_tad
acpi_thermal_rel
aesni_intel
af_alg
af_key
af_packet
agpgart
ahci
algif_aead
algif_hash
algif_skcipher
alx
amd64_edac
amdgpu
amd_pmc
amd_pstate
amdxcp
apple_mfi_fastcharge
appletalk
asn1_encoder
asus_atk0110
asus_nb_wmi
asus_wmi
ata_generic
ata_piix
ath
ath9k_common
ath9k_htc
ath9k_hw
atkbd
atl1c
auth_rpcgss
autofs4
battery
bch
binder
binfmt_misc
blake2b_generic
bluetooth
bnep
bpf
bpf_preload
bridge
br_netfilter
btbcm
btcoexist
btintel
btmtk
btrfs
btrtl
btusb
button
cbc
ccm
ccp
cdc_acm
cdc_ether
cdc_mbim
cdc_ncm
cdc_wdm
cdrom
cec
cfbcopyarea
cfbfillrect
cfbimgblt
cfg80211
cgroup
ch341
chacha_x86_64
chipreg
cifs
cifs_arc4
cifs_md4
cls_cgroup
cmac
cmdlinepart
coretemp
cpufreq_ondemand
crc16
crc32c_generic
crc32c_intel
crc32_generic
crc32_pclmul
crc64
crc64_rocksoft
crc64_rocksoft_generic
crc_itu_t
crct10dif_pclmul
cryptd
crypto_null
crypto_simd
crypto_user
curve25519_x86_64
cuse
dca
des_generic
dm_crypt
dmi_sysfs
dm_log
dm_mirror
dm_mod
dm_multipath
dm_region_hash
dm_round_robin
dns_resolver
drm
drm_buddy
drm_display_helper
drm_kms_helper
drm_panel_orientation_quirks
drm_suballoc_helper
drm_ttm_helper
dvb_core
ebtable_filter
ebtables
ecb
ecc
ecdh_generic
ec_sys
edac_mce_amd
ee1004
eeepc_wmi
eeprom
efi_pstore
efivarfs
ehci_hcd
ehci_pci
enclosure
encrypted_keys
evdev
exfat
ext2
ext4
f2fs
fan
fat
fb_sys_fops
ff_memless
fixed_phy
fjes
fscache
ftdi_sio
fuse
fwnode_mdio
garp
gcm
gf128mul
ghash_clmulni_intel
ghash_generic
gigabyte_wmi
gpio_amdpt
gpio_generic
gpu_sched
grace
hfs
hfsplus
hid
hid_apple
hid_asus
hid_generic
hid_hyperv
hid_logitech_dj
hid_logitech_hidpp
hid_microsoft
hid_multitouch
hid_nintendo
hidp
hid_playstation
hid_roccat
hid_roccat_common
hid_roccat_koneplus
hid_roccat_ryos
hid_sony
hid_steam
hid_wiimote
hv_balloon
hv_netvsc
hv_storvsc
hv_utils
hv_vmbus
hwmon_vid
hyperv_drm
hyperv_keyboard
i2c_algo_bit
i2c_core
i2c_dev
i2c_hid
i2c_hid_acpi
i2c_i801
i2c_mux
i2c_nvidia_gpu
i2c_piix4
i2c_smbus
i8042
i915
ib_cm
ib_core
idma64
igb
igc
inet_diag
input_leds
int3400_thermal
int340x_thermal_zone
intel_agp
intel_cstate
intel_gtt
intel_lpss
intel_lpss_pci
intel_pch_thermal
intel_pmc_bxt
intel_powerclamp
intel_rapl_common
intel_rapl_msr
intel_soc_dts_iosf
intel_uncore
intel_vsec
intel_wmi_thunderbolt
iommufd
iommu_v2
ip6table_filter
ip6table_mangle
ip6table_nat
ip6table_raw
ip6_tables
ip6table_security
ip6t_REJECT
ip6t_rt
ip6_udp_tunnel
ipmi_devintf
ipmi_msghandler
ip_set
iptable_filter
iptable_mangle
iptable_nat
iptable_raw
ip_tables
iptable_security
ipt_REJECT
ipv6
ir_kbd_i2c
irqbypass
isofs
it87
iTCO_vendor_support
iTCO_wdt
iw_cm
iwlmei
iwlmvm
iwlwifi
jbd2
jc42
jfs
joydev
k10temp
ksmbd
kvm
kvm_amd
kvm_intel
led_class_multicolor
ledtrig_audio
ledtrig_timer
libahci
libarc4
libata
libchacha
libchacha20poly1305
libcrc32c
libcurve25519_generic
libdes
libphy
libps2
llc
lm75
lm83
lockd
loop
lpc_ich
lz4
lz4_compress
lz4hc_compress
lzo
lzo_rle
mac80211
mac_hid
mbcache
mc
mc44s803
md4
mdio
mdio_devres
md_mod
mei
mei_hdcp
mei_me
mei_pxp
mii
minix
mousedev
mptcp_diag
mrp
msdos
msr
mt20xx
mt76
mt76_connac_lib
mt76_usb
mt76x02_lib
mt76x02_usb
mt76x2_common
mt76x2u
mt7921_common
mt7921e
mtd
mxm_wmi
nandcore
nbd
nct6683
nct6775
nct6775_core
netfs
nf_conntrack
nf_conntrack_broadcast
nf_conntrack_ftp
nf_conntrack_h323
nf_conntrack_irc
nf_conntrack_netbios_ns
nf_conntrack_netlink
nf_conntrack_pptp
nf_conntrack_sip
nf_conntrack_tftp
nf_defrag_ipv4
nf_defrag_ipv6
nf_nat
nf_nat_ftp
nf_nat_h323
nf_nat_irc
nf_nat_pptp
nf_nat_sip
nf_nat_tftp
nfnetlink
nfnetlink_log
nfnetlink_queue
nf_reject_ipv4
nf_reject_ipv6
nfs
nfsv4
nf_tables
nft_chain_nat
nft_compat
nft_ct
nft_fib
nft_fib_inet
nft_fib_ipv4
nft_fib_ipv6
nft_masq
nft_nat
nft_reject
nft_reject_inet
nft_reject_ipv4
nft_reject_ipv6
nft_xfrm
nilfs2
nlmon
nls_ascii
nls_cp437
nls_iso8859_1
nls_utf8
nouveau
ntfs
ntfs3
nvme
nvme_common
nvme_core
nvmem_rave_sp_eeprom
nvram
overlay
p8022
parport
parport_pc
pata_acpi
pcc_cpufreq
pcspkr
pinctrl_alderlake
pinctrl_amd
pkcs8_key_parser
pktcdvd
platform_profile
pmt_class
pmt_telemetry
poly1305_x86_64
polyval_clmulni
polyval_generic
ppdev
processor_thermal_device
processor_thermal_device_pci_legacy
processor_thermal_mbox
processor_thermal_rapl
processor_thermal_rfim
psmouse
psnap
qcserial
qrtr
r8152
r8153_ecm
r8169
radeon
raid1
raid6_pq
rapl
rave_sp
raw_diag
rc_core
realtek
rfcomm
rfkill
rndis_host
rndis_wlan
rng_core
roles
rpcsec_gss_krb5
rt2800lib
rt2800usb
rt2x00lib
rt2x00usb
rtl8192ee
rtl8723ae
rtl8723be
rtl8723_common
rtl8821ae
rtl_pci
rtlwifi
sch_cake
sch_fq_codel
sch_ingress
scsi_common
scsi_mod
scsi_transport_fc
scsi_transport_sas
sd_mod
selftests
serial_multi_instantiate
serio
serio_raw
ses
sg
sha512_ssse3
snd
snd_acp6x_pdm_dma
snd_acp_config
snd_aloop
snd_compress
snd_ctl_led
snd_hda_codec
snd_hda_codec_generic
snd_hda_codec_hdmi
snd_hda_codec_realtek
snd_hda_core
snd_hda_ext_core
snd_hda_intel
snd_hrtimer
snd_hwdep
snd_intel_dspcfg
snd_intel_sdw_acpi
snd_pci_acp3x
snd_pci_acp5x
snd_pci_acp6x
snd_pcm
snd_pcm_dmaengine
snd_rawmidi
snd_rn_pci_acp3x
snd_seq
snd_seq_device
snd_seq_dummy
snd_seq_midi
snd_seq_midi_event
snd_seq_oss
snd_seq_virmidi
snd_soc_acp6x_mach
snd_soc_acpi
snd_soc_acpi_intel_match
snd_soc_core
snd_soc_dmic
snd_soc_hdac_hda
snd_soc_skl
snd_soc_sst_dsp
snd_soc_sst_ipc
snd_sof
snd_sof_amd_acp
snd_sof_amd_renoir
snd_sof_intel_hda
snd_sof_intel_hda_common
snd_sof_intel_hda_mlink
snd_sof_pci
snd_sof_pci_intel_cnl
snd_sof_probes
snd_sof_utils
snd_sof_xtensa_dsp
snd_timer
snd_ua101
snd_ump
snd_usb_audio
snd_usbmidi_lib
snd_usb_us122l
snd_usb_usx2y
snd_virmidi
soundcore
soundwire_bus
soundwire_cadence
soundwire_generic_allocation
soundwire_intel
sp5100_tco
sparse_keymap
spi_intel
spi_intel_pci
spi_nor
squashfs
sr_mod
st
stp
sunrpc
syscopyarea
sysfillrect
sysimgblt
t10_pi
tap
tcp_bbr
tcp_diag
tda18271
tda827x
tda8290
tda9887
tea5761
tea5767
tee
tg3
thermal
tiny_power_button
tls
tpm
tpm_crb
tpm_tis
tpm_tis_core
trusted
ttm
tun
tuner_simple
tuner_types
tunnel4
tunnel6
typec
typec_ucsi
uas
ucsi_acpi
ucsi_ccg
udf
udp_diag
udp_tunnel
ufs
uhci_hcd
uhid
uinput
uio
uio_pdrv_genirq
unix_diag
usb_common
usbcore
usbhid
usbip_core
usbip_host
usbmon
usbnet
usb_storage
usb_wwan
uvc
uvcvideo
uvesafb
v4l2_dv_timings
veth
vfat
vfio
vfio_iommu_type1
vfio_pci
vfio_pci_core
vhost
vhost_iotlb
vhost_net
video
videobuf2_common
videobuf2_memops
videobuf2_v4l2
videobuf2_vmalloc
videodev
virtio_pci
virtio_pci_legacy_dev
virtio_pci_modern_dev
virtio_scsi
vivaldi_fmap
vmw_vmci
vmw_vsock_virtio_transport_common
vmw_vsock_vmci_transport
vsock
vsock_loopback
wacom
watchdog
wireguard
wmi
wmi_bmof
x86_pkg_temp_thermal
xc2028
xc4000
xc5000
xfrm6_tunnel
xfrm_interface
xfs
xhci_hcd
xhci_pci
xhci_pci_renesas
xor
xpad
x_tables
xt_addrtype
xt_cgroup
xt_CHECKSUM
xt_comment
xt_conntrack
xt_hl
xt_limit
xt_LOG
xt_mark
xt_MASQUERADE
xt_nat
xt_NFQUEUE
xt_recent
xt_REDIRECT
xt_state
xt_tcpudp
xxhash_generic
zlib_deflate
zram

View File

@@ -1,10 +1,10 @@
#!/bin/bash
# List of kernels that are maintained upstream
_current_kernels=("6.5" "6.4" "6.1" "5.15" "5.10" "5.4")
_current_kernels=("6.5" "6.4" "6.3" "6.1" "5.15" "5.10" "5.4")
# List of kernels that are no longer maintained upstream
_eol_kernels=("6.3" "6.2" "6.0" "5.19" "5.18" "5.17" "5.16" "5.14" "5.13" "5.12" "5.11" "5.9" "5.8" "5.7")
_eol_kernels=("6.2" "6.0" "5.19" "5.18" "5.17" "5.16" "5.14" "5.13" "5.12" "5.11" "5.9" "5.8" "5.7")
typeset -Ag _kernel_git_remotes
_kernel_git_remotes=(
@@ -39,36 +39,34 @@ done
# PREEMPT_RT's supported kernel subversion
typeset -Ag _rt_subver_map
_rt_subver_map=(
["5.4"]="248"
["5.4"]="242"
["5.9"]="1"
["5.10"]="192"
["5.10"]="180"
["5.11"]="4"
["5.14"]="2"
["5.15"]="125"
["5.15"]="113"
["5.16"]="2"
["5.17"]="1"
["6.0"]="5"
["6.1"]="46"
["6.1"]="33"
["6.3"]="3"
["6.4"]="6"
)
# PREEMPT_RT's patch revision for the kernel
# We separated this to allow for forcing the application of the patch when _preempt_rt_force=1 on version mismatch
typeset -Ag _rt_rev_map
_rt_rev_map=(
["5.4"]="83"
["5.4"]="81"
["5.9"]="20"
["5.10"]="92"
["5.10"]="89"
["5.11"]="11"
["5.14"]="21"
["5.15"]="66"
["5.15"]="64"
["5.16"]="19"
["5.17"]="17"
["6.0"]="14"
["6.1"]="14"
["6.1"]="11"
["6.3"]="15"
["6.4"]="8"
)
_undefine() {
@@ -253,9 +251,7 @@ _set_cpu_scheduler() {
["upds"]="Undead PDS (TkG)"
["cacule"]="CacULE"
["tt"]="TT (TaskType)"
["bore"]="BORE (Burst-Oriented Response Enhancer - CFS variant) CPU Scheduler"
["bore-eevdf"]="BORE (Burst-Oriented Response Enhancer - EEVDF variant) CPU Scheduler"
["eevdf"]="Earliest Eligible Virtual Deadline First (EEVDF) scheduler"
["bore"]="BORE (Burst-Oriented Response Enhancer) CPU Scheduler"
)
# CPU SCHED selector - _projectc_unoff=1 sets unofficial Project C revision flag for a given version
@@ -294,20 +290,18 @@ _set_cpu_scheduler() {
elif [ "$_kver" = "603" ]; then
_avail_cpu_scheds=("cfs" "pds" "bmq" "tt" "bore")
elif [ "$_kver" = "604" ]; then
_avail_cpu_scheds=("cfs" "eevdf" "pds" "bmq" "tt" "bore")
elif [ "$_kver" = "605" ]; then
_avail_cpu_scheds=("cfs" "eevdf" "tt" "bore" "bore-eevdf")
_avail_cpu_scheds=("cfs" "pds" "bmq" "tt" "bore")
else
_avail_cpu_scheds=("cfs")
fi
if [ "${_preempt_rt}" = "1" ]; then
warning "! Since you have enabled _preempt_rt, incompatible cpu schedulers will not be available !"
_avail_cpu_scheds_rt=("cfs")
if [[ "${_avail_cpu_scheds[*]}" =~ "bore" ]]; then
_avail_cpu_scheds_rt+=("bore")
_avail_cpu_scheds=("cfs" "bore")
else
_avail_cpu_scheds=("cfs")
fi
_avail_cpu_scheds=(${_avail_cpu_scheds_rt[*]})
fi
# Populate descriptions of the available CPU schedulers
@@ -430,7 +424,7 @@ _setup_kernel_work_folder() {
msg2 "First initialization of the linux source code git folder"
mkdir -p "$_kernel_source_folder_abs"
cd "$_kernel_source_folder_abs"
git -c init.defaultBranch=master init --bare
git init --bare
fi
cd "$_kernel_source_folder_abs"
@@ -610,13 +604,8 @@ _tkg_srcprep() {
fi
if [ "${_distro}" = "Arch" ]; then
if [ -n "$_custom_pkgbase" ]; then
echo "-$pkgrel-tkg-${_custom_pkgbase}" > localversion.10-pkgrel
echo -e "Version tail set to \"-$pkgrel-tkg-${_custom_pkgbase}\"\n" > "$_where"/logs/prepare.log.txt
else
echo "-$pkgrel-tkg-${_cpusched}${_compiler_name}" > localversion.10-pkgrel
echo -e "Version tail set to \"-$pkgrel-tkg-${_cpusched}${_compiler_name}\"\n" > "$_where"/logs/prepare.log.txt
fi
echo "" > localversion.20-pkgname
fi
@@ -691,10 +680,8 @@ _tkg_srcprep() {
_msg="Applying clear linux patches" && _tkg_patcher
fi
if [ "$_glitched_base" = "true" ]; then
tkgpatch="$srcdir/0003-glitched-base.patch"
_msg="Applying glitched base patch" && _tkg_patcher
fi
if [ "${_preempt_rt}" != "1" ]; then
tkgpatch="$srcdir/0003-glitched-base-nonrt.patch"
@@ -834,18 +821,9 @@ _tkg_srcprep() {
elif [ "${_cpusched}" = "cfs" ]; then
_msg="Applying Glitched CFS additions patch"
tkgpatch="$srcdir/0003-glitched-cfs-additions.patch" && _tkg_patcher
elif [[ "${_cpusched}" =~ "eevdf" ]]; then
_msg="Applying Earliest Eligible Virtual Deadline First (EEVDF) scheduler patch"
tkgpatch="$srcdir/0003-eevdf.patch" && _tkg_patcher
if [ "${_cpusched}" = "bore-eevdf" ]; then
_msg="Applying BORE-EEVDF patch"
curl "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/${_basekernel}/sched/0001-bore-eevdf.patch" > "$srcdir"/0001-bore-eevdf.patch
tkgpatch="$srcdir/0001-bore-eevdf.patch" && _tkg_patcher
fi
fi
if [ "${_cpusched}" = "cfs" ] || [ "${_cpusched}" = "cacule" ] || [ "${_cpusched}" = "tt" ] || [ "${_cpusched}" = "bore" ] || [[ "${_cpusched}" =~ "eevdf" ]]; then
if [ "${_cpusched}" = "cfs" ] || [ "${_cpusched}" = "cacule" ] || [ "${_cpusched}" = "tt" ] || [ "${_cpusched}" = "bore" ]; then
_msg="Applying Glitched CFS patch"
tkgpatch="$srcdir/0003-glitched-cfs.patch" && _tkg_patcher
fi
@@ -877,8 +855,6 @@ _tkg_srcprep() {
if [ "${_distro}" = "Arch" ]; then
# Reset local version string if ever it's in the .config file
scripts/config --set-str localversion ""
else
_disable "LOCALVERSION_AUTO"
fi
if [ -z $_debug ]; then
@@ -895,15 +871,12 @@ _tkg_srcprep() {
fi
_disable "NTP_PPS" "ZSWAP_COMPRESSOR_DEFAULT_LZO" "PROFILE_ALL_BRANCHES"
_enable "CRYPTO_LZ4" "CRYPTO_LZ4HC" "LZ4_COMPRESS" "LZ4HC_COMPRESS" "ZSWAP_COMPRESSOR_DEFAULT_LZ4" "X86_AMD_PSTATE" "AMD_PINCTRL"
_disable "DEBUG_FORCE_FUNCTION_ALIGN_64B" "X86_P6_NOP" "RCU_STRICT_GRACE_PERIOD"
_disable "DEBUG_FORCE_FUNCTION_ALIGN_64B" "X86_P6_NOP"
scripts/config --set-str "ZSWAP_COMPRESSOR_DEFAULT" "lz4"
_enable "CPU_FREQ_DEFAULT_GOV_SCHEDUTIL"
_disable "CPU_FREQ_DEFAULT_GOV_ONDEMAND" "CPU_FREQ_DEFAULT_GOV_CONSERVATIVE" "CPU_FREQ_DEFAULT_GOV_PERFORMANCE" "CPU_FREQ_DEFAULT_GOV_PERFORMANCE_NODEF"
_module "BLK_DEV_LOOP"
# This leads to all kinds of issues everytime Arch enables it in defconfig. Let's disable it and be happy.
_disable "SYSFB_SIMPLEFB"
# buggy project C/PSI interaction workaround
if [ "${_cpusched}" = "pds" ] || [ "${_cpusched}" = "bmq" ]; then
_enable "PSI_DEFAULT_DISABLED"
@@ -948,9 +921,6 @@ _tkg_srcprep() {
if [[ "$_distro" = "Debian" || "$_distro" = "Ubuntu" ]]; then
#Help Debian cert compile problem.
scripts/config --set-str "SYSTEM_TRUSTED_KEYS" ""
#Debian/Ubuntu don't properly support zstd module compression
_disable "MODULE_COMPRESS_ZSTD"
_enable "MODULE_COMPRESS_NONE"
fi
# Skip dbg package creation on non-Arch
if [ "$_distro" != "Arch" ]; then
@@ -1081,7 +1051,7 @@ _tkg_srcprep() {
# BMQ default config
_enable "SCHED_ALT" "SCHED_BMQ"
_disable "SCHED_PDS"
elif [[ "${_cpusched}" =~ "bore" ]]; then
elif [ "${_cpusched}" = "bore" ]; then
_enable "SCHED_BORE"
fi
@@ -1203,9 +1173,9 @@ _tkg_srcprep() {
fi
# zenify
if [ "$_zenify" = "false" ] || [ "$_glitched_base" = "false" ]; then
if [ "$_zenify" = "false" ]; then
_disable "ZENIFY"
elif [ "$_zenify" = "true" ] && [ "$_glitched_base" = "true" ]; then
else
_enable "ZENIFY"
fi
@@ -1292,10 +1262,8 @@ _tkg_srcprep() {
["tt"]="5"
["upds"]="5"
["cfs"]="5"
["eevdf"]="5"
["bmq"]="5"
["bore"]="5"
["bore-eevdf"]="3"
)
if [[ -n "$_timer_freq" && ! "${_avail_timer_frequencies[*]}" =~ "$_timer_freq" ]]; then
@@ -1604,21 +1572,24 @@ CONFIG_DEBUG_INFO_BTF_MODULES=y\r
unset tkgpatch
unset _msg
# Waydroid
if [ -z "$_waydroid" ]; then
# Anbox modules
if [ "$_basever" != "504" ]; then
if [ -z "$_anbox" ]; then
plain ""
plain "Enable android modules for use with Waydroid?"
plain "https://waydro.id"
plain "Enable android modules for use with Anbox?"
plain "https://github.com/anbox/anbox"
read -rp "`echo $' > N/y : '`" CONDITION12;
fi
if [[ "$CONDITION12" =~ [yY] ]] || [ "$_waydroid" = "true" ]; then
_enable "ANDROID" "ANDROID_BINDER_IPC" "ANDROID_BINDERFS"
_disable "ANDROID_BINDER_IPC_SELFTEST"
scripts/config --set-str "ANDROID_BINDER_DEVICES" ""
if [[ "$CONDITION12" =~ [yY] ]] || [ "$_anbox" = "true" ]; then
_enable "ASHMEM" "ION" "ION_CMA_HEAP" "ANDROID" "ANDROID_BINDER_IPC" "ANDROID_BINDERFS"
_disable "ION_SYSTEM_HEAP" "ANDROID_BINDER_IPC_SELFTEST"
scripts/config --set-str "ANDROID_BINDER_DEVICES" "binder,hwbinder,vndbinder"
warning "Please make sure to read up on how to use this; https://github.com/Frogging-Family/linux-tkg#anbox-usage"
if [[ "$CONDITION12" =~ [yY] ]]; then
read -rp "Press enter to continue..."
fi
fi
fi
# NR_CPUS
if [ "$_basever" != "601" ]; then
@@ -1670,23 +1641,17 @@ CONFIG_DEBUG_INFO_BTF_MODULES=y\r
fi
# modprobed-db
if [[ "$_modprobeddb" = "true" && "$_kernel_on_diet" == "true" ]]; then
msg2 "_modprobeddb and _kernel_on_diet cannot be used together: it doesn't make sense, _kernel_on_diet uses our own modprobed list ;)"
exit 1
if [ -z "$_modprobeddb" ]; then
plain ""
plain "Use modprobed db to clean config from unneeded modules?"
plain "Speeds up compilation considerably. Requires root."
plain "https://wiki.archlinux.org/index.php/Modprobed-db"
plain "!!!! Make sure to have a well populated db !!!!"
read -rp "`echo $' > N/y : '`" CONDITIONMPDB;
fi
if [[ "$_kernel_on_diet" == "true" && "$_kver" -lt 605 ]]; then
msg2 "_kernel_on_diet not implemented for kernels older than 6.5"
exit 1
fi
if [[ "$_modprobeddb" = "true" || "$_kernel_on_diet" == "true" ]]; then
if [ -f "$_where"/"$_modprobeddb_db_path" ]; then
_modprobeddb_db_path="$_where"/"$_modprobeddb_db_path"
fi
if [ "$_kernel_on_diet" == "true" ]; then
_modprobeddb_db_path="$_where/minimal-modprobed.db"
if [[ "$CONDITIONMPDB" =~ [yY] ]] || [ "$_modprobeddb" = "true" ]; then
if [ -f "$where"/"$_modprobeddb_db_path" ];then
_modprobeddb_db_path="$where"/"$_modprobeddb_db_path"
fi
if [ ! -f $_modprobeddb_db_path ]; then
msg2 "modprobed-db database not found"
@@ -1694,7 +1659,6 @@ CONFIG_DEBUG_INFO_BTF_MODULES=y\r
fi
# Workaround for: https://github.com/Tk-Glitch/PKGBUILDS/issues/404.
# Long live #404!
# The page doesn't exist any longer haha
_disable "GPIO_BT8XX" "SND_SE6X" "SENSORS_ADM1021" "SENSORS_MAX6642" "SENSORS_ASUS_WMI_EC"
make LSMOD=$_modprobeddb_db_path localmodconfig ${llvm_opt}
@@ -1729,6 +1693,14 @@ CONFIG_DEBUG_INFO_BTF_MODULES=y\r
fi
fi
# Distro specific workarounds in the .config file, when using Arch config file by default
if [ -z "$_configfile" ] || [ "$_configfile" = "config_hardened.x86_64" ]; then
if [[ "$_distro" =~ ^(Debian|Ubuntu)$ ]]; then
_disable "MODULE_COMPRESS_ZSTD"
_enable "MODULE_COMPRESS_NONE"
fi
fi
# rewrite configuration
msg2 "Setting config"
make ${_config_updating} ${llvm_opt} |& tee -a "$_where"/logs/prepare.log.txt

View File

@@ -183,11 +183,11 @@ index 4700d24e5d55..8f7a3d7fd9c1 100644
* Some Atheros AR9xxx and QCA988x chips do not behave after a bus reset.
* The device will throw a Link Down error on AER-capable systems and
@@ -4513,6 +4613,7 @@ static const struct pci_dev_acs_enabled {
{ PCI_VENDOR_ID_NXP, 0x8d9b, pci_quirk_nxp_rp_acs },
{ PCI_VENDOR_ID_ZHAOXIN, 0x9083, pci_quirk_mf_endpoint_acs },
/* Zhaoxin Root/Downstream Ports */
{ PCI_VENDOR_ID_ZHAOXIN, PCI_ANY_ID, pci_quirk_zhaoxin_pcie_ports_acs },
+ { PCI_ANY_ID, PCI_ANY_ID, pcie_acs_overrides },
/* Wangxun nics */
{ PCI_VENDOR_ID_WANGXUN, PCI_ANY_ID, pci_quirk_wangxun_nic_acs },
{ 0 }
};

View File

@@ -9924,91 +9924,3 @@ index 588c7b983e3ba..8a6aa5b7279d3 100644
/*
* If we are going to sleep and we have plugged IO queued,
diff --git a/kernel/sched/alt_core.c b/kernel/sched/alt_core.c
index ff4a45708a68e7c43f4e6494e120341514b31b56..f783788e3caa71e4c668ef0c0284dc77529b10f3 100644
--- a/kernel/sched/alt_core.c
+++ b/kernel/sched/alt_core.c
@@ -28,7 +28,6 @@
#include <linux/kprobes.h>
#include <linux/mmu_context.h>
#include <linux/nmi.h>
-#include <linux/profile.h>
#include <linux/rcupdate_wait.h>
#include <linux/security.h>
#include <linux/syscalls.h>
@@ -2236,9 +2235,10 @@ ttwu_stat(struct task_struct *p, int cpu, int wake_flags)
rq = this_rq();
#ifdef CONFIG_SMP
- if (cpu == rq->cpu)
+ if (cpu == rq->cpu) {
__schedstat_inc(rq->ttwu_local);
- else {
+ __schedstat_inc(p->stats.nr_wakeups_local);
+ } else {
/** Alt schedule FW ToDo:
* How to do ttwu_wake_remote
*/
@@ -2246,6 +2246,7 @@ ttwu_stat(struct task_struct *p, int cpu, int wake_flags)
#endif /* CONFIG_SMP */
__schedstat_inc(rq->ttwu_count);
+ __schedstat_inc(p->stats.nr_wakeups);
}
/*
@@ -2895,6 +2896,11 @@ static inline void __sched_fork(unsigned long clone_flags, struct task_struct *p
p->stime = 0;
p->sched_time = 0;
+#ifdef CONFIG_SCHEDSTATS
+ /* Even if schedstat is disabled, there should not be garbage */
+ memset(&p->stats, 0, sizeof(p->stats));
+#endif
+
#ifdef CONFIG_PREEMPT_NOTIFIERS
INIT_HLIST_HEAD(&p->preempt_notifiers);
#endif
@@ -7397,6 +7403,10 @@ void normalize_rt_tasks(void)
if (p->flags & PF_KTHREAD)
continue;
+ schedstat_set(p->stats.wait_start, 0);
+ schedstat_set(p->stats.sleep_start, 0);
+ schedstat_set(p->stats.block_start, 0);
+
if (!rt_task(p)) {
/*
* Renice negative nice level userspace
diff --git a/kernel/sched/alt_sched.h b/kernel/sched/alt_sched.h
index 289058a09bd53a96a9bc09cb2e9cb5ee8e42a3d0..f2b9e686d6a69c07f54c2cae36f7ce0ab70f9cb2 100644
--- a/kernel/sched/alt_sched.h
+++ b/kernel/sched/alt_sched.h
@@ -31,6 +31,7 @@
#include <linux/livepatch.h>
#include <linux/membarrier.h>
#include <linux/proc_fs.h>
+#include <linux/profile.h>
#include <linux/psi.h>
#include <linux/slab.h>
#include <linux/stop_machine.h>
diff --git a/kernel/sched/stats.h b/kernel/sched/stats.h
index 38f3698f5e5b31d35fe18c3c6c103a685475e64e..b9d597394316d2f5f16b6eb19f922b65bf9912fc 100644
--- a/kernel/sched/stats.h
+++ b/kernel/sched/stats.h
@@ -89,6 +89,7 @@ static inline void rq_sched_info_depart (struct rq *rq, unsigned long long delt
#endif /* CONFIG_SCHEDSTATS */
+#ifndef CONFIG_SCHED_ALT
#ifdef CONFIG_FAIR_GROUP_SCHED
struct sched_entity_stats {
struct sched_entity se;
@@ -105,6 +106,7 @@ __schedstats_from_se(struct sched_entity *se)
#endif
return &task_of(se)->stats;
}
+#endif /* CONFIG_SCHED_ALT */
#ifdef CONFIG_PSI
void psi_task_change(struct task_struct *task, int clear, int set);

View File

@@ -183,10 +183,11 @@ index 4700d24e5d55..8f7a3d7fd9c1 100644
* Some Atheros AR9xxx and QCA988x chips do not behave after a bus reset.
* The device will throw a Link Down error on AER-capable systems and
@@ -4513,6 +4613,7 @@ static const struct pci_dev_acs_enabled {
{ PCI_VENDOR_ID_ZHAOXIN, 0x9083, pci_quirk_mf_endpoint_acs },
/* Zhaoxin Root/Downstream Ports */
{ PCI_VENDOR_ID_ZHAOXIN, PCI_ANY_ID, pci_quirk_zhaoxin_pcie_ports_acs },
/* Wangxun nics */
{ PCI_VENDOR_ID_WANGXUN, PCI_ANY_ID, pci_quirk_wangxun_nic_acs },
+ { PCI_ANY_ID, PCI_ANY_ID, pcie_acs_overrides },
{ 0 }
};

View File

@@ -90877,9 +90877,9 @@ index c3b582d19b62..9caa3eb8c6f7 100644
size = synth_field_size(field->type);
if (size < 0) {
@@ -698,23 +687,15 @@ static struct synth_field *parse_synth_field(int argc, char **argv,
goto free;
} else if (size == 0) {
if (synth_field_is_string(field->type) ||
synth_field_is_stack(field->type)) {
if (synth_field_is_string(field->type)) {
- char *type;
-
- len = sizeof("__data_loc ") + strlen(field->type) + 1;

View File

@@ -551,26 +551,23 @@ diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
index 7779ee8abc2a..5b9893cdfb1b 100644
--- a/kernel/locking/rtmutex.c
+++ b/kernel/locking/rtmutex.c
@@ -343,7 +343,7 @@ waiter_update_prio(struct rt_mutex_waite
lockdep_assert(RB_EMPTY_NODE(&waiter->tree.entry));
waiter->tree.prio = __waiter_prio(task);
- waiter->tree.deadline = task->dl.deadline;
+ waiter->tree.deadline = __tsk_deadline(task);
@@ -300,21 +300,25 @@ static __always_inline void
waiter_update_prio(struct rt_mutex_waiter *waiter, struct task_struct *task)
{
waiter->prio = __waiter_prio(task);
- waiter->deadline = task->dl.deadline;
+ waiter->deadline = __tsk_deadline(task);
}
/*
@@ -364,16 +364,20 @@ waiter_clone_prio(struct rt_mutex_waiter
* Only use with rt_waiter_node_{less,equal}()
* Only use with rt_mutex_waiter_{less,equal}()
*/
#define task_to_waiter_node(p) \
- &(struct rt_waiter_node){ .prio = __waiter_prio(p), .deadline = (p)->dl.deadline }
+ &(struct rt_waiter_node){ .prio = __waiter_prio(p), .deadline = __tsk_deadline(p) }
#define task_to_waiter(p) \
&(struct rt_mutex_waiter){ .tree = *task_to_waiter_node(p) }
- &(struct rt_mutex_waiter){ .prio = __waiter_prio(p), .deadline = (p)->dl.deadline }
+ &(struct rt_mutex_waiter){ .prio = __waiter_prio(p), .deadline = __tsk_deadline(p) }
static __always_inline int rt_waiter_node_less(struct rt_waiter_node *left,
struct rt_waiter_node *right)
static __always_inline int rt_mutex_waiter_less(struct rt_mutex_waiter *left,
struct rt_mutex_waiter *right)
{
+#ifdef CONFIG_SCHED_PDS
+ return (left->deadline < right->deadline);
@@ -582,7 +579,7 @@ index 7779ee8abc2a..5b9893cdfb1b 100644
/*
* If both waiters have dl_prio(), we check the deadlines of the
* associated tasks.
@@ -382,16 +386,22 @@ static __always_inline int rt_waiter_nod
@@ -323,16 +327,22 @@ static __always_inline int rt_mutex_waiter_less(struct rt_mutex_waiter *left,
*/
if (dl_prio(left->prio))
return dl_time_before(left->deadline, right->deadline);
@@ -592,8 +589,8 @@ index 7779ee8abc2a..5b9893cdfb1b 100644
+#endif
}
static __always_inline int rt_waiter_node_equal(struct rt_waiter_node *left,
struct rt_waiter_node *right)
static __always_inline int rt_mutex_waiter_equal(struct rt_mutex_waiter *left,
struct rt_mutex_waiter *right)
{
+#ifdef CONFIG_SCHED_PDS
+ return (left->deadline == right->deadline);
@@ -605,7 +602,7 @@ index 7779ee8abc2a..5b9893cdfb1b 100644
/*
* If both waiters have dl_prio(), we check the deadlines of the
* associated tasks.
@@ -400,8 +410,10 @@ static __always_inline int rt_waiter_nod
@@ -341,8 +351,10 @@ static __always_inline int rt_mutex_waiter_equal(struct rt_mutex_waiter *left,
*/
if (dl_prio(left->prio))
return left->deadline == right->deadline;

File diff suppressed because it is too large Load Diff

View File

@@ -128,11 +128,13 @@ index 3a98439bba83..6efc4f907f58 100644
From f85ed068b4d0e6c31edce8574a95757a60e58b87 Mon Sep 17 00:00:00 2001
From: Etienne Juvigny <Ti3noU@gmail.com>
Date: Mon, 3 Sep 2018 17:36:25 +0200
Subject: [PATCH 07/17] Add Zenify option
Subject: [PATCH 07/17] Zenify & stuff
---
init/Kconfig | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
kernel/sched/fair.c | 25 +++++++++++++++++++++++++
mm/page-writeback.c | 8 ++++++++
3 files changed, 65 insertions(+)
diff --git a/init/Kconfig b/init/Kconfig
index 3ae8678e1145..da708eed0f1e 100644
@@ -177,6 +179,103 @@ index 3ae8678e1145..da708eed0f1e 100644
config BROKEN
bool
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 6b3b59cc51d6..2a0072192c3d 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -37,8 +37,13 @@
*
* (default: 6ms * (1 + ilog(ncpus)), units: nanoseconds)
*/
+#ifdef CONFIG_ZENIFY
+unsigned int sysctl_sched_latency = 3000000ULL;
+static unsigned int normalized_sysctl_sched_latency = 3000000ULL;
+#else
unsigned int sysctl_sched_latency = 6000000ULL;
static unsigned int normalized_sysctl_sched_latency = 6000000ULL;
+#endif
/*
* The initial- and re-scaling of tunables is configurable
@@ -58,21 +63,34 @@ enum sched_tunable_scaling sysctl_sched_tunable_scaling = SCHED_TUNABLESCALING_L
*
* (default: 0.75 msec * (1 + ilog(ncpus)), units: nanoseconds)
*/
+#ifdef CONFIG_ZENIFY
+unsigned int sysctl_sched_min_granularity = 300000ULL;
+static unsigned int normalized_sysctl_sched_min_granularity = 300000ULL;
+#else
unsigned int sysctl_sched_min_granularity = 750000ULL;
static unsigned int normalized_sysctl_sched_min_granularity = 750000ULL;
+#endif
/*
* Minimal preemption granularity for CPU-bound SCHED_IDLE tasks.
* Applies only when SCHED_IDLE tasks compete with normal tasks.
*
* (default: 0.75 msec)
*/
+#ifdef CONFIG_ZENIFY
+unsigned int sysctl_sched_idle_min_granularity = 300000ULL;
+#else
unsigned int sysctl_sched_idle_min_granularity = 750000ULL;
+#endif
/*
* This value is kept at sysctl_sched_latency/sysctl_sched_min_granularity
*/
+#ifdef CONFIG_ZENIFY
+static unsigned int sched_nr_latency = 10;
+#else
static unsigned int sched_nr_latency = 8;
+#endif
/*
* After fork, child runs first. If set to 0 (default) then
@@ -128,8 +149,12 @@ int __weak arch_asym_cpu_priority(int cpu)
*
* (default: 5 msec, units: microseconds)
*/
+#ifdef CONFIG_ZENIFY
+static unsigned int sysctl_sched_cfs_bandwidth_slice = 3000UL;
+#else
static unsigned int sysctl_sched_cfs_bandwidth_slice = 5000UL;
#endif
+#endif
#ifdef CONFIG_SYSCTL
static struct ctl_table sched_fair_sysctls[] = {
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 28b3e7a67565..01a1aef2b9b1 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -71,7 +71,11 @@ static long ratelimit_pages = 32;
/*
* Start background writeback (via writeback threads) at this percentage
*/
+#ifdef CONFIG_ZENIFY
+static int dirty_background_ratio = 20;
+#else
static int dirty_background_ratio = 10;
+#endif
/*
* dirty_background_bytes starts at 0 (disabled) so that it is a function of
@@ -88,7 +92,11 @@ int vm_highmem_is_dirtyable;
/*
* The generator of dirty data starts writeback at this percentage
*/
+#ifdef CONFIG_ZENIFY
+static int vm_dirty_ratio = 50;
+#else
static int vm_dirty_ratio = 20;
+#endif
/*
* vm_dirty_bytes starts at 0 (disabled) so that it is a function of
--
2.28.0
From e92e67143385cf285851e12aa8b7f083dd38dd24 Mon Sep 17 00:00:00 2001
From: Steven Barrett <damentz@liquorix.net>

View File

@@ -34,109 +34,3 @@ index 051aaf65c..705df5511 100644
static DEFINE_MUTEX(sched_energy_mutex);
static bool sched_energy_update;
From f85ed068b4d0e6c31edce8574a95757a60e58b87 Mon Sep 17 00:00:00 2001
From: Etienne Juvigny <Ti3noU@gmail.com>
Date: Mon, 3 Sep 2018 17:36:25 +0200
Subject: [PATCH] Zenify & stuff
---
kernel/sched/fair.c | 25 +++++++++++++++++++++++++
mm/page-writeback.c | 8 ++++++++
2 files changed, 33 insertions(+)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 6b3b59cc51d6..2a0072192c3d 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -37,8 +37,13 @@
*
* (default: 6ms * (1 + ilog(ncpus)), units: nanoseconds)
*/
+#ifdef CONFIG_ZENIFY
+unsigned int sysctl_sched_latency = 3000000ULL;
+static unsigned int normalized_sysctl_sched_latency = 3000000ULL;
+#else
unsigned int sysctl_sched_latency = 6000000ULL;
static unsigned int normalized_sysctl_sched_latency = 6000000ULL;
+#endif
/*
* The initial- and re-scaling of tunables is configurable
@@ -58,21 +63,34 @@ enum sched_tunable_scaling sysctl_sched_tunable_scaling = SCHED_TUNABLESCALING_L
*
* (default: 0.75 msec * (1 + ilog(ncpus)), units: nanoseconds)
*/
+#ifdef CONFIG_ZENIFY
+unsigned int sysctl_sched_min_granularity = 300000ULL;
+static unsigned int normalized_sysctl_sched_min_granularity = 300000ULL;
+#else
unsigned int sysctl_sched_min_granularity = 750000ULL;
static unsigned int normalized_sysctl_sched_min_granularity = 750000ULL;
+#endif
/*
* Minimal preemption granularity for CPU-bound SCHED_IDLE tasks.
* Applies only when SCHED_IDLE tasks compete with normal tasks.
*
* (default: 0.75 msec)
*/
+#ifdef CONFIG_ZENIFY
+unsigned int sysctl_sched_idle_min_granularity = 300000ULL;
+#else
unsigned int sysctl_sched_idle_min_granularity = 750000ULL;
+#endif
/*
* This value is kept at sysctl_sched_latency/sysctl_sched_min_granularity
*/
+#ifdef CONFIG_ZENIFY
+static unsigned int sched_nr_latency = 10;
+#else
static unsigned int sched_nr_latency = 8;
+#endif
/*
* After fork, child runs first. If set to 0 (default) then
@@ -128,8 +149,12 @@ int __weak arch_asym_cpu_priority(int cpu)
*
* (default: 5 msec, units: microseconds)
*/
+#ifdef CONFIG_ZENIFY
+static unsigned int sysctl_sched_cfs_bandwidth_slice = 3000UL;
+#else
static unsigned int sysctl_sched_cfs_bandwidth_slice = 5000UL;
#endif
+#endif
#ifdef CONFIG_SYSCTL
static struct ctl_table sched_fair_sysctls[] = {
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 28b3e7a67565..01a1aef2b9b1 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -71,7 +71,11 @@ static long ratelimit_pages = 32;
/*
* Start background writeback (via writeback threads) at this percentage
*/
+#ifdef CONFIG_ZENIFY
+static int dirty_background_ratio = 20;
+#else
static int dirty_background_ratio = 10;
+#endif
/*
* dirty_background_bytes starts at 0 (disabled) so that it is a function of
@@ -88,7 +92,11 @@ int vm_highmem_is_dirtyable;
/*
* The generator of dirty data starts writeback at this percentage
*/
+#ifdef CONFIG_ZENIFY
+static int vm_dirty_ratio = 50;
+#else
static int vm_dirty_ratio = 20;
+#endif
/*
* vm_dirty_bytes starts at 0 (disabled) so that it is a function of
--
2.28.0

File diff suppressed because it is too large Load Diff

View File

@@ -559,26 +559,23 @@ diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
index 728f434de2bb..0e1082a4e878 100644
--- a/kernel/locking/rtmutex.c
+++ b/kernel/locking/rtmutex.c
@@ -343,7 +343,7 @@ waiter_update_prio(struct rt_mutex_waite
lockdep_assert(RB_EMPTY_NODE(&waiter->tree.entry));
waiter->tree.prio = __waiter_prio(task);
- waiter->tree.deadline = task->dl.deadline;
+ waiter->tree.deadline = __tsk_deadline(task);
@@ -337,21 +337,25 @@ static __always_inline void
waiter_update_prio(struct rt_mutex_waiter *waiter, struct task_struct *task)
{
waiter->prio = __waiter_prio(task);
- waiter->deadline = task->dl.deadline;
+ waiter->deadline = __tsk_deadline(task);
}
/*
@@ -364,16 +364,20 @@ waiter_clone_prio(struct rt_mutex_waiter
* Only use with rt_waiter_node_{less,equal}()
* Only use with rt_mutex_waiter_{less,equal}()
*/
#define task_to_waiter_node(p) \
- &(struct rt_waiter_node){ .prio = __waiter_prio(p), .deadline = (p)->dl.deadline }
+ &(struct rt_waiter_node){ .prio = __waiter_prio(p), .deadline = __tsk_deadline(p) }
#define task_to_waiter(p) \
&(struct rt_mutex_waiter){ .tree = *task_to_waiter_node(p) }
- &(struct rt_mutex_waiter){ .prio = __waiter_prio(p), .deadline = (p)->dl.deadline }
+ &(struct rt_mutex_waiter){ .prio = __waiter_prio(p), .deadline = __tsk_deadline(p) }
static __always_inline int rt_waiter_node_less(struct rt_waiter_node *left,
struct rt_waiter_node *right)
static __always_inline int rt_mutex_waiter_less(struct rt_mutex_waiter *left,
struct rt_mutex_waiter *right)
{
+#ifdef CONFIG_SCHED_PDS
+ return (left->deadline < right->deadline);
@@ -590,7 +587,7 @@ index 728f434de2bb..0e1082a4e878 100644
/*
* If both waiters have dl_prio(), we check the deadlines of the
* associated tasks.
@@ -382,16 +386,22 @@ static __always_inline int rt_waiter_nod
@@ -360,16 +364,22 @@ static __always_inline int rt_mutex_waiter_less(struct rt_mutex_waiter *left,
*/
if (dl_prio(left->prio))
return dl_time_before(left->deadline, right->deadline);
@@ -600,8 +597,8 @@ index 728f434de2bb..0e1082a4e878 100644
+#endif
}
static __always_inline int rt_waiter_node_equal(struct rt_waiter_node *left,
struct rt_waiter_node *right)
static __always_inline int rt_mutex_waiter_equal(struct rt_mutex_waiter *left,
struct rt_mutex_waiter *right)
{
+#ifdef CONFIG_SCHED_PDS
+ return (left->deadline == right->deadline);
@@ -613,7 +610,7 @@ index 728f434de2bb..0e1082a4e878 100644
/*
* If both waiters have dl_prio(), we check the deadlines of the
* associated tasks.
@@ -400,8 +410,10 @@ static __always_inline int rt_waiter_nod
@@ -378,8 +388,10 @@ static __always_inline int rt_mutex_waiter_equal(struct rt_mutex_waiter *left,
*/
if (dl_prio(left->prio))
return left->deadline == right->deadline;
@@ -11164,147 +11161,3 @@ index 529590499b1f..d04bb99b4f0e 100644
};
struct wakeup_test_data *x = data;
diff --git a/kernel/sched/alt_core.c b/kernel/sched/alt_core.c
index 5a83919dc4e491ccab0f1a3809a3f01c7ff7d1fc..812009077a0f6bc235befa84973d46f5088614bf 100644
--- a/kernel/sched/alt_core.c
+++ b/kernel/sched/alt_core.c
@@ -5507,6 +5507,7 @@ static int __sched_setscheduler(struct task_struct *p,
struct balance_callback *head;
unsigned long flags;
struct rq *rq;
+ bool cpuset_locked = false;
int reset_on_fork;
raw_spinlock_t *lock;
@@ -5581,8 +5582,10 @@ static int __sched_setscheduler(struct task_struct *p,
return retval;
}
- if (pi)
- cpuset_read_lock();
+ if (pi) {
+ cpuset_locked = true;
+ cpuset_lock();
+ }
/*
* Make sure no PI-waiters arrive (or leave) while we are
@@ -5629,8 +5632,8 @@ static int __sched_setscheduler(struct task_struct *p,
policy = oldpolicy = -1;
__task_access_unlock(p, lock);
raw_spin_unlock_irqrestore(&p->pi_lock, flags);
- if (pi)
- cpuset_read_unlock();
+ if (cpuset_locked)
+ cpuset_unlock();
goto recheck;
}
@@ -5662,7 +5665,8 @@ static int __sched_setscheduler(struct task_struct *p,
raw_spin_unlock_irqrestore(&p->pi_lock, flags);
if (pi) {
- cpuset_read_unlock();
+ if (cpuset_locked)
+ cpuset_unlock();
rt_mutex_adjust_pi(p);
}
@@ -5675,8 +5679,8 @@ static int __sched_setscheduler(struct task_struct *p,
unlock:
__task_access_unlock(p, lock);
raw_spin_unlock_irqrestore(&p->pi_lock, flags);
- if (pi)
- cpuset_read_unlock();
+ if (cpuset_locked)
+ cpuset_unlock();
return retval;
}
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index 33e7a816dbd38583b837185b6aa61504f3f3a810..bba3fc7e450a76cfaf6c981c138ef5a894a0ffb6 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -2498,11 +2498,13 @@ static int cpuset_can_attach_check(struct cpuset *cs)
return 0;
}
+#ifndef CONFIG_SCHED_ALT
static void reset_migrate_dl_data(struct cpuset *cs)
{
cs->nr_migrate_dl_tasks = 0;
cs->sum_migrate_dl_bw = 0;
}
+#endif
/* Called by cgroups to determine if a cpuset is usable; cpuset_mutex held */
static int cpuset_can_attach(struct cgroup_taskset *tset)
@@ -2532,12 +2534,15 @@ static int cpuset_can_attach(struct cgroup_taskset *tset)
if (ret)
goto out_unlock;
+#ifndef CONFIG_SCHED_ALT
if (dl_task(task)) {
cs->nr_migrate_dl_tasks++;
cs->sum_migrate_dl_bw += task->dl.dl_bw;
}
+#endif
}
+#ifndef CONFIG_SCHED_ALT
if (!cs->nr_migrate_dl_tasks)
goto out_success;
@@ -2558,6 +2563,7 @@ static int cpuset_can_attach(struct cgroup_taskset *tset)
}
out_success:
+#endif
/*
* Mark attach is in progress. This makes validate_change() fail
* changes which zero cpus/mems_allowed.
@@ -2580,13 +2586,14 @@ static void cpuset_cancel_attach(struct cgroup_taskset *tset)
cs->attach_in_progress--;
if (!cs->attach_in_progress)
wake_up(&cpuset_attach_wq);
-
+#ifndef CONFIG_SCHED_ALT
if (cs->nr_migrate_dl_tasks) {
int cpu = cpumask_any(cs->effective_cpus);
dl_bw_free(cpu, cs->sum_migrate_dl_bw);
reset_migrate_dl_data(cs);
}
+#endif
mutex_unlock(&cpuset_mutex);
}
@@ -2688,11 +2695,13 @@ static void cpuset_attach(struct cgroup_taskset *tset)
out:
cs->old_mems_allowed = cpuset_attach_nodemask_to;
+#ifndef CONFIG_SCHED_ALT
if (cs->nr_migrate_dl_tasks) {
cs->nr_deadline_tasks += cs->nr_migrate_dl_tasks;
oldcs->nr_deadline_tasks -= cs->nr_migrate_dl_tasks;
reset_migrate_dl_data(cs);
}
+#endif
cs->attach_in_progress--;
if (!cs->attach_in_progress)
diff --git a/kernel/sched/alt_core.c b/kernel/sched/alt_core.c
index 812009077a0f6bc235befa84973d46f5088614bf..389ecb74b4b9406939e67b1c4f597e1211e4a484 100644
--- a/kernel/sched/alt_core.c
+++ b/kernel/sched/alt_core.c
@@ -7089,8 +7089,7 @@ int cpuset_cpumask_can_shrink(const struct cpumask __maybe_unused *cur,
return 1;
}
-int task_can_attach(struct task_struct *p,
- const struct cpumask *cs_effective_cpus)
+int task_can_attach(struct task_struct *p)
{
int ret = 0;

View File

@@ -64,139 +64,68 @@ index 2c7171e0b0010..85de313ddec29 100644
select CPU_FREQ_GOV_PERFORMANCE
help
From 6ce292eefababf73880f3565acdb96cdc68f90ac Mon Sep 17 00:00:00 2001
From: Tk-Glitch <ti3nou@gmail.com>
Date: Mon, 7 Aug 2023 09:21:55 +0200
Subject: revert [PATCH] scsi: aacraid: Reply queue mapping to CPUs based on IRQ
affinity
From 50c597f3cc8dc4de0f0b6153a0ff1bd0b2dc6f56 Mon Sep 17 00:00:00 2001
From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Mon, 26 Jun 2023 00:42:18 +0200
Subject: [PATCH] netfilter: nf_tables: unbind non-anonymous set if rule
construction fails
Due to a regression on adaptec raid cards leading to reset on large random I/O
https://bugzilla.kernel.org/show_bug.cgi?id=217599
Otherwise a dangling reference to a rule object that is gone remains
in the set binding list.
Fixes: 26b5a5712eb8 ("netfilter: nf_tables: add NFT_TRANS_PREPARE_ERROR to deal with bound set/chain")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
(cherry picked from commit 3e70489721b6c870252c9082c496703677240f53)
For: https://bugs.archlinux.org/task/78908
---
net/netfilter/nf_tables_api.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
index 7c6efde75..5e115e8b2 100644
--- a/drivers/scsi/aacraid/aacraid.h
+++ b/drivers/scsi/aacraid/aacraid.h
@@ -1678,7 +1678,6 @@ struct aac_dev
u32 handle_pci_error;
bool init_reset;
u8 soft_reset_support;
- u8 use_map_queue;
};
#define aac_adapter_interrupt(dev) \
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c
index 3f062e401..deb32c9f4 100644
--- a/drivers/scsi/aacraid/commsup.c
+++ b/drivers/scsi/aacraid/commsup.c
@@ -223,12 +223,8 @@ int aac_fib_setup(struct aac_dev * dev)
struct fib *aac_fib_alloc_tag(struct aac_dev *dev, struct scsi_cmnd *scmd)
{
struct fib *fibptr;
- u32 blk_tag;
- int i;
- blk_tag = blk_mq_unique_tag(scsi_cmd_to_rq(scmd));
- i = blk_mq_unique_tag_to_tag(blk_tag);
- fibptr = &dev->fibs[i];
+ fibptr = &dev->fibs[scsi_cmd_to_rq(scmd)->tag];
/*
* Null out fields that depend on being zero at the start of
* each I/O
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index c4a36c0be..68f4dbcff 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -19,7 +19,6 @@
#include <linux/compat.h>
#include <linux/blkdev.h>
-#include <linux/blk-mq-pci.h>
#include <linux/completion.h>
#include <linux/init.h>
#include <linux/interrupt.h>
@@ -505,15 +504,6 @@ static int aac_slave_configure(struct scsi_device *sdev)
return 0;
}
-static void aac_map_queues(struct Scsi_Host *shost)
-{
- struct aac_dev *aac = (struct aac_dev *)shost->hostdata;
-
- blk_mq_pci_map_queues(&shost->tag_set.map[HCTX_TYPE_DEFAULT],
- aac->pdev, 0);
- aac->use_map_queue = true;
-}
-
/**
* aac_change_queue_depth - alter queue depths
* @sdev: SCSI device we are considering
@@ -1498,7 +1488,6 @@ static const struct scsi_host_template aac_driver_template = {
.bios_param = aac_biosparm,
.shost_groups = aac_host_groups,
.slave_configure = aac_slave_configure,
- .map_queues = aac_map_queues,
.change_queue_depth = aac_change_queue_depth,
.sdev_groups = aac_dev_groups,
.eh_abort_handler = aac_eh_abort,
@@ -1786,8 +1775,6 @@ static int aac_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
shost->max_lun = AAC_MAX_LUN;
pci_set_drvdata(pdev, shost);
- shost->nr_hw_queues = aac->max_msix;
- shost->host_tagset = 1;
error = scsi_add_host(shost, &pdev->dev);
if (error)
@@ -1919,7 +1906,6 @@ static void aac_remove_one(struct pci_dev *pdev)
struct aac_dev *aac = (struct aac_dev *)shost->hostdata;
aac_cancel_rescan_worker(aac);
- aac->use_map_queue = false;
scsi_remove_host(shost);
__aac_shutdown(aac);
diff --git a/drivers/scsi/aacraid/src.c b/drivers/scsi/aacraid/src.c
index 61949f374..11ef58204 100644
--- a/drivers/scsi/aacraid/src.c
+++ b/drivers/scsi/aacraid/src.c
@@ -493,10 +493,6 @@ static int aac_src_deliver_message(struct fib *fib)
#endif
u16 vector_no;
- struct scsi_cmnd *scmd;
- u32 blk_tag;
- struct Scsi_Host *shost = dev->scsi_host_ptr;
- struct blk_mq_queue_map *qmap;
atomic_inc(&q->numpending);
@@ -509,25 +505,8 @@ static int aac_src_deliver_message(struct fib *fib)
if ((dev->comm_interface == AAC_COMM_MESSAGE_TYPE3)
&& dev->sa_firmware)
vector_no = aac_get_vector(dev);
- else {
- if (!fib->vector_no || !fib->callback_data) {
- if (shost && dev->use_map_queue) {
- qmap = &shost->tag_set.map[HCTX_TYPE_DEFAULT];
- vector_no = qmap->mq_map[raw_smp_processor_id()];
- }
- /*
- * We hardcode the vector_no for
- * reserved commands as a valid shost is
- * absent during the init
- */
- else
- vector_no = 0;
- } else {
- scmd = (struct scsi_cmnd *)fib->callback_data;
- blk_tag = blk_mq_unique_tag(scsi_cmd_to_rq(scmd));
- vector_no = blk_mq_unique_tag_to_hwq(blk_tag);
- }
- }
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 4c7937fd803f9f..1d64c163076a12 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -5343,6 +5343,8 @@ void nf_tables_deactivate_set(const struct nft_ctx *ctx, struct nft_set *set,
nft_set_trans_unbind(ctx, set);
if (nft_set_is_anonymous(set))
nft_deactivate_next(ctx->net, set);
+ else
+ vector_no = fib->vector_no;
+ list_del_rcu(&binding->list);
if (native_hba) {
if (fib->flags & FIB_CONTEXT_FLAG_NATIVE_HBA_TMF) {
set->use--;
break;
From a6571d06002b30ca7f51af7681128179b122977c Mon Sep 17 00:00:00 2001
From: Suren Baghdasaryan <surenb@google.com>
Date: Mon, 3 Jul 2023 11:21:50 -0700
Subject: [PATCH] mm: disable CONFIG_PER_VMA_LOCK by default until its fixed
A memory corruption was reported in [1] with bisection pointing to the
patch [2] enabling per-VMA locks for x86.
Disable per-VMA locks config to prevent this issue while the problem is
being investigated. This is expected to be a temporary measure.
[1] https://bugzilla.kernel.org/show_bug.cgi?id=217624
[2] https://lore.kernel.org/all/20230227173632.3292573-30-surenb@google.com
Reported-by: Jiri Slaby <jirislaby@kernel.org>
Reported-by: Jacob Young <jacobly.alt@gmail.com>
Fixes: 0bff0aaea03e ("x86/mm: try VMA lock-based page fault handling first")
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
---
mm/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/Kconfig b/mm/Kconfig
index e3454087fd31ae..d91a544678ee9d 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -1198,7 +1198,7 @@ config ARCH_SUPPORTS_PER_VMA_LOCK
def_bool n
config PER_VMA_LOCK
- def_bool y
+ bool "Enable per-vma locking during page fault handling."
depends on ARCH_SUPPORTS_PER_VMA_LOCK && MMU && SMP
help
Allow per-vma locking during page fault handling.

View File

@@ -1,24 +1,20 @@
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 8049f0e2c..de170760d 100755
index 70392fd2f..34f98648f 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -53,2 +53,3 @@ $S Source2: diff.patch
Provides: kernel-$KERNELRELEASE
+ Provides: kernel-uname-r = %{version}
$S BuildRequires: bc binutils bison dwarves
@@ -69,4 +70,4 @@ $S BuildRequires: gcc make openssl openssl-devel perl python3 rsync
@@ -63,4 +66,4 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz
Group: Development/System
- Obsoletes: kernel-headers
Provides: kernel-headers = %{version}
+ Provides: installonlypkg(kernel) = %{version}
%description headers
@@ -81,2 +82,5 @@ $S$M Summary: Development package for building kernel modules to match the $__KE
@@ -75,2 +78,5 @@ $S$M Summary: Development package for building kernel modules to match the $__KE
$S$M Group: System Environment/Kernel
+$S$M Provides: kernel-devel = %{version}
+$S$M Provides: kernel-devel-uname-r = %{version}
+$S$M Provides: installonlypkg(kernel) = %{version}
$S$M AutoReqProv: no
@@ -86,2 +90,18 @@ $S$M against the $__KERNELRELEASE kernel package.
@@ -80,2 +86,18 @@ $S$M against the $__KERNELRELEASE kernel package.
$S$M
+$S # Opt out of a lot of Fedora hardening flags etc...
+$S # See https://src.fedoraproject.org/rpms/redhat-rpm-config//blob/rawhide/f/buildflags.md

View File

@@ -0,0 +1,244 @@
From 5ae86c8436b83762bc6cf46bea1da6ace2d3f50e Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Wed, 6 May 2020 14:37:44 +0300
Subject: [PATCH 1/2] mm: Support soft dirty flag reset for VA range.
---
fs/proc/task_mmu.c | 129 ++++++++++++++++++++++++++++++++++++---------
1 file changed, 103 insertions(+), 26 deletions(-)
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 3cec6fbef725..7c7865028f10 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -1032,6 +1032,8 @@ enum clear_refs_types {
struct clear_refs_private {
enum clear_refs_types type;
+ unsigned long start, end;
+ bool clear_range;
};
#ifdef CONFIG_MEM_SOFT_DIRTY
@@ -1125,6 +1127,8 @@ static int clear_refs_pte_range(pmd_t *pmd, unsigned long addr,
spinlock_t *ptl;
struct page *page;
+ BUG_ON(addr < cp->start || end > cp->end);
+
ptl = pmd_trans_huge_lock(pmd, vma);
if (ptl) {
if (cp->type == CLEAR_REFS_SOFT_DIRTY) {
@@ -1181,9 +1185,11 @@ static int clear_refs_test_walk(unsigned long start, unsigned long end,
struct clear_refs_private *cp = walk->private;
struct vm_area_struct *vma = walk->vma;
- if (vma->vm_flags & VM_PFNMAP)
+ if (!cp->clear_range && (vma->vm_flags & VM_PFNMAP))
return 1;
+ BUG_ON(start < cp->start || end > cp->end);
+
/*
* Writing 1 to /proc/pid/clear_refs affects all pages.
* Writing 2 to /proc/pid/clear_refs only affects anonymous pages.
@@ -1206,10 +1212,12 @@ static ssize_t clear_refs_write(struct file *file, const char __user *buf,
size_t count, loff_t *ppos)
{
struct task_struct *task;
- char buffer[PROC_NUMBUF];
+ char buffer[18];
struct mm_struct *mm;
struct vm_area_struct *vma;
enum clear_refs_types type;
+ unsigned long start, end;
+ bool clear_range;
int itype;
int rv;
@@ -1218,12 +1226,34 @@ static ssize_t clear_refs_write(struct file *file, const char __user *buf,
count = sizeof(buffer) - 1;
if (copy_from_user(buffer, buf, count))
return -EFAULT;
- rv = kstrtoint(strstrip(buffer), 10, &itype);
- if (rv < 0)
- return rv;
- type = (enum clear_refs_types)itype;
- if (type < CLEAR_REFS_ALL || type >= CLEAR_REFS_LAST)
- return -EINVAL;
+
+ if (buffer[0] == '6')
+ {
+ static int once;
+
+ if (!once++)
+ printk(KERN_DEBUG "task_mmu: Using POC clear refs range implementation.\n");
+
+ if (count != 17)
+ return -EINVAL;
+
+ type = CLEAR_REFS_SOFT_DIRTY;
+ start = *(unsigned long *)(buffer + 1);
+ end = *(unsigned long *)(buffer + 1 + 8);
+ }
+ else
+ {
+ rv = kstrtoint(strstrip(buffer), 10, &itype);
+ if (rv < 0)
+ return rv;
+ type = (enum clear_refs_types)itype;
+
+ if (type < CLEAR_REFS_ALL || type >= CLEAR_REFS_LAST)
+ return -EINVAL;
+
+ start = 0;
+ end = -1UL;
+ }
task = get_proc_task(file_inode(file));
if (!task)
@@ -1235,40 +1265,86 @@ static ssize_t clear_refs_write(struct file *file, const char __user *buf,
.type = type,
};
- if (mmap_write_lock_killable(mm)) {
- count = -EINTR;
- goto out_mm;
+ if (start || end != -1UL)
+ {
+ start = min(start, -1) & PAGE_MASK;
+ end = min(end, -1) & PAGE_MASK;
+
+ if (start >= end)
+ {
+ count = -EINVAL;
+ goto out_mm;
+ }
+ clear_range = true;
}
+ else
+ {
+ clear_range = false;
+ }
+
+ cp.start = start;
+ cp.end = end;
+ cp.clear_range = clear_range;
+
if (type == CLEAR_REFS_MM_HIWATER_RSS) {
+ if (mmap_write_lock_killable(mm)) {
+ count = -EINTR;
+ goto out_mm;
+ }
+
/*
* Writing 5 to /proc/pid/clear_refs resets the peak
* resident set size to this mm's current rss value.
*/
reset_mm_hiwater_rss(mm);
- goto out_unlock;
+ mmap_write_unlock(mm);
+ goto out_mm;
}
if (type == CLEAR_REFS_SOFT_DIRTY) {
- for_each_vma(vmi, vma) {
- if (!(vma->vm_flags & VM_SOFTDIRTY))
- continue;
- vm_flags_clear(vma, VM_SOFTDIRTY);
- vma_set_page_prot(vma);
+ if (mmap_read_lock_killable(mm)) {
+ count = -EINTR;
+ goto out_mm;
}
-
+ if (!clear_range)
+ for_each_vma(vmi, vma) {
+ if (!(vma->vm_flags & VM_SOFTDIRTY))
+ continue;
+ mmap_read_unlock(mm);
+ if (mmap_write_lock_killable(mm)) {
+ count = -EINTR;
+ goto out_mm;
+ }
+ for_each_vma(vmi, vma) {
+ vm_flags_clear(vma, VM_SOFTDIRTY);
+ vma_set_page_prot(vma);
+ }
+ mmap_write_downgrade(mm);
+ break;
+ }
inc_tlb_flush_pending(mm);
mmu_notifier_range_init(&range, MMU_NOTIFY_SOFT_DIRTY,
- 0, mm, 0, -1UL);
+ 0, mm, start, end);
mmu_notifier_invalidate_range_start(&range);
}
- walk_page_range(mm, 0, -1, &clear_refs_walk_ops, &cp);
+ else
+ {
+ if (mmap_write_lock_killable(mm)) {
+ count = -EINTR;
+ goto out_mm;
+ }
+ }
+ walk_page_range(mm, start, end == -1UL ? -1 : end, &clear_refs_walk_ops, &cp);
if (type == CLEAR_REFS_SOFT_DIRTY) {
mmu_notifier_invalidate_range_end(&range);
flush_tlb_mm(mm);
dec_tlb_flush_pending(mm);
+ mmap_read_unlock(mm);
+ }
+ else
+ {
+ mmap_write_unlock(mm);
}
-out_unlock:
- mmap_write_unlock(mm);
out_mm:
mmput(mm);
}
@@ -1301,6 +1377,7 @@ struct pagemapread {
#define PM_PFRAME_MASK GENMASK_ULL(PM_PFRAME_BITS - 1, 0)
#define PM_SOFT_DIRTY BIT_ULL(55)
#define PM_MMAP_EXCLUSIVE BIT_ULL(56)
+#define PM_SOFT_DIRTY_PAGE BIT_ULL(57)
#define PM_UFFD_WP BIT_ULL(57)
#define PM_FILE BIT_ULL(61)
#define PM_SWAP BIT_ULL(62)
@@ -1373,13 +1450,13 @@ static pagemap_entry_t pte_to_pagemap_entry(struct pagemapread *pm,
flags |= PM_PRESENT;
page = vm_normal_page(vma, addr, pte);
if (pte_soft_dirty(pte))
- flags |= PM_SOFT_DIRTY;
+ flags |= PM_SOFT_DIRTY | PM_SOFT_DIRTY_PAGE;
if (pte_uffd_wp(pte))
flags |= PM_UFFD_WP;
} else if (is_swap_pte(pte)) {
swp_entry_t entry;
if (pte_swp_soft_dirty(pte))
- flags |= PM_SOFT_DIRTY;
+ flags |= PM_SOFT_DIRTY | PM_SOFT_DIRTY_PAGE;
if (pte_swp_uffd_wp(pte))
flags |= PM_UFFD_WP;
entry = pte_to_swp_entry(pte);
@@ -1500,7 +1500,7 @@
flags |= PM_PRESENT;
if (pmd_soft_dirty(pmd))
- flags |= PM_SOFT_DIRTY;
+ flags |= PM_SOFT_DIRTY | PM_SOFT_DIRTY_PAGE;
if (pmd_uffd_wp(pmd))
flags |= PM_UFFD_WP;
if (pm->show_pfn)
@@ -1442,7 +1519,7 @@ static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end,
}
flags |= PM_SWAP;
if (pmd_swp_soft_dirty(pmd))
- flags |= PM_SOFT_DIRTY;
+ flags |= PM_SOFT_DIRTY | PM_SOFT_DIRTY_PAGE;
if (pmd_swp_uffd_wp(pmd))
flags |= PM_UFFD_WP;
VM_BUG_ON(!is_pmd_migration_entry(pmd));
--
2.30.2

View File

@@ -0,0 +1,363 @@
From 9c85113cf4019e7b277a44e72bda8b78347aa72f Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Thu, 7 May 2020 14:05:31 +0300
Subject: [PATCH 2/2] mm: Support soft dirty flag read with reset.
---
fs/proc/base.c | 3 +
fs/proc/internal.h | 1 +
fs/proc/task_mmu.c | 144 +++++++++++++++++++++++++++++++++++++++------
3 files changed, 130 insertions(+), 18 deletions(-)
diff --git a/fs/proc/base.c b/fs/proc/base.c
index b3422cda2a91..8199ae2411ca 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -3202,6 +3202,9 @@ static const struct pid_entry tgid_base_stuff[] = {
REG("smaps", S_IRUGO, proc_pid_smaps_operations),
REG("smaps_rollup", S_IRUGO, proc_pid_smaps_rollup_operations),
REG("pagemap", S_IRUSR, proc_pagemap_operations),
+#ifdef CONFIG_MEM_SOFT_DIRTY
+ REG("pagemap_reset", S_IRUSR, proc_pagemap_reset_operations),
+#endif
#endif
#ifdef CONFIG_SECURITY
DIR("attr", S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations),
diff --git a/fs/proc/internal.h b/fs/proc/internal.h
index f60b379dcdc7..36a901cf0e7f 100644
--- a/fs/proc/internal.h
+++ b/fs/proc/internal.h
@@ -303,6 +303,7 @@ extern const struct file_operations proc_pid_smaps_operations;
extern const struct file_operations proc_pid_smaps_rollup_operations;
extern const struct file_operations proc_clear_refs_operations;
extern const struct file_operations proc_pagemap_operations;
+extern const struct file_operations proc_pagemap_reset_operations;
extern unsigned long task_vsize(struct mm_struct *);
extern unsigned long task_statm(struct mm_struct *,
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 7c7865028f10..a21694967915 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -1056,8 +1056,8 @@ static inline bool pte_is_pinned(struct vm_area_struct *vma, unsigned long addr,
return page_maybe_dma_pinned(page);
}
-static inline void clear_soft_dirty(struct vm_area_struct *vma,
- unsigned long addr, pte_t *pte)
+static inline bool clear_soft_dirty(struct vm_area_struct *vma,
+ unsigned long addr, pte_t *pte)
{
/*
* The soft-dirty tracker uses #PF-s to catch writes
@@ -1066,37 +1066,46 @@ static inline void clear_soft_dirty(struct vm_area_struct *vma,
* of how soft-dirty works.
*/
pte_t ptent = ptep_get(pte);
+ bool ret = false;
if (pte_present(ptent)) {
pte_t old_pte;
if (pte_is_pinned(vma, addr, ptent))
- return;
+ return ret;
old_pte = ptep_modify_prot_start(vma, addr, pte);
+ ret = pte_soft_dirty(old_pte);
ptent = pte_wrprotect(old_pte);
ptent = pte_clear_soft_dirty(ptent);
ptep_modify_prot_commit(vma, addr, pte, old_pte, ptent);
} else if (is_swap_pte(ptent)) {
+ ret = pte_swp_soft_dirty(ptent);
ptent = pte_swp_clear_soft_dirty(ptent);
set_pte_at(vma->vm_mm, addr, pte, ptent);
}
+ return ret;
}
#else
-static inline void clear_soft_dirty(struct vm_area_struct *vma,
+static inline bool clear_soft_dirty(struct vm_area_struct *vma,
unsigned long addr, pte_t *pte)
{
+ return false;
}
#endif
#if defined(CONFIG_MEM_SOFT_DIRTY) && defined(CONFIG_TRANSPARENT_HUGEPAGE)
-static inline void clear_soft_dirty_pmd(struct vm_area_struct *vma,
+static inline bool clear_soft_dirty_pmd(struct vm_area_struct *vma,
unsigned long addr, pmd_t *pmdp)
{
pmd_t old, pmd = *pmdp;
+ bool ret = false;
if (pmd_present(pmd)) {
/* See comment in change_huge_pmd() */
old = pmdp_invalidate(vma, addr, pmdp);
+
+ ret = pmd_soft_dirty(old);
+
if (pmd_dirty(old))
pmd = pmd_mkdirty(pmd);
if (pmd_young(old))
@@ -1107,14 +1116,17 @@ static inline void clear_soft_dirty_pmd(struct vm_area_struct *vma,
set_pmd_at(vma->vm_mm, addr, pmdp, pmd);
} else if (is_migration_entry(pmd_to_swp_entry(pmd))) {
+ ret = pmd_swp_soft_dirty(pmd);
pmd = pmd_swp_clear_soft_dirty(pmd);
set_pmd_at(vma->vm_mm, addr, pmdp, pmd);
}
+ return ret;
}
#else
-static inline void clear_soft_dirty_pmd(struct vm_area_struct *vma,
+static inline bool clear_soft_dirty_pmd(struct vm_area_struct *vma,
unsigned long addr, pmd_t *pmdp)
{
+ return false;
}
#endif
@@ -1367,6 +1379,7 @@ struct pagemapread {
int pos, len; /* units: PM_ENTRY_BYTES, not bytes */
pagemap_entry_t *buffer;
bool show_pfn;
+ bool reset;
};
#define PAGEMAP_WALK_SIZE (PMD_SIZE)
@@ -1398,6 +1411,14 @@ static int add_to_pagemap(unsigned long addr, pagemap_entry_t *pme,
return 0;
}
+static int add_addr_to_pagemap(unsigned long addr, struct pagemapread *pm)
+{
+ ((unsigned long *)pm->buffer)[pm->pos++] = addr;
+ if (pm->pos >= pm->len)
+ return PM_END_OF_BUFFER;
+ return 0;
+}
+
static int pagemap_pte_hole(unsigned long start, unsigned long end,
__always_unused int depth, struct mm_walk *walk)
{
@@ -1405,6 +1426,9 @@ static int pagemap_pte_hole(unsigned long start, unsigned long end,
unsigned long addr = start;
int err = 0;
+ if (pm->reset)
+ goto out;
+
while (addr < end) {
struct vm_area_struct *vma = find_vma(walk->mm, addr);
pagemap_entry_t pme = make_pme(0, 0);
@@ -1439,8 +1463,9 @@ static int pagemap_pte_hole(unsigned long start, unsigned long end,
}
static pagemap_entry_t pte_to_pagemap_entry(struct pagemapread *pm,
- struct vm_area_struct *vma, unsigned long addr, pte_t pte)
+ struct vm_area_struct *vma, unsigned long addr, pte_t *pte_addr)
{
+ pte_t pte = *pte_addr;
u64 frame = 0, flags = 0;
struct page *page = NULL;
@@ -1493,6 +1518,20 @@ static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end,
pmd_t pmd = *pmdp;
struct page *page = NULL;
+ if (pm->reset)
+ {
+ if (clear_soft_dirty_pmd(vma, addr, pmdp))
+ {
+ for (; addr != end; addr += PAGE_SIZE)
+ {
+ err = add_addr_to_pagemap(addr, pm);
+ if (err)
+ break;
+ }
+ }
+ goto trans_huge_done;
+ }
+
if (vma->vm_flags & VM_SOFTDIRTY)
flags |= PM_SOFT_DIRTY;
@@ -1541,6 +1580,7 @@ static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end,
frame += (1 << MAX_SWAPFILES_SHIFT);
}
}
+trans_huge_done:
spin_unlock(ptl);
return err;
}
@@ -1555,10 +1595,18 @@ static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end,
return err;
}
for (; addr < end; pte++, addr += PAGE_SIZE) {
- pagemap_entry_t pme;
+ if (pm->reset)
+ {
+ if (clear_soft_dirty(vma, addr, pte))
+ err = add_addr_to_pagemap(addr, pm);
+ }
+ else
+ {
+ pagemap_entry_t pme;
- pme = pte_to_pagemap_entry(pm, vma, addr, ptep_get(pte));
- err = add_to_pagemap(addr, &pme, pm);
+ pme = pte_to_pagemap_entry(pm, vma, addr, ptep_get(pte));
+ err = add_to_pagemap(addr, &pme, pm);
+ }
if (err)
break;
}
@@ -1650,8 +1698,8 @@ static const struct mm_walk_ops pagemap_ops = {
* determine which areas of memory are actually mapped and llseek to
* skip over unmapped regions.
*/
-static ssize_t pagemap_read(struct file *file, char __user *buf,
- size_t count, loff_t *ppos)
+static ssize_t do_pagemap_read(struct file *file, char __user *buf,
+ size_t count, loff_t *ppos, bool reset)
{
struct mm_struct *mm = file->private_data;
struct pagemapread pm;
@@ -1660,6 +1708,8 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,
unsigned long start_vaddr;
unsigned long end_vaddr;
int ret = 0, copied = 0;
+ struct mmu_notifier_range range;
+ size_t buffer_len;
if (!mm || !mmget_not_zero(mm))
goto out;
@@ -1675,19 +1725,38 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,
/* do not disclose physical addresses: attack vector */
pm.show_pfn = file_ns_capable(file, &init_user_ns, CAP_SYS_ADMIN);
+ pm.reset = reset;
- pm.len = (PAGEMAP_WALK_SIZE >> PAGE_SHIFT);
- pm.buffer = kmalloc_array(pm.len, PM_ENTRY_BYTES, GFP_KERNEL);
+ buffer_len = min(PAGEMAP_WALK_SIZE >> PAGE_SHIFT, count / PM_ENTRY_BYTES);
+
+ pm.buffer = kmalloc_array(buffer_len, PM_ENTRY_BYTES, GFP_KERNEL);
ret = -ENOMEM;
if (!pm.buffer)
goto out_mm;
src = *ppos;
svpfn = src / PM_ENTRY_BYTES;
- end_vaddr = mm->task_size;
+
+ start_vaddr = svpfn << PAGE_SHIFT;
+
+ if (reset)
+ {
+ if (count < sizeof(end_vaddr))
+ {
+ ret = -EINVAL;
+ goto out_mm;
+ }
+ if (copy_from_user(&end_vaddr, buf, sizeof(end_vaddr)))
+ return -EFAULT;
+ end_vaddr = min(end_vaddr, mm->task_size);
+ }
+ else
+ {
+ end_vaddr = mm->task_size;
+ start_vaddr = end_vaddr;
+ }
/* watch out for wraparound */
- start_vaddr = end_vaddr;
if (svpfn <= (ULONG_MAX >> PAGE_SHIFT)) {
ret = mmap_read_lock_killable(mm);
if (ret)
@@ -1707,18 +1776,35 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,
unsigned long end;
pm.pos = 0;
- end = (start_vaddr + PAGEMAP_WALK_SIZE) & PAGEMAP_WALK_MASK;
+ pm.len = min(buffer_len, count / PM_ENTRY_BYTES);
+
+ end = reset ? end_vaddr : (start_vaddr + (pm.len << PAGE_SHIFT));
/* overflow ? */
if (end < start_vaddr || end > end_vaddr)
end = end_vaddr;
+
ret = mmap_read_lock_killable(mm);
if (ret)
goto out_free;
+
+ if (reset)
+ {
+ inc_tlb_flush_pending(mm);
+ mmu_notifier_range_init(&range, MMU_NOTIFY_SOFT_DIRTY,
+ 0, mm, start_vaddr, end);
+ mmu_notifier_invalidate_range_start(&range);
+ }
ret = walk_page_range(mm, start_vaddr, end, &pagemap_ops, &pm);
+ if (reset)
+ {
+ mmu_notifier_invalidate_range_end(&range);
+ flush_tlb_mm(mm);
+ dec_tlb_flush_pending(mm);
+ }
mmap_read_unlock(mm);
- start_vaddr = end;
len = min(count, PM_ENTRY_BYTES * pm.pos);
+ BUG_ON(ret && ret != PM_END_OF_BUFFER);
if (copy_to_user(buf, pm.buffer, len)) {
ret = -EFAULT;
goto out_free;
@@ -1726,6 +1812,8 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,
copied += len;
buf += len;
count -= len;
+
+ start_vaddr = reset && pm.pos == pm.len ? ((unsigned long *)pm.buffer)[pm.pos - 1] + PAGE_SIZE : end;
}
*ppos += copied;
if (!ret || ret == PM_END_OF_BUFFER)
@@ -1739,6 +1827,18 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,
return ret;
}
+static ssize_t pagemap_read(struct file *file, char __user *buf,
+ size_t count, loff_t *ppos)
+{
+ return do_pagemap_read(file, buf, count, ppos, false);
+}
+
+static ssize_t pagemap_reset_read(struct file *file, char __user *buf,
+ size_t count, loff_t *ppos)
+{
+ return do_pagemap_read(file, buf, count, ppos, true);
+}
+
static int pagemap_open(struct inode *inode, struct file *file)
{
struct mm_struct *mm;
@@ -1765,6 +1865,14 @@ const struct file_operations proc_pagemap_operations = {
.open = pagemap_open,
.release = pagemap_release,
};
+
+const struct file_operations proc_pagemap_reset_operations = {
+ .llseek = mem_lseek, /* borrow this */
+ .read = pagemap_reset_read,
+ .open = pagemap_open,
+ .release = pagemap_release,
+};
+
#endif /* CONFIG_PROC_PAGE_MONITOR */
#ifdef CONFIG_NUMA
--
2.30.2

File diff suppressed because it is too large Load Diff

View File

@@ -128,11 +128,13 @@ index 3a98439bba83..6efc4f907f58 100644
From f85ed068b4d0e6c31edce8574a95757a60e58b87 Mon Sep 17 00:00:00 2001
From: Etienne Juvigny <Ti3noU@gmail.com>
Date: Mon, 3 Sep 2018 17:36:25 +0200
Subject: [PATCH 07/17] Add Zenify option
Subject: [PATCH 07/17] Zenify & stuff
---
init/Kconfig | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
kernel/sched/fair.c | 25 +++++++++++++++++++++++++
mm/page-writeback.c | 8 ++++++++
3 files changed, 65 insertions(+)
diff --git a/init/Kconfig b/init/Kconfig
index 3ae8678e1145..da708eed0f1e 100644
@@ -177,6 +179,100 @@ index 3ae8678e1145..da708eed0f1e 100644
config BROKEN
bool
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 6b3b59cc51d6..2a0072192c3d 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -37,8 +37,13 @@
*
* (default: 6ms * (1 + ilog(ncpus)), units: nanoseconds)
*/
+#ifdef CONFIG_ZENIFY
+unsigned int sysctl_sched_latency = 3000000ULL;
+static unsigned int normalized_sysctl_sched_latency = 3000000ULL;
+#else
unsigned int sysctl_sched_latency = 6000000ULL;
static unsigned int normalized_sysctl_sched_latency = 6000000ULL;
+#endif
/*
* The initial- and re-scaling of tunables is configurable
@@ -58,21 +63,34 @@ enum sched_tunable_scaling sysctl_sched_tunable_scaling = SCHED_TUNABLESCALING_L
*
* (default: 0.75 msec * (1 + ilog(ncpus)), units: nanoseconds)
*/
+#ifdef CONFIG_ZENIFY
+unsigned int sysctl_sched_min_granularity = 300000ULL;
+static unsigned int normalized_sysctl_sched_min_granularity = 300000ULL;
+#else
unsigned int sysctl_sched_min_granularity = 750000ULL;
static unsigned int normalized_sysctl_sched_min_granularity = 750000ULL;
+#endif
/*
* Minimal preemption granularity for CPU-bound SCHED_IDLE tasks.
* Applies only when SCHED_IDLE tasks compete with normal tasks.
*
* (default: 0.75 msec)
*/
+#ifdef CONFIG_ZENIFY
+unsigned int sysctl_sched_idle_min_granularity = 300000ULL;
+#else
unsigned int sysctl_sched_idle_min_granularity = 750000ULL;
+#endif
/*
* This value is kept at sysctl_sched_latency/sysctl_sched_min_granularity
*/
+#ifdef CONFIG_ZENIFY
+static unsigned int sched_nr_latency = 10;
+#else
static unsigned int sched_nr_latency = 8;
+#endif
/*
* After fork, child runs first. If set to 0 (default) then
@@ -128,8 +149,12 @@ int __weak arch_asym_cpu_priority(int cpu)
*
* (default: 5 msec, units: microseconds)
*/
+#ifdef CONFIG_ZENIFY
+static unsigned int sysctl_sched_cfs_bandwidth_slice = 3000UL;
+#else
static unsigned int sysctl_sched_cfs_bandwidth_slice = 5000UL;
#endif
+#endif
#ifdef CONFIG_SYSCTL
static struct ctl_table sched_fair_sysctls[] = {
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 28b3e7a67565..01a1aef2b9b1 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -71,7 +71,11 @@ static long ratelimit_pages = 32;
/*
* Start background writeback (via writeback threads) at this percentage
*/
+#ifdef CONFIG_ZENIFY
+static int dirty_background_ratio = 20;
+#else
static int dirty_background_ratio = 10;
+#endif
/*
* dirty_background_bytes starts at 0 (disabled) so that it is a function of
@@ -88,7 +92,11 @@ int vm_highmem_is_dirtyable;
/*
* The generator of dirty data starts writeback at this percentage
*/
+#ifdef CONFIG_ZENIFY
+static int vm_dirty_ratio = 50;
+#else
static int vm_dirty_ratio = 20;
+#endif
/*
* vm_dirty_bytes starts at 0 (disabled) so that it is a function of
--
2.28.0

View File

@@ -34,109 +34,3 @@ index 051aaf65c..705df5511 100644
static DEFINE_MUTEX(sched_energy_mutex);
static bool sched_energy_update;
From f85ed068b4d0e6c31edce8574a95757a60e58b87 Mon Sep 17 00:00:00 2001
From: Etienne Juvigny <Ti3noU@gmail.com>
Date: Mon, 3 Sep 2018 17:36:25 +0200
Subject: [PATCH] Zenify & stuff
---
kernel/sched/fair.c | 25 +++++++++++++++++++++++++
mm/page-writeback.c | 8 ++++++++
2 files changed, 33 insertions(+)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 6b3b59cc51d6..2a0072192c3d 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -37,8 +37,13 @@
*
* (default: 6ms * (1 + ilog(ncpus)), units: nanoseconds)
*/
+#ifdef CONFIG_ZENIFY
+unsigned int sysctl_sched_latency = 3000000ULL;
+static unsigned int normalized_sysctl_sched_latency = 3000000ULL;
+#else
unsigned int sysctl_sched_latency = 6000000ULL;
static unsigned int normalized_sysctl_sched_latency = 6000000ULL;
+#endif
/*
* The initial- and re-scaling of tunables is configurable
@@ -58,21 +63,34 @@ enum sched_tunable_scaling sysctl_sched_tunable_scaling = SCHED_TUNABLESCALING_L
*
* (default: 0.75 msec * (1 + ilog(ncpus)), units: nanoseconds)
*/
+#ifdef CONFIG_ZENIFY
+unsigned int sysctl_sched_min_granularity = 300000ULL;
+static unsigned int normalized_sysctl_sched_min_granularity = 300000ULL;
+#else
unsigned int sysctl_sched_min_granularity = 750000ULL;
static unsigned int normalized_sysctl_sched_min_granularity = 750000ULL;
+#endif
/*
* Minimal preemption granularity for CPU-bound SCHED_IDLE tasks.
* Applies only when SCHED_IDLE tasks compete with normal tasks.
*
* (default: 0.75 msec)
*/
+#ifdef CONFIG_ZENIFY
+unsigned int sysctl_sched_idle_min_granularity = 300000ULL;
+#else
unsigned int sysctl_sched_idle_min_granularity = 750000ULL;
+#endif
/*
* This value is kept at sysctl_sched_latency/sysctl_sched_min_granularity
*/
+#ifdef CONFIG_ZENIFY
+static unsigned int sched_nr_latency = 10;
+#else
static unsigned int sched_nr_latency = 8;
+#endif
/*
* After fork, child runs first. If set to 0 (default) then
@@ -128,8 +149,12 @@ int __weak arch_asym_cpu_priority(int cpu)
*
* (default: 5 msec, units: microseconds)
*/
+#ifdef CONFIG_ZENIFY
+static unsigned int sysctl_sched_cfs_bandwidth_slice = 3000UL;
+#else
static unsigned int sysctl_sched_cfs_bandwidth_slice = 5000UL;
#endif
+#endif
#ifdef CONFIG_SYSCTL
static struct ctl_table sched_fair_sysctls[] = {
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 28b3e7a67565..01a1aef2b9b1 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -71,7 +71,11 @@ static long ratelimit_pages = 32;
/*
* Start background writeback (via writeback threads) at this percentage
*/
+#ifdef CONFIG_ZENIFY
+static int dirty_background_ratio = 20;
+#else
static int dirty_background_ratio = 10;
+#endif
/*
* dirty_background_bytes starts at 0 (disabled) so that it is a function of
@@ -88,7 +92,11 @@ int vm_highmem_is_dirtyable;
/*
* The generator of dirty data starts writeback at this percentage
*/
+#ifdef CONFIG_ZENIFY
+static int vm_dirty_ratio = 50;
+#else
static int vm_dirty_ratio = 20;
+#endif
/*
* vm_dirty_bytes starts at 0 (disabled) so that it is a function of
--
2.28.0

File diff suppressed because it is too large Load Diff

View File

@@ -1,24 +1,20 @@
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 8049f0e2c..de170760d 100755
index 70392fd2f..34f98648f 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -53,2 +53,3 @@ $S Source2: diff.patch
Provides: kernel-$KERNELRELEASE
+ Provides: kernel-uname-r = %{version}
$S BuildRequires: bc binutils bison dwarves
@@ -69,4 +70,4 @@ $S BuildRequires: gcc make openssl openssl-devel perl python3 rsync
@@ -63,4 +66,4 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz
Group: Development/System
- Obsoletes: kernel-headers
Provides: kernel-headers = %{version}
+ Provides: installonlypkg(kernel) = %{version}
%description headers
@@ -81,2 +82,5 @@ $S$M Summary: Development package for building kernel modules to match the $__KE
@@ -75,2 +78,5 @@ $S$M Summary: Development package for building kernel modules to match the $__KE
$S$M Group: System Environment/Kernel
+$S$M Provides: kernel-devel = %{version}
+$S$M Provides: kernel-devel-uname-r = %{version}
+$S$M Provides: installonlypkg(kernel) = %{version}
$S$M AutoReqProv: no
@@ -86,2 +90,18 @@ $S$M against the $__KERNELRELEASE kernel package.
@@ -80,2 +86,18 @@ $S$M against the $__KERNELRELEASE kernel package.
$S$M
+$S # Opt out of a lot of Fedora hardening flags etc...
+$S # See https://src.fedoraproject.org/rpms/redhat-rpm-config//blob/rawhide/f/buildflags.md