5.1が出たので.config
がどう変更されるのか見てみた.以下 -
は削除されたもの,+
は追加されたもの.
-
+CONFIG_IO_URING=y
新しく導入されたio_uring.y にしておく.
-
+CONFIG_UNIX_SCM=y
net: split out functions related to registering inflight socket files
io_uring
に関連.ちなみに手元ではCONFIG_UNIX
はy
にしている(diskless用). -
+CONFIG_EFI_EARLYCON=y
+CONFIG_ARCH_USE_MEMREMAP_PROT=y
-CONFIG_EARLY_PRINTK_EFI=y
x86: Make ARCH_USE_MEMREMAP_PROT a generic Kconfig symbol
efi/x86: Convert x86 EFI earlyprintk into generic earlycon implementationARCH_USE_MEMREMAP_PROT
がarch/x86/Kconfig
(depends on AMD_MEM_ENCRYPT
) からarch/Kconfig
に移動.early_printk.o
がearlycon.o
になって,より Generic に. -
+CONFIG_LSM="yama,loadpin,safesetid,integrity"
-CONFIG_DEFAULT_SECURITY=""
-CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1
LSM: Introduce CONFIG_LSM
LoadPin: Initialize as ordered LSM
apparmor: Remove SECURITY_APPARMOR_BOOTPARAM_VALUELSM (Linux Security Modules) が List されるようになった.
CONFIG_DEFAULT_SECURITY_DAC=y
としているので,上記のようなリストになる.Debian の Default のCONFIG_DEFAULT_SECURITY_APPARMOR=y
にして,CONFIG_LSM="yama,loadpin,safesetid,integrity,apparmor,selinux,smack,tomoyo"
にした
その他
-
+CONFIG_NF_NAT_MASQUERADE=y
-CONFIG_NF_NAT_IPV4=m
-CONFIG_NF_NAT_MASQUERADE_IPV4=y
netfilter: nat: merge ipv4 and ipv6 masquerade functionality
netfilter: nf_tables: merge ipv4 and ipv6 nat chain typesマージされた.
-
+CONFIG_CC_HAS_WARN_MAYBE_UNINITIALIZED=y
kbuild: compute false-positive -Wmaybe-uninitialized cases in Kconfig
自動設定.
-
-CONFIG_IA32_AOUT=y
X86_32
からselectされなくなった. -
-CONFIG_MAY_USE_DEVLINK=y
net: devlink: turn devlink into a built-in
削除された.
-
+CONFIG_IPVLAN_L3S=y
ipvlan: decouple l3s mode dependencies from other modes
IPVLAN
のNETFILTER
依存の部分が切り出された. -
+CONFIG_LDISC_AUTOLOAD=y
tty: ldisc: add sysctl to prevent autoloading of ldiscs
y
にしておく. -
+CONFIG_USB_AUTOSUSPEND_DELAY=2
usb: core: make default autosuspend delay configurable
これがdefaultなので,そのまましておく.
-
+CONFIG_VALIDATE_FS_PARSER=y
vfs: Add configuration parser helpers
y
にしておく. -
+CONFIG_UBSAN_ALIGNMENT=y
lib/ubsan: default UBSAN_ALIGNMENT to not set
X86
でHAVE_EFFICIENT_UNALIGNED_ACCESS
がselectされ,その状態だとUBSAN_NO_ALIGNMENT=y
にできるがCONFIG_UBSAN=n
なので関係なくって,とりあえずそのまま.
DKMS
案の定 nvidia-kernel-dkms (410.104-1~bpo9+1) と nvidia-legacy-340xx-kernel-dkms (340.107-2~bpo9+1) が compile できない.broadcom-sta-dkms は今回試さず.エラーは以下のようなもの(抜粋).
/var/lib/dkms/nvidia-current/410.104/build/common/inc/nv-list-helpers.h:94:19: error: redefinition of ‘list_is_first’
static inline int list_is_first(const struct list_head *list,
^~~~~~~~~~~~~
In file included from /var/lib/dkms/nvidia-current/410.104/build/common/inc/nv-kthread-q.h:28:0,
from /var/lib/dkms/nvidia-current/410.104/build/nvidia/nv-kthread-q.c:24:
./include/linux/list.h:214:19: note: previous definition of ‘list_is_first’ was here
static inline int list_is_first(const struct list_head *list,
^~~~~~~~~~~~~
/var/lib/dkms/nvidia-current/410.104/build/nvidia-uvm/uvm8.c:187:14: error: initialization from incompatible pointer type [-Werror=incompatible-po
inter-types]
.fault = uvm_vm_fault_sigbus_wrapper
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/nvidia-current/410.104/build/nvidia-drm/nvidia-drm-encoder.c:293:5: error: implicit declaration of function ‘drm_kms_helper_hotplug_event’ [-Werror=implicit-function-declaration]
drm_kms_helper_hotplug_event(dev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
list_is_first
については mm, compaction: use free lists to quickly locate a migration source で list_is_first
が drivers/gpu/drm/i915/i915_utils.h
から include/linux/list.h
に移動したことによるもの./usr/src/nvidia-current/410.104/build/common/inc/nv-list-helpers.h
でも全く同じコードなので,/usr/src/nvidia-current/410.104/build/common/inc/nv-list-helpers.h
から削除してしまう.
vm_operations_struct
の .fault
が incompatible pointer type
の件については,mm: change return type to vm_fault_t で返り値がvm_fault_t
に変更になったため.返り値をvm_fault_t
にする.
最後のimplicit declaration of function
については drm: Split out drm_probe_helper.h で drm probe helper が drm_crtc_helper.h
から drm_probe_helper.h
に分離されたことによるもの.drm_crtc_helper.h
ではなく drm_probe_helper.h
を include
するようにする.
以下 nvidia-kernel-dkms (410.104-1~bpo9+1) 向け patch.
diff --git a/common/inc/nv-list-helpers.h b/common/inc/nv-list-helpers.h
index 0aed851..81c2d4e 100644
--- a/common/inc/nv-list-helpers.h
+++ b/common/inc/nv-list-helpers.h
@@ -91,10 +91,12 @@
list_entry((pos)->member.next, typeof(*(pos)), member)
#endif
+/*
static inline int list_is_first(const struct list_head *list,
const struct list_head *head)
{
return list->prev == head;
}
+*/
#endif // __NV_LIST_HELPERS_H__
diff --git a/nvidia-drm/nvidia-drm-connector.c b/nvidia-drm/nvidia-drm-connector.c
index 4dd12d1..723d35f 100644
--- a/nvidia-drm/nvidia-drm-connector.c
+++ b/nvidia-drm/nvidia-drm-connector.c
@@ -30,7 +30,7 @@
#include "nvidia-drm-utils.h"
#include "nvidia-drm-encoder.h"
-#include <drm/drm_crtc_helper.h>
+#include <drm/drm_probe_helper.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
diff --git a/nvidia-drm/nvidia-drm-drv.c b/nvidia-drm/nvidia-drm-drv.c
index 49f099f..ca714c2 100644
--- a/nvidia-drm/nvidia-drm-drv.c
+++ b/nvidia-drm/nvidia-drm-drv.c
@@ -41,7 +41,7 @@
#include <drm/drmP.h>
-#include <drm/drm_crtc_helper.h>
+#include <drm/drm_probe_helper.h>
#if defined(NV_DRM_DRM_GEM_H_PRESENT)
#include <drm/drm_gem.h>
diff --git a/nvidia-drm/nvidia-drm-encoder.c b/nvidia-drm/nvidia-drm-encoder.c
index f66bbd7..0e5e2a8 100644
--- a/nvidia-drm/nvidia-drm-encoder.c
+++ b/nvidia-drm/nvidia-drm-encoder.c
@@ -31,7 +31,7 @@
#include "nvidia-drm-crtc.h"
#include "nvidia-drm-helper.h"
-#include <drm/drm_crtc_helper.h>
+#include <drm/drm_probe_helper.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
diff --git a/nvidia-drm/nvidia-drm-gem-nvkms-memory.c b/nvidia-drm/nvidia-drm-gem-nvkms-memory.c
index 998fcc2..1f2d974 100644
--- a/nvidia-drm/nvidia-drm-gem-nvkms-memory.c
+++ b/nvidia-drm/nvidia-drm-gem-nvkms-memory.c
@@ -330,7 +330,7 @@ done:
/* XXX Move these vma operations to os layer */
-static int __nv_drm_vma_fault(struct vm_area_struct *vma,
+static vm_fault_t __nv_drm_vma_fault(struct vm_area_struct *vma,
struct vm_fault *vmf)
{
unsigned long address = nv_page_fault_va(vmf);
@@ -377,7 +377,7 @@ static int __nv_drm_vma_fault(struct vm_area_struct *vma,
*/
#if defined(NV_VM_OPS_FAULT_REMOVED_VMA_ARG)
-static int nv_drm_vma_fault(struct vm_fault *vmf)
+static vm_fault_t nv_drm_vma_fault(struct vm_fault *vmf)
{
return __nv_drm_vma_fault(vmf->vma, vmf);
}
diff --git a/nvidia-uvm/uvm8.c b/nvidia-uvm/uvm8.c
index 70ed244..9f3d107 100644
--- a/nvidia-uvm/uvm8.c
+++ b/nvidia-uvm/uvm8.c
@@ -166,13 +166,13 @@ static void uvm_destroy_vma_semaphore_pool(struct vm_area_struct *vma)
// If a fault handler is not set, paths like handle_pte_fault in older kernels
// assume the memory is anonymous. That would make debugging this failure harder
// so we force it to fail instead.
-static int uvm_vm_fault_sigbus(struct vm_area_struct *vma, struct vm_fault *vmf)
+static vm_fault_t uvm_vm_fault_sigbus(struct vm_area_struct *vma, struct vm_fault *vmf)
{
UVM_DBG_PRINT_RL("Fault to address 0x%lx in disabled vma\n", nv_page_fault_va(vmf));
return VM_FAULT_SIGBUS;
}
-static int uvm_vm_fault_sigbus_wrapper(struct vm_fault *vmf)
+static vm_fault_t uvm_vm_fault_sigbus_wrapper(struct vm_fault *vmf)
{
#if defined(NV_VM_OPS_FAULT_REMOVED_VMA_ARG)
return uvm_vm_fault_sigbus(vmf->vma, vmf);
@@ -390,7 +390,7 @@ static void uvm_vm_close_managed(struct vm_area_struct *vma)
uvm_record_unlock_mmap_sem_write(¤t->mm->mmap_sem);
}
-static int uvm_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
+static vm_fault_t uvm_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
{
uvm_va_space_t *va_space = uvm_va_space_get(vma->vm_file);
uvm_va_block_t *va_block;
@@ -507,7 +507,7 @@ convert_error:
}
}
-static int uvm_vm_fault_wrapper(struct vm_fault *vmf)
+static vm_fault_t uvm_vm_fault_wrapper(struct vm_fault *vmf)
{
#if defined(NV_VM_OPS_FAULT_REMOVED_VMA_ARG)
return uvm_vm_fault(vmf->vma, vmf);
以下 nvidia-legacy-340xx-kernel-dkms (340.107-2~bpo9+1) 向け patch.Linux 5.0 向け patchがあたっていることが前提.
diff --git a/uvm/nvidia_uvm_lite.c b/uvm/nvidia_uvm_lite.c
index 9f1a479..7d6a99a 100644
--- a/uvm/nvidia_uvm_lite.c
+++ b/uvm/nvidia_uvm_lite.c
@@ -828,7 +828,7 @@ done:
#if defined(NV_VM_OPERATIONS_STRUCT_HAS_FAULT)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
-int _fault(struct vm_fault *vmf)
+vm_fault_t _fault(struct vm_fault *vmf)
#else
int _fault(struct vm_area_struct *vma, struct vm_fault *vmf)
#endif
@@ -884,7 +884,7 @@ static struct vm_operations_struct uvmlite_vma_ops =
//
#if defined(NV_VM_OPERATIONS_STRUCT_HAS_FAULT)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
-int _sigbus_fault(struct vm_fault *vmf)
+vm_fault_t _sigbus_fault(struct vm_fault *vmf)
#else
int _sigbus_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
#endif
ともに Linux 5.1 より前の version で動かすことは考えていない.
追記 (2019/5/9)
nvidia-kernel-418.56 では list_is_first
が存在するかのチェックが行われるので,コメントアウト不要.