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: <b4fa0e2b-53f6-4015-9be0-41b45a6b5f4e@linux.intel.com>
Date:   Mon, 6 Nov 2023 10:15:20 +0000
From:   Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>
To:     Andi Shyti <andi.shyti@...ux.intel.com>,
        Kunwu Chan <chentao@...inos.cn>
Cc:     airlied@...il.com, alan.previn.teres.alexis@...el.com,
        andrzej.hajda@...el.com, chris.p.wilson@...el.com, daniel@...ll.ch,
        dri-devel@...ts.freedesktop.org, intel-gfx@...ts.freedesktop.org,
        jani.nikula@...ux.intel.com, jonathan.cavitt@...el.com,
        joonas.lahtinen@...ux.intel.com, kunwu.chan@...mail.com,
        linux-kernel@...r.kernel.org, robdclark@...omium.org,
        rodrigo.vivi@...el.com, stable@...r.kernel.org
Subject: Re: [PATCH v2] drm/i915: Fix potential spectre vulnerability


On 06/11/2023 09:57, Andi Shyti wrote:
> Hi Kunwu,
> 
> On Fri, Nov 03, 2023 at 10:32:57AM +0800, Kunwu Chan wrote:
>> Fix smatch warning:
>> drivers/gpu/drm/i915/gem/i915_gem_context.c:847 set_proto_ctx_sseu()
>> warn: potential spectre issue 'pc->user_engines' [r] (local cap)
>>
>> Fixes: d4433c7600f7 ("drm/i915/gem: Use the proto-context to handle create parameters (v5)")
>> Cc: <stable@...r.kernel.org> # v5.15+
>> Signed-off-by: Kunwu Chan <chentao@...inos.cn>
>> Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>
>> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>
>> Link: https://lore.kernel.org/all/20231102101642.52988-1-chentao@kylinos.cn
>> ---
>>   drivers/gpu/drm/i915/gem/i915_gem_context.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c
>> index 9a9ff84c90d7..e38f06a6e56e 100644
>> --- a/drivers/gpu/drm/i915/gem/i915_gem_context.c
>> +++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c
>> @@ -844,6 +844,7 @@ static int set_proto_ctx_sseu(struct drm_i915_file_private *fpriv,
>>   		if (idx >= pc->num_user_engines)
>>   			return -EINVAL;
>>   
>> +		idx = array_index_nospec(idx, pc->num_user_engines);
> 
> you ignored my comment, though.

Sorry it was me, I considered it fine as is given it is the same pattern 
as elsewhere in the file. I've merged the patch btw.

Regards,

Tvrtko

> 
> Andi
> 
>>   		pe = &pc->user_engines[idx];
>>   
>>   		/* Only render engine supports RPCS configuration. */
>> -- 
>> 2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ