Linux IOMMU Development
 help / color / mirror / Atom feed
From: Yi Liu <yi.l.liu@intel.com>
To: Baolu Lu <baolu.lu@linux.intel.com>, <joro@8bytes.org>,
	<kevin.tian@intel.com>
Cc: <chao.p.peng@linux.intel.com>, <iommu@lists.linux.dev>
Subject: Re: [PATCH] iommu/vt-d: Fix qi_batch NULL pointer with nested parent domain
Date: Mon, 9 Dec 2024 11:10:10 +0800	[thread overview]
Message-ID: <4f7ca7af-5c5e-4d00-add6-47625f38c8e3@intel.com> (raw)
In-Reply-To: <ce413d97-ec46-4cd9-932a-af804cd531cf@linux.intel.com>

On 2024/12/9 09:39, Baolu Lu wrote:
> On 12/7/24 20:03, Yi Liu wrote:
>> The qi_batch is allocated when assigning cache tag for a domain. While
>> for nested parent domain, it is missed. Hence, when trying to map pages
>> to the nested parent, NULL dereference occurred.

> 
> Strip the kernel message and leave only valuable messages that
> developers might be interested. Something like this,

got it.

>   BUG: kernel NULL pointer dereference, address: 0000000000000200
>   #PF: supervisor read access in kernel mode
>   #PF: error_code(0x0000) - not-present page
>   PGD 8104795067 P4D 0
>   Oops: Oops: 0000 [#1] PREEMPT SMP NOPTI
>   CPU: 223 UID: 0 PID: 4357 Comm: qemu-system-x86 Not tainted 
> 6.13.0-rc1-00028-g4b50c3c3b998-dirty #2632
>   Call Trace:
>    ? __die+0x24/0x70
>    ? page_fault_oops+0x80/0x150
>    ? do_user_addr_fault+0x63/0x7b0
>    ? exc_page_fault+0x7c/0x220
>    ? asm_exc_page_fault+0x26/0x30
>    ? cache_tag_flush_range_np+0x13c/0x260
>    intel_iommu_iotlb_sync_map+0x1a/0x30
>    iommu_map+0x61/0xf0
>    batch_to_domain+0x188/0x250
>    iopt_area_fill_domains+0x125/0x320
>    ? rcu_is_watching+0x11/0x50
>    iopt_map_pages+0x63/0x100
>    iopt_map_common.isra.0+0xa7/0x190
>    iopt_map_user_pages+0x6a/0x80
>    iommufd_ioas_map+0xcd/0x1d0
>    iommufd_fops_ioctl+0x118/0x1c0
>    __x64_sys_ioctl+0x93/0xc0
>    do_syscall_64+0x71/0x140
>    entry_SYSCALL_64_after_hwframe+0x76/0x7e
> 
>

-- 
Regards,
Yi Liu

      parent reply	other threads:[~2024-12-09  3:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-07 12:03 [PATCH] iommu/vt-d: Fix qi_batch NULL pointer with nested parent domain Yi Liu
2024-12-09  1:39 ` Baolu Lu
2024-12-09  3:07   ` Yi Liu
2024-12-09  3:05     ` Baolu Lu
2024-12-11  8:32     ` Tian, Kevin
2024-12-11  9:29       ` Yi Liu
2024-12-09  3:10   ` Yi Liu [this message]

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=4f7ca7af-5c5e-4d00-add6-47625f38c8e3@intel.com \
    --to=yi.l.liu@intel.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=chao.p.peng@linux.intel.com \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@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