やるきなし

2018/06/20 17:06 / Linux 4.17.2 -> 4.18-rc1

4.18-rc1が出たので.configがどう変更されるのか見てみた.以下 - は削除されたもの(or n),+ は追加されたもの,m->y等は値の変化.汎用指向の環境.

STACKPROTECTOR 関連

kbuild/kconfig/kcov

Network 関連

ほか

DKMS

普段使う DKMS である以下(sid)は,すべて compile に失敗する...

追記 (2018/6/21)

上記DKMS問題,まず broadcom-sta で以下の様な error が出る.

  CC [M]  /var/lib/dkms/broadcom-sta/6.30.223.271/build/src/shared/linux_osl.o
In file included from ./include/linux/rseq.h:13:0,
                 from ./include/linux/sched.h:30,
                 from ./include/linux/ioprio.h:5,
                 from ./include/linux/fs.h:39,
                 from ./include/linux/huge_mm.h:7,
                 from ./include/linux/mm.h:479,
                 from /var/lib/dkms/broadcom-sta/6.30.223.271/build/src/include/linuxver.h:65,
                 from /var/lib/dkms/broadcom-sta/6.30.223.271/build/src/shared/linux_osl.c:25:
/usr/lib/gcc/x86_64-linux-gnu/7/include/stdint.h:9:26: error: no include path in which to search for stdint.h
 # include_next <stdint.h>

rseq.h は以下の2つあって,include/uapi/linux/のものを使うのが正解.

以下の2つのファイルを削除すると broadcom-sta と nvidia-legacy-340xx-kernel-dkms (nvidia-legacy-340xx) は compile できるようになる.

次にnvidia-kernel-dkms.上記対応を想定して,こちらはさらに以下のようなエラー.

  gcc -Wp,-MD,/var/lib/dkms/nvidia-current/390.59/build/nvidia-drm/.nvidia-drm-prime-fence.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/7/include -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -DCC_HAVE_ASM_GOTO -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -march=core2 -mno-red-zone -mcmodel=kernel -funit-at-a-time -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -DRETPOLINE -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-var-tracking-assignments -g -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -mrecord-mcount -I/var/lib/dkms/nvidia-current/390.59/build/common/inc -I/var/lib/dkms/nvidia-current/390.59/build -Wall -MD -Wsign-compare -Wno-cast-qual -Wno-error -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"390.59\" -Wno-unused-function -Wuninitialized -fno-strict-aliasing -mno-red-zone -mcmodel=kernel -DNV_UVM_ENABLE -Wno-sign-compare -Wno-format-extra-args -Werror=undef -I/var/lib/dkms/nvidia-current/390.59/build/nvidia-drm -UDEBUG -U_DEBUG -DNDEBUG -DNV_BUILD_MODULE_INSTANCES=0  -DMODULE  -DKBUILD_BASENAME='"nvidia_drm_prime_fence"' -DKBUILD_MODNAME='"nvidia_drm"' -c -o /var/lib/dkms/nvidia-current/390.59/build/nvidia-drm/.tmp_nvidia-drm-prime-fence.o /var/lib/dkms/nvidia-current/390.59/build/nvidia-drm/nvidia-drm-prime-fence.c
   ./tools/objtool/objtool orc generate  --module --no-fp  --retpoline "/var/lib/dkms/nvidia-current/390.59/build/nvidia-modeset/.tmp_nvidia-modeset-linux.o";
   ./tools/objtool/objtool orc generate  --module --no-fp  --retpoline "/var/lib/dkms/nvidia-current/390.59/build/nvidia-uvm/.tmp_uvm8_mmu_test.o";
   ./tools/objtool/objtool orc generate  --module --no-fp  --retpoline "/var/lib/dkms/nvidia-current/390.59/build/nvidia-drm/.tmp_nvidia-drm.o";
   ./tools/objtool/objtool orc generate  --module --no-fp  --retpoline "/var/lib/dkms/nvidia-current/390.59/build/nvidia-uvm/.tmp_uvm8_peer_identity_mappings_test.o";
   ./tools/objtool/objtool orc generate  --module --no-fp  --retpoline "/var/lib/dkms/nvidia-current/390.59/build/nvidia-uvm/.tmp_uvm8_pmm_sysmem_test.o";
In file included from ./include/drm/drmP.h:82:0,
                 from /var/lib/dkms/nvidia-current/390.59/build/nvidia-drm/nvidia-drm-priv.h:30,
                 from /var/lib/dkms/nvidia-current/390.59/build/nvidia-drm/nvidia-drm-drv.c:25:
/var/lib/dkms/nvidia-current/390.59/build/nvidia-drm/nvidia-drm-drv.c:637:23: error: ‘DRM_CONTROL_ALLOW’ undeclared here (not in a function); did you mean ‘DRM_RENDER_ALLOW’?
                       DRM_CONTROL_ALLOW|DRM_UNLOCKED),
                       ^
./include/drm/drm_ioctl.h:162:12: note: in definition of macro ‘DRM_IOCTL_DEF_DRV’
   .flags = _flags,     \
            ^~~~~~

対応するLinux側の変更は以下.

以下のようにDRM_CONTROL_ALLOWnvidia-drm/nvidia-drm-drv.cから削除すればcompileはとおる.

--- a/nvidia-drm/nvidia-drm-drv.c
+++ b/nvidia-drm/nvidia-drm-drv.c
@@ -634,26 +634,26 @@ static const struct drm_ioctl_desc nv_drm_ioctls[] = {
 #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
     DRM_IOCTL_DEF_DRV(NVIDIA_GEM_IMPORT_NVKMS_MEMORY,
                       nv_drm_gem_import_nvkms_memory_ioctl,
-                      DRM_CONTROL_ALLOW|DRM_UNLOCKED),
+                      DRM_UNLOCKED),
 #endif /* NV_DRM_ATOMIC_MODESET_AVAILABLE */
 
     DRM_IOCTL_DEF_DRV(NVIDIA_GEM_IMPORT_USERSPACE_MEMORY,
                       nv_drm_gem_import_userspace_memory_ioctl,
-                      DRM_CONTROL_ALLOW|DRM_RENDER_ALLOW|DRM_UNLOCKED),
+                      DRM_RENDER_ALLOW|DRM_UNLOCKED),
     DRM_IOCTL_DEF_DRV(NVIDIA_GET_DEV_INFO,
                       nv_drm_get_dev_info_ioctl,
-                      DRM_CONTROL_ALLOW|DRM_RENDER_ALLOW|DRM_UNLOCKED),
+                      DRM_RENDER_ALLOW|DRM_UNLOCKED),
 
 #if defined(NV_DRM_DRIVER_HAS_GEM_PRIME_RES_OBJ)
     DRM_IOCTL_DEF_DRV(NVIDIA_FENCE_SUPPORTED,
                       nv_drm_fence_supported_ioctl,
-                      DRM_CONTROL_ALLOW|DRM_RENDER_ALLOW|DRM_UNLOCKED),
+                      DRM_RENDER_ALLOW|DRM_UNLOCKED),
     DRM_IOCTL_DEF_DRV(NVIDIA_FENCE_CONTEXT_CREATE,
                       nv_drm_fence_context_create_ioctl,
-                      DRM_CONTROL_ALLOW|DRM_RENDER_ALLOW|DRM_UNLOCKED),
+                      DRM_RENDER_ALLOW|DRM_UNLOCKED),
     DRM_IOCTL_DEF_DRV(NVIDIA_GEM_FENCE_ATTACH,
                       nv_drm_gem_fence_attach_ioctl,
-                      DRM_CONTROL_ALLOW|DRM_RENDER_ALLOW|DRM_UNLOCKED),
+                      DRM_RENDER_ALLOW|DRM_UNLOCKED),
 #endif
 
     DRM_IOCTL_DEF_DRV(NVIDIA_GET_CLIENT_CAPABILITY,
@@ -662,7 +662,7 @@ static const struct drm_ioctl_desc nv_drm_ioctls[] = {
 #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
     DRM_IOCTL_DEF_DRV(NVIDIA_GET_CRTC_CRC32,
                       nv_drm_get_crtc_crc32_ioctl,
-                      DRM_CONTROL_ALLOW|DRM_RENDER_ALLOW|DRM_UNLOCKED),
+                      DRM_RENDER_ALLOW|DRM_UNLOCKED),
 #endif /* NV_DRM_ATOMIC_MODESET_AVAILABLE */
 };
 

ちなみに現状,実動作は未検証.

Related articles