From: Marco Pagani <marpagan@redhat.com>
To: Ruan Jinjie <ruanjinjie@huawei.com>
Cc: linux-kernel@vger.kernel.org, linux-fpga@vger.kernel.org,
Moritz Fischer <mdf@kernel.org>, Wu Hao <hao.wu@intel.com>,
Xu Yilun <yilun.xu@intel.com>, Tom Rix <trix@redhat.com>
Subject: Re: [PATCH v10 1/4] fpga: add an initial KUnit suite for the FPGA Manager
Date: Mon, 25 Sep 2023 17:21:03 +0200 [thread overview]
Message-ID: <c8491399-556a-e55c-e815-4f0dd61c3b82@redhat.com> (raw)
In-Reply-To: <4d51e87f-830a-adae-d6f7-6aed9433fdc6@huawei.com>
On 2023-09-25 03:36, Ruan Jinjie wrote:
>
>
> On 1970/1/1 8:00, Marco Pagani wrote:
>> The suite tests the basic behaviors of the FPGA Manager including
>> programming using a single contiguous buffer and a scatter gather table.
>>
>> Signed-off-by: Marco Pagani <marpagan@redhat.com>
[...]
> modprobe fpga-mgr-test and then the below null-ptr-deref occurs.
> It seems that ctx->pdev->dev->driver is NULL and the pdev->dev need
> to be associated with a platform driver.
Hi, thanks for reporting the issue. I had not noticed it since it does not
happen when running the tests on UML. I will send a fix soon.
Marco
> general protection fault, probably for non-canonical address
> 0xdffffc0000000002: 0000 [#1] PREEMPT SMP KASAN
> KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]
> CPU: 4 PID: 1866 Comm: kunit_try_catch Tainted: G N
> 6.6.0-rc2+ #49
> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
> 1.15.0-1 04/01/2014
> RIP: 0010:fpga_mgr_get+0x87/0xd0 [fpga_mgr]
> Code: 48 8d 7b 68 48 89 fa 48 c1 ea 03 80 3c 02 00 75 59 48 b8 00
> 00 00 00 00 fc ff df 48 8b 5b 68 48 8d 7b 10 48 89 fa 48 c1 ea 03 <80>
> 3c 02 00 75 33 48 8b 7b 10 e8 7a 43 1a e1 84 c0 74 08 4c 89 e0
> RSP: 0018:ffff8881054cfe18 EFLAGS: 00010202
> RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff83f6a96c
> RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000010
> RBP: ffff88810d185808 R08: 0000000000000001 R09: ffffed1020d107ca
> R10: ffff888106883e53 R11: ffff8881054cfa50 R12: ffff88810d185800
> R13: ffff888106408520 R14: ffff88810683f5a8 R15: ffff888105e4b080
> FS: 0000000000000000(0000) GS:ffff888119e00000(0000)
> knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 00007f537e5ed8a0 CR3: 0000000005086001 CR4: 0000000000770ee0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> PKRU: 55555554
> Call Trace:
> <TASK>
> ? die_addr+0x3d/0xa0
> ? exc_general_protection+0x144/0x220
> ? asm_exc_general_protection+0x22/0x30
> ? kobject_put+0x5c/0x310
> ? fpga_mgr_get+0x87/0xd0 [fpga_mgr]
> ? fpga_mgr_get+0x28/0xd0 [fpga_mgr]
> fpga_mgr_test_get+0xb4/0x1b0 [fpga_mgr_test]
> ? platform_device_register_resndata.constprop.0+0xc0/0xc0
> [fpga_mgr_test]
> ? fpga_mgr_test_lock+0x1f0/0x1f0 [fpga_mgr_test]
> ? __sched_text_end+0xa/0xa
> ? kunit_try_run_case+0xdd/0x250
> ? kunit_try_run_case_cleanup+0xe0/0xe0
> kunit_generic_run_threadfn_adapter+0x4a/0x90
> ? kunit_try_catch_throw+0x80/0x80
> kthread+0x2b5/0x380
> ? kthread_complete_and_exit+0x20/0x20
> ret_from_fork+0x2d/0x70
> ? kthread_complete_and_exit+0x20/0x20
> ret_from_fork_asm+0x11/0x20
> </TASK>
> Modules linked in: fpga_mgr_test(+) fpga_mgr
> Dumping ftrace buffer:
> (ftrace buffer empty)
> ---[ end trace 0000000000000000 ]---
> RIP: 0010:fpga_mgr_get+0x87/0xd0 [fpga_mgr]
> Code: 48 8d 7b 68 48 89 fa 48 c1 ea 03 80 3c 02 00 75 59 48 b8 00
> 00 00 00 00 fc ff df 48 8b 5b 68 48 8d 7b 10 48 89 fa 48 c1 ea 03 <80>
> 3c 02 00 75 33 48 8b 7b 10 e8 7a 43 1a e1 84 c0 74 08 4c 89 e0
> RSP: 0018:ffff8881054cfe18 EFLAGS: 00010202
> RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff83f6a96c
> RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000010
> RBP: ffff88810d185808 R08: 0000000000000001 R09: ffffed1020d107ca
> R10: ffff888106883e53 R11: ffff8881054cfa50 R12: ffff88810d185800
> R13: ffff888106408520 R14: ffff88810683f5a8 R15: ffff888105e4b080
> FS: 0000000000000000(0000) GS:ffff888119e00000(0000)
> knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 00007f537e5ed8a0 CR3: 0000000005086001 CR4: 0000000000770ee0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> PKRU: 55555554
> Kernel panic - not syncing: Fatal exception
> Dumping ftrace buffer:
> (ftrace buffer empty)
> Kernel Offset: disabled
> Rebooting in 1 seconds..
>
> Fixes: ccbc1c302115 ("fpga: add an initial KUnit suite for the FPGA
> Manager")
> Reported-by: Jinjie Ruan <ruanjinjie@huawei.com>
>
[...]
next prev parent reply other threads:[~2023-09-25 15:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-18 13:03 [PATCH v10 0/4] fpga: add initial KUnit tests for the subsystem Marco Pagani
2023-07-18 13:03 ` [PATCH v10 1/4] fpga: add an initial KUnit suite for the FPGA Manager Marco Pagani
2023-07-23 7:34 ` Xu Yilun
2023-09-25 1:36 ` Ruan Jinjie
2023-09-25 15:21 ` Marco Pagani [this message]
2023-07-18 13:03 ` [PATCH v10 2/4] fpga: add an initial KUnit suite for the FPGA Bridge Marco Pagani
2023-09-25 1:31 ` Ruan Jinjie
2023-07-18 13:03 ` [PATCH v10 3/4] fpga: add an initial KUnit suite for the FPGA Region Marco Pagani
2023-09-25 1:41 ` Ruan Jinjie
2023-07-18 13:03 ` [PATCH v10 4/4] fpga: add configuration for the FPGA KUnit test suites Marco Pagani
2023-07-23 7:35 ` [PATCH v10 0/4] fpga: add initial KUnit tests for the subsystem Xu Yilun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c8491399-556a-e55c-e815-4f0dd61c3b82@redhat.com \
--to=marpagan@redhat.com \
--cc=hao.wu@intel.com \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mdf@kernel.org \
--cc=ruanjinjie@huawei.com \
--cc=trix@redhat.com \
--cc=yilun.xu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).