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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e38512f3-626f-42ae-bb3b-3f631dfaed9c@roeck-us.net>
Date: Thu, 22 Feb 2024 10:25:06 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: Marco Pagani <marpagan@...hat.com>
Cc: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
	Maxime Ripard <mripard@...nel.org>,
	Thomas Zimmermann <tzimmermann@...e.de>,
	David Airlie <airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>,
	Sumit Semwal <sumit.semwal@...aro.org>,
	Christian Koenig <christian.koenig@....com>,
	Javier Martinez Canillas <javierm@...hat.com>,
	linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
	linux-media@...r.kernel.org, linaro-mm-sig@...ts.linaro.org
Subject: Re: [PATCH v5] drm/test: add a test suite for GEM objects backed by
 shmem

On Thu, Feb 22, 2024 at 05:33:48PM +0100, Marco Pagani wrote:
> > 
> > In this context, the TTM unit tests fail as well in qemu, with worse result:
> > It seems there is some bad cleanup after a failed test case, causing list
> > corruptions in the drm core and ultimately a crash. I don't know if this
> > is also caused by the missing dma_mask initialization.
> > 
> 
> That's interesting. Which --arch argument are you using to run the
> tests with QEMU?

Example (I am not sure if any of those parameters matters; it is just one
of my tests):

qemu-system-x86_64 -kernel arch/x86/boot/bzImage -M q35 -cpu IvyBridge \
	-no-reboot -snapshot -smp 2 \
	-device e1000,netdev=net0 -netdev user,id=net0 -m 512 \
	-drive file=rootfs.ext2,format=raw,if=ide \
	--append "earlycon=uart8250,io,0x3f8,9600n8 root=/dev/sda1 console=ttyS0" \
	-d unimp,guest_errors -nographic -monitor none

This results in:

[ ... ]
[    5.989496]     KTAP version 1
[    5.989639]     # Subtest: ttm_device
[    5.989711]     # module: ttm_device_test
[    5.989760]     1..5
[    6.002044]     ok 1 ttm_device_init_basic
[    6.013557]     ok 2 ttm_device_init_multiple
ILLOPC: ffffffffb8ac9350: 0f 0b
[    6.022481]     ok 3 ttm_device_fini_basic
[    6.026172] ------------[ cut here ]------------
[    6.026315] WARNING: CPU: 1 PID: 1575 at drivers/gpu/drm/ttm/ttm_device.c:206 ttm_device_init+0x170/0x190
..
[    6.135016]         ok 3 Above the allocation limit
[    6.138759] ------------[ cut here ]------------
[    6.138925] WARNING: CPU: 1 PID: 1595 at kernel/dma/mapping.c:503 dma_alloc_attrs+0xf6/0x100
..
[    6.143850]     # ttm_pool_alloc_basic: ASSERTION FAILED at drivers/gpu/drm/ttm/tests/ttm_pool_test.c:162
[    6.143850]     Expected err == 0, but
[    6.143850]         err == -12 (0xfffffffffffffff4)
[    6.148824]         not ok 4 One page, with coherent DMA mappings enabled

>From there things go downhill.

[    6.152821] list_add corruption. prev->next should be next (ffffffffbbd53950), but was 0000000000000000. (prev=ffff8af1c38f9e20).

and so on until the emulation crashes.

Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ