lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sat, 26 Mar 2022 02:18:29 +0800
From:   kernel test robot <lkp@...el.com>
To:     Rob Clark <robdclark@...omium.org>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org, Gerd Hoffmann <kraxel@...hat.com>,
        Gurchetan Singh <gurchetansingh@...omium.org>
Subject: [kraxel:drm-qemu-next 3/4]
 drivers/gpu/drm/virtio/virtgpu_ioctl.c:271:13: warning: unused variable
 'ret'

tree:   git://git.kraxel.org/linux drm-qemu-next
head:   718c903962a65c138303c8933f8cdb44947b66a5
commit: c9940219406e5e5d0f449fc9dc1526806ec8683e [3/4] drm/virtio: Fix capset-id query size
config: mips-buildonly-randconfig-r002-20220324 (https://download.01.org/0day-ci/archive/20220326/202203260237.93aoZ8XS-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0f6d9501cf49ce02937099350d08f20c4af86f3d)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        git remote add kraxel git://git.kraxel.org/linux
        git fetch --no-tags kraxel drm-qemu-next
        git checkout c9940219406e5e5d0f449fc9dc1526806ec8683e
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/gpu/drm/virtio/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/virtio/virtgpu_ioctl.c:271:13: warning: unused variable 'ret'
   int value, ret, sz = sizeof(int);
   ^
   fatal error: error in backend: Nested variants found in inline asm string: ' .set push
   .set mips64r2
   .if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/atomic.h", .line = 156, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
   1: ll $1, $2 # atomic_fetch_sub
   subu $0, $1, $3
   sc $0, $2
   beqz $0, 1b
   .set pop
   move $0, $1
   '
   PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
   Stack dump:
   0. Program arguments: clang -Wp,-MMD,drivers/gpu/drm/virtio/.virtgpu_ioctl.o.d -nostdinc -Iarch/mips/include -I./arch/mips/include/generated -Iinclude -I./include -Iarch/mips/include/uapi -I./arch/mips/include/generated/uapi -Iinclude/uapi -I./include/generated/uapi -include include/linux/compiler-version.h -include include/linux/kconfig.h -include include/linux/compiler_types.h -D__KERNEL__ -DVMLINUX_LOAD_ADDRESS=0xffffffff80001000 -DLINKER_LOAD_ADDRESS=0x80001000 -DDATAOFFSET=0 -Qunused-arguments -fmacro-prefix-map== -DKBUILD_EXTRA_WARN1 -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 --target=mipsel-linux -fintegrated-as -Werror=unknown-warning-option -Werror=ignored-optimization-argument -mno-check-zero-division -mabi=32 -G 0 -mno-abicalls -fno-pic -pipe -msoft-float -DGAS_HAS_SET_HARDFLOAT -Wa,-msoft-float -ffreestanding -EL -fno-stack-check -march=mips32 -Wa,--trap -DTOOLCHAIN_SUPPORTS_VIRT -Iarch/mips/include/asm/mach-bcm47xx -Iarch/mips/include/asm/mach-generic -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-address-of-packed-member -Os -Wframe-larger-than=1024 -fno-stack-protector -Wimplicit-fallthrough -Wno-gnu -mno-global-merge -Wno-unused-but-set-variable -Wno-unused-const-variable -ftrivial-auto-var-init=pattern -fno-stack-clash-protection -pg -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-array-bounds -fno-strict-overflow -fno-stack-check -Werror=date-time -Werror=incompatible-pointer-types -Wextra -Wunused -Wno-unused-parameter -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wmissing-include-dirs -Wunused-but-set-variable -Wunused-const-variable -Wno-missing-field-initializers -Wno-sign-compare -Wno-type-limits -I drivers/gpu/drm/virtio -I ./drivers/gpu/drm/virtio -DKBUILD_MODFILE="drivers/gpu/drm/virtio/virtio-gpu" -DKBUILD_BASENAME="virtgpu_ioctl" -DKBUILD_MODNAME="virtio_gpu" -D__KBUILD_MODNAME=kmod_virtio_gpu -c -o drivers/gpu/drm/virtio/virtgpu_ioctl.o drivers/gpu/drm/virtio/virtgpu_ioctl.c
   1. <eof> parser at end of file
   2. Code generation
   3. Running pass 'Function Pass Manager' on module 'drivers/gpu/drm/virtio/virtgpu_ioctl.c'.
   4. Running pass 'Mips Assembly Printer' on function '@...tio_gpu_execbuffer_ioctl'
   #0 0x0000555bdad583af Signals.cpp:0:0
   #1 0x0000555bdad561d4 llvm::sys::CleanupOnSignal(unsigned long) (/opt/cross/clang-0f6d9501cf/bin/clang-15+0x34aa1d4)
   #2 0x0000555bdac95b87 llvm::CrashRecoveryContext::HandleExit(int) (/opt/cross/clang-0f6d9501cf/bin/clang-15+0x33e9b87)
   #3 0x0000555bdad4e80e llvm::sys::Process::Exit(int, bool) (/opt/cross/clang-0f6d9501cf/bin/clang-15+0x34a280e)
   #4 0x0000555bd894b40b (/opt/cross/clang-0f6d9501cf/bin/clang-15+0x109f40b)
   #5 0x0000555bdac9c6ac llvm::report_fatal_error(llvm::Twine const&, bool) (/opt/cross/clang-0f6d9501cf/bin/clang-15+0x33f06ac)
   #6 0x0000555bdb9b8780 llvm::AsmPrinter::emitInlineAsm(llvm::MachineInstr const (/opt/cross/clang-0f6d9501cf/bin/clang-15+0x410c780)
   #7 0x0000555bdb9b46b4 llvm::AsmPrinter::emitFunctionBody() (/opt/cross/clang-0f6d9501cf/bin/clang-15+0x41086b4)
   #8 0x0000555bd93c67f7 llvm::MipsAsmPrinter::runOnMachineFunction(llvm::MachineFunction&) (/opt/cross/clang-0f6d9501cf/bin/clang-15+0x1b1a7f7)
   #9 0x0000555bda0973dd llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.53) MachineFunctionPass.cpp:0:0
   #10 0x0000555bda4def67 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/cross/clang-0f6d9501cf/bin/clang-15+0x2c32f67)
   #11 0x0000555bda4df0e1 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/cross/clang-0f6d9501cf/bin/clang-15+0x2c330e1)
   #12 0x0000555bda4dfc5f llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/cross/clang-0f6d9501cf/bin/clang-15+0x2c33c5f)
   #13 0x0000555bdb078777 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/opt/cross/clang-0f6d9501cf/bin/clang-15+0x37cc777)
   #14 0x0000555bdbcd88d3 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/cross/clang-0f6d9501cf/bin/clang-15+0x442c8d3)
   #15 0x0000555bdc7faaa1 clang::ParseAST(clang::Sema&, bool, bool) (/opt/cross/clang-0f6d9501cf/bin/clang-15+0x4f4eaa1)
   #16 0x0000555bdbcd7fb5 clang::CodeGenAction::ExecuteAction() (/opt/cross/clang-0f6d9501cf/bin/clang-15+0x442bfb5)
   #17 0x0000555bdb6d1aa1 clang::FrontendAction::Execute() (/opt/cross/clang-0f6d9501cf/bin/clang-15+0x3e25aa1)
   #18 0x0000555bdb66733a clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/cross/clang-0f6d9501cf/bin/clang-15+0x3dbb33a)
   #19 0x0000555bdb7976cb (/opt/cross/clang-0f6d9501cf/bin/clang-15+0x3eeb6cb)
   #20 0x0000555bd894c9bc cc1_main(llvm::ArrayRef<char char (/opt/cross/clang-0f6d9501cf/bin/clang-15+0x10a09bc)
   #21 0x0000555bd894968b ExecuteCC1Tool(llvm::SmallVectorImpl<char driver.cpp:0:0
   #22 0x0000555bdb4fdf45 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> const::'lambda'()>(long) Job.cpp:0:0
   #23 0x0000555bdac95a43 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/cross/clang-0f6d9501cf/bin/clang-15+0x33e9a43)
   #24 0x0000555bdb4fe83e clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> const (.part.216) Job.cpp:0:0
   #25 0x0000555bdb4d3037 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const (/opt/cross/clang-0f6d9501cf/bin/clang-15+0x3c27037)
   #26 0x0000555bdb4d3a17 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command >&) const (/opt/cross/clang-0f6d9501cf/bin/clang-15+0x3c27a17)
   #27 0x0000555bdb4dd069 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command >&) (/opt/cross/clang-0f6d9501cf/bin/clang-15+0x3c31069)
   #28 0x0000555bd889695f main (/opt/cross/clang-0f6d9501cf/bin/clang-15+0xfea95f)
   #29 0x00007f85b768bd0a __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x26d0a)
   #30 0x0000555bd89491aa _start (/opt/cross/clang-0f6d9501cf/bin/clang-15+0x109d1aa)
   clang-15: error: clang frontend command failed with exit code 70 (use -v to see invocation)
   clang version 15.0.0 (git://gitmirror/llvm_project 0f6d9501cf49ce02937099350d08f20c4af86f3d)
   Target: mipsel-unknown-linux
   Thread model: posix
   InstalledDir: /opt/cross/clang-0f6d9501cf/bin
   clang-15: note: diagnostic msg:
   Makefile arch drivers include kernel nr_bisected scripts source usr

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for SSB_EMBEDDED
   Depends on SSB && SSB_DRIVER_MIPS && SSB_PCICORE_HOSTMODE
   Selected by
   - BCM47XX_SSB && BCM47XX


vim +/ret +271 drivers/gpu/drm/virtio/virtgpu_ioctl.c

   265	
   266	static int virtio_gpu_getparam_ioctl(struct drm_device *dev, void *data,
   267					     struct drm_file *file)
   268	{
   269		struct virtio_gpu_device *vgdev = dev->dev_private;
   270		struct drm_virtgpu_getparam *param = data;
 > 271		int value, ret, sz = sizeof(int);
   272		uint64_t value64;
   273	
   274		switch (param->param) {
   275		case VIRTGPU_PARAM_3D_FEATURES:
   276			value = vgdev->has_virgl_3d ? 1 : 0;
   277			break;
   278		case VIRTGPU_PARAM_CAPSET_QUERY_FIX:
   279			value = 1;
   280			break;
   281		case VIRTGPU_PARAM_RESOURCE_BLOB:
   282			value = vgdev->has_resource_blob ? 1 : 0;
   283			break;
   284		case VIRTGPU_PARAM_HOST_VISIBLE:
   285			value = vgdev->has_host_visible ? 1 : 0;
   286			break;
   287		case VIRTGPU_PARAM_CROSS_DEVICE:
   288			value = vgdev->has_resource_assign_uuid ? 1 : 0;
   289			break;
   290		case VIRTGPU_PARAM_CONTEXT_INIT:
   291			value = vgdev->has_context_init ? 1 : 0;
   292			break;
   293		case VIRTGPU_PARAM_SUPPORTED_CAPSET_IDs:
   294			value64 = vgdev->capset_id_mask;
   295			sz = sizeof(value64);
   296			break;
   297		default:
   298			return -EINVAL;
   299		}
   300	
   301		if (sz == sizeof(int)) {
   302			if (copy_to_user(u64_to_user_ptr(param->value), &value, sz))
   303				return -EFAULT;
   304		} else {
   305			if (copy_to_user(u64_to_user_ptr(param->value), &value64, sz))
   306				return -EFAULT;
   307		}
   308	
   309		return 0;
   310	}
   311	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ