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] [thread-next>] [day] [month] [year] [list]
Message-ID: <b8843192-c5ae-17ea-dfa8-02f379112995@leemhuis.info>
Date:   Wed, 5 Apr 2023 14:24:34 +0200
From:   "Linux regression tracking #adding (Thorsten Leemhuis)" 
        <regressions@...mhuis.info>
To:     Dexuan-Linux Cui <dexuan.linux@...il.com>,
        Petr Tesarik <petrtesarik@...weicloud.com>
Cc:     Christoph Hellwig <hch@....de>,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        Robin Murphy <robin.murphy@....com>,
        Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
        Jianxiong Gao <jxgao@...gle.com>,
        David Stevens <stevensd@...omium.org>,
        Joerg Roedel <jroedel@...e.de>,
        "open list:DMA MAPPING HELPERS" <iommu@...ts.linux.dev>,
        open list <linux-kernel@...r.kernel.org>,
        Roberto Sassu <roberto.sassu@...wei.com>, petr@...arici.cz,
        Michael Kelley <mikelley@...rosoft.com>,
        Dexuan Cui <decui@...rosoft.com>, Tianyu.Lan@...rosoft.com,
        linux-hyperv@...r.kernel.org
Subject: Re: [PATCH v1 2/2] swiotlb: Fix slot alignment checks

[CCing the regression list, as it should be in the loop for regressions:
https://docs.kernel.org/admin-guide/reporting-regressions.html]

[TLDR: I'm adding this report to the list of tracked Linux kernel
regressions; the text you find below is based on a few templates
paragraphs you might have encountered already in similar form.
See link in footer if these mails annoy you.]

On 04.04.23 21:55, Dexuan-Linux Cui wrote:
> On Tue, Mar 21, 2023 at 1:37 AM Petr Tesarik
> <petrtesarik@...weicloud.com> wrote:
>>
>> From: Petr Tesarik <petr.tesarik.ext@...wei.com>
>>
>> Explicit alignment and page alignment are used only to calculate
>> the stride, not when checking actual slot physical address.
>>
>> Originally, only page alignment was implemented, and that worked,
>> because the whole SWIOTLB is allocated on a page boundary, so
>> aligning the start index was sufficient to ensure a page-aligned
>> slot.
>>
>> When Christoph Hellwig added support for min_align_mask, the index
>> could be incremented in the search loop, potentially finding an
>> unaligned slot if minimum device alignment is between IO_TLB_SIZE
>> and PAGE_SIZE. The bug could go unnoticed, because the slot size
>> is 2 KiB, and the most common page size is 4 KiB, so there is no
>> alignment value in between.
>>
>> IIUC the intention has been to find a slot that conforms to all
>> alignment constraints: device minimum alignment, an explicit
>> alignment (given as function parameter) and optionally page
>> alignment (if allocation size is >= PAGE_SIZE). The most
>> restrictive mask can be trivially computed with logical AND. The
>> rest can stay.
>>
>> Fixes: 1f221a0d0dbf ("swiotlb: respect min_align_mask")
>> Fixes: e81e99bacc9f ("swiotlb: Support aligned swiotlb buffers")
>> Signed-off-by: Petr Tesarik <petr.tesarik.ext@...wei.com>
>> ---
> [...]
> 
> Hi Petr, this patch has gone into the mainline:
> 0eee5ae10256 ("swiotlb: fix slot alignment checks")
> 
> Somehow it breaks Linux VMs on Hyper-V: a regular VM with
> swiotlb=force or a confidential VM (which uses swiotlb) fails to boot.
> If I revert this patch, everything works fine.
> 
> Cc'd Tianyu/Michael and the Hyper-V list.

Thanks for the report. To be sure the issue doesn't fall through the
cracks unnoticed, I'm adding it to regzbot, the Linux kernel regression
tracking bot:

#regzbot ^introduced 0eee5ae10256
#regzbot title swiotlb: Linux VMs on Hyper-V broken
#regzbot monitor:
https://lore.kernel.org/all/20230405003549.GA21326@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net/
#regzbot ignore-activity

This isn't a regression? This issue or a fix for it are already
discussed somewhere else? It was fixed already? You want to clarify when
the regression started to happen? Or point out I got the title or
something else totally wrong? Then just reply and tell me -- ideally
while also telling regzbot about it, as explained by the page listed in
the footer of this mail.

Developers: When fixing the issue, remember to add 'Link:' tags pointing
to the report (the parent of this mail). See page linked in footer for
details.

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
--
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
That page also explains what to do if mails like this annoy you.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ