1
0

Compare commits

...

26 Commits

Author SHA1 Message Date
86c5c0ef41 release 6.15.11 2025-08-20 21:48:25 +03:00
720355d977 release 6.15.10 2025-08-15 15:46:56 +03:00
28be96caa2 release 6.15.9 2025-08-01 17:51:51 +03:00
4d05ae4de6 release 6.15.8 2025-07-26 13:24:48 +03:00
48372baf14 release 6.15.7 2025-07-17 22:56:59 +03:00
01b98c3c62 release 6.15.6 2025-07-10 19:51:42 +03:00
492ec3ca82 release 6.15.5 2025-07-07 02:21:22 +03:00
8df072e89b release 6.15.4 2025-06-27 14:17:53 +03:00
4cb7006cd5 release 6.15.3 2025-06-19 18:06:35 +03:00
43dc655d2e release 6.15.2 (preliminary) 2025-06-18 12:24:58 +03:00
4d2691343a release 6.14.11 2025-06-10 15:56:25 +03:00
97cfa52990 release 6.14.10 2025-06-04 16:12:12 +03:00
245a50c3dd release 6.14.9 2025-05-29 17:14:07 +03:00
20c917c71c release 6.14.8 2025-05-22 17:47:17 +03:00
a5a8a2798d release 6.14.7 2025-05-18 12:32:18 +03:00
5c06d65ded release 6.14.6 2025-05-09 12:55:05 +03:00
9d4ee668cc release 6.14.5 2025-05-02 16:53:38 +03:00
23be27fbba release 6.14.4 2025-04-26 01:02:31 +03:00
f2e779751a release 6.14.3 2025-04-21 02:06:41 +03:00
0a221c5ce2 release 6.14.2 2025-04-11 00:38:04 +03:00
12ad6316be release 6.14.1 2025-04-07 13:34:51 +03:00
cb529499fc sync with Debian 2025-04-07 12:53:36 +03:00
5205e81720 release 6.14 (preliminary) 2025-03-27 01:51:30 +03:00
8083f6cf32 refine configs 2025-03-27 01:51:30 +03:00
b65c570ac2 refresh patches 2025-03-27 01:51:30 +03:00
3d597650a9 sync with Debian 2025-03-27 01:51:30 +03:00
265 changed files with 4536 additions and 29165 deletions

1
debian/.gitignore vendored
View File

@@ -27,6 +27,7 @@
/rules.gen
!/linux-bpf-dev.*
!/linux-cpupower.*
!/linux-misc-tools.*
!/linux-perf.*
# Ignore compiled Python files

View File

@@ -221,27 +221,17 @@ class Gencontrol(Base):
do_meta = config.packages.meta
relation_compiler = PackageRelationEntry(cast(str, config.build.compiler))
relation_compiler_host = PackageRelationEntry(
relation_compiler,
name=f'{relation_compiler.name}-for-host',
)
relation_compiler_header = PackageRelationGroup([relation_compiler])
# Generate compiler build-depends for native:
# gcc-N [arm64] <!cross !pkg.linux.nokernel>
# Generate compiler build-depends:
self.bundle.source.build_depends_arch.merge([
PackageRelationEntry(
relation_compiler,
relation_compiler_host,
arches={arch},
restrictions='<!cross !pkg.linux.nokernel>',
)
])
# Generate compiler build-depends for cross:
# gcc-N-aarch64-linux-gnu [arm64] <cross !pkg.linux.nokernel>
self.bundle.source.build_depends_arch.merge([
PackageRelationEntry(
relation_compiler,
name=f'{relation_compiler.name}-{config.defs_debianarch.gnutype_package}',
arches={arch},
restrictions='<cross !pkg.linux.nokernel>',
restrictions='<!pkg.linux.nokernel>',
)
])
@@ -307,7 +297,7 @@ class Gencontrol(Base):
desc.append(config.description.long[part])
desc.append_short(config.description.short[part])
packages_headers[0].depends.merge(relation_compiler_header)
packages_headers[0].depends.merge([relation_compiler_host])
packages_own.extend(packages_image)
packages_own.extend(packages_headers)
@@ -349,7 +339,7 @@ class Gencontrol(Base):
makeflags['KCONFIG_OPTIONS'] = ''
# Add "salt" to fix #872263
makeflags['KCONFIG_OPTIONS'] += \
' -o "BUILD_SALT=\\"%(source_basename)s%(abiname)s%(localversion)s\\""' % vars
' -o "BUILD_SALT=\\"krd-%(source_basename)s-%(abiname)s%(localversion)s\\""' % vars
merged_config = ('debian/build/config.%s_%s_%s' %
(config.name_debianarch, config.name_featureset, config.name_flavour))
@@ -360,14 +350,7 @@ class Gencontrol(Base):
def process_changelog(self) -> None:
version = self.version = self.changelog[0].version
if self.changelog[0].distribution == 'UNRELEASED':
self.abiname = f'{version.linux_upstream}+unreleased'
elif self.changelog[0].distribution == 'experimental':
self.abiname = f'{version.linux_upstream}'
elif version.linux_revision_backports:
self.abiname = f'{version.linux_upstream_full}+bpo'
else:
self.abiname = f'{version.linux_upstream_full}'
self.abiname = f'{version.linux_upstream_full}'
self.vars = {
'upstreamversion': self.version.linux_upstream,

View File

@@ -5,9 +5,9 @@ export GIT_OPTIONAL_LOCKS=0
w=$(git rev-parse --path-format=absolute --show-toplevel) ; : "${w:?}" ; cd "$w"
dst='debian/patches/pf-tmp'
dst='debian/patches/tmp-pf'
src='../linux-extras'
branches='btrfs cpuidle crypto fixes kbuild pksm xfs zstd'
branches='fixes archlinux cpuidle exfat kbuild nfs smb xfs'
if [ -d "${dst}" ] ; then rm -rf "${dst}" ; fi
mkdir -p "${dst}"
@@ -34,19 +34,17 @@ for b in ${branches} ; do
git switch --detach "${ref}"
git switch -C "$r"
rm -rf "$w/${dst}/$b" ; mkdir -p "$w/${dst}/$b"
if git rebase "${from}" ; then
[ -d "$w/${dst}/$b/" ] || mkdir -p "$w/${dst}/$b"
set +e
env -C "$w" git ls-files -z | grep -zF "${dst}/$b/" | grep -zFv '/.' | env -C "$w" -u GIT_OPTIONAL_LOCKS xargs -r -0 git rm -f
find "$w/${dst}/$b/" -name '*.patch' -type f -exec rm -f {} +
set -e
git format-patch -N --subject-prefix='' --output-directory "$w/${dst}/$b" "${from}..$r"
else
echo >&2
git rebase --abort
echo >&2
touch "$w/${dst}/$b/0000-rebase-failed"
base=$(git merge-base "${from}" "${ref}")
git format-patch -N --subject-prefix='' --output-directory "$w/${dst}/$b" "${base}..${ref}"
fi
git switch -q --detach "${ref}"
@@ -57,6 +55,6 @@ done
cd "$w" ; rm -rf "$t"
echo >&2
echo 'put in debian/patches/series' >&2
echo 'output:' >&2
echo >&2
find "${dst}/" -type f -name '*.patch' | sed -E 's#^debian/patches/##' | sort -V

60
debian/bin/genpatch-zen vendored Executable file
View File

@@ -0,0 +1,60 @@
#!/bin/sh
set -ef
export GIT_OPTIONAL_LOCKS=0
w=$(git rev-parse --path-format=absolute --show-toplevel) ; : "${w:?}" ; cd "$w"
dst='debian/patches/tmp-zen'
src='../linux-extras'
branches='zen-sauce fixes'
if [ -d "${dst}" ] ; then rm -rf "${dst}" ; fi
mkdir -p "${dst}"
kver=
if [ -n "$1" ] ; then
kver="$1"
else
kver=$(dpkg-parsechangelog --show-field=Version | sed -E 's/^[0-9]+://;s/-[^-]*$//' | cut -d. -f1-2)
fi
from="upstream/linux-${kver}.y"
t=$(mktemp -d) ; : "${t:?}"
cp -ar "${src}" "$t/"
cd "$t/${src##*/}"
git config advice.skippedCherryPicks false
for b in ${branches} ; do
ref="zen/${kver}/$b"
r="tmp-rebase-$b"
git switch --detach "${ref}"
git switch -C "$r"
rm -rf "$w/${dst}/$b" ; mkdir -p "$w/${dst}/$b"
if git rebase "${from}" ; then
git format-patch -N --subject-prefix='' --output-directory "$w/${dst}/$b" "${from}..$r"
else
echo >&2
git rebase --abort
touch "$w/${dst}/$b/0000-rebase-failed"
base=$(git merge-base "${from}" "${ref}")
git format-patch -N --subject-prefix='' --output-directory "$w/${dst}/$b" "${base}..${ref}"
fi
git switch -q --detach "${ref}"
git branch -D "$r"
echo >&2
done
cd "$w" ; rm -rf "$t"
echo >&2
echo 'output:' >&2
echo >&2
find "${dst}/" -type f -name '*.patch' | sed -E 's#^debian/patches/##' | sort -V

View File

@@ -11,12 +11,15 @@ dpkg-parsechangelog --show-field Source | grep -Eq '^linux'
ch_ver=$(dpkg-parsechangelog --show-field Version)
v=$1
ktarget=$1
[ -n "${ktarget}" ] || ktarget=oldconfig
v=$2
[ -n "$v" ] || v=$(echo "${ch_ver}" | sed -E 's/^\d+://;s/-[^-]+$//')
[ -n "$v" ]
## should be source tree with patches applied
src_dir=$2
src_dir=$3
[ -n "${src_dir}" ] || src_dir="/tmp/linux-$v"
[ -n "${src_dir}" ]
[ -d "${src_dir}" ]
@@ -25,8 +28,8 @@ src_dir=$(readlink -f "${src_dir}")
nproc=$(nproc || printf 2)
case "${nproc}" in
[0-1] ) nproc=2 ;;
[2-9] | 1[0-9] ) ;;
* ) nproc=20 ;;
[2-8] ) ;;
* ) nproc=8 ;;
esac
rm -rf debian/build/
@@ -44,7 +47,7 @@ for c in ${configs} ; do
f="debian/build/$c"
cp -f "$f" "${src_dir}/.config"
env -C "${src_dir}" make "-j${nproc}" oldconfig
env -C "${src_dir}" make "-j${nproc}" "${ktarget}"
cp -f "${src_dir}/.config" "$f"
done
@@ -52,6 +55,7 @@ done
find debian/build/ -name 'config.*' -type f -exec \
sed -i -E \
-e '/CONFIG_BUILD_SALT/d' \
-e '/CONFIG_MODULE_SIG_KEY( |=)/d' \
-e '/CONFIG_(AS|CC|PAHOLE)_((CAN|HAS)_)/d' \
-e '/CONFIG_(AS|BINDGEN|CC|CLANG|GCC|LD|LLD|PAHOLE|RUSTC)_VERSION/d' \
-e '/CONFIG_RUSTC_LLVM_VERSION/d' \

191
debian/changelog vendored
View File

@@ -1,198 +1,71 @@
linux (6.12.20-1) sid; urgency=medium
linux (6.15.11-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.20
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.15.11
-- Konstantin Demin <rockdrilla@gmail.com> Sun, 23 Mar 2025 03:14:29 +0300
-- Konstantin Demin <rockdrilla@gmail.com> Wed, 20 Aug 2025 21:45:46 +0300
linux (6.12.19-1) sid; urgency=medium
linux (6.15.10-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.19
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.15.10
-- Konstantin Demin <rockdrilla@gmail.com> Thu, 13 Mar 2025 20:47:49 +0300
-- Konstantin Demin <rockdrilla@gmail.com> Fri, 15 Aug 2025 15:43:04 +0300
linux (6.12.18-1) sid; urgency=medium
linux (6.15.9-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.18
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.15.9
-- Konstantin Demin <rockdrilla@gmail.com> Sat, 08 Mar 2025 06:44:24 +0300
-- Konstantin Demin <rockdrilla@gmail.com> Fri, 01 Aug 2025 16:49:13 +0300
linux (6.12.17-1) sid; urgency=medium
linux (6.15.8-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.17
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.15.8
-- Konstantin Demin <rockdrilla@gmail.com> Thu, 27 Feb 2025 16:35:33 +0300
-- Konstantin Demin <rockdrilla@gmail.com> Sat, 26 Jul 2025 12:31:39 +0300
linux (6.12.16-1) sid; urgency=medium
linux (6.15.7-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.15
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.16
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.15.7
-- Konstantin Demin <rockdrilla@gmail.com> Fri, 21 Feb 2025 17:46:41 +0300
-- Konstantin Demin <rockdrilla@gmail.com> Thu, 17 Jul 2025 22:21:12 +0300
linux (6.12.14-1) sid; urgency=medium
linux (6.15.6-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.14
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.15.6
-- Konstantin Demin <rockdrilla@gmail.com> Mon, 17 Feb 2025 17:43:08 +0300
-- Konstantin Demin <rockdrilla@gmail.com> Thu, 10 Jul 2025 19:38:23 +0300
linux (6.12.13-1) sid; urgency=medium
linux (6.15.5-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.13
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.15.5
-- Konstantin Demin <rockdrilla@gmail.com> Sun, 09 Feb 2025 19:34:35 +0300
-- Konstantin Demin <rockdrilla@gmail.com> Mon, 07 Jul 2025 01:40:22 +0300
linux (6.12.12-1) sid; urgency=medium
linux (6.15.4-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.12
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.15.4
-- Konstantin Demin <rockdrilla@gmail.com> Sun, 02 Feb 2025 13:07:44 +0300
-- Konstantin Demin <rockdrilla@gmail.com> Fri, 27 Jun 2025 14:05:47 +0300
linux (6.12.11-1) sid; urgency=medium
linux (6.15.3-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.11
* Compress vmlinux with xz for all flavours.
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.15.3
-- Konstantin Demin <rockdrilla@gmail.com> Tue, 28 Jan 2025 09:10:17 +0300
-- Konstantin Demin <rockdrilla@gmail.com> Thu, 19 Jun 2025 17:46:46 +0300
linux (6.12.10-1) sid; urgency=medium
linux (6.15.2-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.10
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.15.1
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.15.2
* New upstream release: https://kernelnewbies.org/Linux_6.15
-- Konstantin Demin <rockdrilla@gmail.com> Sat, 18 Jan 2025 01:39:50 +0300
linux (6.12.9-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.9
* Drop "pf/amd-pstate" and "pf/amd-rapl" patchsets.
-- Konstantin Demin <rockdrilla@gmail.com> Thu, 09 Jan 2025 23:12:22 +0300
linux (6.12.8-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.8
-- Konstantin Demin <rockdrilla@gmail.com> Thu, 02 Jan 2025 19:34:34 +0300
linux (6.12.7-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.7
-- Konstantin Demin <rockdrilla@gmail.com> Fri, 27 Dec 2024 16:28:43 +0300
linux (6.12.6-2) sid; urgency=medium
* Cherry-pick some patches.
* Refine/adjust configs.
-- Konstantin Demin <rockdrilla@gmail.com> Fri, 27 Dec 2024 00:47:14 +0300
linux (6.12.6-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.6
-- Konstantin Demin <rockdrilla@gmail.com> Thu, 19 Dec 2024 21:00:52 +0300
linux (6.12.5-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.5
-- Konstantin Demin <rockdrilla@gmail.com> Mon, 16 Dec 2024 06:43:43 +0300
linux (6.12.4-1) sid; urgency=medium
* Sync with Debian.
* New upstream release: https://kernelnewbies.org/Linux_6.12
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.1
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.2
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.3
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.4
-- Konstantin Demin <rockdrilla@gmail.com> Mon, 09 Dec 2024 22:08:34 +0300
linux (6.11.11-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.11.11
-- Konstantin Demin <rockdrilla@gmail.com> Thu, 05 Dec 2024 18:41:08 +0300
linux (6.11.10-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.11.10
-- Konstantin Demin <rockdrilla@gmail.com> Fri, 22 Nov 2024 19:59:35 +0300
linux (6.11.9-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.11.9
-- Konstantin Demin <rockdrilla@gmail.com> Mon, 18 Nov 2024 00:21:44 +0300
linux (6.11.8-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.11.8
-- Konstantin Demin <rockdrilla@gmail.com> Fri, 15 Nov 2024 10:17:08 +0300
linux (6.11.7-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.11.7
-- Konstantin Demin <rockdrilla@gmail.com> Fri, 08 Nov 2024 22:31:17 +0300
linux (6.11.6-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.11.6
-- Konstantin Demin <rockdrilla@gmail.com> Fri, 01 Nov 2024 10:54:09 +0300
linux (6.11.5-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.11.5
[ Aurelien Jarno ]
* Revert upstream commit causing data corrution (Closes: #1085425)
- Revert "mmc: dw_mmc: Fix IDMAC operation with pages bigger than 4K"
[ Salvatore Bonaccorso ]
* netfilter: xtables: fix typo causing some targets not to load on IPv6
(Closes: #1085953)
[ Konstantin Demin ]
* Initial package release.
-- Konstantin Demin <rockdrilla@gmail.com> Tue, 29 Oct 2024 05:14:58 +0300
linux (6.11.4-1) unstable; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.11.3
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.11.4
[ Salvatore Bonaccorso ]
* d/config: Update with the help of kconfigeditor2
- mm: Enable Z3FOLD_DEPRECATED instead of Z3FOLD
-- Salvatore Bonaccorso <carnil@debian.org> Sun, 20 Oct 2024 20:51:13 +0200
-- Konstantin Demin <rockdrilla@gmail.com> Tue, 17 Jun 2025 12:18:45 +0300

View File

@@ -12,17 +12,6 @@
# CONFIG_X86_INTEL_LPSS is not set
# CONFIG_X86_AMD_PLATFORM_DEVICE is not set
CONFIG_IOSF_MBI=m
CONFIG_HYPERVISOR_GUEST=y
CONFIG_PARAVIRT=y
# CONFIG_PARAVIRT_DEBUG is not set
CONFIG_PARAVIRT_SPINLOCKS=y
CONFIG_KVM_GUEST=y
CONFIG_ARCH_CPUIDLE_HALTPOLL=y
CONFIG_PVH=y
# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set
CONFIG_JAILHOUSE_GUEST=y
CONFIG_ACRN_GUEST=y
CONFIG_INTEL_TDX_GUEST=y
# CONFIG_GART_IOMMU is not set
CONFIG_NR_CPUS=64
# CONFIG_X86_MCE_INJECT is not set
@@ -63,14 +52,7 @@ CONFIG_IO_DELAY_NONE=y
##
## file: arch/x86/xen/Kconfig
##
CONFIG_XEN=y
CONFIG_XEN_PV=y
CONFIG_XEN_512GB=y
CONFIG_XEN_PVHVM_GUEST=y
# CONFIG_XEN_DEBUG_FS is not set
CONFIG_XEN_PVH=y
# CONFIG_XEN_DOM0 is not set
CONFIG_XEN_PV_MSR_SAFE=y
##
## file: block/Kconfig
@@ -110,9 +92,6 @@ CONFIG_XEN_PV_MSR_SAFE=y
## file: crypto/Kconfig
##
CONFIG_CRYPTO_ECDH=m
CONFIG_CRYPTO_ECDSA=m
CONFIG_CRYPTO_CTS=m
CONFIG_CRYPTO_XTS=m
CONFIG_CRYPTO_DEFLATE=m
CONFIG_CRYPTO_842=m
CONFIG_CRYPTO_LZ4=m
@@ -152,7 +131,8 @@ CONFIG_CRYPTO_ZSTD=m
CONFIG_ATA=m
# CONFIG_ATA_ACPI is not set
# CONFIG_SATA_PMP is not set
# CONFIG_SATA_AHCI is not set
CONFIG_SATA_AHCI=m
CONFIG_SATA_MOBILE_LPM_POLICY=0
# CONFIG_SATA_AHCI_PLATFORM is not set
# CONFIG_AHCI_DWC is not set
# CONFIG_SATA_ACARD_AHCI is not set
@@ -221,8 +201,6 @@ CONFIG_ATA=m
## file: drivers/block/Kconfig
##
# CONFIG_ATA_OVER_ETH is not set
CONFIG_XEN_BLKDEV_FRONTEND=m
CONFIG_XEN_BLKDEV_BACKEND=m
##
## file: drivers/block/mtip32xx/Kconfig
@@ -268,7 +246,6 @@ CONFIG_TCG_TIS=m
# CONFIG_TCG_NSC is not set
# CONFIG_TCG_ATMEL is not set
# CONFIG_TCG_INFINEON is not set
CONFIG_TCG_XEN=m
CONFIG_TCG_CRB=m
##
@@ -294,12 +271,6 @@ CONFIG_TCG_CRB=m
CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y
## end choice
##
## file: drivers/cpuidle/Kconfig
##
CONFIG_CPU_IDLE_GOV_HALTPOLL=y
CONFIG_HALTPOLL_CPUIDLE=y
##
## file: drivers/crypto/Kconfig
##
@@ -333,6 +304,7 @@ CONFIG_HALTPOLL_CPUIDLE=y
##
CONFIG_CXL_BUS=y
# CONFIG_CXL_MEM_RAW_COMMANDS is not set
# CONFIG_CXL_FEATURES is not set
##
## file: drivers/devfreq/Kconfig
@@ -353,6 +325,7 @@ CONFIG_CXL_BUS=y
##
## file: drivers/dma/amd/Kconfig
##
# CONFIG_AMD_PTDMA is not set
# CONFIG_AMD_QDMA is not set
##
@@ -371,11 +344,6 @@ CONFIG_CXL_BUS=y
##
# CONFIG_INTEL_LDMA is not set
##
## file: drivers/dma/ptdma/Kconfig
##
# CONFIG_AMD_PTDMA is not set
##
## file: drivers/dma/qcom/Kconfig
##
@@ -429,6 +397,11 @@ CONFIG_GOOGLE_COREBOOT_TABLE=m
CONFIG_GOOGLE_FRAMEBUFFER_COREBOOT=m
CONFIG_GOOGLE_VPD=m
##
## file: drivers/fwctl/Kconfig
##
# CONFIG_FWCTL is not set
##
## file: drivers/gnss/Kconfig
##
@@ -472,10 +445,7 @@ CONFIG_GOOGLE_VPD=m
##
## file: drivers/hv/Kconfig
##
CONFIG_HYPERV=m
# CONFIG_HYPERV_VTL_MODE is not set
CONFIG_HYPERV_UTILS=m
CONFIG_HYPERV_BALLOON=m
# CONFIG_MSHV_ROOT is not set
##
## file: drivers/hwmon/Kconfig
@@ -688,7 +658,6 @@ CONFIG_INFINIBAND_SRPT=m
# CONFIG_SERIO_ALTERA_PS2 is not set
# CONFIG_SERIO_PS2MULT is not set
# CONFIG_SERIO_ARC_PS2 is not set
CONFIG_HYPERV_KEYBOARD=m
# CONFIG_USERIO is not set
##
@@ -706,12 +675,6 @@ CONFIG_HYPERV_KEYBOARD=m
##
# CONFIG_INTERCONNECT is not set
##
## file: drivers/iommu/Kconfig
##
CONFIG_HYPERV_IOMMU=y
CONFIG_VIRTIO_IOMMU=y
##
## file: drivers/iommu/iommufd/Kconfig
##
@@ -784,6 +747,7 @@ CONFIG_FUSION_FC=m
##
## file: drivers/mfd/Kconfig
##
# CONFIG_MFD_CGBC is not set
# CONFIG_MFD_MADERA is not set
# CONFIG_MFD_INTEL_LPSS_ACPI is not set
# CONFIG_MFD_INTEL_LPSS_PCI is not set
@@ -796,6 +760,8 @@ CONFIG_FUSION_FC=m
# CONFIG_MFD_TQMX86 is not set
# CONFIG_MFD_VX855 is not set
# CONFIG_RAVE_SP_CORE is not set
# CONFIG_MFD_QNAP_MCU is not set
# CONFIG_MFD_UPBOARD_FPGA is not set
# CONFIG_MFD_STEAMDECK is not set
##
@@ -806,7 +772,6 @@ CONFIG_FUSION_FC=m
# CONFIG_TIFM_CORE is not set
# CONFIG_ENCLOSURE_SERVICES is not set
# CONFIG_HP_ILO is not set
CONFIG_VMWARE_BALLOON=m
# CONFIG_SRAM is not set
# CONFIG_DW_XDATA_PCIE is not set
# CONFIG_XILINX_SDFEC is not set
@@ -838,11 +803,6 @@ CONFIG_VMWARE_BALLOON=m
##
# CONFIG_EEPROM_93CX6 is not set
##
## file: drivers/misc/keba/Kconfig
##
# CONFIG_KEBA_CP500 is not set
##
## file: drivers/misc/mei/Kconfig
##
@@ -866,8 +826,6 @@ CONFIG_VMWARE_BALLOON=m
##
## file: drivers/net/Kconfig
##
CONFIG_XEN_NETDEV_FRONTEND=m
CONFIG_XEN_NETDEV_BACKEND=m
# CONFIG_FUJITSU_ES is not set
##
@@ -1010,6 +968,11 @@ CONFIG_BE2NET_SKYHAWK=y
##
# CONFIG_NET_VENDOR_FUNGIBLE is not set
##
## file: drivers/net/ethernet/hisilicon/Kconfig
##
# CONFIG_NET_VENDOR_HISILICON is not set
##
## file: drivers/net/ethernet/huawei/Kconfig
##
@@ -1080,11 +1043,6 @@ CONFIG_FBNIC=m
##
# CONFIG_NET_VENDOR_MICROCHIP is not set
##
## file: drivers/net/ethernet/microsoft/Kconfig
##
CONFIG_MICROSOFT_MANA=m
##
## file: drivers/net/ethernet/mscc/Kconfig
##
@@ -1250,11 +1208,6 @@ CONFIG_MICROSOFT_MANA=m
##
# CONFIG_NET_VENDOR_XILINX is not set
##
## file: drivers/net/hyperv/Kconfig
##
CONFIG_HYPERV_NET=m
##
## file: drivers/net/mdio/Kconfig
##
@@ -1292,7 +1245,6 @@ CONFIG_HYPERV_NET=m
# CONFIG_MARVELL_88Q2XXX_PHY is not set
# CONFIG_MARVELL_88X2222_PHY is not set
# CONFIG_MAXLINEAR_GPHY is not set
# CONFIG_MEDIATEK_GE_PHY is not set
# CONFIG_MICREL_PHY is not set
# CONFIG_MICROCHIP_T1S_PHY is not set
# CONFIG_MICROCHIP_PHY is not set
@@ -1305,7 +1257,6 @@ CONFIG_HYPERV_NET=m
# CONFIG_NXP_TJA11XX_PHY is not set
# CONFIG_NCN26000_PHY is not set
# CONFIG_QSEMI_PHY is not set
# CONFIG_REALTEK_PHY is not set
# CONFIG_RENESAS_PHY is not set
# CONFIG_ROCKCHIP_PHY is not set
# CONFIG_SMSC_PHY is not set
@@ -1326,12 +1277,22 @@ CONFIG_HYPERV_NET=m
##
# CONFIG_AQUANTIA_PHY is not set
##
## file: drivers/net/phy/mediatek/Kconfig
##
# CONFIG_MEDIATEK_GE_PHY is not set
##
## file: drivers/net/phy/qcom/Kconfig
##
# CONFIG_QCA83XX_PHY is not set
# CONFIG_QCA808X_PHY is not set
##
## file: drivers/net/phy/realtek/Kconfig
##
# CONFIG_REALTEK_PHY is not set
##
## file: drivers/net/ppp/Kconfig
##
@@ -1395,15 +1356,12 @@ CONFIG_NVME_TARGET_FC=m
##
## file: drivers/pci/Kconfig
##
CONFIG_XEN_PCIDEV_FRONTEND=m
# CONFIG_PCI_P2PDMA is not set
CONFIG_PCI_HYPERV=m
# CONFIG_PCIE_TPH is not set
##
## file: drivers/pci/controller/Kconfig
##
# CONFIG_VMD is not set
CONFIG_PCI_HYPERV_INTERFACE=m
##
## file: drivers/pci/controller/dwc/Kconfig
@@ -1416,6 +1374,7 @@ CONFIG_PCI_HYPERV_INTERFACE=m
##
# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
# CONFIG_HOTPLUG_PCI_CPCI is not set
# CONFIG_HOTPLUG_PCI_OCTEONEP is not set
# CONFIG_HOTPLUG_PCI_SHPC is not set
##
@@ -1427,6 +1386,11 @@ CONFIG_PCIEASPM_DEFAULT=y
# CONFIG_PCIEASPM_POWERSAVE is not set
## end choice
##
## file: drivers/pci/pwrctrl/Kconfig
##
# CONFIG_PCI_PWRCTL_SLOT is not set
##
## file: drivers/pci/switch/Kconfig
##
@@ -1516,13 +1480,16 @@ CONFIG_PCIEASPM_DEFAULT=y
##
CONFIG_PPS=m
##
## file: drivers/pps/generators/Kconfig
##
# CONFIG_PPS_GENERATOR_TIO is not set
##
## file: drivers/ptp/Kconfig
##
# CONFIG_DP83640_PHY is not set
# CONFIG_PTP_1588_CLOCK_INES is not set
CONFIG_PTP_1588_CLOCK_KVM=m
CONFIG_PTP_1588_CLOCK_VMW=m
##
## file: drivers/pwm/Kconfig
@@ -1582,8 +1549,6 @@ CONFIG_SCSI_FC_ATTRS=m
CONFIG_SCSI_SRP_ATTRS=m
CONFIG_SCSI_BUSLOGIC=m
# CONFIG_SCSI_FLASHPOINT is not set
CONFIG_XEN_SCSI_FRONTEND=m
CONFIG_HYPERV_STORAGE=m
# CONFIG_LIBFC is not set
CONFIG_SCSI_IPR=m
# CONFIG_SCSI_IPR_TRACE is not set
@@ -1636,11 +1601,6 @@ CONFIG_SCSI_MPI3MR=m
##
# CONFIG_SOC_TI is not set
##
## file: drivers/soundwire/Kconfig
##
# CONFIG_SOUNDWIRE is not set
##
## file: drivers/spi/Kconfig
##
@@ -1678,6 +1638,7 @@ CONFIG_SCSI_MPI3MR=m
# CONFIG_THERMAL_DEBUGFS is not set
# CONFIG_THERMAL_CORE_TESTING is not set
# CONFIG_THERMAL_GOV_BANG_BANG is not set
# CONFIG_PCIE_THERMAL is not set
##
## file: drivers/thunderbolt/Kconfig
@@ -1691,12 +1652,6 @@ CONFIG_SCSI_MPI3MR=m
# CONFIG_N_GSM is not set
# CONFIG_NOZOMI is not set
##
## file: drivers/tty/hvc/Kconfig
##
CONFIG_HVC_XEN=y
CONFIG_HVC_XEN_FRONTEND=y
##
## file: drivers/tty/serial/Kconfig
##
@@ -1720,6 +1675,7 @@ CONFIG_HVC_XEN_FRONTEND=y
# CONFIG_SERIAL_8250_RSA is not set
# CONFIG_SERIAL_8250_RT288X is not set
# CONFIG_SERIAL_8250_MID is not set
# CONFIG_SERIAL_8250_NI is not set
##
## file: drivers/ufs/Kconfig
@@ -1734,7 +1690,6 @@ CONFIG_HVC_XEN_FRONTEND=y
# CONFIG_UIO_SERCOS3 is not set
# CONFIG_UIO_NETX is not set
# CONFIG_UIO_MF624 is not set
CONFIG_UIO_HV_GENERIC=m
##
## file: drivers/usb/Kconfig
@@ -1763,34 +1718,17 @@ CONFIG_UIO_HV_GENERIC=m
##
CONFIG_FB_CIRRUS=m
CONFIG_FB_UVESA=m
CONFIG_XEN_FBDEV_FRONTEND=y
CONFIG_FB_HYPERV=m
##
## file: drivers/video/fbdev/core/Kconfig
##
# CONFIG_FB_DEVICE is not set
##
## file: drivers/virt/acrn/Kconfig
##
CONFIG_ACRN_HSM=m
##
## file: drivers/virt/coco/tdx-guest/Kconfig
##
CONFIG_TDX_GUEST_DRIVER=m
##
## file: drivers/virt/vboxguest/Kconfig
##
# CONFIG_VBOXGUEST is not set
##
## file: drivers/virtio/Kconfig
##
CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
##
## file: drivers/w1/Kconfig
##
@@ -1804,6 +1742,7 @@ CONFIG_WATCHDOG_PRETIMEOUT_GOV_NOOP=m
CONFIG_WATCHDOG_PRETIMEOUT_GOV_PANIC=m
CONFIG_SOFT_WATCHDOG_PRETIMEOUT=y
# CONFIG_LENOVO_SE10_WDT is not set
# CONFIG_LENOVO_SE30_WDT is not set
# CONFIG_XILINX_WATCHDOG is not set
# CONFIG_CADENCE_WATCHDOG is not set
# CONFIG_DW_WATCHDOG is not set
@@ -1830,7 +1769,6 @@ CONFIG_SOFT_WATCHDOG_PRETIMEOUT=y
# CONFIG_PC87413_WDT is not set
# CONFIG_NV_TCO is not set
# CONFIG_60XX_WDT is not set
# CONFIG_CPU5_WDT is not set
# CONFIG_SMSC_SCH311X_WDT is not set
# CONFIG_SMSC37B787_WDT is not set
# CONFIG_TQMX86_WDT is not set
@@ -1842,35 +1780,8 @@ CONFIG_SOFT_WATCHDOG_PRETIMEOUT=y
# CONFIG_SBC_EPX_C3_WATCHDOG is not set
# CONFIG_NI903X_WDT is not set
# CONFIG_NIC7018_WDT is not set
CONFIG_XEN_WDT=m
# CONFIG_PCIPCWATCHDOG is not set
##
## file: drivers/xen/Kconfig
##
CONFIG_XEN_BALLOON=y
CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y
CONFIG_XEN_MEMORY_HOTPLUG_LIMIT=512
CONFIG_XEN_SCRUB_PAGES_DEFAULT=y
CONFIG_XEN_DEV_EVTCHN=m
CONFIG_XEN_BACKEND=y
CONFIG_XENFS=m
CONFIG_XEN_COMPAT_XENFS=y
CONFIG_XEN_SYS_HYPERVISOR=y
CONFIG_XEN_GNTDEV=m
CONFIG_XEN_GNTDEV_DMABUF=y
CONFIG_XEN_GRANT_DEV_ALLOC=m
CONFIG_XEN_GRANT_DMA_ALLOC=y
CONFIG_XEN_PCIDEV_BACKEND=m
# CONFIG_XEN_PVCALLS_FRONTEND is not set
# CONFIG_XEN_PVCALLS_BACKEND is not set
CONFIG_XEN_SCSI_BACKEND=m
CONFIG_XEN_PRIVCMD=m
CONFIG_XEN_PRIVCMD_EVENTFD=y
CONFIG_XEN_UNPOPULATED_ALLOC=y
CONFIG_XEN_VIRTIO=y
# CONFIG_XEN_VIRTIO_FORCE_GRANT is not set
##
## file: fs/Kconfig
##
@@ -1896,11 +1807,6 @@ CONFIG_XEN_VIRTIO=y
##
# CONFIG_BFS_FS is not set
##
## file: fs/btrfs/Kconfig
##
# CONFIG_BTRFS_FS is not set
##
## file: fs/coda/Kconfig
##
@@ -1936,12 +1842,6 @@ CONFIG_XEN_VIRTIO=y
##
# CONFIG_VXFS_FS is not set
##
## file: fs/fuse/Kconfig
##
CONFIG_FUSE_FS=m
CONFIG_VIRTIO_FS=m
##
## file: fs/gfs2/Kconfig
##
@@ -2057,11 +1957,6 @@ CONFIG_PROC_VMCORE=y
##
# CONFIG_QNX6FS_FS is not set
##
## file: fs/reiserfs/Kconfig
##
# CONFIG_REISERFS_FS is not set
##
## file: fs/romfs/Kconfig
##
@@ -2072,11 +1967,6 @@ CONFIG_PROC_VMCORE=y
##
# CONFIG_CIFS is not set
##
## file: fs/sysv/Kconfig
##
# CONFIG_SYSV_FS is not set
##
## file: fs/ufs/Kconfig
##
@@ -2114,7 +2004,7 @@ CONFIG_CRASH_MAX_MEMORY_RANGES=8192
##
## choice: Preemption Model
CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT_LAZY is not set
## end choice
# CONFIG_SCHED_CORE is not set
@@ -2127,7 +2017,6 @@ CONFIG_PREEMPT_NONE=y
## file: kernel/power/Kconfig
##
# CONFIG_PM_DEBUG is not set
# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
##
## file: kernel/rcu/Kconfig
@@ -2167,7 +2056,6 @@ CONFIG_PANIC_TIMEOUT=5
# CONFIG_FUNCTION_ERROR_INJECTION is not set
# CONFIG_RUNTIME_TESTING_MENU is not set
# CONFIG_MEMTEST is not set
# CONFIG_HYPERV_TESTING is not set
##
## file: lib/Kconfig.kfence
@@ -2178,7 +2066,7 @@ CONFIG_PANIC_TIMEOUT=5
## file: mm/Kconfig
##
# CONFIG_ZSWAP is not set
CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=y
CONFIG_ZSMALLOC=m
# CONFIG_HWPOISON_INJECT is not set
# CONFIG_NUMA_EMU is not set
@@ -2247,17 +2135,6 @@ CONFIG_MAX_SKB_FRAGS=19
##
# CONFIG_CAN is not set
##
## file: net/dccp/Kconfig
##
# CONFIG_IP_DCCP_DEBUG is not set
##
## file: net/dccp/ccids/Kconfig
##
# CONFIG_IP_DCCP_CCID2_DEBUG is not set
# CONFIG_IP_DCCP_CCID3_DEBUG is not set
##
## file: net/ieee802154/Kconfig
##
@@ -2415,11 +2292,6 @@ CONFIG_SUNRPC_XPRT_RDMA=m
##
CONFIG_TIPC_MEDIA_IB=y
##
## file: net/vmw_vsock/Kconfig
##
CONFIG_HYPERV_VSOCKETS=m
##
## file: net/x25/Kconfig
##
@@ -2445,6 +2317,7 @@ CONFIG_IPE_PROP_DM_VERITY_SIGNATURE=y
## file: security/keys/Kconfig
##
# CONFIG_KEYS_REQUEST_CACHE is not set
# CONFIG_BIG_KEYS is not set
# CONFIG_TRUSTED_KEYS is not set
# CONFIG_USER_DECRYPTED_DATA is not set
@@ -2462,16 +2335,26 @@ CONFIG_ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION=y
CONFIG_ARCH_SELECTS_KEXEC_FILE=y
CONFIG_BLK_DEV_RNBD=y
CONFIG_CRASH_RESERVE=y
CONFIG_CRYPTO_ECC=m
CONFIG_CRYPTO_CHACHA20_X86_64=m
CONFIG_CRYPTO_LIB_AESCFB=m
CONFIG_CRYPTO_LIB_CHACHA=m
CONFIG_CRYPTO_LIB_CHACHA20POLY1305=m
CONFIG_CRYPTO_LIB_CHACHA_GENERIC=m
CONFIG_CRYPTO_LIB_CHACHA_INTERNAL=m
CONFIG_CRYPTO_LIB_POLY1305=m
CONFIG_CRYPTO_LIB_POLY1305_GENERIC=m
CONFIG_CRYPTO_LIB_POLY1305_INTERNAL=m
CONFIG_CRYPTO_POLY1305_X86_64=m
CONFIG_CXL_PORT=y
CONFIG_FB_IOMEM_HELPERS_DEFERRED=y
CONFIG_HVC_IRQ=y
CONFIG_HYPERV_TIMER=y
CONFIG_INFINIBAND_ADDR_TRANS_CONFIGFS=y
CONFIG_INFINIBAND_RTRS=m
CONFIG_INFINIBAND_USER_MEM=y
CONFIG_INFINIBAND_VIRT_DMA=y
CONFIG_INLINE_READ_UNLOCK=y
CONFIG_INLINE_READ_UNLOCK_IRQ=y
CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
CONFIG_INLINE_WRITE_UNLOCK=y
CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
CONFIG_IP_VS_PROTO_AH_ESP=y
CONFIG_KEXEC_CORE=y
CONFIG_LZ4HC_COMPRESS=m
@@ -2481,28 +2364,10 @@ CONFIG_ND_BTT=m
CONFIG_ND_PFN=m
CONFIG_NETFS_SUPPORT=m
# CONFIG_NVMEM_LAYOUTS is not set
CONFIG_PARAVIRT_CLOCK=y
CONFIG_PARAVIRT_XXL=y
CONFIG_PCI_XEN=y
CONFIG_PREEMPT_NONE_BUILD=y
CONFIG_RATIONAL=m
CONFIG_SCSI_COMMON=m
CONFIG_SCSI_MOD=m
CONFIG_SCSI_NETLINK=y
CONFIG_SWIOTLB_XEN=y
CONFIG_SYS_HYPERVISOR=y
CONFIG_TCG_TIS_CORE=m
CONFIG_X86_HV_CALLBACK_VECTOR=y
CONFIG_XEN_ACPI=y
CONFIG_XEN_AUTO_XLATE=y
CONFIG_XEN_EFI=y
CONFIG_XEN_GRANT_DMA_OPS=y
CONFIG_XEN_HAVE_PVMMU=y
CONFIG_XEN_HAVE_VPMU=y
CONFIG_XEN_PCI_STUB=y
CONFIG_XEN_PVHVM=y
CONFIG_XEN_PVHVM_SMP=y
CONFIG_XEN_PV_SMP=y
CONFIG_XEN_SAVE_RESTORE=y
CONFIG_XEN_XENBUS_FRONTEND=y
CONFIG_ZSTD_COMPRESS=m

File diff suppressed because it is too large Load Diff

View File

@@ -11,22 +11,11 @@
CONFIG_X86_EXTENDED_PLATFORM=y
# CONFIG_X86_NUMACHIP is not set
# CONFIG_X86_VSMP is not set
CONFIG_X86_GOLDFISH=y
# CONFIG_X86_INTEL_MID is not set
CONFIG_X86_GOLDFISH=y
# CONFIG_X86_INTEL_LPSS is not set
# CONFIG_X86_AMD_PLATFORM_DEVICE is not set
CONFIG_IOSF_MBI=m
CONFIG_HYPERVISOR_GUEST=y
CONFIG_PARAVIRT=y
# CONFIG_PARAVIRT_DEBUG is not set
CONFIG_PARAVIRT_SPINLOCKS=y
CONFIG_KVM_GUEST=y
CONFIG_ARCH_CPUIDLE_HALTPOLL=y
CONFIG_PVH=y
# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set
CONFIG_JAILHOUSE_GUEST=y
CONFIG_ACRN_GUEST=y
CONFIG_INTEL_TDX_GUEST=y
# CONFIG_GART_IOMMU is not set
CONFIG_NR_CPUS=256
# CONFIG_X86_MCE_INJECT is not set
@@ -68,14 +57,7 @@ CONFIG_IO_DELAY_NONE=y
##
## file: arch/x86/xen/Kconfig
##
CONFIG_XEN=y
CONFIG_XEN_PV=y
CONFIG_XEN_512GB=y
CONFIG_XEN_PVHVM_GUEST=y
# CONFIG_XEN_DEBUG_FS is not set
CONFIG_XEN_PVH=y
# CONFIG_XEN_DOM0 is not set
CONFIG_XEN_PV_MSR_SAFE=y
##
## file: block/Kconfig
@@ -115,9 +97,6 @@ CONFIG_XEN_PV_MSR_SAFE=y
## file: crypto/Kconfig
##
CONFIG_CRYPTO_ECDH=m
CONFIG_CRYPTO_ECDSA=m
CONFIG_CRYPTO_CTS=m
CONFIG_CRYPTO_XTS=m
CONFIG_CRYPTO_DEFLATE=m
CONFIG_CRYPTO_842=m
CONFIG_CRYPTO_LZ4=m
@@ -167,7 +146,8 @@ CONFIG_ANDROID_BINDER_DEVICES="binder"
CONFIG_ATA=m
# CONFIG_ATA_ACPI is not set
# CONFIG_SATA_PMP is not set
# CONFIG_SATA_AHCI is not set
CONFIG_SATA_AHCI=m
CONFIG_SATA_MOBILE_LPM_POLICY=0
# CONFIG_SATA_AHCI_PLATFORM is not set
# CONFIG_AHCI_DWC is not set
# CONFIG_SATA_ACARD_AHCI is not set
@@ -236,8 +216,6 @@ CONFIG_ATA=m
## file: drivers/block/Kconfig
##
# CONFIG_ATA_OVER_ETH is not set
CONFIG_XEN_BLKDEV_FRONTEND=m
CONFIG_XEN_BLKDEV_BACKEND=m
##
## file: drivers/block/mtip32xx/Kconfig
@@ -294,7 +272,6 @@ CONFIG_TCG_TIS_I2C=m
# CONFIG_TCG_NSC is not set
# CONFIG_TCG_ATMEL is not set
# CONFIG_TCG_INFINEON is not set
CONFIG_TCG_XEN=m
CONFIG_TCG_CRB=m
##
@@ -339,12 +316,6 @@ CONFIG_INTERRUPT_CNT=m
CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y
## end choice
##
## file: drivers/cpuidle/Kconfig
##
CONFIG_CPU_IDLE_GOV_HALTPOLL=y
CONFIG_HALTPOLL_CPUIDLE=y
##
## file: drivers/crypto/Kconfig
##
@@ -380,6 +351,7 @@ CONFIG_HALTPOLL_CPUIDLE=y
##
CONFIG_CXL_BUS=y
# CONFIG_CXL_MEM_RAW_COMMANDS is not set
# CONFIG_CXL_FEATURES is not set
##
## file: drivers/devfreq/Kconfig
@@ -410,6 +382,7 @@ CONFIG_PM_DEVFREQ_EVENT=y
##
## file: drivers/dma/amd/Kconfig
##
# CONFIG_AMD_PTDMA is not set
# CONFIG_AMD_QDMA is not set
##
@@ -428,11 +401,6 @@ CONFIG_PM_DEVFREQ_EVENT=y
##
# CONFIG_INTEL_LDMA is not set
##
## file: drivers/dma/ptdma/Kconfig
##
# CONFIG_AMD_PTDMA is not set
##
## file: drivers/dma/qcom/Kconfig
##
@@ -459,6 +427,9 @@ CONFIG_EDAC_LEGACY_SYSFS=y
# CONFIG_EDAC_DEBUG is not set
CONFIG_EDAC_DECODE_MCE=y
CONFIG_EDAC_GHES=y
# CONFIG_EDAC_SCRUB is not set
# CONFIG_EDAC_ECS is not set
# CONFIG_EDAC_MEM_REPAIR is not set
# CONFIG_EDAC_AMD64 is not set
# CONFIG_EDAC_E752X is not set
# CONFIG_EDAC_I82975X is not set
@@ -516,6 +487,11 @@ CONFIG_GOOGLE_COREBOOT_TABLE=m
CONFIG_GOOGLE_FRAMEBUFFER_COREBOOT=m
CONFIG_GOOGLE_VPD=m
##
## file: drivers/fwctl/Kconfig
##
# CONFIG_FWCTL is not set
##
## file: drivers/gnss/Kconfig
##
@@ -530,12 +506,15 @@ CONFIG_GPIOLIB_FASTPATH_LIMIT=512
CONFIG_GPIO_SYSFS=y
CONFIG_GPIO_CDEV=y
CONFIG_GPIO_CDEV_V1=y
# CONFIG_GPIO_ALTERA is not set
# CONFIG_GPIO_AMDPT is not set
# CONFIG_GPIO_DWAPB is not set
CONFIG_GPIO_GENERIC_PLATFORM=m
# CONFIG_GPIO_GRANITERAPIDS is not set
CONFIG_GPIO_ICH=m
# CONFIG_GPIO_MB86S7X is not set
# CONFIG_GPIO_POLARFIRE_SOC is not set
# CONFIG_GPIO_XILINX is not set
# CONFIG_GPIO_AMD_FCH is not set
# CONFIG_GPIO_VX855 is not set
# CONFIG_GPIO_F7188X is not set
@@ -559,6 +538,7 @@ CONFIG_GPIO_SCH=m
# CONFIG_GPIO_PCI_IDIO_16 is not set
# CONFIG_GPIO_PCIE_IDIO_24 is not set
# CONFIG_GPIO_RDC321X is not set
# CONFIG_GPIO_MPSSE is not set
CONFIG_GPIO_AGGREGATOR=m
# CONFIG_GPIO_LATCH is not set
CONFIG_GPIO_MOCKUP=m
@@ -575,9 +555,6 @@ CONFIG_DRM=y
# CONFIG_DRM_PANIC is not set
# CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS is not set
# CONFIG_DRM_DEBUG_MODESET_LOCK is not set
CONFIG_DRM_FBDEV_EMULATION=y
CONFIG_DRM_FBDEV_OVERALLOC=100
# CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set
CONFIG_DRM_LOAD_EDID_FIRMWARE=y
CONFIG_DRM_VGEM=m
CONFIG_DRM_HYPERV=m
@@ -593,11 +570,27 @@ CONFIG_DRM_HYPERV=m
##
# CONFIG_DRM_AST is not set
##
## file: drivers/gpu/drm/bridge/Kconfig
##
# CONFIG_DRM_I2C_NXP_TDA998X is not set
##
## file: drivers/gpu/drm/bridge/analogix/Kconfig
##
# CONFIG_DRM_ANALOGIX_ANX78XX is not set
##
## file: drivers/gpu/drm/clients/Kconfig
##
CONFIG_DRM_FBDEV_EMULATION=y
CONFIG_DRM_FBDEV_OVERALLOC=100
# CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set
# CONFIG_DRM_CLIENT_LOG is not set
## choice: Default DRM Client
CONFIG_DRM_CLIENT_DEFAULT_FBDEV=y
## end choice
##
## file: drivers/gpu/drm/etnaviv/Kconfig
##
@@ -614,12 +607,9 @@ CONFIG_DRM_HYPERV=m
# CONFIG_DRM_GUD is not set
##
## file: drivers/gpu/drm/i2c/Kconfig
## file: drivers/gpu/drm/hisilicon/hibmc/Kconfig
##
# CONFIG_DRM_I2C_CH7006 is not set
# CONFIG_DRM_I2C_SIL164 is not set
# CONFIG_DRM_I2C_NXP_TDA998X is not set
# CONFIG_DRM_I2C_NXP_TDA9950 is not set
# CONFIG_DRM_HISI_HIBMC is not set
##
## file: drivers/gpu/drm/i915/Kconfig
@@ -654,6 +644,7 @@ CONFIG_DRM_QXL=m
##
## file: drivers/gpu/drm/tiny/Kconfig
##
# CONFIG_DRM_APPLETBDRM is not set
CONFIG_DRM_BOCHS=m
CONFIG_DRM_CIRRUS_QEMU=m
# CONFIG_DRM_GM12U320 is not set
@@ -743,6 +734,7 @@ CONFIG_HID_GENERIC=m
# CONFIG_HID_VIVALDI is not set
# CONFIG_HID_KEYTOUCH is not set
# CONFIG_HID_KYE is not set
# CONFIG_HID_KYSONA is not set
# CONFIG_HID_UCLOGIC is not set
# CONFIG_HID_WALTOP is not set
# CONFIG_HID_VIEWSONIC is not set
@@ -795,6 +787,7 @@ CONFIG_HID_HYPERV_MOUSE=m
# CONFIG_HID_TOPRE is not set
# CONFIG_HID_THRUSTMASTER is not set
# CONFIG_HID_UDRAW_PS3 is not set
# CONFIG_HID_UNIVERSAL_PIDFF is not set
# CONFIG_HID_WACOM is not set
# CONFIG_HID_XINMO is not set
# CONFIG_HID_ZEROPLUS is not set
@@ -827,6 +820,11 @@ CONFIG_I2C_HID_OF=m
##
# CONFIG_INTEL_ISH_HID is not set
##
## file: drivers/hid/intel-thc-hid/Kconfig
##
# CONFIG_INTEL_THC_HID is not set
##
## file: drivers/hid/usbhid/Kconfig
##
@@ -854,10 +852,7 @@ CONFIG_HSI_CHAR=m
##
## file: drivers/hv/Kconfig
##
CONFIG_HYPERV=m
# CONFIG_HYPERV_VTL_MODE is not set
CONFIG_HYPERV_UTILS=m
CONFIG_HYPERV_BALLOON=m
CONFIG_MSHV_ROOT=m
##
## file: drivers/hwmon/Kconfig
@@ -910,8 +905,10 @@ CONFIG_HWMON=y
# CONFIG_SENSORS_G762 is not set
# CONFIG_SENSORS_HIH6130 is not set
# CONFIG_SENSORS_HS3001 is not set
# CONFIG_SENSORS_HTU31 is not set
# CONFIG_SENSORS_I5500 is not set
# CONFIG_SENSORS_CORETEMP is not set
# CONFIG_SENSORS_ISL28022 is not set
# CONFIG_SENSORS_IT87 is not set
# CONFIG_SENSORS_JC42 is not set
# CONFIG_SENSORS_POWERZ is not set
@@ -969,6 +966,7 @@ CONFIG_HWMON=y
# CONFIG_SENSORS_NCT6683 is not set
# CONFIG_SENSORS_NCT6775 is not set
# CONFIG_SENSORS_NCT6775_I2C is not set
# CONFIG_SENSORS_NCT7363 is not set
# CONFIG_SENSORS_NCT7802 is not set
# CONFIG_SENSORS_NCT7904 is not set
# CONFIG_SENSORS_NPCM7XX is not set
@@ -1049,9 +1047,11 @@ CONFIG_SENSORS_PMBUS=m
# CONFIG_SENSORS_ADP1050 is not set
# CONFIG_SENSORS_BEL_PFE is not set
# CONFIG_SENSORS_BPA_RS600 is not set
# CONFIG_SENSORS_CRPS is not set
# CONFIG_SENSORS_DELTA_AHE50DC_FAN is not set
# CONFIG_SENSORS_FSP_3Y is not set
# CONFIG_SENSORS_DPS920AB is not set
# CONFIG_SENSORS_INA233 is not set
# CONFIG_SENSORS_INSPUR_IPSPS is not set
# CONFIG_SENSORS_IR35221 is not set
# CONFIG_SENSORS_IR36021 is not set
@@ -1089,6 +1089,7 @@ CONFIG_SENSORS_PMBUS=m
# CONFIG_SENSORS_Q54SJ108A2 is not set
# CONFIG_SENSORS_STPDDC60 is not set
# CONFIG_SENSORS_TDA38640 is not set
# CONFIG_SENSORS_TPS25990 is not set
# CONFIG_SENSORS_TPS40422 is not set
# CONFIG_SENSORS_TPS53679 is not set
# CONFIG_SENSORS_TPS546D24 is not set
@@ -1137,6 +1138,7 @@ CONFIG_I2C_ALGOPCA=m
# CONFIG_I2C_AMD756 is not set
# CONFIG_I2C_AMD8111 is not set
# CONFIG_I2C_AMD_MP2 is not set
# CONFIG_I2C_AMD_ASF is not set
CONFIG_I2C_I801=m
CONFIG_I2C_ISCH=m
CONFIG_I2C_ISMT=m
@@ -1432,7 +1434,6 @@ CONFIG_SERIO_PCIPS2=m
# CONFIG_SERIO_ALTERA_PS2 is not set
# CONFIG_SERIO_PS2MULT is not set
# CONFIG_SERIO_ARC_PS2 is not set
CONFIG_HYPERV_KEYBOARD=m
CONFIG_SERIO_GPIO_PS2=m
CONFIG_USERIO=m
@@ -1537,12 +1538,6 @@ CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
##
# CONFIG_INTERCONNECT is not set
##
## file: drivers/iommu/Kconfig
##
CONFIG_HYPERV_IOMMU=y
CONFIG_VIRTIO_IOMMU=y
##
## file: drivers/iommu/iommufd/Kconfig
##
@@ -1623,6 +1618,7 @@ CONFIG_FUSION_FC=m
# CONFIG_MFD_BCM590XX is not set
# CONFIG_MFD_BD9571MWV is not set
# CONFIG_MFD_AXP20X_I2C is not set
# CONFIG_MFD_CGBC is not set
# CONFIG_MFD_CS42L43_I2C is not set
# CONFIG_MFD_MADERA is not set
# CONFIG_PMIC_DA903X is not set
@@ -1648,6 +1644,7 @@ CONFIG_MFD_INTEL_PMC_BXT=m
# CONFIG_MFD_MAX14577 is not set
# CONFIG_MFD_MAX77541 is not set
# CONFIG_MFD_MAX77693 is not set
# CONFIG_MFD_MAX77705 is not set
# CONFIG_MFD_MAX77843 is not set
# CONFIG_MFD_MAX8907 is not set
# CONFIG_MFD_MAX8925 is not set
@@ -1659,7 +1656,6 @@ CONFIG_MFD_INTEL_PMC_BXT=m
# CONFIG_MFD_MENF21BMC is not set
# CONFIG_MFD_VIPERBOARD is not set
# CONFIG_MFD_RETU is not set
# CONFIG_MFD_PCF50633 is not set
# CONFIG_MFD_SY7636A is not set
# CONFIG_MFD_RDC321X is not set
# CONFIG_MFD_RT4831 is not set
@@ -1698,6 +1694,8 @@ CONFIG_MFD_INTEL_PMC_BXT=m
# CONFIG_MFD_ATC260X_I2C is not set
# CONFIG_MFD_CS40L50_I2C is not set
# CONFIG_RAVE_SP_CORE is not set
# CONFIG_MFD_QNAP_MCU is not set
# CONFIG_MFD_UPBOARD_FPGA is not set
# CONFIG_MFD_STEAMDECK is not set
##
@@ -1718,7 +1716,6 @@ CONFIG_MFD_INTEL_PMC_BXT=m
# CONFIG_SENSORS_APDS990X is not set
# CONFIG_HMC6352 is not set
# CONFIG_DS1682 is not set
CONFIG_VMWARE_BALLOON=m
# CONFIG_SRAM is not set
# CONFIG_DW_XDATA_PCIE is not set
# CONFIG_XILINX_SDFEC is not set
@@ -1780,11 +1777,6 @@ CONFIG_EEPROM_AT24=m
##
# CONFIG_INTEL_MEI is not set
##
## file: drivers/misc/ti-st/Kconfig
##
# CONFIG_TI_ST is not set
##
## file: drivers/mmc/Kconfig
##
@@ -1803,8 +1795,6 @@ CONFIG_EEPROM_AT24=m
##
## file: drivers/net/Kconfig
##
CONFIG_XEN_NETDEV_FRONTEND=m
CONFIG_XEN_NETDEV_BACKEND=m
# CONFIG_FUJITSU_ES is not set
##
@@ -1947,6 +1937,11 @@ CONFIG_BE2NET_SKYHAWK=y
##
# CONFIG_NET_VENDOR_FUNGIBLE is not set
##
## file: drivers/net/ethernet/hisilicon/Kconfig
##
# CONFIG_NET_VENDOR_HISILICON is not set
##
## file: drivers/net/ethernet/huawei/Kconfig
##
@@ -2017,11 +2012,6 @@ CONFIG_FBNIC=m
##
# CONFIG_NET_VENDOR_MICROCHIP is not set
##
## file: drivers/net/ethernet/microsoft/Kconfig
##
CONFIG_MICROSOFT_MANA=m
##
## file: drivers/net/ethernet/mscc/Kconfig
##
@@ -2187,16 +2177,12 @@ CONFIG_MICROSOFT_MANA=m
##
# CONFIG_NET_VENDOR_XILINX is not set
##
## file: drivers/net/hyperv/Kconfig
##
CONFIG_HYPERV_NET=m
##
## file: drivers/net/mctp/Kconfig
##
CONFIG_MCTP_SERIAL=m
CONFIG_MCTP_TRANSPORT_I2C=m
CONFIG_MCTP_TRANSPORT_USB=m
##
## file: drivers/net/mdio/Kconfig
@@ -2237,7 +2223,6 @@ CONFIG_MCTP_TRANSPORT_I2C=m
# CONFIG_MARVELL_88Q2XXX_PHY is not set
# CONFIG_MARVELL_88X2222_PHY is not set
# CONFIG_MAXLINEAR_GPHY is not set
# CONFIG_MEDIATEK_GE_PHY is not set
# CONFIG_MICREL_PHY is not set
# CONFIG_MICROCHIP_T1S_PHY is not set
# CONFIG_MICROCHIP_PHY is not set
@@ -2250,7 +2235,6 @@ CONFIG_MCTP_TRANSPORT_I2C=m
# CONFIG_NXP_TJA11XX_PHY is not set
# CONFIG_NCN26000_PHY is not set
# CONFIG_QSEMI_PHY is not set
# CONFIG_REALTEK_PHY is not set
# CONFIG_RENESAS_PHY is not set
# CONFIG_ROCKCHIP_PHY is not set
# CONFIG_SMSC_PHY is not set
@@ -2271,12 +2255,22 @@ CONFIG_MCTP_TRANSPORT_I2C=m
##
# CONFIG_AQUANTIA_PHY is not set
##
## file: drivers/net/phy/mediatek/Kconfig
##
# CONFIG_MEDIATEK_GE_PHY is not set
##
## file: drivers/net/phy/qcom/Kconfig
##
# CONFIG_QCA83XX_PHY is not set
# CONFIG_QCA808X_PHY is not set
##
## file: drivers/net/phy/realtek/Kconfig
##
# CONFIG_REALTEK_PHY is not set
##
## file: drivers/net/ppp/Kconfig
##
@@ -2366,15 +2360,12 @@ CONFIG_NVME_TARGET_FC=m
##
## file: drivers/pci/Kconfig
##
CONFIG_XEN_PCIDEV_FRONTEND=m
# CONFIG_PCI_P2PDMA is not set
CONFIG_PCI_HYPERV=m
CONFIG_PCIE_TPH=y
##
## file: drivers/pci/controller/Kconfig
##
# CONFIG_VMD is not set
CONFIG_PCI_HYPERV_INTERFACE=m
##
## file: drivers/pci/controller/dwc/Kconfig
@@ -2387,6 +2378,7 @@ CONFIG_PCI_HYPERV_INTERFACE=m
##
# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
# CONFIG_HOTPLUG_PCI_CPCI is not set
# CONFIG_HOTPLUG_PCI_OCTEONEP is not set
# CONFIG_HOTPLUG_PCI_SHPC is not set
##
@@ -2398,6 +2390,11 @@ CONFIG_PCIEASPM_DEFAULT=y
# CONFIG_PCIEASPM_POWERSAVE is not set
## end choice
##
## file: drivers/pci/pwrctrl/Kconfig
##
# CONFIG_PCI_PWRCTL_SLOT is not set
##
## file: drivers/pci/switch/Kconfig
##
@@ -2468,6 +2465,7 @@ CONFIG_WMI_BMOF=m
# CONFIG_GPD_POCKET_FAN is not set
# CONFIG_WIRELESS_HOTKEY is not set
# CONFIG_IBM_RTL is not set
# CONFIG_LENOVO_WMI_HOTKEY_UTILITIES is not set
# CONFIG_SENSORS_HDAPS is not set
# CONFIG_THINKPAD_LMI is not set
CONFIG_ACPI_QUICKSTART=m
@@ -2481,7 +2479,6 @@ CONFIG_MSI_WMI_PLATFORM=m
# CONFIG_ACPI_CMPC is not set
# CONFIG_TOPSTAR_LAPTOP is not set
CONFIG_SERIAL_MULTI_INSTANTIATE=m
# CONFIG_MLX_PLATFORM is not set
# CONFIG_INSPUR_PLATFORM_PROFILE is not set
# CONFIG_LENOVO_WMI_CAMERA is not set
# CONFIG_INTEL_IPS is not set
@@ -2492,10 +2489,15 @@ CONFIG_SERIAL_MULTI_INSTANTIATE=m
##
## file: drivers/platform/x86/amd/Kconfig
##
# CONFIG_AMD_HSMP is not set
# CONFIG_AMD_3D_VCACHE is not set
# CONFIG_AMD_WBRF is not set
##
## file: drivers/platform/x86/amd/hsmp/Kconfig
##
# CONFIG_AMD_HSMP_ACPI is not set
# CONFIG_AMD_HSMP_PLAT is not set
##
## file: drivers/platform/x86/amd/pmc/Kconfig
##
@@ -2625,16 +2627,19 @@ CONFIG_BATTERY_GOLDFISH=m
##
CONFIG_PPS=m
##
## file: drivers/pps/generators/Kconfig
##
CONFIG_PPS_GENERATOR_TIO=m
##
## file: drivers/ptp/Kconfig
##
# CONFIG_DP83640_PHY is not set
# CONFIG_PTP_1588_CLOCK_INES is not set
CONFIG_PTP_1588_CLOCK_KVM=m
# CONFIG_PTP_1588_CLOCK_IDT82P33 is not set
# CONFIG_PTP_1588_CLOCK_IDTCM is not set
# CONFIG_PTP_1588_CLOCK_FC3W is not set
CONFIG_PTP_1588_CLOCK_VMW=m
##
## file: drivers/pwm/Kconfig
@@ -2729,8 +2734,6 @@ CONFIG_SCSI_FC_ATTRS=m
CONFIG_SCSI_SRP_ATTRS=m
CONFIG_SCSI_BUSLOGIC=m
# CONFIG_SCSI_FLASHPOINT is not set
CONFIG_XEN_SCSI_FRONTEND=m
CONFIG_HYPERV_STORAGE=m
# CONFIG_LIBFC is not set
CONFIG_SCSI_IPR=m
# CONFIG_SCSI_IPR_TRACE is not set
@@ -2783,11 +2786,6 @@ CONFIG_SCSI_MPI3MR=m
##
# CONFIG_SOC_TI is not set
##
## file: drivers/soundwire/Kconfig
##
# CONFIG_SOUNDWIRE is not set
##
## file: drivers/spi/Kconfig
##
@@ -2809,25 +2807,15 @@ CONFIG_SCSI_MPI3MR=m
CONFIG_STAGING=y
##
## file: drivers/staging/fieldbus/Kconfig
## file: drivers/staging/gpib/Kconfig
##
# CONFIG_FIELDBUS_DEV is not set
##
## file: drivers/staging/gdm724x/Kconfig
##
# CONFIG_LTE_GDM724X is not set
# CONFIG_GPIB is not set
##
## file: drivers/staging/media/Kconfig
##
# CONFIG_STAGING_MEDIA is not set
##
## file: drivers/staging/rts5208/Kconfig
##
# CONFIG_RTS5208 is not set
##
## file: drivers/staging/sm750fb/Kconfig
##
@@ -2857,6 +2845,7 @@ CONFIG_THERMAL_DEBUGFS=y
# CONFIG_THERMAL_HWMON is not set
# CONFIG_THERMAL_GOV_BANG_BANG is not set
CONFIG_DEVFREQ_THERMAL=y
CONFIG_PCIE_THERMAL=y
##
## file: drivers/thunderbolt/Kconfig
@@ -2873,12 +2862,6 @@ CONFIG_GOLDFISH_TTY=m
# CONFIG_N_GSM is not set
# CONFIG_NOZOMI is not set
##
## file: drivers/tty/hvc/Kconfig
##
CONFIG_HVC_XEN=y
CONFIG_HVC_XEN_FRONTEND=y
##
## file: drivers/tty/serial/Kconfig
##
@@ -2904,6 +2887,7 @@ CONFIG_HVC_XEN_FRONTEND=y
# CONFIG_SERIAL_8250_RSA is not set
# CONFIG_SERIAL_8250_RT288X is not set
# CONFIG_SERIAL_8250_MID is not set
# CONFIG_SERIAL_8250_NI is not set
##
## file: drivers/ufs/Kconfig
@@ -2918,7 +2902,6 @@ CONFIG_HVC_XEN_FRONTEND=y
# CONFIG_UIO_SERCOS3 is not set
# CONFIG_UIO_NETX is not set
# CONFIG_UIO_MF624 is not set
CONFIG_UIO_HV_GENERIC=m
##
## file: drivers/usb/Kconfig
@@ -3175,35 +3158,17 @@ CONFIG_FB_UVESA=m
# CONFIG_FB_SMSCUFX is not set
# CONFIG_FB_UDL is not set
CONFIG_FB_GOLDFISH=m
CONFIG_XEN_FBDEV_FRONTEND=y
CONFIG_FB_HYPERV=m
# CONFIG_FB_SSD1307 is not set
##
## file: drivers/video/fbdev/core/Kconfig
##
CONFIG_FB_DEVICE=y
##
## file: drivers/virt/acrn/Kconfig
##
CONFIG_ACRN_HSM=m
##
## file: drivers/virt/coco/tdx-guest/Kconfig
##
CONFIG_TDX_GUEST_DRIVER=m
##
## file: drivers/virt/vboxguest/Kconfig
##
CONFIG_VBOXGUEST=m
##
## file: drivers/virtio/Kconfig
##
CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
##
## file: drivers/w1/Kconfig
##
@@ -3217,6 +3182,7 @@ CONFIG_WATCHDOG_PRETIMEOUT_GOV_NOOP=m
CONFIG_WATCHDOG_PRETIMEOUT_GOV_PANIC=m
CONFIG_SOFT_WATCHDOG_PRETIMEOUT=y
# CONFIG_LENOVO_SE10_WDT is not set
# CONFIG_LENOVO_SE30_WDT is not set
# CONFIG_XILINX_WATCHDOG is not set
# CONFIG_ZIIRAVE_WATCHDOG is not set
# CONFIG_CADENCE_WATCHDOG is not set
@@ -3244,7 +3210,6 @@ CONFIG_SOFT_WATCHDOG_PRETIMEOUT=y
# CONFIG_PC87413_WDT is not set
# CONFIG_NV_TCO is not set
# CONFIG_60XX_WDT is not set
# CONFIG_CPU5_WDT is not set
# CONFIG_SMSC_SCH311X_WDT is not set
# CONFIG_SMSC37B787_WDT is not set
# CONFIG_TQMX86_WDT is not set
@@ -3257,36 +3222,9 @@ CONFIG_SOFT_WATCHDOG_PRETIMEOUT=y
# CONFIG_NI903X_WDT is not set
# CONFIG_NIC7018_WDT is not set
# CONFIG_MEN_A21_WDT is not set
CONFIG_XEN_WDT=m
# CONFIG_PCIPCWATCHDOG is not set
# CONFIG_USBPCWATCHDOG is not set
##
## file: drivers/xen/Kconfig
##
CONFIG_XEN_BALLOON=y
CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y
CONFIG_XEN_MEMORY_HOTPLUG_LIMIT=512
CONFIG_XEN_SCRUB_PAGES_DEFAULT=y
CONFIG_XEN_DEV_EVTCHN=m
CONFIG_XEN_BACKEND=y
CONFIG_XENFS=m
CONFIG_XEN_COMPAT_XENFS=y
CONFIG_XEN_SYS_HYPERVISOR=y
CONFIG_XEN_GNTDEV=m
CONFIG_XEN_GNTDEV_DMABUF=y
CONFIG_XEN_GRANT_DEV_ALLOC=m
CONFIG_XEN_GRANT_DMA_ALLOC=y
CONFIG_XEN_PCIDEV_BACKEND=m
# CONFIG_XEN_PVCALLS_FRONTEND is not set
# CONFIG_XEN_PVCALLS_BACKEND is not set
CONFIG_XEN_SCSI_BACKEND=m
CONFIG_XEN_PRIVCMD=m
CONFIG_XEN_PRIVCMD_EVENTFD=y
CONFIG_XEN_UNPOPULATED_ALLOC=y
CONFIG_XEN_VIRTIO=y
# CONFIG_XEN_VIRTIO_FORCE_GRANT is not set
##
## file: fs/Kconfig
##
@@ -3320,16 +3258,6 @@ CONFIG_9P_FS_SECURITY=y
##
# CONFIG_BFS_FS is not set
##
## file: fs/btrfs/Kconfig
##
CONFIG_BTRFS_FS=m
CONFIG_BTRFS_FS_POSIX_ACL=y
# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set
# CONFIG_BTRFS_DEBUG is not set
# CONFIG_BTRFS_ASSERT is not set
# CONFIG_BTRFS_FS_REF_VERIFY is not set
##
## file: fs/coda/Kconfig
##
@@ -3381,12 +3309,6 @@ CONFIG_F2FS_UNFAIR_RWSEM=y
##
# CONFIG_VXFS_FS is not set
##
## file: fs/fuse/Kconfig
##
CONFIG_FUSE_FS=m
CONFIG_VIRTIO_FS=m
##
## file: fs/gfs2/Kconfig
##
@@ -3502,11 +3424,6 @@ CONFIG_OCFS2_DEBUG_MASKLOG=y
##
# CONFIG_QNX6FS_FS is not set
##
## file: fs/reiserfs/Kconfig
##
# CONFIG_REISERFS_FS is not set
##
## file: fs/romfs/Kconfig
##
@@ -3530,11 +3447,6 @@ CONFIG_CIFS_SWN_UPCALL=y
CONFIG_CIFS_FSCACHE=y
# CONFIG_CIFS_COMPRESSION is not set
##
## file: fs/sysv/Kconfig
##
# CONFIG_SYSV_FS is not set
##
## file: fs/ufs/Kconfig
##
@@ -3556,8 +3468,10 @@ CONFIG_VBOXSF_FS=m
CONFIG_DEFAULT_HOSTNAME="debian-vm"
CONFIG_LOG_BUF_SHIFT=17
CONFIG_LOG_CPU_MAX_BUF_SHIFT=12
# CONFIG_UCLAMP_TASK is not set
# CONFIG_RT_GROUP_SCHED is not set
CONFIG_UCLAMP_TASK=y
CONFIG_UCLAMP_BUCKETS_COUNT=10
CONFIG_RT_GROUP_SCHED=y
CONFIG_UCLAMP_TASK_GROUP=y
##
## file: kernel/Kconfig.kexec
@@ -3570,7 +3484,7 @@ CONFIG_LOG_CPU_MAX_BUF_SHIFT=12
##
## choice: Preemption Model
# CONFIG_PREEMPT_NONE is not set
CONFIG_PREEMPT_VOLUNTARY=y
CONFIG_PREEMPT_LAZY=y
## end choice
# CONFIG_SCHED_CORE is not set
@@ -3587,7 +3501,6 @@ CONFIG_PM_ADVANCED_DEBUG=y
# CONFIG_PM_TEST_SUSPEND is not set
# CONFIG_DPM_WATCHDOG is not set
# CONFIG_PM_TRACE_RTC is not set
# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
##
## file: kernel/rcu/Kconfig
@@ -3604,6 +3517,7 @@ CONFIG_PM_ADVANCED_DEBUG=y
##
CONFIG_BOOTTIME_TRACING=y
CONFIG_FUNCTION_GRAPH_RETVAL=y
# CONFIG_PREEMPT_TRACER is not set
CONFIG_SCHED_TRACER=y
CONFIG_HWLAT_TRACER=y
CONFIG_OSNOISE_TRACER=y
@@ -3630,6 +3544,7 @@ CONFIG_RAID6_PQ_BENCHMARK=y
# CONFIG_MEMORY_NOTIFIER_ERROR_INJECT is not set
CONFIG_PANIC_TIMEOUT=30
CONFIG_WQ_CPU_INTENSIVE_REPORT=y
# CONFIG_DEBUG_PREEMPT is not set
CONFIG_NMI_CHECK_CPU=y
# CONFIG_DEBUG_IRQFLAGS is not set
# CONFIG_DEBUG_LIST is not set
@@ -3639,7 +3554,6 @@ CONFIG_NETDEV_NOTIFIER_ERROR_INJECT=m
CONFIG_FUNCTION_ERROR_INJECTION=y
# CONFIG_RUNTIME_TESTING_MENU is not set
# CONFIG_MEMTEST is not set
# CONFIG_HYPERV_TESTING is not set
##
## file: lib/Kconfig.kfence
@@ -3666,13 +3580,9 @@ CONFIG_ZSWAP_SHRINKER_DEFAULT_ON=y
CONFIG_ZSWAP_COMPRESSOR_DEFAULT_ZSTD=y
## end choice
## choice: Default allocator
CONFIG_ZSWAP_ZPOOL_DEFAULT_ZBUD=y
# CONFIG_ZSWAP_ZPOOL_DEFAULT_Z3FOLD_DEPRECATED is not set
# CONFIG_ZSWAP_ZPOOL_DEFAULT_ZSMALLOC is not set
CONFIG_ZSWAP_ZPOOL_DEFAULT_ZSMALLOC=y
## end choice
CONFIG_ZBUD=y
CONFIG_Z3FOLD_DEPRECATED=m
CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=y
CONFIG_ZSMALLOC=y
# CONFIG_HWPOISON_INJECT is not set
CONFIG_NUMA_EMU=y
@@ -3746,17 +3656,6 @@ CONFIG_NET_9P_RDMA=m
##
# CONFIG_CAN is not set
##
## file: net/dccp/Kconfig
##
# CONFIG_IP_DCCP_DEBUG is not set
##
## file: net/dccp/ccids/Kconfig
##
# CONFIG_IP_DCCP_CCID2_DEBUG is not set
# CONFIG_IP_DCCP_CCID3_DEBUG is not set
##
## file: net/ieee802154/Kconfig
##
@@ -3962,11 +3861,6 @@ CONFIG_SUNRPC_XPRT_RDMA=m
##
CONFIG_TIPC_MEDIA_IB=y
##
## file: net/vmw_vsock/Kconfig
##
CONFIG_HYPERV_VSOCKETS=m
##
## file: net/x25/Kconfig
##
@@ -3992,6 +3886,7 @@ CONFIG_IPE_PROP_DM_VERITY_SIGNATURE=y
## file: security/keys/Kconfig
##
# CONFIG_KEYS_REQUEST_CACHE is not set
# CONFIG_BIG_KEYS is not set
# CONFIG_TRUSTED_KEYS is not set
# CONFIG_USER_DECRYPTED_DATA is not set
@@ -4008,23 +3903,37 @@ CONFIG_842_DECOMPRESS=m
CONFIG_ASYNC_MEMCPY=m
CONFIG_ASYNC_PQ=m
CONFIG_ASYNC_RAID6_RECOV=m
CONFIG_BLK_CGROUP_PUNT_BIO=y
CONFIG_BLK_DEV_RNBD=y
CONFIG_CHECK_SIGNATURE=y
CONFIG_CRYPTO_ECC=m
CONFIG_CRC_CCITT=m
CONFIG_CRYPTO_CHACHA20_X86_64=m
CONFIG_CRYPTO_LIB_AESCFB=m
CONFIG_CRYPTO_LIB_ARC4=m
CONFIG_CRYPTO_LIB_CHACHA=m
CONFIG_CRYPTO_LIB_CHACHA20POLY1305=m
CONFIG_CRYPTO_LIB_CHACHA_GENERIC=m
CONFIG_CRYPTO_LIB_CHACHA_INTERNAL=m
CONFIG_CRYPTO_LIB_POLY1305=m
CONFIG_CRYPTO_LIB_POLY1305_GENERIC=m
CONFIG_CRYPTO_LIB_POLY1305_INTERNAL=m
CONFIG_CRYPTO_POLY1305_X86_64=m
CONFIG_CXL_PORT=y
CONFIG_DEV_SYNC_PROBE=m
CONFIG_DRM_BRIDGE=y
CONFIG_DRM_CLIENT=y
CONFIG_DRM_CLIENT_DEFAULT="fbdev"
CONFIG_DRM_CLIENT_LIB=m
CONFIG_DRM_CLIENT_SELECTION=m
CONFIG_DRM_CLIENT_SETUP=y
CONFIG_DRM_EXEC=m
CONFIG_DRM_GEM_SHMEM_HELPER=m
CONFIG_DRM_KMS_HELPER=y
CONFIG_DRM_KMS_HELPER=m
CONFIG_DRM_PANEL=y
CONFIG_DRM_PANEL_BRIDGE=y
CONFIG_DRM_TTM=m
CONFIG_DRM_TTM_HELPER=m
CONFIG_DRM_VRAM_HELPER=m
CONFIG_DRM_XEN=y
CONFIG_FB_IOMEM_HELPERS_DEFERRED=y
CONFIG_GPIOLIB_IRQCHIP=y
CONFIG_GPIO_ACPI=y
CONFIG_GPIO_GENERIC=m
@@ -4032,8 +3941,6 @@ CONFIG_HAVE_CLK=y
CONFIG_HAVE_CLK_PREPARE=y
CONFIG_HDMI=y
CONFIG_HSI_BOARDINFO=y
CONFIG_HVC_IRQ=y
CONFIG_HYPERV_TIMER=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_HID_CORE=m
CONFIG_I2C_I801_MUX=y
@@ -4057,14 +3964,13 @@ CONFIG_NETFS_SUPPORT=y
CONFIG_NET_CLS=y
CONFIG_NLS_UCS2_UTILS=m
# CONFIG_NVMEM_LAYOUTS is not set
CONFIG_PARAVIRT_CLOCK=y
CONFIG_PARAVIRT_XXL=y
CONFIG_PCI_XEN=y
CONFIG_PM_CLK=y
CONFIG_PM_OPP=y
CONFIG_PM_SLEEP_DEBUG=y
CONFIG_PPPOE_HASH_BITS=4
CONFIG_PREEMPT_VOLUNTARY_BUILD=y
CONFIG_PREEMPTION=y
CONFIG_PREEMPT_BUILD=y
CONFIG_PREEMPT_COUNT=y
CONFIG_RAID6_PQ=m
CONFIG_RATIONAL=y
CONFIG_REGMAP=y
@@ -4078,11 +3984,11 @@ CONFIG_SCSI_NETLINK=y
CONFIG_SERIAL_MCTRL_GPIO=y
CONFIG_SLHC=m
CONFIG_SMBFS=m
CONFIG_SWIOTLB_XEN=y
CONFIG_SYS_HYPERVISOR=y
CONFIG_TASKS_RCU=y
CONFIG_TCG_TIS_CORE=m
CONFIG_TRACER_MAX_TRACE=y
CONFIG_TRACING_MAP=y
CONFIG_UNINLINE_SPIN_UNLOCK=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_COMMON=m
CONFIG_USB_EHCI_PCI=m
@@ -4090,22 +3996,8 @@ CONFIG_USB_PHY=y
CONFIG_USB_XHCI_PCI=m
CONFIG_VIDEOMODE_HELPERS=y
CONFIG_VIRTIO_DMA_SHARED_BUFFER=m
CONFIG_X86_HV_CALLBACK_VECTOR=y
CONFIG_XEN_ACPI=y
CONFIG_XEN_AUTO_XLATE=y
CONFIG_XEN_EFI=y
CONFIG_XEN_FRONT_PGDIR_SHBUF=m
CONFIG_XEN_GRANT_DMA_OPS=y
CONFIG_XEN_HAVE_PVMMU=y
CONFIG_XEN_HAVE_VPMU=y
CONFIG_XEN_PCI_STUB=y
CONFIG_XEN_PVHVM=y
CONFIG_XEN_PVHVM_SMP=y
CONFIG_XEN_PV_SMP=y
CONFIG_XEN_SAVE_RESTORE=y
CONFIG_XEN_XENBUS_FRONTEND=y
CONFIG_Z3FOLD=m
CONFIG_ZPOOL=y
CONFIG_ZSTD_COMPRESS=y
CONFIG_ZSWAP_COMPRESSOR_DEFAULT="zstd"
CONFIG_ZSWAP_ZPOOL_DEFAULT="zbud"
CONFIG_ZSWAP_ZPOOL_DEFAULT="zsmalloc"

399
debian/config/config vendored

File diff suppressed because it is too large Load Diff

116
debian/copyright vendored
View File

@@ -25,43 +25,43 @@ Copyright: 1996-2006 Manoj Srivastava
License: GPL-2
Files:
arch/arm/boot/dts/armada-370.dtsi
arch/arm/boot/dts/armada-370-d*.dts*
arch/arm/boot/dts/armada-370-mirabox.dts
arch/arm/boot/dts/armada-370-netgear*.dts*
arch/arm/boot/dts/armada-370-rd.dts
arch/arm/boot/dts/armada-370-synology-ds213j.dts
arch/arm/boot/dts/armada-375*.dts*
arch/arm/boot/dts/armada-38*.dts*
arch/arm/boot/dts/armada-39*.dts*
arch/arm/boot/dts/armada-xp*.dts*
arch/arm/boot/dts/artpec6.dtsi
arch/arm/boot/dts/at91sam9260ek.dts
arch/arm/boot/dts/at91sam9xe.dtsi
arch/arm/boot/dts/axp*.dts*
arch/arm/boot/dts/berlin2*.dts*
arch/arm/boot/dts/allwinner/axp*.dts*
arch/arm/boot/dts/allwinner/sun*.dts*
arch/arm/boot/dts/amlogic/meson*.dts*
arch/arm/boot/dts/arm/mps2*.dts*
arch/arm/boot/dts/axis/artpec6.dtsi
arch/arm/boot/dts/cnxt/cx92755*.dts*
arch/arm/boot/dts/cros-ec-sbs.dtsi
arch/arm/boot/dts/cx92755*.dts*
arch/arm/boot/dts/imx7*.dts*
arch/arm/boot/dts/kirkwood-linkstation*.dts*
arch/arm/boot/dts/ls*.dts*
arch/arm/boot/dts/meson*.dts*
arch/arm/boot/dts/mps2*.dts*
arch/arm/boot/dts/mvebu-linkstation-*.dts*
arch/arm/boot/dts/orion5x-kuroboxpro.dts
arch/arm/boot/dts/orion5x-linkstation*.dts*
arch/arm/boot/dts/orion5x-ls*.dts*
arch/arm/boot/dts/qcom-mdm9615*.dts*
arch/arm/boot/dts/rk*.dts
arch/arm/boot/dts/sama5d2.dtsi
arch/arm/boot/dts/sama5d4.dtsi
arch/arm/boot/dts/socfpga_cyclone5_vining_fpga.dts
arch/arm/boot/dts/stm*.dts*
arch/arm/boot/dts/sun*.dts*
arch/arm/boot/dts/tegra124-apalis*.dts*
arch/arm/boot/dts/uniphier-*.dts*
arch/arm/boot/dts/vf610-colibri*.dts*
arch/arm/boot/dts/vf610m*.dts*
arch/arm/boot/dts/intel/socfpga/socfpga_cyclone5_vining_fpga.dts
arch/arm/boot/dts/marvell/armada-370-d*.dts*
arch/arm/boot/dts/marvell/armada-370-mirabox.dts
arch/arm/boot/dts/marvell/armada-370-netgear*.dts*
arch/arm/boot/dts/marvell/armada-370-rd.dts
arch/arm/boot/dts/marvell/armada-370-synology-ds213j.dts
arch/arm/boot/dts/marvell/armada-370.dtsi
arch/arm/boot/dts/marvell/armada-375*.dts*
arch/arm/boot/dts/marvell/armada-38*.dts*
arch/arm/boot/dts/marvell/armada-39*.dts*
arch/arm/boot/dts/marvell/armada-xp*.dts*
arch/arm/boot/dts/marvell/kirkwood-linkstation*.dts*
arch/arm/boot/dts/marvell/mvebu-linkstation-*.dts*
arch/arm/boot/dts/marvell/orion5x-kuroboxpro.dts
arch/arm/boot/dts/marvell/orion5x-linkstation*.dts*
arch/arm/boot/dts/marvell/orion5x-ls*.dts*
arch/arm/boot/dts/microchip/at91sam9260ek.dts
arch/arm/boot/dts/microchip/at91sam9xe.dtsi
arch/arm/boot/dts/microchip/sama5d2.dtsi
arch/arm/boot/dts/microchip/sama5d4.dtsi
arch/arm/boot/dts/nvidia/tegra124-apalis*.dts*
arch/arm/boot/dts/nxp/imx/imx7*.dts*
arch/arm/boot/dts/nxp/ls/ls*.dts*
arch/arm/boot/dts/nxp/vf/vf610-colibri*.dts*
arch/arm/boot/dts/nxp/vf/vf610m*.dts*
arch/arm/boot/dts/qcom/qcom-mdm9615*.dts*
arch/arm/boot/dts/rockchip/rk*.dts
arch/arm/boot/dts/socionext/uniphier-*.dts*
arch/arm/boot/dts/st/stm*.dts*
arch/arm/boot/dts/synaptics/berlin2*.dts*
arch/arm64/boot/dts/allwinner/*.dts*
arch/arm64/boot/dts/amlogic/*.dts*
arch/arm64/boot/dts/cavium/thunder-*.dts*
@@ -78,48 +78,11 @@ Files:
Copyright: 2012-2018 Linus Torvalds and many others
License: GPL-2+-or-X11
Files: drivers/crypto/vmx/*.pl
Copyright: 2006,2014 Andy Polyakov <appro@openssl.org>
License: CRYPTOGAMS
All rights reserved.
.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
.
* Redistributions of source code must retain copyright notices, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the
distribution.
* Neither the name of the CRYPTOGAMS nor the names of its copyright
holder and contributors may be used to endorse or promote products
derived from this software without specific prior written
permission.
.
ALTERNATIVELY, provided that this notice is retained in full, this
product may be distributed under the terms of the GNU General Public
License (GPL), in which case the provisions of the GPL apply INSTEAD
OF those given above.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Files: fs/nls/mac-*
Copyright: 1991-2012 Unicode, Inc.
License: Unicode-data
All rights reserved. Distributed under the Terms of Use in
http://www.unicode.org/copyright.html.
https://www.unicode.org/copyright.html.
.
Permission is hereby granted, free of charge, to any person obtaining a
copy of the Unicode data files and any associated documentation (the "Data
@@ -228,8 +191,7 @@ License: GPL-2
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this package; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
along with this program. If not, see <https://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU General Public License version
2 can be found in `/usr/share/common-licenses/GPL-2'.
@@ -246,7 +208,7 @@ License: LGPL-2.1
Lesser General Public License for more details.
.
You should have received a copy of the GNU Lesser General Public License
along with this program; If not, see <http://www.gnu.org/licenses/>.
along with this program; If not, see <https://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU Lesser General Public
License version 2.1 can be found in `/usr/share/common-licenses/LGPL-2.1'.

View File

@@ -9,7 +9,7 @@ configure )
if [ ${have_systemd} = 1 ] ; then
if [ -z "$2" ] ; then
# On initial install make sure udev notifies systemd
udevadm trigger || true
udevadm trigger || :
else
# On upgrade make sure running daemons are restarted
systemctl try-restart hv-kvp-daemon.service hv-vss-daemon.service

View File

@@ -14,11 +14,11 @@ upgrade )
init_service="hyperv-daemons.hv-$i-daemon"
systemd_unit="${init_service}.service"
if [ ${have_systemd} = 1 ] ; then
systemctl stop "${systemd_unit}" 2>/dev/null || true
systemctl stop "${systemd_unit}" 2>/dev/null || :
fi
deb-systemd-helper purge "${systemd_unit}" || true
invoke-rc.d --skip-systemd-native "${init_service}" stop || true
update-rc.d "${init_service}" remove || true
deb-systemd-helper purge "${systemd_unit}" || :
invoke-rc.d --skip-systemd-native "${init_service}" stop || :
update-rc.d "${init_service}" remove || :
done ; unset services i init_service systemd_unit
;;
esac

View File

@@ -11,7 +11,6 @@ from pathlib import Path
from typing import (
Optional,
Self,
TypeVar,
)
import dacite
@@ -157,9 +156,6 @@ class ConfigBase:
return config
ConfigT = TypeVar('ConfigT', bound=ConfigBase)
@dataclasses.dataclass
class Config(ConfigBase):
# Disable basic fields
@@ -227,9 +223,9 @@ class Config(ConfigBase):
return config
@classmethod
def _read_hierarchy(
cls, bases: Iterable[Path], orig: Iterable[ConfigT],
) -> Iterable[ConfigT]:
def _read_hierarchy[T: ConfigBase](
cls, bases: Iterable[Path], orig: Iterable[T],
) -> Iterable[T]:
for i in orig:
try:
assert i.path is not None

View File

@@ -5,22 +5,16 @@ import re
from typing import (
Any,
Callable,
Generic,
IO,
Iterable,
Optional,
overload,
TypeVar,
TYPE_CHECKING,
)
_T = TypeVar('_T')
if TYPE_CHECKING:
from dataclasses import _DataclassT
else:
# We can only get to _DataclassT during type checking, use a generic type during runtime
_DataclassT = _T
from _typeshed import DataclassInstance as _DataclassInstance
__all__ = [
'field_deb822',
@@ -30,61 +24,61 @@ __all__ = [
]
class Deb822Field(Generic[_T]):
class Deb822Field[T]:
key: str
load: Optional[Callable[[str], _T]]
dump: Optional[Callable[[_T], str]]
load: Optional[Callable[[str], T]]
dump: Optional[Callable[[T], str]]
def __init__(
self, *,
key: str,
load: Optional[Callable[[str], _T]],
dump: Optional[Callable[[_T], str]],
load: Optional[Callable[[str], T]],
dump: Optional[Callable[[T], str]],
) -> None:
self.key = key
self.load = load
self.dump = dump
# The return type _T is technically wrong, but it allows checking if during
# The return type T is technically wrong, but it allows checking if during
# runtime we get the correct type.
@overload
def field_deb822(
def field_deb822[T](
deb822_key: str,
/, *,
deb822_load: Optional[Callable[[str], _T]] = None,
deb822_dump: Optional[Callable[[_T], str]] = str,
default: _T,
) -> _T:
deb822_load: Optional[Callable[[str], T]] = None,
deb822_dump: Optional[Callable[[T], str]] = str,
default: T,
) -> T:
...
@overload
def field_deb822(
def field_deb822[T](
deb822_key: str,
/, *,
deb822_load: Optional[Callable[[str], _T]] = None,
deb822_dump: Optional[Callable[[_T], str]] = str,
default_factory: Callable[[], _T],
) -> _T:
deb822_load: Optional[Callable[[str], T]] = None,
deb822_dump: Optional[Callable[[T], str]] = str,
default_factory: Callable[[], T],
) -> T:
...
@overload
def field_deb822(
def field_deb822[T](
deb822_key: str,
/, *,
deb822_load: Optional[Callable[[str], _T]] = None,
deb822_dump: Optional[Callable[[_T], str]] = str,
) -> _T:
deb822_load: Optional[Callable[[str], T]] = None,
deb822_dump: Optional[Callable[[T], str]] = str,
) -> T:
...
def field_deb822(
def field_deb822[T](
deb822_key: str,
/, *,
deb822_load: Optional[Callable[[str], _T]] = None,
deb822_dump: Optional[Callable[[_T], str]] = str,
deb822_load: Optional[Callable[[str], T]] = None,
deb822_dump: Optional[Callable[[T], str]] = str,
default: Any = dataclasses.MISSING,
default_factory: Any = dataclasses.MISSING,
) -> Any:
@@ -112,8 +106,8 @@ class Deb822DecodeError(ValueError):
pass
class Deb822DecodeState(Generic[_DataclassT]):
cls: type[_DataclassT]
class Deb822DecodeState[T: _DataclassInstance]:
cls: type[T]
fields: dict[str, dataclasses.Field]
ignore_unknown: bool
@@ -132,7 +126,7 @@ class Deb822DecodeState(Generic[_DataclassT]):
def __init__(
self,
cls: type[_DataclassT],
cls: type[T],
ignore_unknown: bool,
) -> None:
self.reset()
@@ -167,7 +161,7 @@ class Deb822DecodeState(Generic[_DataclassT]):
else:
raise NotImplementedError
def generate(self) -> _DataclassT | None:
def generate(self) -> T | None:
if not self.data:
return None
@@ -192,12 +186,12 @@ class Deb822DecodeState(Generic[_DataclassT]):
return self.cls(**r)
def read_deb822(
cls: type[_DataclassT],
def read_deb822[T: _DataclassInstance](
cls: type[T],
file: IO[str],
/,
ignore_unknown: bool = False,
) -> Iterable[_DataclassT]:
) -> Iterable[T]:
state = Deb822DecodeState(cls, ignore_unknown)
for linenr, line in enumerate(file):
@@ -217,8 +211,8 @@ def read_deb822(
yield obj
def write_deb822(
objs: Iterable[_DataclassT],
def write_deb822[T: _DataclassInstance](
objs: Iterable[T],
file: IO[str],
/,
) -> None:

View File

@@ -7,7 +7,6 @@ from dataclasses import (
)
from typing import (
Protocol,
TypeVar,
TYPE_CHECKING,
)
@@ -17,14 +16,11 @@ if TYPE_CHECKING:
class _HasName(Protocol, _DataclassInstance):
name: str
_DataclassT = TypeVar('_DataclassT', bound=_DataclassInstance)
_HasNameT = TypeVar('_HasNameT', bound=_HasName)
def default(
cls: type[_DataclassT],
def default[T: _DataclassInstance](
cls: type[T],
/,
) -> _DataclassT:
) -> T:
f = {}
for field in fields(cls):
@@ -34,10 +30,10 @@ def default(
return cls(**f)
def merge(
self: _DataclassT,
other: _DataclassT | None, /,
) -> _DataclassT:
def merge[T: _DataclassInstance](
self: T,
other: T | None, /,
) -> T:
if other is None:
return self
@@ -75,22 +71,22 @@ def merge(
return replace(self, **f)
def merge_default(
cls: type[_DataclassT],
def merge_default[T: _DataclassInstance](
cls: type[T],
/,
*others: _DataclassT,
) -> _DataclassT:
ret: _DataclassT = default(cls)
*others: T,
) -> T:
ret: T = default(cls)
for o in others:
ret = merge(ret, o)
return ret
def _merge_assoclist(
self_list: list[_HasNameT],
other_list: list[_HasNameT],
def _merge_assoclist[T: _HasName](
self_list: list[T],
other_list: list[T],
/,
) -> list[_HasNameT]:
) -> list[T]:
'''
Merge lists where each item got a "name" attribute
'''
@@ -99,7 +95,7 @@ def _merge_assoclist(
if not other_list:
return self_list
ret: list[_HasNameT] = []
ret: list[T] = []
other_dict = {
i.name: i
for i in other_list

View File

@@ -181,28 +181,6 @@ class VersionLinux(Version):
\d+
)
)?
$
""", re.X)
_revision_re = re.compile(r"""
\d+
(\.\d+)?
(?:
(?P<revision_experimental>
~exp\d+
)
|
(?P<revision_security>
(?:[~+]deb\d+u\d+)+
)?
(?P<revision_backports>
~bpo\d+\+\d+
)?
|
(?P<revision_other>
.+?
)
)
(?:\+b\d+)?
$
""", re.X)
@@ -223,11 +201,6 @@ $
self.linux_upstream = d['version']
self.linux_upstream_full = self.linux_upstream + d['update']
self.linux_dfsg = d['dfsg']
d = rev_match.groupdict()
self.linux_revision_experimental = d['revision_experimental'] and True
self.linux_revision_security = d['revision_security'] and True
self.linux_revision_backports = d['revision_backports'] and True
self.linux_revision_other = d['revision_other'] and True
class PackageArchitecture(set[str]):
@@ -370,9 +343,8 @@ class PackageRelationEntry:
ret.append(f'({self.operator} {self.version})')
if self.arches:
ret.append(f'[{self.arches}]')
if self.restrictions:
ret.append(str(self.restrictions))
return ' '.join(ret)
ret.append(str(self.restrictions))
return ' '.join(i for i in ret if i)
class PackageRelationGroup(list[PackageRelationEntry]):
@@ -443,8 +415,6 @@ class PackageBuildprofileEntry:
pos: set[str] = dataclasses.field(default_factory=set)
neg: set[str] = dataclasses.field(default_factory=set)
__re = re.compile(r'^<(?P<profiles>[a-z0-9. !-]+)>$')
def copy(self) -> Self:
return self.__class__(
pos=set(self.pos),
@@ -453,17 +423,15 @@ class PackageBuildprofileEntry:
@classmethod
def parse(cls, v: str, /) -> Self:
match = cls.__re.match(v)
if not match:
raise RuntimeError('Unable to parse build profile "%s"' % v)
ret = cls()
for i in re.split(r' ', match.group('profiles')):
for i in re.split(r' ', v):
if i:
if i[0] == '!':
ret.neg.add(i[1:])
else:
ret.pos.add(i)
if ret.pos & ret.neg:
raise ValueError
return ret
def __eq__(self, other: object, /) -> bool:
@@ -494,7 +462,7 @@ class PackageBuildprofileEntry:
return self.pos <= other.pos and self.neg >= other.neg
__ge__ = issuperset
def update(self, other: Self, /) -> None:
def update(self, other: Self, /) -> Self:
'''
Update the build profiles, adding entries from other, merging if possible.
@@ -502,20 +470,41 @@ class PackageBuildprofileEntry:
All others remain if they are used on both sides.
'''
diff = (self.pos & other.neg) | (self.neg & other.pos)
self.pos &= other.pos - diff
self.neg &= other.neg - diff
self.pos &= other.pos
self.neg &= other.neg
self.pos -= diff
self.neg -= diff
return self
__ior__ = update
def intersection_update(self, other: Self, /) -> Self:
'''
Update the build profiles, creating an intersection of both.
Negating entries (profile vs !profile) are completely removed.
All others remain.
'''
diff = (self.pos & other.neg) | (self.neg & other.pos)
self.pos |= other.pos
self.neg |= other.neg
self.pos -= diff
self.neg -= diff
return self
__iand__ = intersection_update
def __len__(self) -> int:
return len(self.pos) + len(self.neg)
def __str__(self) -> str:
s = ' '.join(itertools.chain(
return ' '.join(itertools.chain(
sorted(self.pos),
(f'!{i}' for i in sorted(self.neg)),
))
return f'<{s}>'
class PackageBuildprofile(list[PackageBuildprofileEntry]):
__re = re.compile(r' *(<[^>]+>)(?: +|$)')
__re = re.compile(r' *<(?P<entry>[a-z0-9. !-]+)>(?: +|$)')
def copy(self) -> Self:
return self.__class__(i.copy() for i in self)
@@ -524,10 +513,10 @@ class PackageBuildprofile(list[PackageBuildprofileEntry]):
def parse(cls, v: str, /) -> Self:
ret = cls()
for match in cls.__re.finditer(v):
ret.append(PackageBuildprofileEntry.parse(match.group(1)))
ret.append(PackageBuildprofileEntry.parse(match.group('entry')))
return ret
def update(self, v: Self, /) -> None:
def update(self, v: Self, /) -> Self:
for i in v:
for j in self:
if not j.isdisjoint(i):
@@ -535,10 +524,23 @@ class PackageBuildprofile(list[PackageBuildprofileEntry]):
break
else:
self.append(i)
return self
__ior__ = update
def intersection_update(self, v: Self, /) -> Self:
if len(v) > 1:
raise ValueError
for i in v:
if self:
for j in self:
j.intersection_update(i)
else:
self.append(i)
return self
__iand__ = intersection_update
def __str__(self) -> str:
return ' '.join(str(i) for i in self)
return ' '.join(f'<{str(i)}>' for i in self if i)
@dataclasses.dataclass

View File

@@ -189,6 +189,7 @@ class PackagesBundle:
package.meta_rules_check_packages = check_packages
for name in (
'NEWS',
'lintian-overrides',
'maintscript',
'postinst',
@@ -202,7 +203,11 @@ class PackagesBundle:
except KeyError:
pass
else:
with self.open(f'{package_name}.{name}') as f:
if arch:
out = f'{package_name}.{name}.{arch}'
else:
out = f'{package_name}.{name}'
with self.open(out) as f:
f.write(template)
return ret
@@ -341,8 +346,7 @@ class PackagesBundle:
for item in group:
if package.architecture != arch_all and not item.arches:
item.arches = package.architecture
if package.build_profiles and not item.restrictions:
item.restrictions = package.build_profiles
item.restrictions &= package.build_profiles
build_dep.merge(group)
def write(self) -> None:

View File

@@ -1,424 +0,0 @@
import pytest
from .debian import (
Version,
VersionLinux,
PackageArchitecture,
PackageDescription,
PackageRelationEntry,
PackageRelationGroup,
PackageRelation,
PackageBuildprofileEntry,
PackageBuildprofile,
)
class TestVersion:
def test_native(self) -> None:
v = Version('1.2+c~4')
assert v.epoch is None
assert v.upstream == '1.2+c~4'
assert v.revision is None
assert v.complete == '1.2+c~4'
assert v.complete_noepoch == '1.2+c~4'
def test_nonnative(self) -> None:
v = Version('1-2+d~3')
assert v.epoch is None
assert v.upstream == '1'
assert v.revision == '2+d~3'
assert v.complete == '1-2+d~3'
assert v.complete_noepoch == '1-2+d~3'
def test_native_epoch(self) -> None:
v = Version('5:1.2.3')
assert v.epoch == 5
assert v.upstream == '1.2.3'
assert v.revision is None
assert v.complete == '5:1.2.3'
assert v.complete_noepoch == '1.2.3'
def test_nonnative_epoch(self) -> None:
v = Version('5:1.2.3-4')
assert v.epoch == 5
assert v.upstream == '1.2.3'
assert v.revision == '4'
assert v.complete == '5:1.2.3-4'
assert v.complete_noepoch == '1.2.3-4'
def test_multi_hyphen(self) -> None:
v = Version('1-2-3')
assert v.epoch is None
assert v.upstream == '1-2'
assert v.revision == '3'
assert v.complete == '1-2-3'
def test_multi_colon(self) -> None:
v = Version('1:2:3')
assert v.epoch == 1
assert v.upstream == '2:3'
assert v.revision is None
def test_invalid_epoch(self) -> None:
with pytest.raises(RuntimeError):
Version('a:1')
with pytest.raises(RuntimeError):
Version('-1:1')
with pytest.raises(RuntimeError):
Version('1a:1')
def test_invalid_upstream(self) -> None:
with pytest.raises(RuntimeError):
Version('1_2')
with pytest.raises(RuntimeError):
Version('1/2')
with pytest.raises(RuntimeError):
Version('a1')
with pytest.raises(RuntimeError):
Version('1 2')
def test_invalid_revision(self) -> None:
with pytest.raises(RuntimeError):
Version('1-2_3')
with pytest.raises(RuntimeError):
Version('1-2/3')
with pytest.raises(RuntimeError):
Version('1-2:3')
class TestVersionLinux:
def test_stable(self) -> None:
v = VersionLinux('1.2.3-4')
assert v.linux_version == '1.2'
assert v.linux_upstream == '1.2'
assert v.linux_upstream_full == '1.2.3'
assert v.linux_modifier is None
assert v.linux_dfsg is None
assert not v.linux_revision_experimental
assert not v.linux_revision_security
assert not v.linux_revision_backports
assert not v.linux_revision_other
def test_rc(self) -> None:
v = VersionLinux('1.2~rc3-4')
assert v.linux_version == '1.2'
assert v.linux_upstream == '1.2-rc3'
assert v.linux_upstream_full == '1.2-rc3'
assert v.linux_modifier == 'rc3'
assert v.linux_dfsg is None
assert not v.linux_revision_experimental
assert not v.linux_revision_security
assert not v.linux_revision_backports
assert not v.linux_revision_other
def test_dfsg(self) -> None:
v = VersionLinux('1.2~rc3.dfsg.1-4')
assert v.linux_version == '1.2'
assert v.linux_upstream == '1.2-rc3'
assert v.linux_upstream_full == '1.2-rc3'
assert v.linux_modifier == 'rc3'
assert v.linux_dfsg == '1'
assert not v.linux_revision_experimental
assert not v.linux_revision_security
assert not v.linux_revision_backports
assert not v.linux_revision_other
def test_experimental(self) -> None:
v = VersionLinux('1.2~rc3-4~exp5')
assert v.linux_upstream_full == '1.2-rc3'
assert v.linux_revision_experimental
assert not v.linux_revision_security
assert not v.linux_revision_backports
assert not v.linux_revision_other
def test_security(self) -> None:
v = VersionLinux('1.2.3-4+deb10u1')
assert v.linux_upstream_full == '1.2.3'
assert not v.linux_revision_experimental
assert v.linux_revision_security
assert not v.linux_revision_backports
assert not v.linux_revision_other
def test_backports(self) -> None:
v = VersionLinux('1.2.3-4~bpo9+10')
assert v.linux_upstream_full == '1.2.3'
assert not v.linux_revision_experimental
assert not v.linux_revision_security
assert v.linux_revision_backports
assert not v.linux_revision_other
def test_security_backports(self) -> None:
v = VersionLinux('1.2.3-4+deb10u1~bpo9+10')
assert v.linux_upstream_full == '1.2.3'
assert not v.linux_revision_experimental
assert v.linux_revision_security
assert v.linux_revision_backports
assert not v.linux_revision_other
def test_lts_backports(self) -> None:
# Backport during LTS, as an extra package in the -security
# suite. Since this is not part of a -backports suite it
# shouldn't get the linux_revision_backports flag.
v = VersionLinux('1.2.3-4~deb9u10')
assert v.linux_upstream_full == '1.2.3'
assert not v.linux_revision_experimental
assert v.linux_revision_security
assert not v.linux_revision_backports
assert not v.linux_revision_other
def test_lts_backports_2(self) -> None:
# Same but with two security extensions in the revision.
v = VersionLinux('1.2.3-4+deb10u1~deb9u10')
assert v.linux_upstream_full == '1.2.3'
assert not v.linux_revision_experimental
assert v.linux_revision_security
assert not v.linux_revision_backports
assert not v.linux_revision_other
def test_binnmu(self) -> None:
v = VersionLinux('1.2.3-4+b1')
assert not v.linux_revision_experimental
assert not v.linux_revision_security
assert not v.linux_revision_backports
assert not v.linux_revision_other
def test_other_revision(self) -> None:
v = VersionLinux('4.16.5-1+revert+crng+ready') # from #898087
assert not v.linux_revision_experimental
assert not v.linux_revision_security
assert not v.linux_revision_backports
assert v.linux_revision_other
def test_other_revision_binnmu(self) -> None:
v = VersionLinux('4.16.5-1+revert+crng+ready+b1')
assert not v.linux_revision_experimental
assert not v.linux_revision_security
assert not v.linux_revision_backports
assert v.linux_revision_other
class TestPackageArchitecture:
def test_init(self) -> None:
a = PackageArchitecture()
assert a == set()
def test_init_str(self) -> None:
a = PackageArchitecture(' foo bar\tbaz ')
assert a == {'foo', 'bar', 'baz'}
def test_init_iter(self) -> None:
a = PackageArchitecture(('foo', 'bar'))
assert a == {'foo', 'bar'}
def test_init_self(self) -> None:
a = PackageArchitecture(PackageArchitecture(('foo', 'bar')))
assert a == {'foo', 'bar'}
def test_str(self) -> None:
a = PackageArchitecture(('foo', 'bar'))
assert str(a) == 'bar foo'
class TestPackageDescription:
def test_init(self) -> None:
a = PackageDescription()
assert a.short == []
assert a.long == []
def test_init_str(self) -> None:
a = PackageDescription('Short\nLong1\n.\nLong2')
assert a.short == ['Short']
assert a.long == ['Long1', 'Long2']
def test_init_self(self) -> None:
a = PackageDescription(PackageDescription('Short\nLong1\n.\nLong2'))
assert a.short == ['Short']
assert a.long == ['Long1', 'Long2']
def test_str(self) -> None:
a = PackageDescription('Short\nLong1\n.\nLong2')
assert str(a) == 'Short\nLong1\n.\nLong2'
class TestPackageRelationEntry:
def test_init_str(self) -> None:
a = PackageRelationEntry('package (>=version) [arch2 arch1] <profile1 >')
assert a.name == 'package'
assert a.version == 'version'
assert a.arches == {'arch1', 'arch2'}
# TODO: assert a.profiles
assert str(a) == 'package (>= version) [arch1 arch2] <profile1>'
def test_init_self(self) -> None:
a = PackageRelationEntry(PackageRelationEntry('package [arch2 arch1]'))
assert a.name == 'package'
assert a.arches == {'arch1', 'arch2'}
assert str(a) == 'package [arch1 arch2]'
class TestPackageRelationGroup:
def test_init(self) -> None:
a = PackageRelationGroup()
assert a == []
def test_init_str(self) -> None:
a = PackageRelationGroup('foo | bar')
assert len(a) == 2
assert a[0].name == 'foo'
assert a[1].name == 'bar'
def test_init_iter_entry(self) -> None:
a = PackageRelationGroup((PackageRelationEntry('foo'), PackageRelationEntry('bar')))
assert len(a) == 2
assert a[0].name == 'foo'
assert a[1].name == 'bar'
def test_init_iter_str(self) -> None:
a = PackageRelationGroup(('foo', 'bar'))
assert len(a) == 2
assert a[0].name == 'foo'
assert a[1].name == 'bar'
def test_init_self(self) -> None:
a = PackageRelationGroup(PackageRelationGroup(['foo', 'bar']))
assert len(a) == 2
assert a[0].name == 'foo'
assert a[1].name == 'bar'
def test_str(self) -> None:
a = PackageRelationGroup('foo| bar')
assert str(a) == 'foo | bar'
class TestPackageRelation:
def test_init(self) -> None:
a = PackageRelation()
assert a == []
def test_init_str(self) -> None:
a = PackageRelation('foo1 | foo2, bar')
assert len(a) == 2
assert len(a[0]) == 2
assert a[0][0].name == 'foo1'
assert a[0][1].name == 'foo2'
assert len(a[1]) == 1
assert a[1][0].name == 'bar'
def test_init_iter_entry(self) -> None:
a = PackageRelation([[PackageRelationEntry('foo')], [PackageRelationEntry('bar')]])
assert len(a) == 2
assert len(a[0]) == 1
assert a[0][0].name == 'foo'
assert len(a[1]) == 1
assert a[1][0].name == 'bar'
def test_init_iter_str(self) -> None:
a = PackageRelation(('foo', 'bar'))
assert len(a) == 2
assert len(a[0]) == 1
assert a[0][0].name == 'foo'
assert len(a[1]) == 1
assert a[1][0].name == 'bar'
def test_init_self(self) -> None:
a = PackageRelation(PackageRelation(('foo', 'bar')))
assert len(a) == 2
assert len(a[0]) == 1
assert a[0][0].name == 'foo'
assert len(a[1]) == 1
assert a[1][0].name == 'bar'
def test_str(self) -> None:
a = PackageRelation('foo ,bar')
assert str(a) == 'foo, bar'
class TestPackageBuildprofileEntry:
def test_parse(self) -> None:
a = PackageBuildprofileEntry.parse('<profile1 !profile2 profile3 !profile4>')
assert a.pos == {'profile1', 'profile3'}
assert a.neg == {'profile2', 'profile4'}
assert str(a) == '<profile1 profile3 !profile2 !profile4>'
def test_eq(self) -> None:
a = PackageBuildprofileEntry.parse('<profile1 !profile2>')
b = PackageBuildprofileEntry(pos={'profile1'}, neg={'profile2'})
assert a == b
def test_isdisjoint(self) -> None:
a = PackageBuildprofileEntry.parse('<profile1 profile2>')
b = PackageBuildprofileEntry.parse('<profile1 profile3>')
assert a.isdisjoint(b)
def test_issubset_empty(self) -> None:
a = PackageBuildprofileEntry.parse('<profile1 profile2>')
b = PackageBuildprofileEntry()
assert a.issubset(b)
def test_issubset_pos(self) -> None:
a = PackageBuildprofileEntry.parse('<profile1 profile2>')
b = PackageBuildprofileEntry.parse('<profile1>')
assert a.issubset(b)
def test_issubset_neg(self) -> None:
a = PackageBuildprofileEntry.parse('<!profile1>')
b = PackageBuildprofileEntry.parse('<!profile1 !profile2>')
assert a.issubset(b)
def test_issubset_both(self) -> None:
a = PackageBuildprofileEntry.parse('<!profile1 !profile2 profile3>')
b = PackageBuildprofileEntry.parse('<!profile1 !profile2 !profile3>')
assert a.issubset(b)
def test_issuperset_empty(self) -> None:
a = PackageBuildprofileEntry.parse('<profile1 profile2>')
b = PackageBuildprofileEntry()
assert b.issuperset(a)
def test_issuperset_pos(self) -> None:
a = PackageBuildprofileEntry.parse('<profile1 profile2>')
b = PackageBuildprofileEntry.parse('<profile1>')
assert b.issuperset(a)
def test_issuperset_neg(self) -> None:
a = PackageBuildprofileEntry.parse('<!profile1>')
b = PackageBuildprofileEntry.parse('<!profile1 !profile2>')
assert b.issuperset(a)
def test_issuperset_both(self) -> None:
a = PackageBuildprofileEntry.parse('<!profile1 !profile2 profile3>')
b = PackageBuildprofileEntry.parse('<!profile1 !profile2 !profile3>')
assert b.issuperset(a)
def test_update_pos(self) -> None:
a = PackageBuildprofileEntry.parse('<profile1 profile2>')
b = PackageBuildprofileEntry.parse('<profile1>')
a.update(b)
assert a.pos == {'profile1'}
assert a.neg == set()
def test_update_neg(self) -> None:
a = PackageBuildprofileEntry.parse('<!profile1 !profile2>')
b = PackageBuildprofileEntry.parse('<!profile1>')
a.update(b)
assert a.pos == set()
assert a.neg == {'profile1'}
def test_update_both(self) -> None:
a = PackageBuildprofileEntry.parse('<profile1 !profile2 profile3>')
b = PackageBuildprofileEntry.parse('<profile1 !profile2 !profile3>')
a.update(b)
assert a.pos == {'profile1'}
assert a.neg == {'profile2'}
class TestPackageBuildprofile:
def test_parse(self) -> None:
a = PackageBuildprofile.parse('<profile1> <!profile2> <profile3> <!profile4>')
assert str(a) == '<profile1> <!profile2> <profile3> <!profile4>'
def test_update(self) -> None:
a = PackageBuildprofile.parse('<profile1 profile2> <profile2>')
b = PackageBuildprofile.parse('<profile1> <profile2 !profile3> <profile3>')
a.update(b)
assert str(a) == '<profile1> <profile2> <profile3>'

View File

@@ -6,6 +6,7 @@ libcpupower.so.1 libcpupower1 #MINVER#
cpufreq_get_available_governors@Base 4.7~rc2-1~exp1
cpufreq_get_boost_frequencies@Base 5.5.8-1~exp1
cpufreq_get_driver@Base 4.7~rc2-1~exp1
cpufreq_get_energy_performance_preference@Base 6.14~
cpufreq_get_freq_hardware@Base 4.7~rc2-1~exp1
cpufreq_get_freq_kernel@Base 4.7~rc2-1~exp1
cpufreq_get_hardware_limits@Base 4.7~rc2-1~exp1
@@ -23,6 +24,7 @@ libcpupower.so.1 libcpupower1 #MINVER#
cpufreq_put_available_governors@Base 4.7~rc2-1~exp1
cpufreq_put_boost_frequencies@Base 5.5.8-1~exp1
cpufreq_put_driver@Base 4.7~rc2-1~exp1
cpufreq_put_energy_performance_preference@Base 6.14~
cpufreq_put_policy@Base 4.7~rc2-1~exp1
cpufreq_put_related_cpus@Base 4.7~rc2-1~exp1
cpufreq_put_stats@Base 4.7~rc2-1~exp1

2
debian/linux-misc-tools.manpages vendored Normal file
View File

@@ -0,0 +1,2 @@
tools/thermal/thermometer/thermometer.8
tools/thermal/tmon/tmon.8

View File

@@ -1,4 +1,5 @@
# These executables are needed to handle processes running in compat mode
linux-perf: binary-from-other-architecture *usr/lib/perf-core/perf-read-vdso32*
linux-perf: binary-from-other-architecture *usr/lib/perf-core/perf-read-vdsox32*
# Some of these plugins only need symbols from libtraceevent, which

View File

@@ -0,0 +1,10 @@
# This is a test program that does not link any libraries, either
# statically or dynamically
linux-perf: statically-linked-binary [usr/lib/perf-core/tests/shell/coresight/asm_pure_loop/asm_pure_loop]
# Some of these plugins only need symbols from libtraceevent, which
# loads them and should not have a NEEDED entry
linux-perf: shared-library-lacks-prerequisites *usr/lib/traceevent/plugins/plugin_*.so*
# This transition was too complex for dh_installdeb to handle
linux-perf: maintainer-script-should-not-use-dpkg-maintscript-helper "dpkg-maintscript-helper" *

View File

@@ -9,8 +9,7 @@ if [ -n "${old_version_suffix}" ] ; then
fi
unset old_version_suffix
case "$1" in
remove )
if [ "$1" = remove ] ; then
for wrapper in \
/usr/bin/perf \
/usr/share/bash-completion/completions/perf \
@@ -19,7 +18,6 @@ remove )
diversion="${wrapper%/perf*}/perf.wrapper${wrapper#*/perf}"
dpkg-divert --package linux-perf --divert "${diversion}" --rename --remove "${wrapper}"
done ; unset wrapper diversion
;;
esac
fi
#DEBHELPER#

View File

@@ -16,7 +16,7 @@ correctness.
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -1366,6 +1366,7 @@ static int m88e1118_config_init(struct p
@@ -1409,6 +1409,7 @@ static int m88e1118_config_init(struct p
return genphy_soft_reset(phydev);
}
@@ -24,7 +24,7 @@ correctness.
static int m88e1149_config_init(struct phy_device *phydev)
{
int err;
@@ -1391,7 +1392,9 @@ static int m88e1149_config_init(struct p
@@ -1434,7 +1435,9 @@ static int m88e1149_config_init(struct p
return genphy_soft_reset(phydev);
}
@@ -34,7 +34,7 @@ correctness.
static int m88e1145_config_init_rgmii(struct phy_device *phydev)
{
int err;
@@ -1469,6 +1472,7 @@ static int m88e1145_config_init(struct p
@@ -1512,6 +1515,7 @@ static int m88e1145_config_init(struct p
return 0;
}
@@ -42,7 +42,7 @@ correctness.
static int m88e1540_get_fld(struct phy_device *phydev, u8 *msecs)
{
@@ -3792,6 +3796,7 @@ static struct phy_driver marvell_drivers
@@ -3828,6 +3832,7 @@ static struct phy_driver marvell_drivers
.led_hw_control_set = m88e1318_led_hw_control_set,
.led_hw_control_get = m88e1318_led_hw_control_get,
},
@@ -50,7 +50,7 @@ correctness.
{
.phy_id = MARVELL_PHY_ID_88E1145,
.phy_id_mask = MARVELL_PHY_ID_MASK,
@@ -3815,6 +3820,8 @@ static struct phy_driver marvell_drivers
@@ -3851,6 +3856,8 @@ static struct phy_driver marvell_drivers
.cable_test_start = m88e1111_vct_cable_test_start,
.cable_test_get_status = m88e1111_vct_cable_test_get_status,
},
@@ -59,7 +59,7 @@ correctness.
{
.phy_id = MARVELL_PHY_ID_88E1149R,
.phy_id_mask = MARVELL_PHY_ID_MASK,
@@ -3833,6 +3840,8 @@ static struct phy_driver marvell_drivers
@@ -3869,6 +3876,8 @@ static struct phy_driver marvell_drivers
.get_strings = marvell_get_strings,
.get_stats = marvell_get_stats,
},
@@ -68,7 +68,7 @@ correctness.
{
.phy_id = MARVELL_PHY_ID_88E1240,
.phy_id_mask = MARVELL_PHY_ID_MASK,
@@ -3853,6 +3862,7 @@ static struct phy_driver marvell_drivers
@@ -3889,6 +3898,7 @@ static struct phy_driver marvell_drivers
.get_tunable = m88e1011_get_tunable,
.set_tunable = m88e1011_set_tunable,
},
@@ -76,7 +76,7 @@ correctness.
{
.phy_id = MARVELL_PHY_ID_88E1116R,
.phy_id_mask = MARVELL_PHY_ID_MASK,
@@ -4141,9 +4151,9 @@ static struct mdio_device_id __maybe_unu
@@ -4177,9 +4187,9 @@ static const struct mdio_device_id __may
{ MARVELL_PHY_ID_88E1111_FINISAR, MARVELL_PHY_ID_MASK },
{ MARVELL_PHY_ID_88E1118, MARVELL_PHY_ID_MASK },
{ MARVELL_PHY_ID_88E1121R, MARVELL_PHY_ID_MASK },

View File

@@ -1,32 +0,0 @@
From: Ben Hutchings <benh@debian.org>
Date: Mon, 16 Sep 2024 00:07:04 +0200
Subject: Documentation: Use relative source filenames in ABI documentation
Currently the ABI documentation files contain absolute source
filenames, which makes them unreproducible if the build directory can
vary.
Remove the source base directory ($srctree) from the source filenames
shown in the documentation.
Signed-off-by: Ben Hutchings <benh@debian.org>
---
--- a/Documentation/sphinx/kernel_abi.py
+++ b/Documentation/sphinx/kernel_abi.py
@@ -103,6 +103,7 @@ class KernelCmd(Directive):
lines = code_block + "\n\n"
line_regex = re.compile(r"^\.\. LINENO (\S+)\#([0-9]+)$")
+ srctree = os.path.abspath(os.environ["srctree"])
ln = 0
n = 0
f = fname
@@ -127,7 +128,7 @@ class KernelCmd(Directive):
# sphinx counts lines from 0
ln = int(match.group(2)) - 1
else:
- content.append(line, f, ln)
+ content.append(line, os.path.relpath(f, srctree), ln)
kernellog.info(self.state.document.settings.env.app, "%s: parsed %i lines" % (fname, n))

View File

@@ -1,61 +0,0 @@
From: Philip Yang <Philip.Yang@amd.com>
Date: Wed, 29 Jan 2025 12:37:30 -0500
Subject: drm/amdkfd: Fix user queue validation on Gfx7/8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Origin: https://gitlab.freedesktop.org/drm/kernel/-/commit/e7a477735f1771b9a9346a5fbd09d7ff0641723a
Bug-Debian: https://bugs.debian.org/1093124
To workaround queue full h/w issue on Gfx7/8, when application create
AQL queue, the ring buffer bo allocate size is queue_size/2 and
map queue_size ring buffer to GPU in 2 pieces using 2 attachments, each
attachment map size is queue_size/2, with same ring_bo backing memory.
For Gfx7/8, user queue buffer validation should use queue_size/2 to
verify ring_bo allocation and mapping size.
Fixes: 68e599db7a54 ("drm/amdkfd: Validate user queue buffers")
Suggested-by: Tomáš Trnka <trnka@scm.com>
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_queue.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/amd/amdkfd/kfd_queue.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_queue.c
@@ -233,6 +233,7 @@ void kfd_queue_buffer_put(struct amdgpu_
int kfd_queue_acquire_buffers(struct kfd_process_device *pdd, struct queue_properties *properties)
{
struct kfd_topology_device *topo_dev;
+ u64 expected_queue_size;
struct amdgpu_vm *vm;
u32 total_cwsr_size;
int err;
@@ -241,6 +242,15 @@ int kfd_queue_acquire_buffers(struct kfd
if (!topo_dev)
return -EINVAL;
+ /* AQL queues on GFX7 and GFX8 appear twice their actual size */
+ if (properties->type == KFD_QUEUE_TYPE_COMPUTE &&
+ properties->format == KFD_QUEUE_FORMAT_AQL &&
+ topo_dev->node_props.gfx_target_version >= 70000 &&
+ topo_dev->node_props.gfx_target_version < 90000)
+ expected_queue_size = properties->queue_size / 2;
+ else
+ expected_queue_size = properties->queue_size;
+
vm = drm_priv_to_vm(pdd->drm_priv);
err = amdgpu_bo_reserve(vm->root.bo, false);
if (err)
@@ -255,7 +265,7 @@ int kfd_queue_acquire_buffers(struct kfd
goto out_err_unreserve;
err = kfd_queue_buffer_get(vm, (void *)properties->queue_address,
- &properties->ring_bo, properties->queue_size);
+ &properties->ring_bo, expected_queue_size);
if (err)
goto out_err_unreserve;

View File

@@ -18,7 +18,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -2618,7 +2618,7 @@ module_exit(exit_btrfs_fs)
@@ -2630,7 +2630,7 @@ module_exit(exit_btrfs_fs)
MODULE_DESCRIPTION("B-Tree File System (BTRFS)");
MODULE_LICENSE("GPL");
@@ -27,19 +27,9 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
MODULE_SOFTDEP("pre: xxhash64");
MODULE_SOFTDEP("pre: sha256");
MODULE_SOFTDEP("pre: blake2b-256");
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -7447,6 +7447,6 @@ static void __exit ext4_exit_fs(void)
MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others");
MODULE_DESCRIPTION("Fourth Extended Filesystem");
MODULE_LICENSE("GPL");
-MODULE_SOFTDEP("pre: crc32c");
+MODULE_SOFTDEP("pre: crypto-crc32c");
module_init(ext4_init_fs)
module_exit(ext4_exit_fs)
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -3181,6 +3181,7 @@ static void __exit journal_exit(void)
@@ -3158,6 +3158,7 @@ static void __exit journal_exit(void)
MODULE_DESCRIPTION("Generic filesystem journal-writing module");
MODULE_LICENSE("GPL");
@@ -49,7 +39,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -2384,5 +2384,8 @@ static void __exit exit_nfsd(void)
@@ -2349,5 +2349,8 @@ static void __exit exit_nfsd(void)
MODULE_AUTHOR("Olaf Kirch <okir@monad.swb.de>");
MODULE_DESCRIPTION("In-kernel NFS server");
MODULE_LICENSE("GPL");

View File

@@ -15,16 +15,16 @@ Signed-off-by: Ben Hutchings <benh@debian.org>
---
--- a/scripts/Makefile.btf
+++ b/scripts/Makefile.btf
@@ -12,8 +12,6 @@ endif
@@ -14,8 +14,6 @@ endif
pahole-flags-$(call test-ge, $(pahole-ver), 121) += --btf_gen_floats
-pahole-flags-$(call test-ge, $(pahole-ver), 122) += -j
-pahole-flags-$(call test-ge, $(pahole-ver), 122) += -j$(JOBS)
-
pahole-flags-$(call test-ge, $(pahole-ver), 125) += --skip_encoding_btf_inconsistent_proto --btf_gen_optimized
else
@@ -27,6 +25,18 @@ endif
@@ -29,6 +27,18 @@ endif
endif
@@ -35,9 +35,9 @@ Signed-off-by: Ben Hutchings <benh@debian.org>
+# Assume that if KBUILD_BUILD_TIMESTAMP is set then a reproducible
+# build is required and we must not use -j alone.
+ifeq ($(KBUILD_BUILD_TIMESTAMP),)
+pahole-flags-$(call test-ge, $(pahole-ver), 122) += -j
+pahole-flags-$(call test-ge, $(pahole-ver), 122) += -j$(JOBS)
+else
+pahole-flags-$(call test-ge, $(pahole-ver), 127) += -j --btf_features=+reproducible_build
+pahole-flags-$(call test-ge, $(pahole-ver), 127) += -j$(JOBS) --btf_features=+reproducible_build
+endif
+
pahole-flags-$(CONFIG_PAHOLE_HAS_LANG_EXCLUDE) += --lang_exclude=rust

View File

@@ -9,7 +9,7 @@ sources.
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -195,6 +195,11 @@ cmd_record_mcount = $(if $(findstring $(
@@ -184,6 +184,11 @@ cmd_record_mcount = $(if $(findstring $(
$(sub_cmd_record_mcount))
endif # CONFIG_FTRACE_MCOUNT_USE_RECORDMCOUNT

View File

@@ -0,0 +1,41 @@
From: Ben Hutchings <benh@debian.org>
Date: Sun, 20 Apr 2025 18:50:44 +0200
Subject: libbpf: Use the standard fixdep build rule
libbpf's all target depends on the fixdep target defined in
tools/scripts/Makefile.include. However the $(BPF_IN_SHARED) and
$(BPF_IN_STATIC) targets don't use it, but instead rebuild fixdep in
the staticobjs or sharedobjs subdirectory using a different command.
Change the $(BPF_IN_SHARED) and $(BPF_IN_STATIC) targets to depend on
fixdep and to symlink the executable into the respective output
subdirectory.
Signed-off-by: Ben Hutchings <benh@debian.org>
---
--- a/tools/lib/bpf/Makefile
+++ b/tools/lib/bpf/Makefile
@@ -134,7 +134,7 @@ all_cmd: $(CMD_TARGETS) check
$(SHARED_OBJDIR) $(STATIC_OBJDIR):
$(Q)mkdir -p $@
-$(BPF_IN_SHARED): force $(BPF_GENERATED) | $(SHARED_OBJDIR)
+$(BPF_IN_SHARED): fixdep force $(BPF_GENERATED) | $(SHARED_OBJDIR)
@(test -f ../../include/uapi/linux/bpf.h -a -f ../../../include/uapi/linux/bpf.h && ( \
(diff -B ../../include/uapi/linux/bpf.h ../../../include/uapi/linux/bpf.h >/dev/null) || \
echo "Warning: Kernel ABI header at 'tools/include/uapi/linux/bpf.h' differs from latest version at 'include/uapi/linux/bpf.h'" >&2 )) || true
@@ -144,11 +144,11 @@ $(BPF_IN_SHARED): force $(BPF_GENERATED)
@(test -f ../../include/uapi/linux/if_xdp.h -a -f ../../../include/uapi/linux/if_xdp.h && ( \
(diff -B ../../include/uapi/linux/if_xdp.h ../../../include/uapi/linux/if_xdp.h >/dev/null) || \
echo "Warning: Kernel ABI header at 'tools/include/uapi/linux/if_xdp.h' differs from latest version at 'include/uapi/linux/if_xdp.h'" >&2 )) || true
- $(SILENT_MAKE) -C $(srctree)/tools/build CFLAGS= LDFLAGS= OUTPUT=$(SHARED_OBJDIR) $(SHARED_OBJDIR)fixdep
+ ln -sf ../fixdep $(SHARED_OBJDIR)/
$(Q)$(MAKE) $(build)=libbpf OUTPUT=$(SHARED_OBJDIR) CFLAGS="$(CFLAGS) $(SHLIB_FLAGS)"
-$(BPF_IN_STATIC): force $(BPF_GENERATED) | $(STATIC_OBJDIR)
- $(SILENT_MAKE) -C $(srctree)/tools/build CFLAGS= LDFLAGS= OUTPUT=$(STATIC_OBJDIR) $(STATIC_OBJDIR)fixdep
+$(BPF_IN_STATIC): fixdep force $(BPF_GENERATED) | $(STATIC_OBJDIR)
+ ln -sf ../fixdep $(STATIC_OBJDIR)/
$(Q)$(MAKE) $(build)=libbpf OUTPUT=$(STATIC_OBJDIR)
$(BPF_HELPER_DEFS): $(srctree)/tools/include/uapi/linux/bpf.h

View File

@@ -9,7 +9,7 @@ alternative may allow subverting module signing.
---
--- a/kernel/module/version.c
+++ b/kernel/module/version.c
@@ -46,9 +46,8 @@ int check_version(const struct load_info
@@ -63,9 +63,8 @@ int check_version(const struct load_info
goto bad_version;
}

View File

@@ -1,33 +0,0 @@
From: Scott Mayhew <smayhew@redhat.com>
Date: Tue, 10 Dec 2024 07:25:54 -0500
Subject: nfsd: fix legacy client tracking initialization
Origin: https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git/commit/?h=nfsd-next&id=45cd8c0c13fe5c9f1b926bd307df431f8f1b8a16
Bug: https://bugzilla.kernel.org/show_bug.cgi?id=219580
Bug-Debian: https://bugs.debian.org/1087900
Get rid of the nfsd4_legacy_tracking_ops->init() call in
check_for_legacy_methods(). That will be handled in the caller
(nfsd4_client_tracking_init()). Otherwise, we'll wind up calling
nfsd4_legacy_tracking_ops->init() twice, and the second time we'll
trigger the BUG_ON() in nfsd4_init_recdir().
Fixes: 74fd48739d04 ("nfsd: new Kconfig option for legacy client tracking")
Reported-by: Jur van der Burg <jur@avtware.com>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=219580
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
fs/nfsd/nfs4recover.c | 1 -
1 file changed, 1 deletion(-)
--- a/fs/nfsd/nfs4recover.c
+++ b/fs/nfsd/nfs4recover.c
@@ -2052,7 +2052,6 @@ static inline int check_for_legacy_metho
path_put(&path);
if (status)
return -ENOTDIR;
- status = nn->client_tracking_ops->init(net);
}
return status;
}

View File

@@ -0,0 +1,31 @@
From: Ben Hutchings <benh@debian.org>
Date: Sun, 23 Mar 2025 21:04:02 +0100
Subject: [PATCH] perf docs: Fix perf-check manual page built with asciidoctor
Forwarded: https://lore.kernel.org/linux-perf-users/Z-BxCE8WrcRmR_5f@decadent.org.uk/
asciidoctor is more picky than asciidoc about the length of heading
underlines, and currently mis-parses perf-check.txt:
ASCIIDOC perf-check.1
asciidoctor: ERROR: perf-check.txt: line 1: non-conforming manpage title
asciidoctor: ERROR: perf-check.txt: line 1: name section expected
asciidoctor: WARNING: perf-check.txt: line 2: unterminated example block
asciidoctor: WARNING: perf-check.txt: line 5: unterminated listing block
Fix the length of the title underline so it works properly.
Fixes: 98ad0b77323c ("perf check: Introduce 'check' subcommand")
Signed-off-by: Ben Hutchings <benh@debian.org>
---
tools/perf/Documentation/perf-check.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/tools/perf/Documentation/perf-check.txt
+++ b/tools/perf/Documentation/perf-check.txt
@@ -1,5 +1,5 @@
perf-check(1)
-===============
+=============
NAME
----

View File

@@ -16,7 +16,7 @@ Signed-off-by: Ben Hutchings <benh@debian.org>
---
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -953,7 +953,7 @@ $(LIBAPI)-clean:
@@ -963,7 +963,7 @@ $(LIBAPI)-clean:
$(LIBBPF): FORCE | $(LIBBPF_OUTPUT)
$(Q)$(MAKE) -C $(LIBBPF_DIR) FEATURES_DUMP=$(FEATURE_DUMP_EXPORT) \
O= OUTPUT=$(LIBBPF_OUTPUT)/ DESTDIR=$(LIBBPF_DESTDIR) prefix= subdir= \

View File

@@ -36,7 +36,7 @@ of the patch
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -32,6 +32,8 @@
#include <linux/aperture.h>
#include <linux/compat.h>
#include <linux/module.h>
+#include <linux/namei.h>
@@ -73,7 +73,7 @@ of the patch
static int radeon_pci_probe(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
@@ -296,6 +320,12 @@ static int radeon_pci_probe(struct pci_d
@@ -297,6 +321,12 @@ static int radeon_pci_probe(struct pci_d
if (vga_switcheroo_client_probe_defer(pdev))
return -EPROBE_DEFER;
@@ -84,5 +84,5 @@ of the patch
+ }
+
/* Get rid of things like offb */
ret = drm_aperture_remove_conflicting_pci_framebuffers(pdev, &kms_driver);
ret = aperture_remove_conflicting_pci_devices(pdev, kms_driver.name);
if (ret)

View File

@@ -21,7 +21,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+ * much older kernel. Do "use" the attr structure here to avoid
+ * a "set but not used" warning.
*/
- return syscall(__NR_bpf, BPF_PROG_LOAD, &attr, sizeof(attr));
- return syscall(__NR_bpf, BPF_PROG_LOAD, &attr, sizeof(attr)) == 0;
+ (void)&attr;
+ return 0;
}

View File

@@ -6,7 +6,7 @@ Signed-off-by: Ben Hutchings <benh@debian.org>
---
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -927,7 +927,7 @@ $(OUTPUT)dlfilters/%.o: dlfilters/%.c in
@@ -937,7 +937,7 @@ $(OUTPUT)dlfilters/%.o: dlfilters/%.c in
.SECONDARY: $(DLFILTERS:.so=.o)
$(OUTPUT)dlfilters/%.so: $(OUTPUT)dlfilters/%.o

View File

@@ -69,7 +69,7 @@ Signed-off-by: Geoff Levand <geoff@infradead.org>
* acpi_boot_table_init() called from setup_arch(), always.
* 1. find RSDP and get its address, and then find XSDT
* 2. extract all tables and checksums them all
@@ -257,6 +286,8 @@ done:
@@ -261,6 +290,8 @@ done:
if (IS_ENABLED(CONFIG_ACPI_BGRT))
acpi_table_parse(ACPI_SIG_BGRT, acpi_parse_bgrt);

View File

@@ -1,89 +0,0 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Mon, 07 Feb 2022 00:00:26 +0100
Subject: sh: Do not use hyphen in exported variable names
arch/sh/Makefile defines and exports ld-bfd to be used by
arch/sh/boot/Makefile and arch/sh/boot/compressed/Makefile. However
some shells, including dash, will not pass through environment
variables whose name includes a hyphen. Usually GNU make does not use
a shell to recurse, but if e.g. $(srctree) contains '~' it will use a
shell here.
Rename the variable to ld_bfd.
(Another instance of this problem was fixed upstream by commit
82977af93a0d "sh: rename suffix-y to suffix_y".)
References: https://buildd.debian.org/status/fetch.php?pkg=linux&arch=sh4&ver=4.13%7Erc5-1%7Eexp1&stamp=1502943967&raw=0
Fixes: ef9b542fce00 ("sh: bzip2/lzma uImage support.")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
arch/sh/Makefile | 10 +++++-----
arch/sh/boot/compressed/Makefile | 4 ++--
arch/sh/boot/romimage/Makefile | 4 ++--
3 files changed, 9 insertions(+), 9 deletions(-)
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -102,16 +102,16 @@ UTS_MACHINE := sh
LDFLAGS_vmlinux += -e _stext
ifdef CONFIG_CPU_LITTLE_ENDIAN
-ld-bfd := elf32-sh-linux
-LDFLAGS_vmlinux += --defsym jiffies=jiffies_64 --oformat $(ld-bfd)
+ld_bfd := elf32-sh-linux
+LDFLAGS_vmlinux += --defsym jiffies=jiffies_64 --oformat $(ld_bfd)
KBUILD_LDFLAGS += -EL
else
-ld-bfd := elf32-shbig-linux
-LDFLAGS_vmlinux += --defsym jiffies=jiffies_64+4 --oformat $(ld-bfd)
+ld_bfd := elf32-shbig-linux
+LDFLAGS_vmlinux += --defsym jiffies=jiffies_64+4 --oformat $(ld_bfd)
KBUILD_LDFLAGS += -EB
endif
-export ld-bfd
+export ld_bfd
# Mach groups
machdir-$(CONFIG_SOLUTION_ENGINE) += mach-se
--- a/arch/sh/boot/compressed/Makefile
+++ b/arch/sh/boot/compressed/Makefile
@@ -27,7 +27,7 @@ endif
ccflags-remove-$(CONFIG_MCOUNT) += -pg
-LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(IMAGE_OFFSET) -e startup \
+LDFLAGS_vmlinux := --oformat $(ld_bfd) -Ttext $(IMAGE_OFFSET) -e startup \
-T $(obj)/../../kernel/vmlinux.lds
KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
@@ -51,7 +51,7 @@ $(obj)/vmlinux.bin.lzo: $(obj)/vmlinux.b
OBJCOPYFLAGS += -R .empty_zero_page
-LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T
+LDFLAGS_piggy.o := -r --format binary --oformat $(ld_bfd) -T
$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix_y) FORCE
$(call if_changed,ld)
--- a/arch/sh/boot/romimage/Makefile
+++ b/arch/sh/boot/romimage/Makefile
@@ -13,7 +13,7 @@ mmcif-obj-$(CONFIG_CPU_SUBTYPE_SH7724) :
load-$(CONFIG_ROMIMAGE_MMCIF) := $(mmcif-load-y)
obj-$(CONFIG_ROMIMAGE_MMCIF) := $(mmcif-obj-y)
-LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(load-y) -e romstart \
+LDFLAGS_vmlinux := --oformat $(ld_bfd) -Ttext $(load-y) -e romstart \
-T $(obj)/../../kernel/vmlinux.lds
$(obj)/vmlinux: $(obj)/head.o $(obj-y) $(obj)/piggy.o FORCE
@@ -24,7 +24,7 @@ OBJCOPYFLAGS += -j .empty_zero_page
$(obj)/zeropage.bin: vmlinux FORCE
$(call if_changed,objcopy)
-LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T
+LDFLAGS_piggy.o := -r --format binary --oformat $(ld_bfd) -T
$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/zeropage.bin arch/sh/boot/zImage FORCE
$(call if_changed,ld)

View File

@@ -1,22 +0,0 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Fri, 25 Sep 2015 22:50:50 +0100
Subject: Revert "perf build: Fix libunwind feature detection on 32-bit x86"
Forwarded: no
This reverts commit 05b41775e2edd69a83f592e3534930c934d4038e.
It broke feature detection that was working just fine for us.
---
tools/perf/Makefile.config | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -56,7 +56,7 @@ ifeq ($(SRCARCH),x86)
LIBUNWIND_LIBS = -lunwind-x86_64 -lunwind -llzma
$(call detected,CONFIG_X86_64)
else
- LIBUNWIND_LIBS = -lunwind-x86 -llzma -lunwind
+ LIBUNWIND_LIBS = -lunwind -lunwind-x86
endif
endif

View File

@@ -21,7 +21,7 @@ Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -120,6 +120,12 @@
@@ -119,6 +119,12 @@
#include <kunit/visibility.h>
@@ -34,7 +34,7 @@ Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
/*
* Minimum number of threads to boot the kernel
*/
@@ -2157,6 +2163,10 @@ __latent_entropy struct task_struct *cop
@@ -2194,6 +2200,10 @@ __latent_entropy struct task_struct *cop
if ((clone_flags & (CLONE_NEWUSER|CLONE_FS)) == (CLONE_NEWUSER|CLONE_FS))
return ERR_PTR(-EINVAL);
@@ -45,7 +45,7 @@ Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
/*
* Thread groups must share signals as well, and detached threads
* can only be started up within the thread group.
@@ -3310,6 +3320,12 @@ int ksys_unshare(unsigned long unshare_f
@@ -3354,6 +3364,12 @@ int ksys_unshare(unsigned long unshare_f
if (unshare_flags & CLONE_NEWNS)
unshare_flags |= CLONE_FS;
@@ -60,18 +60,18 @@ Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
goto bad_unshare_out;
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -135,6 +135,10 @@ static enum sysctl_writes_mode sysctl_wr
int sysctl_legacy_va_layout;
#endif
@@ -84,6 +84,10 @@ EXPORT_SYMBOL_GPL(sysctl_long_vals);
static const int ngroups_max = NGROUPS_MAX;
static const int cap_last_cap = CAP_LAST_CAP;
+#ifdef CONFIG_USER_NS
+extern int unprivileged_userns_clone;
+#endif
+
#endif /* CONFIG_SYSCTL */
#ifdef CONFIG_PROC_SYSCTL
/*
@@ -1618,6 +1622,15 @@ static struct ctl_table kern_table[] = {
/**
@@ -1595,6 +1599,15 @@ static const struct ctl_table kern_table
.mode = 0644,
.proc_handler = proc_dointvec,
},

View File

@@ -1,28 +1,19 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Fri, 22 Jun 2018 17:27:00 +0100
Subject: android: Enable building ashmem and binder as modules
Date: Tue, 08 Jul 2025 13:30:55 +0200
Subject: android: Enable building binder as module
Bug-Debian: https://bugs.debian.org/901492
We want to enable use of the Android ashmem and binder drivers to
support Anbox, but they should not be built-in as that would waste
resources and increase security attack surface on systems that don't
need them.
We want to enable use of the Android binder driver to support
Waydroid, but it should not be built-in as that would waste resources
and increase security attack surface on systems that don't need it.
- Add a MODULE_LICENSE declaration to ashmem
- Change the Makefiles to build each driver as an object with the
"_linux" suffix (which is what Anbox expects)
- Change the Makefiles to build the driver as an object with the
"_linux" suffix (which is what Waydroid expects)
- Change config symbol types to tristate
Update:
In upstream commit 721412ed3d titled "staging: remove ashmem" the ashmem
driver was removed entirely. Secondary commit message:
"The mainline replacement for ashmem is memfd, so remove the legacy
code from drivers/staging/"
Consequently, the ashmem part of this patch has been removed.
---
drivers/android/Kconfig | 2 +-
drivers/android/Makefile | 7 ++++---
drivers/android/binder_alloc.c | 2 +-
drivers/android/Kconfig | 2 +-
drivers/android/Makefile | 7 ++++---
drivers/android/binder_alloc.c | 2 +-
3 files changed, 6 insertions(+), 5 deletions(-)
--- a/drivers/android/Kconfig

View File

@@ -22,7 +22,7 @@ implementation went from disk-io.c to super.c; forwarded the issue]
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -766,6 +766,18 @@ static void set_device_specific_options(
@@ -769,6 +769,18 @@ static void set_device_specific_options(
btrfs_set_opt(fs_info->mount_opt, SSD);
/*

View File

@@ -1,41 +0,0 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Thu, 16 Feb 2017 19:09:17 +0000
Subject: dccp: Disable auto-loading as mitigation against local exploits
Forwarded: not-needed
We can mitigate the effect of vulnerabilities in obscure protocols by
preventing unprivileged users from loading the modules, so that they
are only exploitable on systems where the administrator has chosen to
load the protocol.
The 'dccp' protocol is not actively maintained or widely used.
Therefore disable auto-loading.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -1098,8 +1098,8 @@ module_exit(dccp_v4_exit);
* values directly, Also cover the case where the protocol is not specified,
* i.e. net-pf-PF_INET-proto-0-type-SOCK_DCCP
*/
-MODULE_ALIAS_NET_PF_PROTO_TYPE(PF_INET, 33, 6);
-MODULE_ALIAS_NET_PF_PROTO_TYPE(PF_INET, 0, 6);
+/* MODULE_ALIAS_NET_PF_PROTO_TYPE(PF_INET, 33, 6); */
+/* MODULE_ALIAS_NET_PF_PROTO_TYPE(PF_INET, 0, 6); */
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Arnaldo Carvalho de Melo <acme@mandriva.com>");
MODULE_DESCRIPTION("DCCP - Datagram Congestion Controlled Protocol");
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -1174,8 +1174,8 @@ module_exit(dccp_v6_exit);
* values directly, Also cover the case where the protocol is not specified,
* i.e. net-pf-PF_INET6-proto-0-type-SOCK_DCCP
*/
-MODULE_ALIAS_NET_PF_PROTO_TYPE(PF_INET6, 33, 6);
-MODULE_ALIAS_NET_PF_PROTO_TYPE(PF_INET6, 0, 6);
+/* MODULE_ALIAS_NET_PF_PROTO_TYPE(PF_INET6, 33, 6); */
+/* MODULE_ALIAS_NET_PF_PROTO_TYPE(PF_INET6, 0, 6); */
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Arnaldo Carvalho de Melo <acme@mandriva.com>");
MODULE_DESCRIPTION("DCCPv6 - Datagram Congestion Controlled Protocol");

View File

@@ -15,14 +15,13 @@ probably discontinued 10 years ago.
---
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -657,100 +657,6 @@ config FB_ATMEL
@@ -658,102 +658,6 @@ config FB_ATMEL
help
This enables support for the AT91 LCD Controller.
-config FB_NVIDIA
- tristate "nVidia Framebuffer Support"
- depends on FB && PCI
- select FB_BACKLIGHT if FB_NVIDIA_BACKLIGHT
- depends on FB && PCI && HAS_IOPORT
- select FB_CFB_FILLRECT
- select FB_CFB_COPYAREA
- select FB_CFB_IMAGEBLIT
@@ -62,6 +61,8 @@ probably discontinued 10 years ago.
-config FB_NVIDIA_BACKLIGHT
- bool "Support for backlight control"
- depends on FB_NVIDIA
- depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_NVIDIA
- select FB_BACKLIGHT
- default y
- help
- Say Y here if you want to control the backlight of your display.
@@ -69,7 +70,6 @@ probably discontinued 10 years ago.
-config FB_RIVA
- tristate "nVidia Riva support"
- depends on FB && PCI
- select FB_BACKLIGHT if FB_RIVA_BACKLIGHT
- select FB_CFB_FILLRECT
- select FB_CFB_COPYAREA
- select FB_CFB_IMAGEBLIT
@@ -109,6 +109,8 @@ probably discontinued 10 years ago.
-config FB_RIVA_BACKLIGHT
- bool "Support for backlight control"
- depends on FB_RIVA
- depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_RIVA
- select FB_BACKLIGHT
- default y
- help
- Say Y here if you want to control the backlight of your display.

View File

@@ -1,5 +1,5 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Mon, 05 Aug 2024 03:26:48 +0200
Date: Tue, 08 Jul 2025 13:32:21 +0200
Subject: Export symbols needed by binder
Bug-Debian: https://bugs.debian.org/901492
@@ -10,19 +10,20 @@ and increase security attack surface on systems that don't need it.
Export the currently un-exported symbols it depends on.
---
fs/file.c | 1 +
ipc/msgutil.c | 1 +
ipc/namespace.c | 1 +
kernel/sched/syscalls.c | 1 +
kernel/sched/wait.c | 1 +
kernel/task_work.c | 1 +
mm/memory.c | 1 +
security/security.c | 4 ++++
8 files changed, 11 insertions(+)
fs/file.c | 1 +
ipc/msgutil.c | 1 +
ipc/namespace.c | 1 +
kernel/sched/syscalls.c | 1 +
kernel/sched/wait.c | 1 +
kernel/task_work.c | 1 +
mm/list_lru.c | 2 ++
mm/memory.c | 2 ++
security/security.c | 4 ++++
9 files changed, 14 insertions(+)
--- a/fs/file.c
+++ b/fs/file.c
@@ -793,6 +793,7 @@ struct file *file_close_fd(unsigned int
@@ -858,6 +858,7 @@ struct file *file_close_fd(unsigned int
return file;
}
@@ -72,7 +73,7 @@ Export the currently un-exported symbols it depends on.
* Note: we use "set_current_state()" _after_ the wait-queue add,
--- a/kernel/task_work.c
+++ b/kernel/task_work.c
@@ -108,6 +108,7 @@ int task_work_add(struct task_struct *ta
@@ -96,6 +96,7 @@ int task_work_add(struct task_struct *ta
return 0;
}
@@ -80,9 +81,27 @@ Export the currently un-exported symbols it depends on.
/**
* task_work_cancel_match - cancel a pending work added by task_work_add()
--- a/mm/list_lru.c
+++ b/mm/list_lru.c
@@ -175,6 +175,7 @@ bool list_lru_add(struct list_lru *lru,
unlock_list_lru(l, false);
return false;
}
+EXPORT_SYMBOL_GPL(list_lru_add);
bool list_lru_add_obj(struct list_lru *lru, struct list_head *item)
{
@@ -212,6 +213,7 @@ bool list_lru_del(struct list_lru *lru,
unlock_list_lru(l, false);
return false;
}
+EXPORT_SYMBOL_GPL(list_lru_del);
bool list_lru_del_obj(struct list_lru *lru, struct list_head *item)
{
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1937,6 +1937,7 @@ void zap_page_range_single(struct vm_are
@@ -2020,6 +2020,7 @@ void zap_page_range_single(struct vm_are
tlb_finish_mmu(&tlb);
hugetlb_zap_end(vma, details);
}
@@ -90,9 +109,17 @@ Export the currently un-exported symbols it depends on.
/**
* zap_vma_ptes - remove ptes mapping the vma
@@ -6567,6 +6568,7 @@ inval:
count_vm_vma_lock_event(VMA_LOCK_ABORT);
return NULL;
}
+EXPORT_SYMBOL_GPL(lock_vma_under_rcu);
#endif /* CONFIG_PER_VMA_LOCK */
#ifndef __PAGETABLE_P4D_FOLDED
--- a/security/security.c
+++ b/security/security.c
@@ -997,6 +997,7 @@ int security_binder_set_context_mgr(cons
@@ -996,6 +996,7 @@ int security_binder_set_context_mgr(cons
{
return call_int_hook(binder_set_context_mgr, mgr);
}
@@ -100,7 +127,7 @@ Export the currently un-exported symbols it depends on.
/**
* security_binder_transaction() - Check if a binder transaction is allowed
@@ -1012,6 +1013,7 @@ int security_binder_transaction(const st
@@ -1011,6 +1012,7 @@ int security_binder_transaction(const st
{
return call_int_hook(binder_transaction, from, to);
}
@@ -108,7 +135,7 @@ Export the currently un-exported symbols it depends on.
/**
* security_binder_transfer_binder() - Check if a binder transfer is allowed
@@ -1027,6 +1029,7 @@ int security_binder_transfer_binder(cons
@@ -1026,6 +1028,7 @@ int security_binder_transfer_binder(cons
{
return call_int_hook(binder_transfer_binder, from, to);
}
@@ -116,7 +143,7 @@ Export the currently un-exported symbols it depends on.
/**
* security_binder_transfer_file() - Check if a binder file xfer is allowed
@@ -1043,6 +1046,7 @@ int security_binder_transfer_file(const
@@ -1042,6 +1045,7 @@ int security_binder_transfer_file(const
{
return call_int_hook(binder_transfer_file, from, to, file);
}

View File

@@ -12,7 +12,7 @@ actually used.
---
--- a/fs/notify/fanotify/fanotify_user.c
+++ b/fs/notify/fanotify/fanotify_user.c
@@ -1763,6 +1763,14 @@ static int do_fanotify_mark(int fanotify
@@ -1881,6 +1881,14 @@ static int do_fanotify_mark(int fanotify
umask = FANOTIFY_EVENT_FLAGS;
}
@@ -24,6 +24,6 @@ actually used.
+ }
+#endif
+
f = fdget(fanotify_fd);
if (unlikely(!fd_file(f)))
CLASS(fd, f)(fanotify_fd);
if (fd_empty(f))
return -EBADF;

View File

@@ -0,0 +1,37 @@
From: Ben Hutchings <benh@debian.org>
Subject: firmware_loader: Log direct loading failures as info for d-i
Date: Thu, 30 May 2024 13:14:32 +0100
Forwarded: not-needed
On an installed Debian system, firmware packages will normally be
installed automatically based on a mapping of device IDs to firmware.
Within the Debian installer this has not yet happened and we need a
way to detect missing firmware.
Although many/most drivers log firmware loading failures, they do so
using many different formats. This adds a single log message to the
firmware loader, which the installer's hw-detect package will look
for. The log level is set to "info" because some failures are
expected and we do not want to confuse users with bogus error messages
(like in bug #966218).
NOTE: The log message format must not be changed without coordinating
this with the check-missing-firmware.sh in hw-detect.
---
drivers/base/firmware_loader/fallback.c | 2 +-
drivers/base/firmware_loader/main.c | 17 ++++++++---------
2 files changed, 9 insertions(+), 10 deletions(-)
--- a/drivers/base/firmware_loader/main.c
+++ b/drivers/base/firmware_loader/main.c
@@ -590,6 +590,10 @@ fw_get_filesystem_firmware(struct device
}
__putname(path);
+ if (rc)
+ dev_info(device, "firmware: failed to load %s (%d)\n",
+ fw_priv->fw_name, rc);
+
return rc;
}

View File

@@ -9,7 +9,7 @@ This reverts commit 561ec64ae67ef25cac8d72bb9c4bfc955edfd415
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1034,8 +1034,8 @@ static inline void put_link(struct namei
@@ -1095,8 +1095,8 @@ static inline void put_link(struct namei
path_put(&last->link);
}

View File

@@ -15,7 +15,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -2077,7 +2077,7 @@ module_init(ax25_init);
@@ -2067,7 +2067,7 @@ module_init(ax25_init);
MODULE_AUTHOR("Jonathan Naylor G4KLX <g4klx@g4klx.demon.co.uk>");
MODULE_DESCRIPTION("The amateur radio AX.25 link layer protocol");
MODULE_LICENSE("GPL");

View File

@@ -16,8 +16,8 @@ The error message is based on that used in commit 0126be38d988
---
--- a/Makefile
+++ b/Makefile
@@ -134,6 +134,18 @@ ifeq ("$(origin M)", "command line")
KBUILD_EXTMOD := $(M)
@@ -138,6 +138,18 @@ ifeq ("$(origin MO)", "command line")
KBUILD_EXTMOD_OUTPUT := $(MO)
endif
+# Old syntax make ... SUBDIRS=$PWD should be rejected to avoid mishaps

View File

@@ -27,27 +27,27 @@ rules.real and change Makefile.modfinal to look for it in both places.
--- a/scripts/Makefile.modfinal
+++ b/scripts/Makefile.modfinal
@@ -33,11 +33,13 @@ quiet_cmd_cc_o_c = CC [M] $@
$(extmod_prefix).module-common.o: $(srctree)/scripts/module-common.c FORCE
$(call if_changed_dep,cc_o_c)
@@ -28,11 +28,13 @@ ccflags-remove-y := $(CC_FLAGS_CFI)
.module-common.o: $(srctree)/scripts/module-common.c FORCE
$(call if_changed_rule,cc_o_c)
+ARCH_MODULE_LDS := $(word 1,$(wildcard scripts/module.lds arch/$(SRCARCH)/module.lds))
+ARCH_MODULE_LDS := $(word 1,$(wildcard $(objtree)/scripts/module.lds $(objtree)/arch/$(SRCARCH)/module.lds))
+
quiet_cmd_ld_ko_o = LD [M] $@
cmd_ld_ko_o = \
$(LD) -r $(KBUILD_LDFLAGS) \
$(KBUILD_LDFLAGS_MODULE) $(LDFLAGS_MODULE) \
- -T scripts/module.lds -o $@ $(filter %.o, $^)
- -T $(objtree)/scripts/module.lds -o $@ $(filter %.o, $^)
+ -T $(ARCH_MODULE_LDS) -o $@ $(filter %.o, $^)
quiet_cmd_btf_ko = BTF [M] $@
cmd_btf_ko = \
@@ -57,7 +59,7 @@ if_changed_except = $(if $(call newer_pr
@@ -52,7 +54,7 @@ if_changed_except = $(if $(call newer_pr
printf '%s\n' 'savedcmd_$@ := $(make-cmd)' > $(dot-target).cmd, @:)
# Re-generate module BTFs if either module's .ko or vmlinux changed
-%.ko: %.o %.mod.o $(extmod_prefix).module-common.o scripts/module.lds $(and $(CONFIG_DEBUG_INFO_BTF_MODULES),$(KBUILD_BUILTIN),vmlinux) FORCE
+%.ko: %.o %.mod.o $(extmod_prefix).module-common.o $(ARCH_MODULE_LDS) $(and $(CONFIG_DEBUG_INFO_BTF_MODULES),$(KBUILD_BUILTIN),vmlinux) FORCE
+$(call if_changed_except,ld_ko_o,vmlinux)
-%.ko: %.o %.mod.o .module-common.o $(objtree)/scripts/module.lds $(and $(CONFIG_DEBUG_INFO_BTF_MODULES),$(KBUILD_BUILTIN),$(objtree)/vmlinux) FORCE
+%.ko: %.o %.mod.o .module-common.o $(ARCH_MODULE_LDS) $(and $(CONFIG_DEBUG_INFO_BTF_MODULES),$(KBUILD_BUILTIN),$(objtree)/vmlinux) FORCE
+$(call if_changed_except,ld_ko_o,$(objtree)/vmlinux)
ifdef CONFIG_DEBUG_INFO_BTF_MODULES
+$(if $(newer-prereqs),$(call cmd,btf_ko))

View File

@@ -14,10 +14,12 @@ use of $(ARCH) needs to be moved after this.
[bwh: Updated for 5.3: include .kernelvariables from current directory
rather than using undefined $(obj).]
[carnil: Update for 6.13: Include .kernelvariables from $(objtree).]
---
--- a/Makefile
+++ b/Makefile
@@ -380,36 +380,6 @@ include $(srctree)/scripts/subarch.inclu
@@ -402,36 +402,6 @@ include $(srctree)/scripts/subarch.inclu
# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
ARCH ?= $(SUBARCH)
@@ -54,11 +56,11 @@ use of $(ARCH) needs to be moved after this.
KCONFIG_CONFIG ?= .config
export KCONFIG_CONFIG
@@ -529,6 +499,35 @@ RUSTFLAGS_KERNEL =
@@ -551,6 +521,35 @@ RUSTFLAGS_KERNEL =
AFLAGS_KERNEL =
LDFLAGS_vmlinux =
+-include .kernelvariables
+-include $(objtree)/.kernelvariables
+
+# Architecture as present in compile.h
+UTS_MACHINE := $(ARCH)

View File

@@ -15,7 +15,7 @@ to the installed location.
---
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -662,10 +662,12 @@ static int report__browse_hists(struct r
@@ -666,10 +666,12 @@ static int report__browse_hists(struct r
path = system_path(TIPDIR);
if (perf_tip(&help, path) || help == NULL) {
@@ -30,10 +30,10 @@ to the installed location.
free(path);
--- a/tools/perf/tests/Build
+++ b/tools/perf/tests/Build
@@ -73,7 +73,7 @@ perf-test-$(CONFIG_DWARF_UNWIND) += dwar
@@ -73,7 +73,7 @@ ifeq ($(SRCARCH),$(filter $(SRCARCH),x86
perf-test-$(CONFIG_DWARF_UNWIND) += dwarf-unwind.o
endif
CFLAGS_attr.o += -DBINDIR="BUILD_STR($(bindir_SQ))" -DPYTHON="BUILD_STR($(PYTHON_WORD))"
-CFLAGS_python-use.o += -DPYTHONPATH="BUILD_STR($(OUTPUT)python)" -DPYTHON="BUILD_STR($(PYTHON_WORD))"
+CFLAGS_python-use.o += -DPYTHONPATH="BUILD_STR($(perfexec_instdir_SQ)/scripts/python)" -DPYTHON="BUILD_STR($(PYTHON_WORD))"
CFLAGS_dwarf-unwind.o += -fno-optimize-sibling-calls

View File

@@ -20,7 +20,7 @@ is non-empty.
---
--- a/Makefile
+++ b/Makefile
@@ -1825,7 +1825,7 @@ PHONY += prepare
@@ -1882,7 +1882,7 @@ PHONY += prepare
# now expand this into a simple variable to reduce the cost of shell evaluations
prepare: CC_VERSION_TEXT := $(CC_VERSION_TEXT)
prepare:

View File

@@ -10,7 +10,7 @@ Forwarded: not-needed
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -1153,7 +1153,7 @@ install-bin: install-tools install-tests
@@ -1158,7 +1158,7 @@ install-bin: install-tools install-tests
install: install-bin try-install-man
install-python_ext:

View File

@@ -4,7 +4,7 @@ Subject: linux-tools: Install perf-read-vdso{,x}32 in directory under /usr/lib
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -1075,21 +1075,21 @@ install-tools: all install-gtk
@@ -1085,21 +1085,21 @@ install-tools: all install-gtk
$(LN) '$(DESTDIR_SQ)$(bindir_SQ)/perf' '$(DESTDIR_SQ)$(bindir_SQ)/trace'; \
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(includedir_SQ)/perf'; \
$(INSTALL) -m 644 include/perf/perf_dlfilter.h -t '$(DESTDIR_SQ)$(includedir_SQ)/perf'

View File

@@ -13,7 +13,7 @@ $KBUILD_BUILD_TIMESTAMP.
--- a/init/Makefile
+++ b/init/Makefile
@@ -29,7 +29,7 @@ preempt-flag-$(CONFIG_PREEMPT_DYNAMIC) :
@@ -30,7 +30,7 @@ preempt-flag-$(CONFIG_PREEMPT_DYNAMIC) :
preempt-flag-$(CONFIG_PREEMPT_RT) := PREEMPT_RT
build-version = $(or $(KBUILD_BUILD_VERSION), $(build-version-auto))

View File

@@ -19,7 +19,7 @@ Forwarded: not-needed
/* describe a ptrace relationship for potential exception */
struct ptrace_relation {
@@ -476,7 +476,7 @@ static inline void yama_init_sysctl(void
@@ -469,7 +469,7 @@ static inline void yama_init_sysctl(void
static int __init yama_init(void)
{

View File

@@ -141,7 +141,7 @@ arm-init to efi-init common for all arch") renamed arm-init.c to efi-init.c]
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -765,7 +765,8 @@ extern int efi_mem_desc_lookup(u64 phys_
@@ -753,7 +753,8 @@ extern int efi_mem_desc_lookup(u64 phys_
extern int __efi_mem_desc_lookup(u64 phys_addr, efi_memory_desc_t *out_md);
extern void efi_mem_reserve(phys_addr_t addr, u64 size);
extern int efi_mem_reserve_persistent(phys_addr_t addr, u64 size);

View File

@@ -31,7 +31,7 @@ cc: linux-efi@vger.kernel.org
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -1070,19 +1070,7 @@ void __init setup_arch(char **cmdline_p)
@@ -1127,19 +1127,7 @@ void __init setup_arch(char **cmdline_p)
/* Allocate bigger log buffer */
setup_log_buf(1);
@@ -106,11 +106,11 @@ cc: linux-efi@vger.kernel.org
+}
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -876,6 +876,14 @@ static inline int efi_range_is_wc(unsign
#define EFI_MEM_ATTR 10 /* Did firmware publish an EFI_MEMORY_ATTRIBUTES table? */
#define EFI_MEM_NO_SOFT_RESERVE 11 /* Is the kernel configured to ignore soft reservations? */
#define EFI_PRESERVE_BS_REGIONS 12 /* Are EFI boot-services memory segments available? */
+#define EFI_SECURE_BOOT 13 /* Are we in Secure Boot mode? */
@@ -863,6 +863,14 @@ static inline int efi_range_is_wc(unsign
#define EFI_MEM_ATTR 9 /* Did firmware publish an EFI_MEMORY_ATTRIBUTES table? */
#define EFI_MEM_NO_SOFT_RESERVE 10 /* Is the kernel configured to ignore soft reservations? */
#define EFI_PRESERVE_BS_REGIONS 11 /* Are EFI boot-services memory segments available? */
+#define EFI_SECURE_BOOT 12 /* Are we in Secure Boot mode? */
+
+enum efi_secureboot_mode {
+ efi_secureboot_mode_unset,
@@ -121,7 +121,7 @@ cc: linux-efi@vger.kernel.org
#ifdef CONFIG_EFI
/*
@@ -900,6 +908,7 @@ static inline bool efi_rt_services_suppo
@@ -887,6 +895,7 @@ static inline bool efi_rt_services_suppo
return (efi.runtime_supported_mask & mask) == mask;
}
extern void efi_find_mirror(void);
@@ -129,7 +129,7 @@ cc: linux-efi@vger.kernel.org
#else
static inline bool efi_enabled(int feature)
{
@@ -919,6 +928,7 @@ static inline bool efi_rt_services_suppo
@@ -906,6 +915,7 @@ static inline bool efi_rt_services_suppo
}
static inline void efi_find_mirror(void) {}
@@ -137,7 +137,7 @@ cc: linux-efi@vger.kernel.org
#endif
extern int efi_status_to_err(efi_status_t status);
@@ -1137,13 +1147,6 @@ static inline bool efi_runtime_disabled(
@@ -1124,13 +1134,6 @@ static inline bool efi_runtime_disabled(
extern void efi_call_virt_check_flags(unsigned long flags, const void *caller);
extern unsigned long efi_call_virt_save_flags(void);

View File

@@ -26,7 +26,7 @@ Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -904,6 +904,8 @@ void __init setup_arch(char **cmdline_p)
@@ -964,6 +964,8 @@ void __init setup_arch(char **cmdline_p)
if (efi_enabled(EFI_BOOT))
efi_init();
@@ -35,7 +35,7 @@ Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
reserve_ibft_region();
x86_init.resources.dmi_setup();
@@ -1070,8 +1072,6 @@ void __init setup_arch(char **cmdline_p)
@@ -1127,8 +1129,6 @@ void __init setup_arch(char **cmdline_p)
/* Allocate bigger log buffer */
setup_log_buf(1);
@@ -67,15 +67,15 @@ Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
default:
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -522,6 +522,7 @@ int security_inode_notifysecctx(struct i
@@ -574,6 +574,7 @@ int security_inode_notifysecctx(struct i
int security_inode_setsecctx(struct dentry *dentry, void *ctx, u32 ctxlen);
int security_inode_getsecctx(struct inode *inode, void **ctx, u32 *ctxlen);
int security_inode_getsecctx(struct inode *inode, struct lsm_context *cp);
int security_locked_down(enum lockdown_reason what);
+int lock_kernel_down(const char *where, enum lockdown_reason level);
int lsm_fill_user_ctx(struct lsm_ctx __user *uctx, u32 *uctx_len,
void *val, size_t val_len, u64 id, u64 flags);
int security_bdev_alloc(struct block_device *bdev);
@@ -1504,6 +1505,11 @@ static inline int security_locked_down(e
@@ -1580,6 +1581,11 @@ static inline int security_locked_down(e
{
return 0;
}

View File

@@ -23,7 +23,7 @@ Cc: linux-mtd@lists.infradead.org
--- a/drivers/mtd/devices/phram.c
+++ b/drivers/mtd/devices/phram.c
@@ -364,7 +364,11 @@ static int phram_param_call(const char *
@@ -365,7 +365,11 @@ static int phram_param_call(const char *
#endif
}

View File

@@ -22,9 +22,9 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -1623,6 +1623,11 @@ int perf_cpu_time_max_percent_handler(co
int perf_event_max_stack_handler(const struct ctl_table *table, int write,
void *buffer, size_t *lenp, loff_t *ppos);
@@ -1684,6 +1684,11 @@ extern int sysctl_perf_event_sample_rate
extern void perf_sample_event_took(u64 sample_len_ns);
+static inline bool perf_paranoid_any(void)
+{
@@ -36,7 +36,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -449,8 +449,13 @@ static struct kmem_cache *perf_event_cac
@@ -463,8 +463,13 @@ static struct kmem_cache *perf_event_cac
* 0 - disallow raw tracepoint access for unpriv
* 1 - disallow cpu events for unpriv
* 2 - disallow kernel profiling for unpriv
@@ -48,9 +48,9 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
int sysctl_perf_event_paranoid __read_mostly = 2;
+#endif
/* Minimum for 512 kiB + 1 user control page */
int sysctl_perf_event_mlock __read_mostly = 512 + (PAGE_SIZE / 1024); /* 'free' kiB per user */
@@ -12691,6 +12696,9 @@ SYSCALL_DEFINE5(perf_event_open,
/* Minimum for 512 kiB + 1 user control page. 'free' kiB per user. */
static int sysctl_perf_event_mlock __read_mostly = 512 + (PAGE_SIZE / 1024);
@@ -13164,6 +13169,9 @@ SYSCALL_DEFINE5(perf_event_open,
if (err)
return err;
@@ -58,13 +58,13 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+ return -EACCES;
+
/* Do we allow access to perf_event_open(2) ? */
err = security_perf_event_open(&attr, PERF_SECURITY_OPEN);
err = security_perf_event_open(PERF_SECURITY_OPEN);
if (err)
--- a/security/Kconfig
+++ b/security/Kconfig
@@ -51,6 +51,15 @@ config PROC_MEM_NO_FORCE
endchoice
@@ -72,6 +72,15 @@ config MSEAL_SYSTEM_MAPPINGS
For complete descriptions of memory sealing, please see
Documentation/userspace-api/mseal.rst
+config SECURITY_PERF_EVENTS_RESTRICT
+ bool "Restrict unprivileged use of performance events"

View File

@@ -48,7 +48,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
def_bool y
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -205,13 +205,13 @@ static LIST_HEAD(dmar_satc_units);
@@ -204,13 +204,13 @@ static LIST_HEAD(dmar_satc_units);
static void intel_iommu_domain_free(struct iommu_domain *domain);
@@ -64,7 +64,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
static int intel_iommu_superpage = 1;
static int iommu_identity_mapping;
static int iommu_skip_te_disable;
@@ -250,6 +250,7 @@ static int __init intel_iommu_setup(char
@@ -249,6 +249,7 @@ static int __init intel_iommu_setup(char
while (*str) {
if (!strncmp(str, "on", 2)) {
dmar_disabled = 0;

View File

@@ -22,7 +22,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -2218,6 +2218,8 @@
@@ -2288,6 +2288,8 @@
bypassed by not enabling DMAR with this option. In
this case, gfx device will use physical address for
DMA.
@@ -33,7 +33,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
sp_off [Default Off]
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -36,6 +36,9 @@
@@ -35,6 +35,9 @@
#define CONTEXT_SIZE VTD_PAGE_SIZE
#define IS_GFX_DEVICE(pdev) ((pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY)
@@ -43,7 +43,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
#define IS_USB_DEVICE(pdev) ((pdev->class >> 8) == PCI_CLASS_SERIAL_USB)
#define IS_ISA_DEVICE(pdev) ((pdev->class >> 8) == PCI_CLASS_BRIDGE_ISA)
#define IS_AZALIA(pdev) ((pdev)->vendor == 0x8086 && (pdev)->device == 0x3a3e)
@@ -208,12 +211,14 @@ int intel_iommu_sm = IS_ENABLED(CONFIG_I
@@ -207,12 +210,14 @@ int intel_iommu_sm = IS_ENABLED(CONFIG_I
int intel_iommu_enabled = 0;
EXPORT_SYMBOL_GPL(intel_iommu_enabled);
@@ -58,7 +58,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
const struct iommu_ops intel_iommu_ops;
static const struct iommu_dirty_ops intel_dirty_ops;
@@ -253,6 +258,9 @@ static int __init intel_iommu_setup(char
@@ -252,6 +257,9 @@ static int __init intel_iommu_setup(char
} else if (!strncmp(str, "igfx_off", 8)) {
disable_igfx_iommu = 1;
pr_info("Disable GFX device mapping\n");
@@ -68,7 +68,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
} else if (!strncmp(str, "forcedac", 8)) {
pr_warn("intel_iommu=forcedac deprecated; use iommu.forcedac instead\n");
iommu_dma_forcedac = true;
@@ -2046,6 +2054,9 @@ static int device_def_domain_type(struct
@@ -1949,6 +1957,9 @@ static int device_def_domain_type(struct
if ((iommu_identity_mapping & IDENTMAP_AZALIA) && IS_AZALIA(pdev))
return IOMMU_DOMAIN_IDENTITY;
@@ -78,7 +78,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
}
return 0;
@@ -2344,6 +2355,9 @@ static int __init init_dmars(void)
@@ -2243,6 +2254,9 @@ static int __init init_dmars(void)
iommu_set_root_entry(iommu);
}

View File

@@ -29,7 +29,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -6641,6 +6641,10 @@
@@ -7044,6 +7044,10 @@
later by a loaded module cannot be set this way.
Example: sysctl.vm.swappiness=40
@@ -42,7 +42,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Ignore sysrq setting - this boot parameter will
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -3165,6 +3165,14 @@ config COMPAT_32
@@ -3178,6 +3178,14 @@ config COMPAT_32
select HAVE_UID16
select OLD_SIGSUSPEND3
@@ -57,9 +57,70 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
config COMPAT
def_bool y
depends on IA32_EMULATION || X86_X32_ABI
--- a/arch/x86/entry/common.c
+++ b/arch/x86/entry/common.c
@@ -64,7 +64,7 @@ static __always_inline bool do_syscall_x
--- a/arch/x86/include/asm/elf.h
+++ b/arch/x86/include/asm/elf.h
@@ -12,6 +12,9 @@
#include <asm/user.h>
#include <asm/auxvec.h>
#include <asm/fsgsbase.h>
+#ifndef COMPILE_OFFSETS /* avoid a circular dependency on asm-offsets.h */
+#include <asm/syscall.h>
+#endif
typedef unsigned long elf_greg_t;
@@ -152,7 +155,8 @@ do { \
#define compat_elf_check_arch(x) \
((elf_check_arch_ia32(x) && ia32_enabled_verbose()) || \
- (IS_ENABLED(CONFIG_X86_X32_ABI) && (x)->e_machine == EM_X86_64))
+ (IS_ENABLED(CONFIG_X86_X32_ABI) && x32_enabled && \
+ (x)->e_machine == EM_X86_64))
static inline void elf_common_init(struct thread_struct *t,
struct pt_regs *regs, const u16 ds)
--- a/arch/x86/include/asm/syscall.h
+++ b/arch/x86/include/asm/syscall.h
@@ -13,6 +13,7 @@
#include <uapi/linux/audit.h>
#include <linux/sched.h>
#include <linux/err.h>
+#include <linux/jump_label.h>
#include <asm/thread_info.h> /* for TS_COMPAT */
#include <asm/unistd.h>
@@ -28,6 +29,18 @@ extern long ia32_sys_call(const struct p
extern long x32_sys_call(const struct pt_regs *, unsigned int nr);
extern long x64_sys_call(const struct pt_regs *, unsigned int nr);
+#if defined(CONFIG_X86_X32_ABI)
+#if defined(CONFIG_X86_X32_DISABLED)
+DECLARE_STATIC_KEY_FALSE(x32_enabled_skey);
+#define x32_enabled static_branch_unlikely(&x32_enabled_skey)
+#else
+DECLARE_STATIC_KEY_TRUE(x32_enabled_skey);
+#define x32_enabled static_branch_likely(&x32_enabled_skey)
+#endif
+#else
+#define x32_enabled 0
+#endif
+
/*
* Only the low 32 bits of orig_ax are meaningful, so we return int.
* This importantly ignores the high bits on 64-bit, so comparisons
--- a/arch/x86/entry/syscall_64.c
+++ b/arch/x86/entry/syscall_64.c
@@ -7,6 +7,9 @@
#include <linux/syscalls.h>
#include <linux/entry-common.h>
#include <linux/nospec.h>
+#include <linux/moduleparam.h>
+#undef MODULE_PARAM_PREFIX
+#define MODULE_PARAM_PREFIX "syscall."
#include <asm/syscall.h>
#define __SYSCALL(nr, sym) extern long __x64_##sym(const struct pt_regs *);
@@ -75,7 +78,7 @@ static __always_inline bool do_syscall_x
*/
unsigned int xnr = nr - __X32_SYSCALL_BIT;
@@ -68,23 +129,12 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
xnr = array_index_nospec(xnr, X32_NR_syscalls);
regs->ax = x32_sys_call(regs, xnr);
return true;
--- a/arch/x86/entry/syscall_x32.c
+++ b/arch/x86/entry/syscall_x32.c
@@ -4,6 +4,9 @@
#include <linux/linkage.h>
#include <linux/sys.h>
#include <linux/cache.h>
+#include <linux/moduleparam.h>
+#undef MODULE_PARAM_PREFIX
+#define MODULE_PARAM_PREFIX "syscall."
#include <linux/syscalls.h>
#include <asm/syscall.h>
@@ -23,3 +26,46 @@ long x32_sys_call(const struct pt_regs *
default: return __x64_sys_ni_syscall(regs);
}
};
@@ -139,3 +142,48 @@ __visible noinstr bool do_syscall_64(str
/* Use SYSRET to exit to userspace */
return true;
}
+
+#ifdef CONFIG_X86_X32_ABI
+/* Maybe enable x32 syscalls */
+
+#if defined(CONFIG_X86_X32_DISABLED)
@@ -127,54 +177,4 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+};
+
+arch_param_cb(x32, &x32_param_ops, NULL, 0444);
--- a/arch/x86/include/asm/elf.h
+++ b/arch/x86/include/asm/elf.h
@@ -12,6 +12,9 @@
#include <asm/user.h>
#include <asm/auxvec.h>
#include <asm/fsgsbase.h>
+#ifndef COMPILE_OFFSETS /* avoid a circular dependency on asm-offsets.h */
+#include <asm/syscall.h>
+#endif
typedef unsigned long elf_greg_t;
@@ -151,7 +154,8 @@ do { \
#define compat_elf_check_arch(x) \
((elf_check_arch_ia32(x) && ia32_enabled_verbose()) || \
- (IS_ENABLED(CONFIG_X86_X32_ABI) && (x)->e_machine == EM_X86_64))
+ (IS_ENABLED(CONFIG_X86_X32_ABI) && x32_enabled && \
+ (x)->e_machine == EM_X86_64))
static inline void elf_common_init(struct thread_struct *t,
struct pt_regs *regs, const u16 ds)
--- a/arch/x86/include/asm/syscall.h
+++ b/arch/x86/include/asm/syscall.h
@@ -13,6 +13,7 @@
#include <uapi/linux/audit.h>
#include <linux/sched.h>
#include <linux/err.h>
+#include <linux/jump_label.h>
#include <asm/thread_info.h> /* for TS_COMPAT */
#include <asm/unistd.h>
@@ -28,6 +29,18 @@ extern long ia32_sys_call(const struct p
extern long x32_sys_call(const struct pt_regs *, unsigned int nr);
extern long x64_sys_call(const struct pt_regs *, unsigned int nr);
+#if defined(CONFIG_X86_X32_ABI)
+#if defined(CONFIG_X86_X32_DISABLED)
+DECLARE_STATIC_KEY_FALSE(x32_enabled_skey);
+#define x32_enabled static_branch_unlikely(&x32_enabled_skey)
+#else
+DECLARE_STATIC_KEY_TRUE(x32_enabled_skey);
+#define x32_enabled static_branch_likely(&x32_enabled_skey)
+#endif
+#else
+#define x32_enabled 0
+#endif
+
/*
* Only the low 32 bits of orig_ax are meaningful, so we return int.
* This importantly ignores the high bits on 64-bit, so comparisons

View File

@@ -1,52 +0,0 @@
this reverts following commit:
From: Josh Poimboeuf <jpoimboe@redhat.com>
Date: Thu, 14 Jan 2021 16:32:42 -0600
Subject: objtool: Don't fail the kernel build on fatal errors
[ Upstream commit 655cf86548a3938538642a6df27dd359e13c86bd ]
This is basically a revert of commit 644592d32837 ("objtool: Fail the
kernel build on fatal errors").
That change turned out to be more trouble than it's worth. Failing the
build is an extreme measure which sometimes gets too much attention and
blocks CI build testing.
These fatal-type warnings aren't yet as rare as we'd hope, due to the
ever-increasing matrix of supported toolchains/plugins and their
fast-changing nature as of late.
Also, there are more people (and bots) looking for objtool warnings than
ever before, so even non-fatal warnings aren't likely to be ignored for
long.
Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -4897,10 +4897,14 @@ int check(struct objtool_file *file)
}
out:
- /*
- * For now, don't fail the kernel build on fatal warnings. These
- * errors are still fairly common due to the growing matrix of
- * supported toolchains and their recent pace of change.
- */
+ if (ret < 0) {
+ /*
+ * Fatal error. The binary is corrupt or otherwise broken in
+ * some way, or objtool itself is broken. Fail the kernel
+ * build.
+ */
+ return ret;
+ }
+
return 0;
}

View File

@@ -1,6 +1,6 @@
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1800,7 +1800,7 @@ static __net_init int inet_init_net(stru
@@ -1790,7 +1790,7 @@ static __net_init int inet_init_net(stru
/*
* Set defaults for local port range
*/

View File

@@ -1,9 +1,9 @@
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
@@ -374,7 +374,11 @@ static rx_handler_result_t br_handle_fra
return RX_HANDLER_PASS;
@@ -383,7 +383,11 @@ static rx_handler_result_t br_handle_fra
case 0x01: /* IEEE MAC (Pause) */
reason = SKB_DROP_REASON_MAC_IEEE_MAC_CONTROL;
- goto drop;
+ fwd_mask |= p->br->group_fwd_mask;
+ if (fwd_mask & (1u << dest[5]))

View File

@@ -1,42 +0,0 @@
From d53b209e5fcee3b3c53c30a4cc4fcc8e392a8fce Mon Sep 17 00:00:00 2001
From: Alexandre Frade <kernel@xanmod.org>
Date: Mon, 11 Mar 2024 12:01:13 -0300
Subject: [PATCH 19/19] x86/cfi,bpf: Add tso_segs and skb_marked_lost to
bpf_struct_ops CFI
Rebased-by: Oleksandr Natalenko <oleksandr@natalenko.name>
[ https://github.com/sirlucjan/kernel-patches/blob/master/6.8/bbr3-patches/0001-tcp-bbr3-initial-import.patch ]
Signed-off-by: Alexandre Frade <kernel@xanmod.org>
---
net/ipv4/bpf_tcp_ca.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
--- a/net/ipv4/bpf_tcp_ca.c
+++ b/net/ipv4/bpf_tcp_ca.c
@@ -280,11 +280,15 @@ static void bpf_tcp_ca_pkts_acked(struct
{
}
-static u32 bpf_tcp_ca_min_tso_segs(struct sock *sk)
+static u32 bpf_tcp_ca_tso_segs(struct sock *sk, unsigned int mss_now)
{
return 0;
}
+static void bpf_tcp_ca_skb_marked_lost(struct sock *sk, const struct sk_buff *skb)
+{
+}
+
static void bpf_tcp_ca_cong_control(struct sock *sk, u32 ack, int flag,
const struct rate_sample *rs)
{
@@ -315,7 +319,8 @@ static struct tcp_congestion_ops __bpf_o
.cwnd_event = bpf_tcp_ca_cwnd_event,
.in_ack_event = bpf_tcp_ca_in_ack_event,
.pkts_acked = bpf_tcp_ca_pkts_acked,
- .min_tso_segs = bpf_tcp_ca_min_tso_segs,
+ .tso_segs = bpf_tcp_ca_tso_segs,
+ .skb_marked_lost = bpf_tcp_ca_skb_marked_lost,
.cong_control = bpf_tcp_ca_cong_control,
.undo_cwnd = bpf_tcp_ca_undo_cwnd,
.sndbuf_expand = bpf_tcp_ca_sndbuf_expand,

View File

@@ -1,55 +0,0 @@
From e50ffd43b88d64b8063a9fce59f1d03b56f6144c Mon Sep 17 00:00:00 2001
From: Elizabeth Figura <zfigura@codeweavers.com>
Date: Fri, 13 Dec 2024 13:34:42 -0600
Subject: ntsync: Return the fd from NTSYNC_IOC_CREATE_SEM.
Simplify the user API a bit by returning the fd as return value from the ioctl
instead of through the argument pointer.
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
---
drivers/misc/ntsync.c | 7 ++-----
include/uapi/linux/ntsync.h | 3 +--
2 files changed, 3 insertions(+), 7 deletions(-)
--- a/drivers/misc/ntsync.c
+++ b/drivers/misc/ntsync.c
@@ -165,7 +165,6 @@ static int ntsync_obj_get_fd(struct ntsy
static int ntsync_create_sem(struct ntsync_device *dev, void __user *argp)
{
- struct ntsync_sem_args __user *user_args = argp;
struct ntsync_sem_args args;
struct ntsync_obj *sem;
int fd;
@@ -182,12 +181,10 @@ static int ntsync_create_sem(struct ntsy
sem->u.sem.count = args.count;
sem->u.sem.max = args.max;
fd = ntsync_obj_get_fd(sem);
- if (fd < 0) {
+ if (fd < 0)
kfree(sem);
- return fd;
- }
- return put_user(fd, &user_args->sem);
+ return fd;
}
static int ntsync_char_open(struct inode *inode, struct file *file)
--- a/include/uapi/linux/ntsync.h
+++ b/include/uapi/linux/ntsync.h
@@ -11,12 +11,11 @@
#include <linux/types.h>
struct ntsync_sem_args {
- __u32 sem;
__u32 count;
__u32 max;
};
-#define NTSYNC_IOC_CREATE_SEM _IOWR('N', 0x80, struct ntsync_sem_args)
+#define NTSYNC_IOC_CREATE_SEM _IOW ('N', 0x80, struct ntsync_sem_args)
#define NTSYNC_IOC_SEM_POST _IOWR('N', 0x81, __u32)

View File

@@ -1,64 +0,0 @@
From 160e9bf7826da868ae4de261753a03cce2208ff6 Mon Sep 17 00:00:00 2001
From: Elizabeth Figura <zfigura@codeweavers.com>
Date: Fri, 13 Dec 2024 13:34:43 -0600
Subject: ntsync: Rename NTSYNC_IOC_SEM_POST to NTSYNC_IOC_SEM_RELEASE.
Use the more common "release" terminology, which is also the term used by NT,
instead of "post" (which is used by POSIX).
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
---
drivers/misc/ntsync.c | 10 +++++-----
include/uapi/linux/ntsync.h | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
--- a/drivers/misc/ntsync.c
+++ b/drivers/misc/ntsync.c
@@ -57,7 +57,7 @@ struct ntsync_device {
* Actually change the semaphore state, returning -EOVERFLOW if it is made
* invalid.
*/
-static int post_sem_state(struct ntsync_obj *sem, __u32 count)
+static int release_sem_state(struct ntsync_obj *sem, __u32 count)
{
__u32 sum;
@@ -71,7 +71,7 @@ static int post_sem_state(struct ntsync_
return 0;
}
-static int ntsync_sem_post(struct ntsync_obj *sem, void __user *argp)
+static int ntsync_sem_release(struct ntsync_obj *sem, void __user *argp)
{
__u32 __user *user_args = argp;
__u32 prev_count;
@@ -87,7 +87,7 @@ static int ntsync_sem_post(struct ntsync
spin_lock(&sem->lock);
prev_count = sem->u.sem.count;
- ret = post_sem_state(sem, args);
+ ret = release_sem_state(sem, args);
spin_unlock(&sem->lock);
@@ -114,8 +114,8 @@ static long ntsync_obj_ioctl(struct file
void __user *argp = (void __user *)parm;
switch (cmd) {
- case NTSYNC_IOC_SEM_POST:
- return ntsync_sem_post(obj, argp);
+ case NTSYNC_IOC_SEM_RELEASE:
+ return ntsync_sem_release(obj, argp);
default:
return -ENOIOCTLCMD;
}
--- a/include/uapi/linux/ntsync.h
+++ b/include/uapi/linux/ntsync.h
@@ -17,6 +17,6 @@ struct ntsync_sem_args {
#define NTSYNC_IOC_CREATE_SEM _IOW ('N', 0x80, struct ntsync_sem_args)
-#define NTSYNC_IOC_SEM_POST _IOWR('N', 0x81, __u32)
+#define NTSYNC_IOC_SEM_RELEASE _IOWR('N', 0x81, __u32)
#endif

View File

@@ -1,377 +0,0 @@
From e855a17ec837cdee9047e6e23e47ed7b4312a265 Mon Sep 17 00:00:00 2001
From: Elizabeth Figura <zfigura@codeweavers.com>
Date: Fri, 13 Dec 2024 13:34:44 -0600
Subject: ntsync: Introduce NTSYNC_IOC_WAIT_ANY.
This corresponds to part of the functionality of the NT syscall
NtWaitForMultipleObjects(). Specifically, it implements the behaviour where
the third argument (wait_any) is TRUE, and it does not handle alertable waits.
Those features have been split out into separate patches to ease review.
This patch therefore implements the wait/wake infrastructure which comprises the
core of ntsync's functionality.
NTSYNC_IOC_WAIT_ANY is a vectored wait function similar to poll(). Unlike
poll(), it "consumes" objects when they are signaled. For semaphores, this means
decreasing one from the internal counter. At most one object can be consumed by
this function.
This wait/wake model is fundamentally different from that used anywhere else in
the kernel, and for that reason ntsync does not use any existing infrastructure,
such as futexes, kernel mutexes or semaphores, or wait_event().
Up to 64 objects can be waited on at once. As soon as one is signaled, the
object with the lowest index is consumed, and that index is returned via the
"index" field.
A timeout is supported. The timeout is passed as a u64 nanosecond value, which
represents absolute time measured against either the MONOTONIC or REALTIME clock
(controlled by the flags argument). If U64_MAX is passed, the ioctl waits
indefinitely.
This ioctl validates that all objects belong to the relevant device. This is not
necessary for any technical reason related to NTSYNC_IOC_WAIT_ANY, but will be
necessary for NTSYNC_IOC_WAIT_ALL introduced in the following patch.
Some padding fields are added for alignment and for fields which will be added
in future patches (split out to ease review).
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
---
drivers/misc/ntsync.c | 247 +++++++++++++++++++++++++++++++++++-
include/uapi/linux/ntsync.h | 14 ++
2 files changed, 260 insertions(+), 1 deletion(-)
--- a/drivers/misc/ntsync.c
+++ b/drivers/misc/ntsync.c
@@ -6,11 +6,16 @@
*/
#include <linux/anon_inodes.h>
+#include <linux/atomic.h>
#include <linux/file.h>
#include <linux/fs.h>
+#include <linux/hrtimer.h>
+#include <linux/ktime.h>
#include <linux/miscdevice.h>
#include <linux/module.h>
#include <linux/overflow.h>
+#include <linux/sched.h>
+#include <linux/sched/signal.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <uapi/linux/ntsync.h>
@@ -30,6 +35,8 @@ enum ntsync_type {
*
* Both rely on struct file for reference counting. Individual
* ntsync_obj objects take a reference to the device when created.
+ * Wait operations take a reference to each object being waited on for
+ * the duration of the wait.
*/
struct ntsync_obj {
@@ -47,12 +54,55 @@ struct ntsync_obj {
__u32 max;
} sem;
} u;
+
+ struct list_head any_waiters;
+};
+
+struct ntsync_q_entry {
+ struct list_head node;
+ struct ntsync_q *q;
+ struct ntsync_obj *obj;
+ __u32 index;
+};
+
+struct ntsync_q {
+ struct task_struct *task;
+
+ /*
+ * Protected via atomic_try_cmpxchg(). Only the thread that wins the
+ * compare-and-swap may actually change object states and wake this
+ * task.
+ */
+ atomic_t signaled;
+
+ __u32 count;
+ struct ntsync_q_entry entries[];
};
struct ntsync_device {
struct file *file;
};
+static void try_wake_any_sem(struct ntsync_obj *sem)
+{
+ struct ntsync_q_entry *entry;
+
+ lockdep_assert_held(&sem->lock);
+
+ list_for_each_entry(entry, &sem->any_waiters, node) {
+ struct ntsync_q *q = entry->q;
+ int signaled = -1;
+
+ if (!sem->u.sem.count)
+ break;
+
+ if (atomic_try_cmpxchg(&q->signaled, &signaled, entry->index)) {
+ sem->u.sem.count--;
+ wake_up_process(q->task);
+ }
+ }
+}
+
/*
* Actually change the semaphore state, returning -EOVERFLOW if it is made
* invalid.
@@ -87,7 +137,9 @@ static int ntsync_sem_release(struct nts
spin_lock(&sem->lock);
prev_count = sem->u.sem.count;
- ret = release_sem_state(sem, args);
+ ret = post_sem_state(sem, args);
+ if (!ret)
+ try_wake_any_sem(sem);
spin_unlock(&sem->lock);
@@ -140,6 +192,7 @@ static struct ntsync_obj *ntsync_alloc_o
obj->dev = dev;
get_file(dev->file);
spin_lock_init(&obj->lock);
+ INIT_LIST_HEAD(&obj->any_waiters);
return obj;
}
@@ -187,6 +240,196 @@ static int ntsync_create_sem(struct ntsy
return fd;
}
+static struct ntsync_obj *get_obj(struct ntsync_device *dev, int fd)
+{
+ struct file *file = fget(fd);
+ struct ntsync_obj *obj;
+
+ if (!file)
+ return NULL;
+
+ if (file->f_op != &ntsync_obj_fops) {
+ fput(file);
+ return NULL;
+ }
+
+ obj = file->private_data;
+ if (obj->dev != dev) {
+ fput(file);
+ return NULL;
+ }
+
+ return obj;
+}
+
+static void put_obj(struct ntsync_obj *obj)
+{
+ fput(obj->file);
+}
+
+static int ntsync_schedule(const struct ntsync_q *q, const struct ntsync_wait_args *args)
+{
+ ktime_t timeout = ns_to_ktime(args->timeout);
+ clockid_t clock = CLOCK_MONOTONIC;
+ ktime_t *timeout_ptr;
+ int ret = 0;
+
+ timeout_ptr = (args->timeout == U64_MAX ? NULL : &timeout);
+
+ if (args->flags & NTSYNC_WAIT_REALTIME)
+ clock = CLOCK_REALTIME;
+
+ do {
+ if (signal_pending(current)) {
+ ret = -ERESTARTSYS;
+ break;
+ }
+
+ set_current_state(TASK_INTERRUPTIBLE);
+ if (atomic_read(&q->signaled) != -1) {
+ ret = 0;
+ break;
+ }
+ ret = schedule_hrtimeout_range_clock(timeout_ptr, 0, HRTIMER_MODE_ABS, clock);
+ } while (ret < 0);
+ __set_current_state(TASK_RUNNING);
+
+ return ret;
+}
+
+/*
+ * Allocate and initialize the ntsync_q structure, but do not queue us yet.
+ */
+static int setup_wait(struct ntsync_device *dev,
+ const struct ntsync_wait_args *args,
+ struct ntsync_q **ret_q)
+{
+ const __u32 count = args->count;
+ int fds[NTSYNC_MAX_WAIT_COUNT];
+ struct ntsync_q *q;
+ __u32 i, j;
+
+ if (args->pad[0] || args->pad[1] || args->pad[2] || (args->flags & ~NTSYNC_WAIT_REALTIME))
+ return -EINVAL;
+
+ if (args->count > NTSYNC_MAX_WAIT_COUNT)
+ return -EINVAL;
+
+ if (copy_from_user(fds, u64_to_user_ptr(args->objs),
+ array_size(count, sizeof(*fds))))
+ return -EFAULT;
+
+ q = kmalloc(struct_size(q, entries, count), GFP_KERNEL);
+ if (!q)
+ return -ENOMEM;
+ q->task = current;
+ atomic_set(&q->signaled, -1);
+ q->count = count;
+
+ for (i = 0; i < count; i++) {
+ struct ntsync_q_entry *entry = &q->entries[i];
+ struct ntsync_obj *obj = get_obj(dev, fds[i]);
+
+ if (!obj)
+ goto err;
+
+ entry->obj = obj;
+ entry->q = q;
+ entry->index = i;
+ }
+
+ *ret_q = q;
+ return 0;
+
+err:
+ for (j = 0; j < i; j++)
+ put_obj(q->entries[j].obj);
+ kfree(q);
+ return -EINVAL;
+}
+
+static void try_wake_any_obj(struct ntsync_obj *obj)
+{
+ switch (obj->type) {
+ case NTSYNC_TYPE_SEM:
+ try_wake_any_sem(obj);
+ break;
+ }
+}
+
+static int ntsync_wait_any(struct ntsync_device *dev, void __user *argp)
+{
+ struct ntsync_wait_args args;
+ struct ntsync_q *q;
+ int signaled;
+ __u32 i;
+ int ret;
+
+ if (copy_from_user(&args, argp, sizeof(args)))
+ return -EFAULT;
+
+ ret = setup_wait(dev, &args, &q);
+ if (ret < 0)
+ return ret;
+
+ /* queue ourselves */
+
+ for (i = 0; i < args.count; i++) {
+ struct ntsync_q_entry *entry = &q->entries[i];
+ struct ntsync_obj *obj = entry->obj;
+
+ spin_lock(&obj->lock);
+ list_add_tail(&entry->node, &obj->any_waiters);
+ spin_unlock(&obj->lock);
+ }
+
+ /* check if we are already signaled */
+
+ for (i = 0; i < args.count; i++) {
+ struct ntsync_obj *obj = q->entries[i].obj;
+
+ if (atomic_read(&q->signaled) != -1)
+ break;
+
+ spin_lock(&obj->lock);
+ try_wake_any_obj(obj);
+ spin_unlock(&obj->lock);
+ }
+
+ /* sleep */
+
+ ret = ntsync_schedule(q, &args);
+
+ /* and finally, unqueue */
+
+ for (i = 0; i < args.count; i++) {
+ struct ntsync_q_entry *entry = &q->entries[i];
+ struct ntsync_obj *obj = entry->obj;
+
+ spin_lock(&obj->lock);
+ list_del(&entry->node);
+ spin_unlock(&obj->lock);
+
+ put_obj(obj);
+ }
+
+ signaled = atomic_read(&q->signaled);
+ if (signaled != -1) {
+ struct ntsync_wait_args __user *user_args = argp;
+
+ /* even if we caught a signal, we need to communicate success */
+ ret = 0;
+
+ if (put_user(signaled, &user_args->index))
+ ret = -EFAULT;
+ } else if (!ret) {
+ ret = -ETIMEDOUT;
+ }
+
+ kfree(q);
+ return ret;
+}
+
static int ntsync_char_open(struct inode *inode, struct file *file)
{
struct ntsync_device *dev;
@@ -218,6 +461,8 @@ static long ntsync_char_ioctl(struct fil
switch (cmd) {
case NTSYNC_IOC_CREATE_SEM:
return ntsync_create_sem(dev, argp);
+ case NTSYNC_IOC_WAIT_ANY:
+ return ntsync_wait_any(dev, argp);
default:
return -ENOIOCTLCMD;
}
--- a/include/uapi/linux/ntsync.h
+++ b/include/uapi/linux/ntsync.h
@@ -15,7 +15,21 @@ struct ntsync_sem_args {
__u32 max;
};
+#define NTSYNC_WAIT_REALTIME 0x1
+
+struct ntsync_wait_args {
+ __u64 timeout;
+ __u64 objs;
+ __u32 count;
+ __u32 index;
+ __u32 flags;
+ __u32 pad[3];
+};
+
+#define NTSYNC_MAX_WAIT_COUNT 64
+
#define NTSYNC_IOC_CREATE_SEM _IOW ('N', 0x80, struct ntsync_sem_args)
+#define NTSYNC_IOC_WAIT_ANY _IOWR('N', 0x82, struct ntsync_wait_args)
#define NTSYNC_IOC_SEM_RELEASE _IOWR('N', 0x81, __u32)

View File

@@ -1,533 +0,0 @@
From 6c1dac87ff835a48a067fe75bd0a6965921dac78 Mon Sep 17 00:00:00 2001
From: Elizabeth Figura <zfigura@codeweavers.com>
Date: Fri, 13 Dec 2024 13:34:45 -0600
Subject: ntsync: Introduce NTSYNC_IOC_WAIT_ALL.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This is similar to NTSYNC_IOC_WAIT_ANY, but waits until all of the objects are
simultaneously signaled, and then acquires all of them as a single atomic
operation.
Because acquisition of multiple objects is atomic, some complex locking is
required. We cannot simply spin-lock multiple objects simultaneously, as that
may disable preëmption for a problematically long time.
Instead, modifying any object which may be involved in a wait-all operation takes
a device-wide sleeping mutex, "wait_all_lock", instead of the normal object
spinlock.
Because wait-for-all is a rare operation, in order to optimize wait-for-any,
this lock is only taken when necessary. "all_hint" is used to mark objects which
are involved in a wait-for-all operation, and if an object is not, only its
spinlock is taken.
The locking scheme used here was written by Peter Zijlstra.
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
---
drivers/misc/ntsync.c | 336 ++++++++++++++++++++++++++++++++++--
include/uapi/linux/ntsync.h | 1 +
2 files changed, 323 insertions(+), 14 deletions(-)
--- a/drivers/misc/ntsync.c
+++ b/drivers/misc/ntsync.c
@@ -13,6 +13,7 @@
#include <linux/ktime.h>
#include <linux/miscdevice.h>
#include <linux/module.h>
+#include <linux/mutex.h>
#include <linux/overflow.h>
#include <linux/sched.h>
#include <linux/sched/signal.h>
@@ -41,6 +42,7 @@ enum ntsync_type {
struct ntsync_obj {
spinlock_t lock;
+ int dev_locked;
enum ntsync_type type;
@@ -55,7 +57,30 @@ struct ntsync_obj {
} sem;
} u;
+ /*
+ * any_waiters is protected by the object lock, but all_waiters is
+ * protected by the device wait_all_lock.
+ */
struct list_head any_waiters;
+ struct list_head all_waiters;
+
+ /*
+ * Hint describing how many tasks are queued on this object in a
+ * wait-all operation.
+ *
+ * Any time we do a wake, we may need to wake "all" waiters as well as
+ * "any" waiters. In order to atomically wake "all" waiters, we must
+ * lock all of the objects, and that means grabbing the wait_all_lock
+ * below (and, due to lock ordering rules, before locking this object).
+ * However, wait-all is a rare operation, and grabbing the wait-all
+ * lock for every wake would create unnecessary contention.
+ * Therefore we first check whether all_hint is zero, and, if it is,
+ * we skip trying to wake "all" waiters.
+ *
+ * Since wait requests must originate from user-space threads, we're
+ * limited here by PID_MAX_LIMIT, so there's no risk of overflow.
+ */
+ atomic_t all_hint;
};
struct ntsync_q_entry {
@@ -75,19 +100,198 @@ struct ntsync_q {
*/
atomic_t signaled;
+ bool all;
__u32 count;
struct ntsync_q_entry entries[];
};
struct ntsync_device {
+ /*
+ * Wait-all operations must atomically grab all objects, and be totally
+ * ordered with respect to each other and wait-any operations.
+ * If one thread is trying to acquire several objects, another thread
+ * cannot touch the object at the same time.
+ *
+ * This device-wide lock is used to serialize wait-for-all
+ * operations, and operations on an object that is involved in a
+ * wait-for-all.
+ */
+ struct mutex wait_all_lock;
+
struct file *file;
};
+/*
+ * Single objects are locked using obj->lock.
+ *
+ * Multiple objects are 'locked' while holding dev->wait_all_lock.
+ * In this case however, individual objects are not locked by holding
+ * obj->lock, but by setting obj->dev_locked.
+ *
+ * This means that in order to lock a single object, the sequence is slightly
+ * more complicated than usual. Specifically it needs to check obj->dev_locked
+ * after acquiring obj->lock, if set, it needs to drop the lock and acquire
+ * dev->wait_all_lock in order to serialize against the multi-object operation.
+ */
+
+static void dev_lock_obj(struct ntsync_device *dev, struct ntsync_obj *obj)
+{
+ lockdep_assert_held(&dev->wait_all_lock);
+ lockdep_assert(obj->dev == dev);
+ spin_lock(&obj->lock);
+ /*
+ * By setting obj->dev_locked inside obj->lock, it is ensured that
+ * anyone holding obj->lock must see the value.
+ */
+ obj->dev_locked = 1;
+ spin_unlock(&obj->lock);
+}
+
+static void dev_unlock_obj(struct ntsync_device *dev, struct ntsync_obj *obj)
+{
+ lockdep_assert_held(&dev->wait_all_lock);
+ lockdep_assert(obj->dev == dev);
+ spin_lock(&obj->lock);
+ obj->dev_locked = 0;
+ spin_unlock(&obj->lock);
+}
+
+static void obj_lock(struct ntsync_obj *obj)
+{
+ struct ntsync_device *dev = obj->dev;
+
+ for (;;) {
+ spin_lock(&obj->lock);
+ if (likely(!obj->dev_locked))
+ break;
+
+ spin_unlock(&obj->lock);
+ mutex_lock(&dev->wait_all_lock);
+ spin_lock(&obj->lock);
+ /*
+ * obj->dev_locked should be set and released under the same
+ * wait_all_lock section, since we now own this lock, it should
+ * be clear.
+ */
+ lockdep_assert(!obj->dev_locked);
+ spin_unlock(&obj->lock);
+ mutex_unlock(&dev->wait_all_lock);
+ }
+}
+
+static void obj_unlock(struct ntsync_obj *obj)
+{
+ spin_unlock(&obj->lock);
+}
+
+static bool ntsync_lock_obj(struct ntsync_device *dev, struct ntsync_obj *obj)
+{
+ bool all;
+
+ obj_lock(obj);
+ all = atomic_read(&obj->all_hint);
+ if (unlikely(all)) {
+ obj_unlock(obj);
+ mutex_lock(&dev->wait_all_lock);
+ dev_lock_obj(dev, obj);
+ }
+
+ return all;
+}
+
+static void ntsync_unlock_obj(struct ntsync_device *dev, struct ntsync_obj *obj, bool all)
+{
+ if (all) {
+ dev_unlock_obj(dev, obj);
+ mutex_unlock(&dev->wait_all_lock);
+ } else {
+ obj_unlock(obj);
+ }
+}
+
+#define ntsync_assert_held(obj) \
+ lockdep_assert((lockdep_is_held(&(obj)->lock) != LOCK_STATE_NOT_HELD) || \
+ ((lockdep_is_held(&(obj)->dev->wait_all_lock) != LOCK_STATE_NOT_HELD) && \
+ (obj)->dev_locked))
+
+static bool is_signaled(struct ntsync_obj *obj)
+{
+ ntsync_assert_held(obj);
+
+ switch (obj->type) {
+ case NTSYNC_TYPE_SEM:
+ return !!obj->u.sem.count;
+ }
+
+ WARN(1, "bad object type %#x\n", obj->type);
+ return false;
+}
+
+/*
+ * "locked_obj" is an optional pointer to an object which is already locked and
+ * should not be locked again. This is necessary so that changing an object's
+ * state and waking it can be a single atomic operation.
+ */
+static void try_wake_all(struct ntsync_device *dev, struct ntsync_q *q,
+ struct ntsync_obj *locked_obj)
+{
+ __u32 count = q->count;
+ bool can_wake = true;
+ int signaled = -1;
+ __u32 i;
+
+ lockdep_assert_held(&dev->wait_all_lock);
+ if (locked_obj)
+ lockdep_assert(locked_obj->dev_locked);
+
+ for (i = 0; i < count; i++) {
+ if (q->entries[i].obj != locked_obj)
+ dev_lock_obj(dev, q->entries[i].obj);
+ }
+
+ for (i = 0; i < count; i++) {
+ if (!is_signaled(q->entries[i].obj)) {
+ can_wake = false;
+ break;
+ }
+ }
+
+ if (can_wake && atomic_try_cmpxchg(&q->signaled, &signaled, 0)) {
+ for (i = 0; i < count; i++) {
+ struct ntsync_obj *obj = q->entries[i].obj;
+
+ switch (obj->type) {
+ case NTSYNC_TYPE_SEM:
+ obj->u.sem.count--;
+ break;
+ }
+ }
+ wake_up_process(q->task);
+ }
+
+ for (i = 0; i < count; i++) {
+ if (q->entries[i].obj != locked_obj)
+ dev_unlock_obj(dev, q->entries[i].obj);
+ }
+}
+
+static void try_wake_all_obj(struct ntsync_device *dev, struct ntsync_obj *obj)
+{
+ struct ntsync_q_entry *entry;
+
+ lockdep_assert_held(&dev->wait_all_lock);
+ lockdep_assert(obj->dev_locked);
+
+ list_for_each_entry(entry, &obj->all_waiters, node)
+ try_wake_all(dev, entry->q, obj);
+}
+
static void try_wake_any_sem(struct ntsync_obj *sem)
{
struct ntsync_q_entry *entry;
- lockdep_assert_held(&sem->lock);
+ ntsync_assert_held(sem);
+ lockdep_assert(sem->type == NTSYNC_TYPE_SEM);
list_for_each_entry(entry, &sem->any_waiters, node) {
struct ntsync_q *q = entry->q;
@@ -111,7 +315,7 @@ static int release_sem_state(struct ntsy
{
__u32 sum;
- lockdep_assert_held(&sem->lock);
+ ntsync_assert_held(sem);
if (check_add_overflow(sem->u.sem.count, count, &sum) ||
sum > sem->u.sem.max)
@@ -123,9 +327,11 @@ static int release_sem_state(struct ntsy
static int ntsync_sem_release(struct ntsync_obj *sem, void __user *argp)
{
+ struct ntsync_device *dev = sem->dev;
__u32 __user *user_args = argp;
__u32 prev_count;
__u32 args;
+ bool all;
int ret;
if (copy_from_user(&args, argp, sizeof(args)))
@@ -134,14 +340,17 @@ static int ntsync_sem_release(struct nts
if (sem->type != NTSYNC_TYPE_SEM)
return -EINVAL;
- spin_lock(&sem->lock);
+ all = ntsync_lock_obj(dev, sem);
prev_count = sem->u.sem.count;
- ret = post_sem_state(sem, args);
- if (!ret)
+ ret = release_sem_state(sem, args);
+ if (!ret) {
+ if (all)
+ try_wake_all_obj(dev, sem);
try_wake_any_sem(sem);
+ }
- spin_unlock(&sem->lock);
+ ntsync_unlock_obj(dev, sem, all);
if (!ret && put_user(prev_count, user_args))
ret = -EFAULT;
@@ -193,6 +402,8 @@ static struct ntsync_obj *ntsync_alloc_o
get_file(dev->file);
spin_lock_init(&obj->lock);
INIT_LIST_HEAD(&obj->any_waiters);
+ INIT_LIST_HEAD(&obj->all_waiters);
+ atomic_set(&obj->all_hint, 0);
return obj;
}
@@ -301,7 +512,7 @@ static int ntsync_schedule(const struct
* Allocate and initialize the ntsync_q structure, but do not queue us yet.
*/
static int setup_wait(struct ntsync_device *dev,
- const struct ntsync_wait_args *args,
+ const struct ntsync_wait_args *args, bool all,
struct ntsync_q **ret_q)
{
const __u32 count = args->count;
@@ -324,6 +535,7 @@ static int setup_wait(struct ntsync_devi
return -ENOMEM;
q->task = current;
atomic_set(&q->signaled, -1);
+ q->all = all;
q->count = count;
for (i = 0; i < count; i++) {
@@ -333,6 +545,16 @@ static int setup_wait(struct ntsync_devi
if (!obj)
goto err;
+ if (all) {
+ /* Check that the objects are all distinct. */
+ for (j = 0; j < i; j++) {
+ if (obj == q->entries[j].obj) {
+ put_obj(obj);
+ goto err;
+ }
+ }
+ }
+
entry->obj = obj;
entry->q = q;
entry->index = i;
@@ -362,13 +584,14 @@ static int ntsync_wait_any(struct ntsync
struct ntsync_wait_args args;
struct ntsync_q *q;
int signaled;
+ bool all;
__u32 i;
int ret;
if (copy_from_user(&args, argp, sizeof(args)))
return -EFAULT;
- ret = setup_wait(dev, &args, &q);
+ ret = setup_wait(dev, &args, false, &q);
if (ret < 0)
return ret;
@@ -378,9 +601,9 @@ static int ntsync_wait_any(struct ntsync
struct ntsync_q_entry *entry = &q->entries[i];
struct ntsync_obj *obj = entry->obj;
- spin_lock(&obj->lock);
+ all = ntsync_lock_obj(dev, obj);
list_add_tail(&entry->node, &obj->any_waiters);
- spin_unlock(&obj->lock);
+ ntsync_unlock_obj(dev, obj, all);
}
/* check if we are already signaled */
@@ -391,9 +614,9 @@ static int ntsync_wait_any(struct ntsync
if (atomic_read(&q->signaled) != -1)
break;
- spin_lock(&obj->lock);
+ all = ntsync_lock_obj(dev, obj);
try_wake_any_obj(obj);
- spin_unlock(&obj->lock);
+ ntsync_unlock_obj(dev, obj, all);
}
/* sleep */
@@ -406,13 +629,94 @@ static int ntsync_wait_any(struct ntsync
struct ntsync_q_entry *entry = &q->entries[i];
struct ntsync_obj *obj = entry->obj;
- spin_lock(&obj->lock);
+ all = ntsync_lock_obj(dev, obj);
list_del(&entry->node);
- spin_unlock(&obj->lock);
+ ntsync_unlock_obj(dev, obj, all);
+
+ put_obj(obj);
+ }
+
+ signaled = atomic_read(&q->signaled);
+ if (signaled != -1) {
+ struct ntsync_wait_args __user *user_args = argp;
+
+ /* even if we caught a signal, we need to communicate success */
+ ret = 0;
+
+ if (put_user(signaled, &user_args->index))
+ ret = -EFAULT;
+ } else if (!ret) {
+ ret = -ETIMEDOUT;
+ }
+
+ kfree(q);
+ return ret;
+}
+
+static int ntsync_wait_all(struct ntsync_device *dev, void __user *argp)
+{
+ struct ntsync_wait_args args;
+ struct ntsync_q *q;
+ int signaled;
+ __u32 i;
+ int ret;
+
+ if (copy_from_user(&args, argp, sizeof(args)))
+ return -EFAULT;
+
+ ret = setup_wait(dev, &args, true, &q);
+ if (ret < 0)
+ return ret;
+
+ /* queue ourselves */
+
+ mutex_lock(&dev->wait_all_lock);
+
+ for (i = 0; i < args.count; i++) {
+ struct ntsync_q_entry *entry = &q->entries[i];
+ struct ntsync_obj *obj = entry->obj;
+
+ atomic_inc(&obj->all_hint);
+
+ /*
+ * obj->all_waiters is protected by dev->wait_all_lock rather
+ * than obj->lock, so there is no need to acquire obj->lock
+ * here.
+ */
+ list_add_tail(&entry->node, &obj->all_waiters);
+ }
+
+ /* check if we are already signaled */
+
+ try_wake_all(dev, q, NULL);
+
+ mutex_unlock(&dev->wait_all_lock);
+
+ /* sleep */
+
+ ret = ntsync_schedule(q, &args);
+
+ /* and finally, unqueue */
+
+ mutex_lock(&dev->wait_all_lock);
+
+ for (i = 0; i < args.count; i++) {
+ struct ntsync_q_entry *entry = &q->entries[i];
+ struct ntsync_obj *obj = entry->obj;
+
+ /*
+ * obj->all_waiters is protected by dev->wait_all_lock rather
+ * than obj->lock, so there is no need to acquire it here.
+ */
+ list_del(&entry->node);
+
+ atomic_dec(&obj->all_hint);
put_obj(obj);
}
+ mutex_unlock(&dev->wait_all_lock);
+
signaled = atomic_read(&q->signaled);
if (signaled != -1) {
struct ntsync_wait_args __user *user_args = argp;
@@ -438,6 +742,8 @@ static int ntsync_char_open(struct inode
if (!dev)
return -ENOMEM;
+ mutex_init(&dev->wait_all_lock);
+
file->private_data = dev;
dev->file = file;
return nonseekable_open(inode, file);
@@ -461,6 +767,8 @@ static long ntsync_char_ioctl(struct fil
switch (cmd) {
case NTSYNC_IOC_CREATE_SEM:
return ntsync_create_sem(dev, argp);
+ case NTSYNC_IOC_WAIT_ALL:
+ return ntsync_wait_all(dev, argp);
case NTSYNC_IOC_WAIT_ANY:
return ntsync_wait_any(dev, argp);
default:
--- a/include/uapi/linux/ntsync.h
+++ b/include/uapi/linux/ntsync.h
@@ -30,6 +30,7 @@ struct ntsync_wait_args {
#define NTSYNC_IOC_CREATE_SEM _IOW ('N', 0x80, struct ntsync_sem_args)
#define NTSYNC_IOC_WAIT_ANY _IOWR('N', 0x82, struct ntsync_wait_args)
+#define NTSYNC_IOC_WAIT_ALL _IOWR('N', 0x83, struct ntsync_wait_args)
#define NTSYNC_IOC_SEM_RELEASE _IOWR('N', 0x81, __u32)

View File

@@ -1,222 +0,0 @@
From bcdeaefdc4b60e7845232c201427717df3a83277 Mon Sep 17 00:00:00 2001
From: Elizabeth Figura <zfigura@codeweavers.com>
Date: Fri, 13 Dec 2024 13:34:46 -0600
Subject: ntsync: Introduce NTSYNC_IOC_CREATE_MUTEX.
This corresponds to the NT syscall NtCreateMutant().
An NT mutex is recursive, with a 32-bit recursion counter. When acquired via
NtWaitForMultipleObjects(), the recursion counter is incremented by one. The OS
records the thread which acquired it.
The OS records the thread which acquired it. However, in order to keep this
driver self-contained, the owning thread ID is managed by user-space, and passed
as a parameter to all relevant ioctls.
The initial owner and recursion count, if any, are specified when the mutex is
created.
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
---
drivers/misc/ntsync.c | 74 +++++++++++++++++++++++++++++++++++--
include/uapi/linux/ntsync.h | 9 ++++-
2 files changed, 79 insertions(+), 4 deletions(-)
--- a/drivers/misc/ntsync.c
+++ b/drivers/misc/ntsync.c
@@ -25,6 +25,7 @@
enum ntsync_type {
NTSYNC_TYPE_SEM,
+ NTSYNC_TYPE_MUTEX,
};
/*
@@ -55,6 +56,10 @@ struct ntsync_obj {
__u32 count;
__u32 max;
} sem;
+ struct {
+ __u32 count;
+ pid_t owner;
+ } mutex;
} u;
/*
@@ -92,6 +97,7 @@ struct ntsync_q_entry {
struct ntsync_q {
struct task_struct *task;
+ __u32 owner;
/*
* Protected via atomic_try_cmpxchg(). Only the thread that wins the
@@ -214,13 +220,17 @@ static void ntsync_unlock_obj(struct nts
((lockdep_is_held(&(obj)->dev->wait_all_lock) != LOCK_STATE_NOT_HELD) && \
(obj)->dev_locked))
-static bool is_signaled(struct ntsync_obj *obj)
+static bool is_signaled(struct ntsync_obj *obj, __u32 owner)
{
ntsync_assert_held(obj);
switch (obj->type) {
case NTSYNC_TYPE_SEM:
return !!obj->u.sem.count;
+ case NTSYNC_TYPE_MUTEX:
+ if (obj->u.mutex.owner && obj->u.mutex.owner != owner)
+ return false;
+ return obj->u.mutex.count < UINT_MAX;
}
WARN(1, "bad object type %#x\n", obj->type);
@@ -250,7 +260,7 @@ static void try_wake_all(struct ntsync_d
}
for (i = 0; i < count; i++) {
- if (!is_signaled(q->entries[i].obj)) {
+ if (!is_signaled(q->entries[i].obj, q->owner)) {
can_wake = false;
break;
}
@@ -264,6 +274,10 @@ static void try_wake_all(struct ntsync_d
case NTSYNC_TYPE_SEM:
obj->u.sem.count--;
break;
+ case NTSYNC_TYPE_MUTEX:
+ obj->u.mutex.count++;
+ obj->u.mutex.owner = q->owner;
+ break;
}
}
wake_up_process(q->task);
@@ -307,6 +321,30 @@ static void try_wake_any_sem(struct ntsy
}
}
+static void try_wake_any_mutex(struct ntsync_obj *mutex)
+{
+ struct ntsync_q_entry *entry;
+
+ ntsync_assert_held(mutex);
+ lockdep_assert(mutex->type == NTSYNC_TYPE_MUTEX);
+
+ list_for_each_entry(entry, &mutex->any_waiters, node) {
+ struct ntsync_q *q = entry->q;
+ int signaled = -1;
+
+ if (mutex->u.mutex.count == UINT_MAX)
+ break;
+ if (mutex->u.mutex.owner && mutex->u.mutex.owner != q->owner)
+ continue;
+
+ if (atomic_try_cmpxchg(&q->signaled, &signaled, entry->index)) {
+ mutex->u.mutex.count++;
+ mutex->u.mutex.owner = q->owner;
+ wake_up_process(q->task);
+ }
+ }
+}
+
/*
* Actually change the semaphore state, returning -EOVERFLOW if it is made
* invalid.
@@ -451,6 +489,30 @@ static int ntsync_create_sem(struct ntsy
return fd;
}
+static int ntsync_create_mutex(struct ntsync_device *dev, void __user *argp)
+{
+ struct ntsync_mutex_args args;
+ struct ntsync_obj *mutex;
+ int fd;
+
+ if (copy_from_user(&args, argp, sizeof(args)))
+ return -EFAULT;
+
+ if (!args.owner != !args.count)
+ return -EINVAL;
+
+ mutex = ntsync_alloc_obj(dev, NTSYNC_TYPE_MUTEX);
+ if (!mutex)
+ return -ENOMEM;
+ mutex->u.mutex.count = args.count;
+ mutex->u.mutex.owner = args.owner;
+ fd = ntsync_obj_get_fd(mutex);
+ if (fd < 0)
+ kfree(mutex);
+
+ return fd;
+}
+
static struct ntsync_obj *get_obj(struct ntsync_device *dev, int fd)
{
struct file *file = fget(fd);
@@ -520,7 +582,7 @@ static int setup_wait(struct ntsync_devi
struct ntsync_q *q;
__u32 i, j;
- if (args->pad[0] || args->pad[1] || args->pad[2] || (args->flags & ~NTSYNC_WAIT_REALTIME))
+ if (args->pad[0] || args->pad[1] || (args->flags & ~NTSYNC_WAIT_REALTIME))
return -EINVAL;
if (args->count > NTSYNC_MAX_WAIT_COUNT)
@@ -534,6 +596,7 @@ static int setup_wait(struct ntsync_devi
if (!q)
return -ENOMEM;
q->task = current;
+ q->owner = args->owner;
atomic_set(&q->signaled, -1);
q->all = all;
q->count = count;
@@ -576,6 +639,9 @@ static void try_wake_any_obj(struct ntsy
case NTSYNC_TYPE_SEM:
try_wake_any_sem(obj);
break;
+ case NTSYNC_TYPE_MUTEX:
+ try_wake_any_mutex(obj);
+ break;
}
}
@@ -765,6 +831,8 @@ static long ntsync_char_ioctl(struct fil
void __user *argp = (void __user *)parm;
switch (cmd) {
+ case NTSYNC_IOC_CREATE_MUTEX:
+ return ntsync_create_mutex(dev, argp);
case NTSYNC_IOC_CREATE_SEM:
return ntsync_create_sem(dev, argp);
case NTSYNC_IOC_WAIT_ALL:
--- a/include/uapi/linux/ntsync.h
+++ b/include/uapi/linux/ntsync.h
@@ -15,6 +15,11 @@ struct ntsync_sem_args {
__u32 max;
};
+struct ntsync_mutex_args {
+ __u32 owner;
+ __u32 count;
+};
+
#define NTSYNC_WAIT_REALTIME 0x1
struct ntsync_wait_args {
@@ -23,7 +28,8 @@ struct ntsync_wait_args {
__u32 count;
__u32 index;
__u32 flags;
- __u32 pad[3];
+ __u32 owner;
+ __u32 pad[2];
};
#define NTSYNC_MAX_WAIT_COUNT 64
@@ -31,6 +37,7 @@ struct ntsync_wait_args {
#define NTSYNC_IOC_CREATE_SEM _IOW ('N', 0x80, struct ntsync_sem_args)
#define NTSYNC_IOC_WAIT_ANY _IOWR('N', 0x82, struct ntsync_wait_args)
#define NTSYNC_IOC_WAIT_ALL _IOWR('N', 0x83, struct ntsync_wait_args)
+#define NTSYNC_IOC_CREATE_MUTEX _IOW ('N', 0x84, struct ntsync_mutex_args)
#define NTSYNC_IOC_SEM_RELEASE _IOWR('N', 0x81, __u32)

View File

@@ -1,95 +0,0 @@
From e349279c9dc7fc2136a764a16074a90ef3039f38 Mon Sep 17 00:00:00 2001
From: Elizabeth Figura <zfigura@codeweavers.com>
Date: Fri, 13 Dec 2024 13:34:47 -0600
Subject: ntsync: Introduce NTSYNC_IOC_MUTEX_UNLOCK.
This corresponds to the NT syscall NtReleaseMutant().
This syscall decrements the mutex's recursion count by one, and returns the
previous value. If the mutex is not owned by the current task, the function
instead fails and returns -EPERM.
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
---
drivers/misc/ntsync.c | 53 +++++++++++++++++++++++++++++++++++++
include/uapi/linux/ntsync.h | 1 +
2 files changed, 54 insertions(+)
--- a/drivers/misc/ntsync.c
+++ b/drivers/misc/ntsync.c
@@ -396,6 +396,57 @@ static int ntsync_sem_release(struct nts
return ret;
}
+/*
+ * Actually change the mutex state, returning -EPERM if not the owner.
+ */
+static int unlock_mutex_state(struct ntsync_obj *mutex,
+ const struct ntsync_mutex_args *args)
+{
+ ntsync_assert_held(mutex);
+
+ if (mutex->u.mutex.owner != args->owner)
+ return -EPERM;
+
+ if (!--mutex->u.mutex.count)
+ mutex->u.mutex.owner = 0;
+ return 0;
+}
+
+static int ntsync_mutex_unlock(struct ntsync_obj *mutex, void __user *argp)
+{
+ struct ntsync_mutex_args __user *user_args = argp;
+ struct ntsync_device *dev = mutex->dev;
+ struct ntsync_mutex_args args;
+ __u32 prev_count;
+ bool all;
+ int ret;
+
+ if (copy_from_user(&args, argp, sizeof(args)))
+ return -EFAULT;
+ if (!args.owner)
+ return -EINVAL;
+
+ if (mutex->type != NTSYNC_TYPE_MUTEX)
+ return -EINVAL;
+
+ all = ntsync_lock_obj(dev, mutex);
+
+ prev_count = mutex->u.mutex.count;
+ ret = unlock_mutex_state(mutex, &args);
+ if (!ret) {
+ if (all)
+ try_wake_all_obj(dev, mutex);
+ try_wake_any_mutex(mutex);
+ }
+
+ ntsync_unlock_obj(dev, mutex, all);
+
+ if (!ret && put_user(prev_count, &user_args->count))
+ ret = -EFAULT;
+
+ return ret;
+}
+
static int ntsync_obj_release(struct inode *inode, struct file *file)
{
struct ntsync_obj *obj = file->private_data;
@@ -415,6 +466,8 @@ static long ntsync_obj_ioctl(struct file
switch (cmd) {
case NTSYNC_IOC_SEM_RELEASE:
return ntsync_sem_release(obj, argp);
+ case NTSYNC_IOC_MUTEX_UNLOCK:
+ return ntsync_mutex_unlock(obj, argp);
default:
return -ENOIOCTLCMD;
}
--- a/include/uapi/linux/ntsync.h
+++ b/include/uapi/linux/ntsync.h
@@ -40,5 +40,6 @@ struct ntsync_wait_args {
#define NTSYNC_IOC_CREATE_MUTEX _IOW ('N', 0x84, struct ntsync_mutex_args)
#define NTSYNC_IOC_SEM_RELEASE _IOWR('N', 0x81, __u32)
+#define NTSYNC_IOC_MUTEX_UNLOCK _IOWR('N', 0x85, struct ntsync_mutex_args)
#endif

View File

@@ -1,156 +0,0 @@
From ebb60a10ac3c6b28ba7a46aa67b279d41ad9356d Mon Sep 17 00:00:00 2001
From: Elizabeth Figura <zfigura@codeweavers.com>
Date: Fri, 13 Dec 2024 13:34:48 -0600
Subject: ntsync: Introduce NTSYNC_IOC_MUTEX_KILL.
This does not correspond to any NT syscall. Rather, when a thread dies, it
should be called by the NT emulator for each mutex, with the TID of the dying
thread.
NT mutexes are robust (in the pthread sense). When an NT thread dies, any
mutexes it owned are immediately released. Acquisition of those mutexes by other
threads will return a special value indicating that the mutex was abandoned,
like EOWNERDEAD returned from pthread_mutex_lock(), and EOWNERDEAD is indeed
used here for that purpose.
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
---
drivers/misc/ntsync.c | 61 +++++++++++++++++++++++++++++++++++--
include/uapi/linux/ntsync.h | 1 +
2 files changed, 60 insertions(+), 2 deletions(-)
--- a/drivers/misc/ntsync.c
+++ b/drivers/misc/ntsync.c
@@ -59,6 +59,7 @@ struct ntsync_obj {
struct {
__u32 count;
pid_t owner;
+ bool ownerdead;
} mutex;
} u;
@@ -107,6 +108,7 @@ struct ntsync_q {
atomic_t signaled;
bool all;
+ bool ownerdead;
__u32 count;
struct ntsync_q_entry entries[];
};
@@ -275,6 +277,9 @@ static void try_wake_all(struct ntsync_d
obj->u.sem.count--;
break;
case NTSYNC_TYPE_MUTEX:
+ if (obj->u.mutex.ownerdead)
+ q->ownerdead = true;
+ obj->u.mutex.ownerdead = false;
obj->u.mutex.count++;
obj->u.mutex.owner = q->owner;
break;
@@ -338,6 +343,9 @@ static void try_wake_any_mutex(struct nt
continue;
if (atomic_try_cmpxchg(&q->signaled, &signaled, entry->index)) {
+ if (mutex->u.mutex.ownerdead)
+ q->ownerdead = true;
+ mutex->u.mutex.ownerdead = false;
mutex->u.mutex.count++;
mutex->u.mutex.owner = q->owner;
wake_up_process(q->task);
@@ -447,6 +455,52 @@ static int ntsync_mutex_unlock(struct nt
return ret;
}
+/*
+ * Actually change the mutex state to mark its owner as dead,
+ * returning -EPERM if not the owner.
+ */
+static int kill_mutex_state(struct ntsync_obj *mutex, __u32 owner)
+{
+ ntsync_assert_held(mutex);
+
+ if (mutex->u.mutex.owner != owner)
+ return -EPERM;
+
+ mutex->u.mutex.ownerdead = true;
+ mutex->u.mutex.owner = 0;
+ mutex->u.mutex.count = 0;
+ return 0;
+}
+
+static int ntsync_mutex_kill(struct ntsync_obj *mutex, void __user *argp)
+{
+ struct ntsync_device *dev = mutex->dev;
+ __u32 owner;
+ bool all;
+ int ret;
+
+ if (get_user(owner, (__u32 __user *)argp))
+ return -EFAULT;
+ if (!owner)
+ return -EINVAL;
+
+ if (mutex->type != NTSYNC_TYPE_MUTEX)
+ return -EINVAL;
+
+ all = ntsync_lock_obj(dev, mutex);
+
+ ret = kill_mutex_state(mutex, owner);
+ if (!ret) {
+ if (all)
+ try_wake_all_obj(dev, mutex);
+ try_wake_any_mutex(mutex);
+ }
+
+ ntsync_unlock_obj(dev, mutex, all);
+
+ return ret;
+}
+
static int ntsync_obj_release(struct inode *inode, struct file *file)
{
struct ntsync_obj *obj = file->private_data;
@@ -468,6 +522,8 @@ static long ntsync_obj_ioctl(struct file
return ntsync_sem_release(obj, argp);
case NTSYNC_IOC_MUTEX_UNLOCK:
return ntsync_mutex_unlock(obj, argp);
+ case NTSYNC_IOC_MUTEX_KILL:
+ return ntsync_mutex_kill(obj, argp);
default:
return -ENOIOCTLCMD;
}
@@ -652,6 +708,7 @@ static int setup_wait(struct ntsync_devi
q->owner = args->owner;
atomic_set(&q->signaled, -1);
q->all = all;
+ q->ownerdead = false;
q->count = count;
for (i = 0; i < count; i++) {
@@ -760,7 +817,7 @@ static int ntsync_wait_any(struct ntsync
struct ntsync_wait_args __user *user_args = argp;
/* even if we caught a signal, we need to communicate success */
- ret = 0;
+ ret = q->ownerdead ? -EOWNERDEAD : 0;
if (put_user(signaled, &user_args->index))
ret = -EFAULT;
@@ -841,7 +898,7 @@ static int ntsync_wait_all(struct ntsync
struct ntsync_wait_args __user *user_args = argp;
/* even if we caught a signal, we need to communicate success */
- ret = 0;
+ ret = q->ownerdead ? -EOWNERDEAD : 0;
if (put_user(signaled, &user_args->index))
ret = -EFAULT;
--- a/include/uapi/linux/ntsync.h
+++ b/include/uapi/linux/ntsync.h
@@ -41,5 +41,6 @@ struct ntsync_wait_args {
#define NTSYNC_IOC_SEM_RELEASE _IOWR('N', 0x81, __u32)
#define NTSYNC_IOC_MUTEX_UNLOCK _IOWR('N', 0x85, struct ntsync_mutex_args)
+#define NTSYNC_IOC_MUTEX_KILL _IOW ('N', 0x86, __u32)
#endif

View File

@@ -1,162 +0,0 @@
From f74c8259d49ea4c0e679902da9c7c95ec06ae65c Mon Sep 17 00:00:00 2001
From: Elizabeth Figura <zfigura@codeweavers.com>
Date: Fri, 13 Dec 2024 13:34:49 -0600
Subject: ntsync: Introduce NTSYNC_IOC_CREATE_EVENT.
This correspond to the NT syscall NtCreateEvent().
An NT event holds a single bit of state denoting whether it is signaled or
unsignaled.
There are two types of events: manual-reset and automatic-reset. When an
automatic-reset event is acquired via a wait function, its state is reset to
unsignaled. Manual-reset events are not affected by wait functions.
Whether the event is manual-reset, and its initial state, are specified at
creation time.
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
---
drivers/misc/ntsync.c | 59 +++++++++++++++++++++++++++++++++++++
include/uapi/linux/ntsync.h | 6 ++++
2 files changed, 65 insertions(+)
--- a/drivers/misc/ntsync.c
+++ b/drivers/misc/ntsync.c
@@ -26,6 +26,7 @@
enum ntsync_type {
NTSYNC_TYPE_SEM,
NTSYNC_TYPE_MUTEX,
+ NTSYNC_TYPE_EVENT,
};
/*
@@ -61,6 +62,10 @@ struct ntsync_obj {
pid_t owner;
bool ownerdead;
} mutex;
+ struct {
+ bool manual;
+ bool signaled;
+ } event;
} u;
/*
@@ -233,6 +238,8 @@ static bool is_signaled(struct ntsync_ob
if (obj->u.mutex.owner && obj->u.mutex.owner != owner)
return false;
return obj->u.mutex.count < UINT_MAX;
+ case NTSYNC_TYPE_EVENT:
+ return obj->u.event.signaled;
}
WARN(1, "bad object type %#x\n", obj->type);
@@ -283,6 +290,10 @@ static void try_wake_all(struct ntsync_d
obj->u.mutex.count++;
obj->u.mutex.owner = q->owner;
break;
+ case NTSYNC_TYPE_EVENT:
+ if (!obj->u.event.manual)
+ obj->u.event.signaled = false;
+ break;
}
}
wake_up_process(q->task);
@@ -353,6 +364,28 @@ static void try_wake_any_mutex(struct nt
}
}
+static void try_wake_any_event(struct ntsync_obj *event)
+{
+ struct ntsync_q_entry *entry;
+
+ ntsync_assert_held(event);
+ lockdep_assert(event->type == NTSYNC_TYPE_EVENT);
+
+ list_for_each_entry(entry, &event->any_waiters, node) {
+ struct ntsync_q *q = entry->q;
+ int signaled = -1;
+
+ if (!event->u.event.signaled)
+ break;
+
+ if (atomic_try_cmpxchg(&q->signaled, &signaled, entry->index)) {
+ if (!event->u.event.manual)
+ event->u.event.signaled = false;
+ wake_up_process(q->task);
+ }
+ }
+}
+
/*
* Actually change the semaphore state, returning -EOVERFLOW if it is made
* invalid.
@@ -622,6 +655,27 @@ static int ntsync_create_mutex(struct nt
return fd;
}
+static int ntsync_create_event(struct ntsync_device *dev, void __user *argp)
+{
+ struct ntsync_event_args args;
+ struct ntsync_obj *event;
+ int fd;
+
+ if (copy_from_user(&args, argp, sizeof(args)))
+ return -EFAULT;
+
+ event = ntsync_alloc_obj(dev, NTSYNC_TYPE_EVENT);
+ if (!event)
+ return -ENOMEM;
+ event->u.event.manual = args.manual;
+ event->u.event.signaled = args.signaled;
+ fd = ntsync_obj_get_fd(event);
+ if (fd < 0)
+ kfree(event);
+
+ return fd;
+}
+
static struct ntsync_obj *get_obj(struct ntsync_device *dev, int fd)
{
struct file *file = fget(fd);
@@ -752,6 +806,9 @@ static void try_wake_any_obj(struct ntsy
case NTSYNC_TYPE_MUTEX:
try_wake_any_mutex(obj);
break;
+ case NTSYNC_TYPE_EVENT:
+ try_wake_any_event(obj);
+ break;
}
}
@@ -941,6 +998,8 @@ static long ntsync_char_ioctl(struct fil
void __user *argp = (void __user *)parm;
switch (cmd) {
+ case NTSYNC_IOC_CREATE_EVENT:
+ return ntsync_create_event(dev, argp);
case NTSYNC_IOC_CREATE_MUTEX:
return ntsync_create_mutex(dev, argp);
case NTSYNC_IOC_CREATE_SEM:
--- a/include/uapi/linux/ntsync.h
+++ b/include/uapi/linux/ntsync.h
@@ -20,6 +20,11 @@ struct ntsync_mutex_args {
__u32 count;
};
+struct ntsync_event_args {
+ __u32 manual;
+ __u32 signaled;
+};
+
#define NTSYNC_WAIT_REALTIME 0x1
struct ntsync_wait_args {
@@ -38,6 +43,7 @@ struct ntsync_wait_args {
#define NTSYNC_IOC_WAIT_ANY _IOWR('N', 0x82, struct ntsync_wait_args)
#define NTSYNC_IOC_WAIT_ALL _IOWR('N', 0x83, struct ntsync_wait_args)
#define NTSYNC_IOC_CREATE_MUTEX _IOW ('N', 0x84, struct ntsync_mutex_args)
+#define NTSYNC_IOC_CREATE_EVENT _IOW ('N', 0x87, struct ntsync_event_args)
#define NTSYNC_IOC_SEM_RELEASE _IOWR('N', 0x81, __u32)
#define NTSYNC_IOC_MUTEX_UNLOCK _IOWR('N', 0x85, struct ntsync_mutex_args)

View File

@@ -1,67 +0,0 @@
From bf60db9cfeccc8f92636b6dcf2eccd7fcd8d84f3 Mon Sep 17 00:00:00 2001
From: Elizabeth Figura <zfigura@codeweavers.com>
Date: Fri, 13 Dec 2024 13:34:50 -0600
Subject: ntsync: Introduce NTSYNC_IOC_EVENT_SET.
This corresponds to the NT syscall NtSetEvent().
This sets the event to the signaled state, and returns its previous state.
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
---
drivers/misc/ntsync.c | 27 +++++++++++++++++++++++++++
include/uapi/linux/ntsync.h | 1 +
2 files changed, 28 insertions(+)
--- a/drivers/misc/ntsync.c
+++ b/drivers/misc/ntsync.c
@@ -534,6 +534,31 @@ static int ntsync_mutex_kill(struct ntsy
return ret;
}
+static int ntsync_event_set(struct ntsync_obj *event, void __user *argp)
+{
+ struct ntsync_device *dev = event->dev;
+ __u32 prev_state;
+ bool all;
+
+ if (event->type != NTSYNC_TYPE_EVENT)
+ return -EINVAL;
+
+ all = ntsync_lock_obj(dev, event);
+
+ prev_state = event->u.event.signaled;
+ event->u.event.signaled = true;
+ if (all)
+ try_wake_all_obj(dev, event);
+ try_wake_any_event(event);
+
+ ntsync_unlock_obj(dev, event, all);
+
+ if (put_user(prev_state, (__u32 __user *)argp))
+ return -EFAULT;
+
+ return 0;
+}
+
static int ntsync_obj_release(struct inode *inode, struct file *file)
{
struct ntsync_obj *obj = file->private_data;
@@ -557,6 +582,8 @@ static long ntsync_obj_ioctl(struct file
return ntsync_mutex_unlock(obj, argp);
case NTSYNC_IOC_MUTEX_KILL:
return ntsync_mutex_kill(obj, argp);
+ case NTSYNC_IOC_EVENT_SET:
+ return ntsync_event_set(obj, argp);
default:
return -ENOIOCTLCMD;
}
--- a/include/uapi/linux/ntsync.h
+++ b/include/uapi/linux/ntsync.h
@@ -48,5 +48,6 @@ struct ntsync_wait_args {
#define NTSYNC_IOC_SEM_RELEASE _IOWR('N', 0x81, __u32)
#define NTSYNC_IOC_MUTEX_UNLOCK _IOWR('N', 0x85, struct ntsync_mutex_args)
#define NTSYNC_IOC_MUTEX_KILL _IOW ('N', 0x86, __u32)
+#define NTSYNC_IOC_EVENT_SET _IOR ('N', 0x88, __u32)
#endif

View File

@@ -1,64 +0,0 @@
From f2de3c99a840cac45446515dd268cb9d64f9f892 Mon Sep 17 00:00:00 2001
From: Elizabeth Figura <zfigura@codeweavers.com>
Date: Fri, 13 Dec 2024 13:34:51 -0600
Subject: ntsync: Introduce NTSYNC_IOC_EVENT_RESET.
This corresponds to the NT syscall NtResetEvent().
This sets the event to the unsignaled state, and returns its previous state.
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
---
drivers/misc/ntsync.c | 24 ++++++++++++++++++++++++
include/uapi/linux/ntsync.h | 1 +
2 files changed, 25 insertions(+)
--- a/drivers/misc/ntsync.c
+++ b/drivers/misc/ntsync.c
@@ -559,6 +559,28 @@ static int ntsync_event_set(struct ntsyn
return 0;
}
+static int ntsync_event_reset(struct ntsync_obj *event, void __user *argp)
+{
+ struct ntsync_device *dev = event->dev;
+ __u32 prev_state;
+ bool all;
+
+ if (event->type != NTSYNC_TYPE_EVENT)
+ return -EINVAL;
+
+ all = ntsync_lock_obj(dev, event);
+
+ prev_state = event->u.event.signaled;
+ event->u.event.signaled = false;
+
+ ntsync_unlock_obj(dev, event, all);
+
+ if (put_user(prev_state, (__u32 __user *)argp))
+ return -EFAULT;
+
+ return 0;
+}
+
static int ntsync_obj_release(struct inode *inode, struct file *file)
{
struct ntsync_obj *obj = file->private_data;
@@ -584,6 +606,8 @@ static long ntsync_obj_ioctl(struct file
return ntsync_mutex_kill(obj, argp);
case NTSYNC_IOC_EVENT_SET:
return ntsync_event_set(obj, argp);
+ case NTSYNC_IOC_EVENT_RESET:
+ return ntsync_event_reset(obj, argp);
default:
return -ENOIOCTLCMD;
}
--- a/include/uapi/linux/ntsync.h
+++ b/include/uapi/linux/ntsync.h
@@ -49,5 +49,6 @@ struct ntsync_wait_args {
#define NTSYNC_IOC_MUTEX_UNLOCK _IOWR('N', 0x85, struct ntsync_mutex_args)
#define NTSYNC_IOC_MUTEX_KILL _IOW ('N', 0x86, __u32)
#define NTSYNC_IOC_EVENT_SET _IOR ('N', 0x88, __u32)
+#define NTSYNC_IOC_EVENT_RESET _IOR ('N', 0x89, __u32)
#endif

View File

@@ -1,60 +0,0 @@
From 50c791dde217f9fdc1785de77fa2ae888d6bdb4e Mon Sep 17 00:00:00 2001
From: Elizabeth Figura <zfigura@codeweavers.com>
Date: Fri, 13 Dec 2024 13:34:52 -0600
Subject: ntsync: Introduce NTSYNC_IOC_EVENT_PULSE.
This corresponds to the NT syscall NtPulseEvent().
This wakes up any waiters as if the event had been set, but does not set the
event, instead resetting it if it had been signalled. Thus, for a manual-reset
event, all waiters are woken, whereas for an auto-reset event, at most one
waiter is woken.
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
---
drivers/misc/ntsync.c | 8 ++++++--
include/uapi/linux/ntsync.h | 1 +
2 files changed, 7 insertions(+), 2 deletions(-)
--- a/drivers/misc/ntsync.c
+++ b/drivers/misc/ntsync.c
@@ -534,7 +534,7 @@ static int ntsync_mutex_kill(struct ntsy
return ret;
}
-static int ntsync_event_set(struct ntsync_obj *event, void __user *argp)
+static int ntsync_event_set(struct ntsync_obj *event, void __user *argp, bool pulse)
{
struct ntsync_device *dev = event->dev;
__u32 prev_state;
@@ -550,6 +550,8 @@ static int ntsync_event_set(struct ntsyn
if (all)
try_wake_all_obj(dev, event);
try_wake_any_event(event);
+ if (pulse)
+ event->u.event.signaled = false;
ntsync_unlock_obj(dev, event, all);
@@ -605,9 +607,11 @@ static long ntsync_obj_ioctl(struct file
case NTSYNC_IOC_MUTEX_KILL:
return ntsync_mutex_kill(obj, argp);
case NTSYNC_IOC_EVENT_SET:
- return ntsync_event_set(obj, argp);
+ return ntsync_event_set(obj, argp, false);
case NTSYNC_IOC_EVENT_RESET:
return ntsync_event_reset(obj, argp);
+ case NTSYNC_IOC_EVENT_PULSE:
+ return ntsync_event_set(obj, argp, true);
default:
return -ENOIOCTLCMD;
}
--- a/include/uapi/linux/ntsync.h
+++ b/include/uapi/linux/ntsync.h
@@ -50,5 +50,6 @@ struct ntsync_wait_args {
#define NTSYNC_IOC_MUTEX_KILL _IOW ('N', 0x86, __u32)
#define NTSYNC_IOC_EVENT_SET _IOR ('N', 0x88, __u32)
#define NTSYNC_IOC_EVENT_RESET _IOR ('N', 0x89, __u32)
+#define NTSYNC_IOC_EVENT_PULSE _IOR ('N', 0x8a, __u32)
#endif

View File

@@ -1,64 +0,0 @@
From 248013d9877d47dc5219344268c10b62de1f52f2 Mon Sep 17 00:00:00 2001
From: Elizabeth Figura <zfigura@codeweavers.com>
Date: Fri, 13 Dec 2024 13:34:53 -0600
Subject: ntsync: Introduce NTSYNC_IOC_SEM_READ.
This corresponds to the NT syscall NtQuerySemaphore().
This returns the current count and maximum count of the semaphore.
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
---
drivers/misc/ntsync.c | 24 ++++++++++++++++++++++++
include/uapi/linux/ntsync.h | 1 +
2 files changed, 25 insertions(+)
--- a/drivers/misc/ntsync.c
+++ b/drivers/misc/ntsync.c
@@ -583,6 +583,28 @@ static int ntsync_event_reset(struct nts
return 0;
}
+static int ntsync_sem_read(struct ntsync_obj *sem, void __user *argp)
+{
+ struct ntsync_sem_args __user *user_args = argp;
+ struct ntsync_device *dev = sem->dev;
+ struct ntsync_sem_args args;
+ bool all;
+
+ if (sem->type != NTSYNC_TYPE_SEM)
+ return -EINVAL;
+
+ all = ntsync_lock_obj(dev, sem);
+
+ args.count = sem->u.sem.count;
+ args.max = sem->u.sem.max;
+
+ ntsync_unlock_obj(dev, sem, all);
+
+ if (copy_to_user(user_args, &args, sizeof(args)))
+ return -EFAULT;
+ return 0;
+}
+
static int ntsync_obj_release(struct inode *inode, struct file *file)
{
struct ntsync_obj *obj = file->private_data;
@@ -602,6 +624,8 @@ static long ntsync_obj_ioctl(struct file
switch (cmd) {
case NTSYNC_IOC_SEM_RELEASE:
return ntsync_sem_release(obj, argp);
+ case NTSYNC_IOC_SEM_READ:
+ return ntsync_sem_read(obj, argp);
case NTSYNC_IOC_MUTEX_UNLOCK:
return ntsync_mutex_unlock(obj, argp);
case NTSYNC_IOC_MUTEX_KILL:
--- a/include/uapi/linux/ntsync.h
+++ b/include/uapi/linux/ntsync.h
@@ -51,5 +51,6 @@ struct ntsync_wait_args {
#define NTSYNC_IOC_EVENT_SET _IOR ('N', 0x88, __u32)
#define NTSYNC_IOC_EVENT_RESET _IOR ('N', 0x89, __u32)
#define NTSYNC_IOC_EVENT_PULSE _IOR ('N', 0x8a, __u32)
+#define NTSYNC_IOC_SEM_READ _IOR ('N', 0x8b, struct ntsync_sem_args)
#endif

View File

@@ -1,66 +0,0 @@
From 8fc7a993fd8bc6b1a09b4b965bee7d16bb2156cc Mon Sep 17 00:00:00 2001
From: Elizabeth Figura <zfigura@codeweavers.com>
Date: Fri, 13 Dec 2024 13:34:54 -0600
Subject: ntsync: Introduce NTSYNC_IOC_MUTEX_READ.
This corresponds to the NT syscall NtQueryMutant().
This returns the recursion count, owner, and abandoned state of the mutex.
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
---
drivers/misc/ntsync.c | 26 ++++++++++++++++++++++++++
include/uapi/linux/ntsync.h | 1 +
2 files changed, 27 insertions(+)
--- a/drivers/misc/ntsync.c
+++ b/drivers/misc/ntsync.c
@@ -605,6 +605,30 @@ static int ntsync_sem_read(struct ntsync
return 0;
}
+static int ntsync_mutex_read(struct ntsync_obj *mutex, void __user *argp)
+{
+ struct ntsync_mutex_args __user *user_args = argp;
+ struct ntsync_device *dev = mutex->dev;
+ struct ntsync_mutex_args args;
+ bool all;
+ int ret;
+
+ if (mutex->type != NTSYNC_TYPE_MUTEX)
+ return -EINVAL;
+
+ all = ntsync_lock_obj(dev, mutex);
+
+ args.count = mutex->u.mutex.count;
+ args.owner = mutex->u.mutex.owner;
+ ret = mutex->u.mutex.ownerdead ? -EOWNERDEAD : 0;
+
+ ntsync_unlock_obj(dev, mutex, all);
+
+ if (copy_to_user(user_args, &args, sizeof(args)))
+ return -EFAULT;
+ return ret;
+}
+
static int ntsync_obj_release(struct inode *inode, struct file *file)
{
struct ntsync_obj *obj = file->private_data;
@@ -630,6 +654,8 @@ static long ntsync_obj_ioctl(struct file
return ntsync_mutex_unlock(obj, argp);
case NTSYNC_IOC_MUTEX_KILL:
return ntsync_mutex_kill(obj, argp);
+ case NTSYNC_IOC_MUTEX_READ:
+ return ntsync_mutex_read(obj, argp);
case NTSYNC_IOC_EVENT_SET:
return ntsync_event_set(obj, argp, false);
case NTSYNC_IOC_EVENT_RESET:
--- a/include/uapi/linux/ntsync.h
+++ b/include/uapi/linux/ntsync.h
@@ -52,5 +52,6 @@ struct ntsync_wait_args {
#define NTSYNC_IOC_EVENT_RESET _IOR ('N', 0x89, __u32)
#define NTSYNC_IOC_EVENT_PULSE _IOR ('N', 0x8a, __u32)
#define NTSYNC_IOC_SEM_READ _IOR ('N', 0x8b, struct ntsync_sem_args)
+#define NTSYNC_IOC_MUTEX_READ _IOR ('N', 0x8c, struct ntsync_mutex_args)
#endif

View File

@@ -1,64 +0,0 @@
From aed34cc9c28dba5e3735d7c59e1970a32eefc5f4 Mon Sep 17 00:00:00 2001
From: Elizabeth Figura <zfigura@codeweavers.com>
Date: Fri, 13 Dec 2024 13:34:55 -0600
Subject: ntsync: Introduce NTSYNC_IOC_EVENT_READ.
This corresponds to the NT syscall NtQueryEvent().
This returns the signaled state of the event and whether it is manual-reset.
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
---
drivers/misc/ntsync.c | 24 ++++++++++++++++++++++++
include/uapi/linux/ntsync.h | 1 +
2 files changed, 25 insertions(+)
--- a/drivers/misc/ntsync.c
+++ b/drivers/misc/ntsync.c
@@ -629,6 +629,28 @@ static int ntsync_mutex_read(struct ntsy
return ret;
}
+static int ntsync_event_read(struct ntsync_obj *event, void __user *argp)
+{
+ struct ntsync_event_args __user *user_args = argp;
+ struct ntsync_device *dev = event->dev;
+ struct ntsync_event_args args;
+ bool all;
+
+ if (event->type != NTSYNC_TYPE_EVENT)
+ return -EINVAL;
+
+ all = ntsync_lock_obj(dev, event);
+
+ args.manual = event->u.event.manual;
+ args.signaled = event->u.event.signaled;
+
+ ntsync_unlock_obj(dev, event, all);
+
+ if (copy_to_user(user_args, &args, sizeof(args)))
+ return -EFAULT;
+ return 0;
+}
+
static int ntsync_obj_release(struct inode *inode, struct file *file)
{
struct ntsync_obj *obj = file->private_data;
@@ -662,6 +684,8 @@ static long ntsync_obj_ioctl(struct file
return ntsync_event_reset(obj, argp);
case NTSYNC_IOC_EVENT_PULSE:
return ntsync_event_set(obj, argp, true);
+ case NTSYNC_IOC_EVENT_READ:
+ return ntsync_event_read(obj, argp);
default:
return -ENOIOCTLCMD;
}
--- a/include/uapi/linux/ntsync.h
+++ b/include/uapi/linux/ntsync.h
@@ -53,5 +53,6 @@ struct ntsync_wait_args {
#define NTSYNC_IOC_EVENT_PULSE _IOR ('N', 0x8a, __u32)
#define NTSYNC_IOC_SEM_READ _IOR ('N', 0x8b, struct ntsync_sem_args)
#define NTSYNC_IOC_MUTEX_READ _IOR ('N', 0x8c, struct ntsync_mutex_args)
+#define NTSYNC_IOC_EVENT_READ _IOR ('N', 0x8d, struct ntsync_event_args)
#endif

View File

@@ -1,187 +0,0 @@
From 361a7fb848ba9cac87855cb68f9ab000ed1027be Mon Sep 17 00:00:00 2001
From: Elizabeth Figura <zfigura@codeweavers.com>
Date: Fri, 13 Dec 2024 13:34:56 -0600
Subject: ntsync: Introduce alertable waits.
NT waits can optionally be made "alertable". This is a special channel for
thread wakeup that is mildly similar to SIGIO. A thread has an internal single
bit of "alerted" state, and if a thread is alerted while an alertable wait, the
wait will return a special value, consume the "alerted" state, and will not
consume any of its objects.
Alerts are implemented using events; the user-space NT emulator is expected to
create an internal ntsync event for each thread and pass that event to wait
functions.
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
---
drivers/misc/ntsync.c | 70 ++++++++++++++++++++++++++++++++-----
include/uapi/linux/ntsync.h | 3 +-
2 files changed, 63 insertions(+), 10 deletions(-)
--- a/drivers/misc/ntsync.c
+++ b/drivers/misc/ntsync.c
@@ -869,22 +869,29 @@ static int setup_wait(struct ntsync_devi
const struct ntsync_wait_args *args, bool all,
struct ntsync_q **ret_q)
{
+ int fds[NTSYNC_MAX_WAIT_COUNT + 1];
const __u32 count = args->count;
- int fds[NTSYNC_MAX_WAIT_COUNT];
struct ntsync_q *q;
+ __u32 total_count;
__u32 i, j;
- if (args->pad[0] || args->pad[1] || (args->flags & ~NTSYNC_WAIT_REALTIME))
+ if (args->pad || (args->flags & ~NTSYNC_WAIT_REALTIME))
return -EINVAL;
if (args->count > NTSYNC_MAX_WAIT_COUNT)
return -EINVAL;
+ total_count = count;
+ if (args->alert)
+ total_count++;
+
if (copy_from_user(fds, u64_to_user_ptr(args->objs),
array_size(count, sizeof(*fds))))
return -EFAULT;
+ if (args->alert)
+ fds[count] = args->alert;
- q = kmalloc(struct_size(q, entries, count), GFP_KERNEL);
+ q = kmalloc(struct_size(q, entries, total_count), GFP_KERNEL);
if (!q)
return -ENOMEM;
q->task = current;
@@ -894,7 +901,7 @@ static int setup_wait(struct ntsync_devi
q->ownerdead = false;
q->count = count;
- for (i = 0; i < count; i++) {
+ for (i = 0; i < total_count; i++) {
struct ntsync_q_entry *entry = &q->entries[i];
struct ntsync_obj *obj = get_obj(dev, fds[i]);
@@ -944,10 +951,10 @@ static void try_wake_any_obj(struct ntsy
static int ntsync_wait_any(struct ntsync_device *dev, void __user *argp)
{
struct ntsync_wait_args args;
+ __u32 i, total_count;
struct ntsync_q *q;
int signaled;
bool all;
- __u32 i;
int ret;
if (copy_from_user(&args, argp, sizeof(args)))
@@ -957,9 +964,13 @@ static int ntsync_wait_any(struct ntsync
if (ret < 0)
return ret;
+ total_count = args.count;
+ if (args.alert)
+ total_count++;
+
/* queue ourselves */
- for (i = 0; i < args.count; i++) {
+ for (i = 0; i < total_count; i++) {
struct ntsync_q_entry *entry = &q->entries[i];
struct ntsync_obj *obj = entry->obj;
@@ -968,9 +979,15 @@ static int ntsync_wait_any(struct ntsync
ntsync_unlock_obj(dev, obj, all);
}
- /* check if we are already signaled */
+ /*
+ * Check if we are already signaled.
+ *
+ * Note that the API requires that normal objects are checked before
+ * the alert event. Hence we queue the alert event last, and check
+ * objects in order.
+ */
- for (i = 0; i < args.count; i++) {
+ for (i = 0; i < total_count; i++) {
struct ntsync_obj *obj = q->entries[i].obj;
if (atomic_read(&q->signaled) != -1)
@@ -987,7 +1004,7 @@ static int ntsync_wait_any(struct ntsync
/* and finally, unqueue */
- for (i = 0; i < args.count; i++) {
+ for (i = 0; i < total_count; i++) {
struct ntsync_q_entry *entry = &q->entries[i];
struct ntsync_obj *obj = entry->obj;
@@ -1047,6 +1064,14 @@ static int ntsync_wait_all(struct ntsync
*/
list_add_tail(&entry->node, &obj->all_waiters);
}
+ if (args.alert) {
+ struct ntsync_q_entry *entry = &q->entries[args.count];
+ struct ntsync_obj *obj = entry->obj;
+
+ dev_lock_obj(dev, obj);
+ list_add_tail(&entry->node, &obj->any_waiters);
+ dev_unlock_obj(dev, obj);
+ }
/* check if we are already signaled */
@@ -1054,6 +1079,21 @@ static int ntsync_wait_all(struct ntsync
mutex_unlock(&dev->wait_all_lock);
+ /*
+ * Check if the alert event is signaled, making sure to do so only
+ * after checking if the other objects are signaled.
+ */
+
+ if (args.alert) {
+ struct ntsync_obj *obj = q->entries[args.count].obj;
+
+ if (atomic_read(&q->signaled) == -1) {
+ bool all = ntsync_lock_obj(dev, obj);
+ try_wake_any_obj(obj);
+ ntsync_unlock_obj(dev, obj, all);
+ }
+ }
+
/* sleep */
ret = ntsync_schedule(q, &args);
@@ -1079,6 +1119,18 @@ static int ntsync_wait_all(struct ntsync
mutex_unlock(&dev->wait_all_lock);
+ if (args.alert) {
+ struct ntsync_q_entry *entry = &q->entries[args.count];
+ struct ntsync_obj *obj = entry->obj;
+ bool all;
+
+ all = ntsync_lock_obj(dev, obj);
+ list_del(&entry->node);
+ ntsync_unlock_obj(dev, obj, all);
+
+ put_obj(obj);
+ }
+
signaled = atomic_read(&q->signaled);
if (signaled != -1) {
struct ntsync_wait_args __user *user_args = argp;
--- a/include/uapi/linux/ntsync.h
+++ b/include/uapi/linux/ntsync.h
@@ -34,7 +34,8 @@ struct ntsync_wait_args {
__u32 index;
__u32 flags;
__u32 owner;
- __u32 pad[2];
+ __u32 alert;
+ __u32 pad;
};
#define NTSYNC_MAX_WAIT_COUNT 64

View File

@@ -1,30 +0,0 @@
From b240b27e5348d38acbc4a12f1dc762dd1845f391 Mon Sep 17 00:00:00 2001
From: Elizabeth Figura <zfigura@codeweavers.com>
Date: Fri, 13 Dec 2024 13:35:09 -0600
Subject: maintainers: Add an entry for ntsync.
Add myself as maintainer, supported by CodeWeavers.
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
---
MAINTAINERS | 9 +++++++++
1 file changed, 9 insertions(+)
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -16486,6 +16486,15 @@ T: git https://github.com/Paragon-Softwa
F: Documentation/filesystems/ntfs3.rst
F: fs/ntfs3/
+NTSYNC SYNCHRONIZATION PRIMITIVE DRIVER
+M: Elizabeth Figura <zfigura@codeweavers.com>
+L: wine-devel@winehq.org
+S: Supported
+F: Documentation/userspace-api/ntsync.rst
+F: drivers/misc/ntsync.c
+F: include/uapi/linux/ntsync.h
+F: tools/testing/selftests/drivers/ntsync/
+
NUBUS SUBSYSTEM
M: Finn Thain <fthain@linux-m68k.org>
L: linux-m68k@lists.linux-m68k.org

View File

@@ -1,413 +0,0 @@
From 733e310bb840117593a0eb4726fa63b34fea9cc3 Mon Sep 17 00:00:00 2001
From: Elizabeth Figura <zfigura@codeweavers.com>
Date: Fri, 13 Dec 2024 13:35:10 -0600
Subject: docs: ntsync: Add documentation for the ntsync uAPI.
Add an overall explanation of the driver architecture, and complete and precise
specification for its intended behaviour.
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
---
Documentation/userspace-api/index.rst | 1 +
Documentation/userspace-api/ntsync.rst | 385 +++++++++++++++++++++++++
2 files changed, 386 insertions(+)
create mode 100644 Documentation/userspace-api/ntsync.rst
--- a/Documentation/userspace-api/index.rst
+++ b/Documentation/userspace-api/index.rst
@@ -63,6 +63,7 @@ Everything else
vduse
futex2
perf_ring_buffer
+ ntsync
.. only:: subproject and html
--- /dev/null
+++ b/Documentation/userspace-api/ntsync.rst
@@ -0,0 +1,385 @@
+===================================
+NT synchronization primitive driver
+===================================
+
+This page documents the user-space API for the ntsync driver.
+
+ntsync is a support driver for emulation of NT synchronization
+primitives by user-space NT emulators. It exists because implementation
+in user-space, using existing tools, cannot match Windows performance
+while offering accurate semantics. It is implemented entirely in
+software, and does not drive any hardware device.
+
+This interface is meant as a compatibility tool only, and should not
+be used for general synchronization. Instead use generic, versatile
+interfaces such as futex(2) and poll(2).
+
+Synchronization primitives
+==========================
+
+The ntsync driver exposes three types of synchronization primitives:
+semaphores, mutexes, and events.
+
+A semaphore holds a single volatile 32-bit counter, and a static 32-bit
+integer denoting the maximum value. It is considered signaled (that is,
+can be acquired without contention, or will wake up a waiting thread)
+when the counter is nonzero. The counter is decremented by one when a
+wait is satisfied. Both the initial and maximum count are established
+when the semaphore is created.
+
+A mutex holds a volatile 32-bit recursion count, and a volatile 32-bit
+identifier denoting its owner. A mutex is considered signaled when its
+owner is zero (indicating that it is not owned). The recursion count is
+incremented when a wait is satisfied, and ownership is set to the given
+identifier.
+
+A mutex also holds an internal flag denoting whether its previous owner
+has died; such a mutex is said to be abandoned. Owner death is not
+tracked automatically based on thread death, but rather must be
+communicated using ``NTSYNC_IOC_MUTEX_KILL``. An abandoned mutex is
+inherently considered unowned.
+
+Except for the "unowned" semantics of zero, the actual value of the
+owner identifier is not interpreted by the ntsync driver at all. The
+intended use is to store a thread identifier; however, the ntsync
+driver does not actually validate that a calling thread provides
+consistent or unique identifiers.
+
+An event is similar to a semaphore with a maximum count of one. It holds
+a volatile boolean state denoting whether it is signaled or not. There
+are two types of events, auto-reset and manual-reset. An auto-reset
+event is designaled when a wait is satisfied; a manual-reset event is
+not. The event type is specified when the event is created.
+
+Unless specified otherwise, all operations on an object are atomic and
+totally ordered with respect to other operations on the same object.
+
+Objects are represented by files. When all file descriptors to an
+object are closed, that object is deleted.
+
+Char device
+===========
+
+The ntsync driver creates a single char device /dev/ntsync. Each file
+description opened on the device represents a unique instance intended
+to back an individual NT virtual machine. Objects created by one ntsync
+instance may only be used with other objects created by the same
+instance.
+
+ioctl reference
+===============
+
+All operations on the device are done through ioctls. There are four
+structures used in ioctl calls::
+
+ struct ntsync_sem_args {
+ __u32 count;
+ __u32 max;
+ };
+
+ struct ntsync_mutex_args {
+ __u32 owner;
+ __u32 count;
+ };
+
+ struct ntsync_event_args {
+ __u32 signaled;
+ __u32 manual;
+ };
+
+ struct ntsync_wait_args {
+ __u64 timeout;
+ __u64 objs;
+ __u32 count;
+ __u32 owner;
+ __u32 index;
+ __u32 alert;
+ __u32 flags;
+ __u32 pad;
+ };
+
+Depending on the ioctl, members of the structure may be used as input,
+output, or not at all.
+
+The ioctls on the device file are as follows:
+
+.. c:macro:: NTSYNC_IOC_CREATE_SEM
+
+ Create a semaphore object. Takes a pointer to struct
+ :c:type:`ntsync_sem_args`, which is used as follows:
+
+ .. list-table::
+
+ * - ``count``
+ - Initial count of the semaphore.
+ * - ``max``
+ - Maximum count of the semaphore.
+
+ Fails with ``EINVAL`` if ``count`` is greater than ``max``.
+ On success, returns a file descriptor the created semaphore.
+
+.. c:macro:: NTSYNC_IOC_CREATE_MUTEX
+
+ Create a mutex object. Takes a pointer to struct
+ :c:type:`ntsync_mutex_args`, which is used as follows:
+
+ .. list-table::
+
+ * - ``count``
+ - Initial recursion count of the mutex.
+ * - ``owner``
+ - Initial owner of the mutex.
+
+ If ``owner`` is nonzero and ``count`` is zero, or if ``owner`` is
+ zero and ``count`` is nonzero, the function fails with ``EINVAL``.
+ On success, returns a file descriptor the created mutex.
+
+.. c:macro:: NTSYNC_IOC_CREATE_EVENT
+
+ Create an event object. Takes a pointer to struct
+ :c:type:`ntsync_event_args`, which is used as follows:
+
+ .. list-table::
+
+ * - ``signaled``
+ - If nonzero, the event is initially signaled, otherwise
+ nonsignaled.
+ * - ``manual``
+ - If nonzero, the event is a manual-reset event, otherwise
+ auto-reset.
+
+ On success, returns a file descriptor the created event.
+
+The ioctls on the individual objects are as follows:
+
+.. c:macro:: NTSYNC_IOC_SEM_POST
+
+ Post to a semaphore object. Takes a pointer to a 32-bit integer,
+ which on input holds the count to be added to the semaphore, and on
+ output contains its previous count.
+
+ If adding to the semaphore's current count would raise the latter
+ past the semaphore's maximum count, the ioctl fails with
+ ``EOVERFLOW`` and the semaphore is not affected. If raising the
+ semaphore's count causes it to become signaled, eligible threads
+ waiting on this semaphore will be woken and the semaphore's count
+ decremented appropriately.
+
+.. c:macro:: NTSYNC_IOC_MUTEX_UNLOCK
+
+ Release a mutex object. Takes a pointer to struct
+ :c:type:`ntsync_mutex_args`, which is used as follows:
+
+ .. list-table::
+
+ * - ``owner``
+ - Specifies the owner trying to release this mutex.
+ * - ``count``
+ - On output, contains the previous recursion count.
+
+ If ``owner`` is zero, the ioctl fails with ``EINVAL``. If ``owner``
+ is not the current owner of the mutex, the ioctl fails with
+ ``EPERM``.
+
+ The mutex's count will be decremented by one. If decrementing the
+ mutex's count causes it to become zero, the mutex is marked as
+ unowned and signaled, and eligible threads waiting on it will be
+ woken as appropriate.
+
+.. c:macro:: NTSYNC_IOC_SET_EVENT
+
+ Signal an event object. Takes a pointer to a 32-bit integer, which on
+ output contains the previous state of the event.
+
+ Eligible threads will be woken, and auto-reset events will be
+ designaled appropriately.
+
+.. c:macro:: NTSYNC_IOC_RESET_EVENT
+
+ Designal an event object. Takes a pointer to a 32-bit integer, which
+ on output contains the previous state of the event.
+
+.. c:macro:: NTSYNC_IOC_PULSE_EVENT
+
+ Wake threads waiting on an event object while leaving it in an
+ unsignaled state. Takes a pointer to a 32-bit integer, which on
+ output contains the previous state of the event.
+
+ A pulse operation can be thought of as a set followed by a reset,
+ performed as a single atomic operation. If two threads are waiting on
+ an auto-reset event which is pulsed, only one will be woken. If two
+ threads are waiting a manual-reset event which is pulsed, both will
+ be woken. However, in both cases, the event will be unsignaled
+ afterwards, and a simultaneous read operation will always report the
+ event as unsignaled.
+
+.. c:macro:: NTSYNC_IOC_READ_SEM
+
+ Read the current state of a semaphore object. Takes a pointer to
+ struct :c:type:`ntsync_sem_args`, which is used as follows:
+
+ .. list-table::
+
+ * - ``count``
+ - On output, contains the current count of the semaphore.
+ * - ``max``
+ - On output, contains the maximum count of the semaphore.
+
+.. c:macro:: NTSYNC_IOC_READ_MUTEX
+
+ Read the current state of a mutex object. Takes a pointer to struct
+ :c:type:`ntsync_mutex_args`, which is used as follows:
+
+ .. list-table::
+
+ * - ``owner``
+ - On output, contains the current owner of the mutex, or zero
+ if the mutex is not currently owned.
+ * - ``count``
+ - On output, contains the current recursion count of the mutex.
+
+ If the mutex is marked as abandoned, the function fails with
+ ``EOWNERDEAD``. In this case, ``count`` and ``owner`` are set to
+ zero.
+
+.. c:macro:: NTSYNC_IOC_READ_EVENT
+
+ Read the current state of an event object. Takes a pointer to struct
+ :c:type:`ntsync_event_args`, which is used as follows:
+
+ .. list-table::
+
+ * - ``signaled``
+ - On output, contains the current state of the event.
+ * - ``manual``
+ - On output, contains 1 if the event is a manual-reset event,
+ and 0 otherwise.
+
+.. c:macro:: NTSYNC_IOC_KILL_OWNER
+
+ Mark a mutex as unowned and abandoned if it is owned by the given
+ owner. Takes an input-only pointer to a 32-bit integer denoting the
+ owner. If the owner is zero, the ioctl fails with ``EINVAL``. If the
+ owner does not own the mutex, the function fails with ``EPERM``.
+
+ Eligible threads waiting on the mutex will be woken as appropriate
+ (and such waits will fail with ``EOWNERDEAD``, as described below).
+
+.. c:macro:: NTSYNC_IOC_WAIT_ANY
+
+ Poll on any of a list of objects, atomically acquiring at most one.
+ Takes a pointer to struct :c:type:`ntsync_wait_args`, which is
+ used as follows:
+
+ .. list-table::
+
+ * - ``timeout``
+ - Absolute timeout in nanoseconds. If ``NTSYNC_WAIT_REALTIME``
+ is set, the timeout is measured against the REALTIME clock;
+ otherwise it is measured against the MONOTONIC clock. If the
+ timeout is equal to or earlier than the current time, the
+ function returns immediately without sleeping. If ``timeout``
+ is U64_MAX, the function will sleep until an object is
+ signaled, and will not fail with ``ETIMEDOUT``.
+ * - ``objs``
+ - Pointer to an array of ``count`` file descriptors
+ (specified as an integer so that the structure has the same
+ size regardless of architecture). If any object is
+ invalid, the function fails with ``EINVAL``.
+ * - ``count``
+ - Number of objects specified in the ``objs`` array.
+ If greater than ``NTSYNC_MAX_WAIT_COUNT``, the function fails
+ with ``EINVAL``.
+ * - ``owner``
+ - Mutex owner identifier. If any object in ``objs`` is a mutex,
+ the ioctl will attempt to acquire that mutex on behalf of
+ ``owner``. If ``owner`` is zero, the ioctl fails with
+ ``EINVAL``.
+ * - ``index``
+ - On success, contains the index (into ``objs``) of the object
+ which was signaled. If ``alert`` was signaled instead,
+ this contains ``count``.
+ * - ``alert``
+ - Optional event object file descriptor. If nonzero, this
+ specifies an "alert" event object which, if signaled, will
+ terminate the wait. If nonzero, the identifier must point to a
+ valid event.
+ * - ``flags``
+ - Zero or more flags. Currently the only flag is
+ ``NTSYNC_WAIT_REALTIME``, which causes the timeout to be
+ measured against the REALTIME clock instead of MONOTONIC.
+ * - ``pad``
+ - Unused, must be set to zero.
+
+ This function attempts to acquire one of the given objects. If unable
+ to do so, it sleeps until an object becomes signaled, subsequently
+ acquiring it, or the timeout expires. In the latter case the ioctl
+ fails with ``ETIMEDOUT``. The function only acquires one object, even
+ if multiple objects are signaled.
+
+ A semaphore is considered to be signaled if its count is nonzero, and
+ is acquired by decrementing its count by one. A mutex is considered
+ to be signaled if it is unowned or if its owner matches the ``owner``
+ argument, and is acquired by incrementing its recursion count by one
+ and setting its owner to the ``owner`` argument. An auto-reset event
+ is acquired by designaling it; a manual-reset event is not affected
+ by acquisition.
+
+ Acquisition is atomic and totally ordered with respect to other
+ operations on the same object. If two wait operations (with different
+ ``owner`` identifiers) are queued on the same mutex, only one is
+ signaled. If two wait operations are queued on the same semaphore,
+ and a value of one is posted to it, only one is signaled.
+
+ If an abandoned mutex is acquired, the ioctl fails with
+ ``EOWNERDEAD``. Although this is a failure return, the function may
+ otherwise be considered successful. The mutex is marked as owned by
+ the given owner (with a recursion count of 1) and as no longer
+ abandoned, and ``index`` is still set to the index of the mutex.
+
+ The ``alert`` argument is an "extra" event which can terminate the
+ wait, independently of all other objects.
+
+ It is valid to pass the same object more than once, including by
+ passing the same event in the ``objs`` array and in ``alert``. If a
+ wakeup occurs due to that object being signaled, ``index`` is set to
+ the lowest index corresponding to that object.
+
+ The function may fail with ``EINTR`` if a signal is received.
+
+.. c:macro:: NTSYNC_IOC_WAIT_ALL
+
+ Poll on a list of objects, atomically acquiring all of them. Takes a
+ pointer to struct :c:type:`ntsync_wait_args`, which is used
+ identically to ``NTSYNC_IOC_WAIT_ANY``, except that ``index`` is
+ always filled with zero on success if not woken via alert.
+
+ This function attempts to simultaneously acquire all of the given
+ objects. If unable to do so, it sleeps until all objects become
+ simultaneously signaled, subsequently acquiring them, or the timeout
+ expires. In the latter case the ioctl fails with ``ETIMEDOUT`` and no
+ objects are modified.
+
+ Objects may become signaled and subsequently designaled (through
+ acquisition by other threads) while this thread is sleeping. Only
+ once all objects are simultaneously signaled does the ioctl acquire
+ them and return. The entire acquisition is atomic and totally ordered
+ with respect to other operations on any of the given objects.
+
+ If an abandoned mutex is acquired, the ioctl fails with
+ ``EOWNERDEAD``. Similarly to ``NTSYNC_IOC_WAIT_ANY``, all objects are
+ nevertheless marked as acquired. Note that if multiple mutex objects
+ are specified, there is no way to know which were marked as
+ abandoned.
+
+ As with "any" waits, the ``alert`` argument is an "extra" event which
+ can terminate the wait. Critically, however, an "all" wait will
+ succeed if all members in ``objs`` are signaled, *or* if ``alert`` is
+ signaled. In the latter case ``index`` will be set to ``count``. As
+ with "any" waits, if both conditions are filled, the former takes
+ priority, and objects in ``objs`` will be acquired.
+
+ Unlike ``NTSYNC_IOC_WAIT_ANY``, it is not valid to pass the same
+ object more than once, nor is it valid to pass the same object in
+ ``objs`` and in ``alert``. If this is attempted, the function fails
+ with ``EINVAL``.

View File

@@ -1,25 +0,0 @@
From 4871bb89577d78a3d55b44e47c3a4f677dbdc89b Mon Sep 17 00:00:00 2001
From: Elizabeth Figura <zfigura@codeweavers.com>
Date: Fri, 13 Dec 2024 13:35:11 -0600
Subject: ntsync: No longer depend on BROKEN.
f5b335dc025cfee90957efa90dc72fada0d5abb4 ("misc: ntsync: mark driver as "broken"
to prevent from building") was committed to avoid the driver being used while
only part of its functionality was released. Since the rest of the functionality
has now been committed, revert this.
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
---
drivers/misc/Kconfig | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -517,7 +517,6 @@ config OPEN_DICE
config NTSYNC
tristate "NT synchronization primitive emulation"
- depends on BROKEN
help
This module provides kernel support for emulation of Windows NT
synchronization primitives. It is not a hardware driver.

View File

@@ -1,22 +0,0 @@
From 2aa0cab3a568e6adccbe708ee2e79185638860ed Mon Sep 17 00:00:00 2001
From: Mike Lothian <mike@fireburn.co.uk>
Date: Fri, 14 Feb 2025 12:28:00 +0000
Subject: ntsync: Set the permissions to be 0666
This allows ntsync to be usuable by non-root processes out of the box
Signed-off-by: Mike Lothian <mike@fireburn.co.uk>
---
drivers/misc/ntsync.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/misc/ntsync.c
+++ b/drivers/misc/ntsync.c
@@ -1206,6 +1206,7 @@ static struct miscdevice ntsync_misc = {
.minor = MISC_DYNAMIC_MINOR,
.name = NTSYNC_NAME,
.fops = &ntsync_fops,
+ .mode = 0666, // Setting file permissions to 0666
};
module_misc_device(ntsync_misc);

View File

@@ -21,12 +21,12 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -62,7 +62,8 @@ bool __ieee80211_recalc_txpower(struct i
if (sdata->deflink.user_power_level != IEEE80211_UNSET_POWER_LEVEL)
power = min(power, sdata->deflink.user_power_level);
if (link->user_power_level != IEEE80211_UNSET_POWER_LEVEL)
power = min(power, link->user_power_level);
- if (sdata->deflink.ap_power_level != IEEE80211_UNSET_POWER_LEVEL)
+ if (sdata->deflink.ap_power_level != IEEE80211_UNSET_POWER_LEVEL &&
+ sdata->vif.bss_conf.txpower_type != NL80211_TX_POWER_FIXED)
power = min(power, sdata->deflink.ap_power_level);
- if (link->ap_power_level != IEEE80211_UNSET_POWER_LEVEL)
+ if (link->ap_power_level != IEEE80211_UNSET_POWER_LEVEL &&
+ link->conf->txpower_type != NL80211_TX_POWER_FIXED)
power = min(power, link->ap_power_level);
if (power != sdata->vif.bss_conf.txpower) {
if (power != link->conf->txpower) {

View File

@@ -0,0 +1,34 @@
From: David Bauer <mail@david-bauer.net>
Date: Thu, 30 Nov 2023 07:32:52 +0100
Subject: [PATCH] mac80211: avoid crashing on invalid band info
Frequent crashes have been observed on MT7916 based platforms. While the
root of these crashes are currently unknown, they happen when decoding
rate information of connected STAs in AP mode. The rate-information is
associated with a band which is not available on the PHY.
Check for this condition in order to avoid crashing the whole system.
This patch should be removed once the roout cause has been found and
fixed.
Link: https://github.com/freifunk-gluon/gluon/issues/2980
Signed-off-by: David Bauer <mail@david-bauer.net>
---
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -2467,6 +2467,13 @@ static void sta_stats_decode_rate(struct
sband = local->hw.wiphy->bands[band];
+ if (!sband) {
+ wiphy_warn(local->hw.wiphy,
+ "Invalid band %d\n",
+ band);
+ break;
+ }
+
if (WARN_ON_ONCE(!sband->bitrates))
break;

View File

@@ -0,0 +1,38 @@
From b478e06a16a8baa00c5ecc87c1d636981f2206d5 Mon Sep 17 00:00:00 2001
From: Johannes Berg <johannes.berg@intel.com>
Date: Tue, 29 Oct 2019 10:25:25 +0100
Subject: [PATCH] mac80211: sta: randomize BA session dialog token allocator
We currently always start the dialog token generator at zero,
so the first dialog token we use is always 1. This would be
OK if we had a perfect guarantee that we always do a proper
deauth/re-auth handshake, but in IBSS mode this doesn't always
happen properly.
To make problems with block ack (aggregation) sessions getting
stuck less likely, randomize the dialog token so if we start a
new session but the peer still has old state for us, it can
better detect this.
This is really just a workaround to make things a bit more
robust than they are now - a better fix would be to do a full
authentication handshake in IBSS mode upon having discovered a
new station, and on the receiver resetting the state (removing
and re-adding the station) on receiving the authentication
packet.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/sta_info.c | 1 +
1 file changed, 1 insertion(+)
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -582,6 +582,7 @@ __sta_info_alloc(struct ieee80211_sub_if
spin_lock_init(&sta->ps_lock);
INIT_WORK(&sta->drv_deliver_wk, sta_deliver_ps_frames);
wiphy_work_init(&sta->ampdu_mlme.work, ieee80211_ba_session_work);
+ sta->ampdu_mlme.dialog_token_allocator = get_random_u32_below(U8_MAX);
#ifdef CONFIG_MAC80211_MESH
if (ieee80211_vif_is_mesh(&sdata->vif)) {
sta->mesh = kzalloc(sizeof(*sta->mesh), gfp);

View File

@@ -0,0 +1,21 @@
From: Felix Fietkau <nbd@nbd.name>
Date: Wed, 28 Apr 2021 21:03:13 +0200
Subject: [PATCH] mac80211: minstrel_ht: fix MINSTREL_FRAC macro
Add missing braces to avoid issues with e.g. using additions in the
div expression
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/net/mac80211/rc80211_minstrel_ht.h
+++ b/net/mac80211/rc80211_minstrel_ht.h
@@ -14,7 +14,7 @@
/* scaled fraction values */
#define MINSTREL_SCALE 12
-#define MINSTREL_FRAC(val, div) (((val) << MINSTREL_SCALE) / div)
+#define MINSTREL_FRAC(val, div) (((val) << MINSTREL_SCALE) / (div))
#define MINSTREL_TRUNC(val) ((val) >> MINSTREL_SCALE)
#define EWMA_LEVEL 96 /* ewma weighting factor [/EWMA_DIV] */

View File

@@ -0,0 +1,30 @@
From: Felix Fietkau <nbd@nbd.name>
Date: Sat, 6 Feb 2021 16:08:01 +0100
Subject: [PATCH] mac80211: minstrel_ht: reduce fluctuations in rate
probability stats
In some scenarios when there is a lot of fluctuation in packet error rates,
rate switching can be amplified when the statistics get skewed by time slots
with very few tries.
Make the input data to the moving average more smooth by adding the
success/attempts count from the last stats window as well. This has the
advantage of smoothing the data without introducing any extra lag to sampling
rates.
This significantly improves rate stability on a strong test link subjected to
periodic noise bursts generated with a SDR
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -769,7 +769,8 @@ minstrel_ht_calc_rate_stats(struct minst
unsigned int cur_prob;
if (unlikely(mrs->attempts > 0)) {
- cur_prob = MINSTREL_FRAC(mrs->success, mrs->attempts);
+ cur_prob = MINSTREL_FRAC(mrs->success + mrs->last_success,
+ mrs->attempts + mrs->last_attempts);
minstrel_filter_avg_add(&mrs->prob_avg,
&mrs->prob_avg_1, cur_prob);
mrs->att_hist += mrs->attempts;

View File

@@ -0,0 +1,151 @@
From: Felix Fietkau <nbd@nbd.name>
Date: Sat, 6 Feb 2021 16:33:14 +0100
Subject: [PATCH] mac80211: minstrel_ht: rework rate downgrade code and
max_prob rate selection
The current fallback code for fast rate switching on potentially failing rates
is triggering too often if there is some strong noise on the channel. This can
lead to wild fluctuations in the rate selection.
Additionally, switching down to max_prob_rate can create a significant gap down
in throughput, especially when using only 2 spatial streams, because max_prob_rate
is limited to using fewer streams than the max_tp rates.
In order to improve throughput without reducing reliability too much, use the
rate downgrade code for the max_prob_rate only, and allow the non-downgraded
max_prob_rate to use as many spatial streams as the max_tp rates
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -580,6 +580,14 @@ minstrel_ht_set_best_prob_rate(struct mi
int cur_tp_avg, cur_group, cur_idx;
int max_gpr_group, max_gpr_idx;
int max_gpr_tp_avg, max_gpr_prob;
+ int min_dur;
+
+ min_dur = max(minstrel_get_duration(mi->max_tp_rate[0]),
+ minstrel_get_duration(mi->max_tp_rate[1]));
+
+ /* make the rate at least 18% slower than max tp rates */
+ if (minstrel_get_duration(index) <= min_dur * 19 / 16)
+ return;
cur_group = MI_RATE_GROUP(index);
cur_idx = MI_RATE_IDX(index);
@@ -601,11 +609,6 @@ minstrel_ht_set_best_prob_rate(struct mi
!minstrel_ht_is_legacy_group(max_tp_group))
return;
- /* skip rates faster than max tp rate with lower prob */
- if (minstrel_get_duration(mi->max_tp_rate[0]) > minstrel_get_duration(index) &&
- mrs->prob_avg < max_tp_prob)
- return;
-
max_gpr_group = MI_RATE_GROUP(mg->max_group_prob_rate);
max_gpr_idx = MI_RATE_IDX(mg->max_group_prob_rate);
max_gpr_prob = mi->groups[max_gpr_group].rates[max_gpr_idx].prob_avg;
@@ -663,40 +666,6 @@ minstrel_ht_assign_best_tp_rates(struct
}
-/*
- * Try to increase robustness of max_prob rate by decrease number of
- * streams if possible.
- */
-static inline void
-minstrel_ht_prob_rate_reduce_streams(struct minstrel_ht_sta *mi)
-{
- struct minstrel_mcs_group_data *mg;
- int tmp_max_streams, group, tmp_idx, tmp_prob;
- int tmp_tp = 0;
-
- if (!mi->sta->deflink.ht_cap.ht_supported)
- return;
-
- group = MI_RATE_GROUP(mi->max_tp_rate[0]);
- tmp_max_streams = minstrel_mcs_groups[group].streams;
- for (group = 0; group < ARRAY_SIZE(minstrel_mcs_groups); group++) {
- mg = &mi->groups[group];
- if (!mi->supported[group] || group == MINSTREL_CCK_GROUP)
- continue;
-
- tmp_idx = MI_RATE_IDX(mg->max_group_prob_rate);
- tmp_prob = mi->groups[group].rates[tmp_idx].prob_avg;
-
- if (tmp_tp < minstrel_ht_get_tp_avg(mi, group, tmp_idx, tmp_prob) &&
- (minstrel_mcs_groups[group].streams < tmp_max_streams)) {
- mi->max_prob_rate = mg->max_group_prob_rate;
- tmp_tp = minstrel_ht_get_tp_avg(mi, group,
- tmp_idx,
- tmp_prob);
- }
- }
-}
-
static u16
__minstrel_ht_get_sample_rate(struct minstrel_ht_sta *mi,
enum minstrel_sample_type type)
@@ -1176,8 +1145,6 @@ minstrel_ht_update_stats(struct minstrel
mi->max_prob_rate = tmp_max_prob_rate;
- /* Try to increase robustness of max_prob_rate*/
- minstrel_ht_prob_rate_reduce_streams(mi);
minstrel_ht_refill_sample_rates(mi);
#ifdef CONFIG_MAC80211_DEBUGFS
@@ -1256,7 +1223,7 @@ minstrel_ht_ri_txstat_valid(struct minst
}
static void
-minstrel_downgrade_rate(struct minstrel_ht_sta *mi, u16 *idx, bool primary)
+minstrel_downgrade_prob_rate(struct minstrel_ht_sta *mi, u16 *idx)
{
int group, orig_group;
@@ -1271,11 +1238,7 @@ minstrel_downgrade_rate(struct minstrel_
minstrel_mcs_groups[orig_group].streams)
continue;
- if (primary)
- *idx = mi->groups[group].max_group_tp_rate[0];
- else
- *idx = mi->groups[group].max_group_tp_rate[1];
- break;
+ *idx = mi->groups[group].max_group_prob_rate;
}
}
@@ -1286,7 +1249,7 @@ minstrel_ht_tx_status(void *priv, struct
struct ieee80211_tx_info *info = st->info;
struct minstrel_ht_sta *mi = priv_sta;
struct ieee80211_tx_rate *ar = info->status.rates;
- struct minstrel_rate_stats *rate, *rate2;
+ struct minstrel_rate_stats *rate;
struct minstrel_priv *mp = priv;
u32 update_interval = mp->update_interval;
bool last, update = false;
@@ -1354,18 +1317,13 @@ minstrel_ht_tx_status(void *priv, struct
/*
* check for sudden death of spatial multiplexing,
* downgrade to a lower number of streams if necessary.
+ * only do this for the max_prob_rate to prevent spurious
+ * rate fluctuations when the link changes suddenly
*/
- rate = minstrel_get_ratestats(mi, mi->max_tp_rate[0]);
+ rate = minstrel_get_ratestats(mi, mi->max_prob_rate);
if (rate->attempts > 30 &&
rate->success < rate->attempts / 4) {
- minstrel_downgrade_rate(mi, &mi->max_tp_rate[0], true);
- update = true;
- }
-
- rate2 = minstrel_get_ratestats(mi, mi->max_tp_rate[1]);
- if (rate2->attempts > 30 &&
- rate2->success < rate2->attempts / 4) {
- minstrel_downgrade_rate(mi, &mi->max_tp_rate[1], false);
+ minstrel_downgrade_prob_rate(mi, &mi->max_prob_rate);
update = true;
}
}

View File

@@ -0,0 +1,53 @@
From: Felix Fietkau <nbd@nbd.name>
Date: Sun, 26 Jun 2022 11:43:25 +0200
Subject: [PATCH] mac80211: increase quantum for airtime scheduler
Given the typical AQL budget and queue length, a quantum of 256 with the
default station weight often requires iterating over all queues frequently,
until one of them becomes eligible.
Improve performance by using 8 times station weight as scheduler quantum
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -103,6 +103,8 @@ ieee80211_sta_keep_active(struct sta_inf
return time_before_eq(jiffies, sta->airtime[ac].last_active + HZ / 10);
}
+#define AIRTIME_QUANTUM_SHIFT 3
+
struct ieee80211_bss {
u32 device_ts_beacon, device_ts_presp;
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -4085,7 +4085,7 @@ struct ieee80211_txq *ieee80211_next_txq
if (deficit < 0)
sta->airtime[txqi->txq.ac].deficit +=
- sta->airtime_weight;
+ sta->airtime_weight << AIRTIME_QUANTUM_SHIFT;
if (deficit < 0 || !aql_check) {
list_move_tail(&txqi->schedule_order,
@@ -4230,7 +4230,8 @@ bool ieee80211_txq_may_transmit(struct i
}
sta = container_of(iter->txq.sta, struct sta_info, sta);
if (ieee80211_sta_deficit(sta, ac) < 0)
- sta->airtime[ac].deficit += sta->airtime_weight;
+ sta->airtime[ac].deficit += sta->airtime_weight <<
+ AIRTIME_QUANTUM_SHIFT;
list_move_tail(&iter->schedule_order, &local->active_txqs[ac]);
}
@@ -4238,7 +4239,7 @@ bool ieee80211_txq_may_transmit(struct i
if (sta->airtime[ac].deficit >= 0)
goto out;
- sta->airtime[ac].deficit += sta->airtime_weight;
+ sta->airtime[ac].deficit += sta->airtime_weight << AIRTIME_QUANTUM_SHIFT;
list_move_tail(&txqi->schedule_order, &local->active_txqs[ac]);
spin_unlock_bh(&local->active_txq_lock[ac]);

Some files were not shown because too many files have changed in this diff Show More