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: <20220722095859.GB14113@lst.de>
Date:   Fri, 22 Jul 2022 11:58:59 +0200
From:   Christoph Hellwig <hch@....de>
To:     Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>
Cc:     Robert Beckett <bob.beckett@...labora.com>,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
        Rodrigo Vivi <rodrigo.vivi@...el.com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>, kernel@...labora.com,
        Christoph Hellwig <hch@....de>,
        Thomas Hellstrom <thomas.hellstrom@...el.com>,
        Matthew Auld <matthew.auld@...el.com>,
        intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/i915: stop using swiotlb

On Fri, Jul 22, 2022 at 10:45:54AM +0100, Tvrtko Ursulin wrote:
>> -	unsigned int size = swiotlb_max_segment();
>> -
>> -	if (size == 0)
>> -		size = UINT_MAX;
>
> On a more detailed look, there was a CI failure which makes me think this 
> cap might need to stay. Because max sg segment is unsigned int. So I wonder 
> if sg contstruction overflows without it.
>
> If this quick analysis is right, you could leave i915_sg_segment_size 
> helper and cap the return from dma_max_mapping_size to UINT_MAX in it.

As dma_max_mapping_size retuns a size_t it would be good to make
all variables using it a size_t as well.  In places where that gets
lower to an unsigned int your probably want this cap.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ