Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Wernher von Braun settled for a V-2 when he coulda had a V-8.


devel / comp.arch / Re: Non-constant timing for instructions, including XOR

SubjectAuthor
* Non-constant timing for instructions, including XORThomas Koenig
+- Re: Non-constant timing for instructions, including XORScott Lurndal
+* Re: Non-constant timing for instructions, including XORAnton Ertl
|`- Re: Non-constant timing for instructions, including XORThomas Koenig
`* Re: Non-constant timing for instructions, including XORMitchAlsup
 +* Re: Non-constant timing for instructions, including XORrobf...@gmail.com
 |`- Re: Non-constant timing for instructions, including XORMitchAlsup
 +- Re: Non-constant timing for instructions, including XORTerje Mathisen
 `* Re: Non-constant timing for instructions, including XOREricP
  +- Re: Non-constant timing for instructions, including XORQuadibloc
  `* Re: Non-constant timing for instructions, including XORAnton Ertl
   +- Re: Non-constant timing for instructions, including XORMitchAlsup
   +* Re: Non-constant timing for instructions, including XORScott Lurndal
   |`* Re: Non-constant timing for instructions, including XORAnton Ertl
   | +- Re: Non-constant timing for instructions, including XORMichael S
   | +- Re: Non-constant timing for instructions, including XORMitchAlsup
   | `- Re: Non-constant timing for instructions, including XORScott Lurndal
   `- Re: Non-constant timing for instructions, including XORMitchAlsup

1
Non-constant timing for instructions, including XOR

<tr12ha$39saq$1@newsreader4.netcologne.de>

  copy mid

https://rocksolidbbs.com/devel/article-flat.php?id=33413&group=comp.arch#33413

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2a0a-a540-2398-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoenig@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Non-constant timing for instructions, including XOR
Date: Fri, 27 Jan 2023 17:44:10 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <tr12ha$39saq$1@newsreader4.netcologne.de>
Injection-Date: Fri, 27 Jan 2023 17:44:10 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2a0a-a540-2398-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2a0a:a540:2398:0:7285:c2ff:fe6c:992d";
logging-data="3469658"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Fri, 27 Jan 2023 17:44 UTC

This is _really_ rich.

It seems that you have to set special CPU flags on both Intel and
AMD to get constant time for such simple operations as XOR or ADD
and not latency which depends on data.

XOR? ADD? Seriously? If there ever was a single cycle latency
instruction, XOR's the one, and ADD has been down to a single
cycle for ages.

See https://www.openwall.com/lists/oss-security/2023/01/25/3 which
includes a links to the vendor documentation and a discussion on
the Linux Kernel list.

It seems people at Intel and AMD have chosen execution speed
over sanity.

Re: Non-constant timing for instructions, including XOR

<wAUAL.76198$5S78.44687@fx48.iad>

  copy mid

https://rocksolidbbs.com/devel/article-flat.php?id=33414&group=comp.arch#33414

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx48.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: scott@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Non-constant timing for instructions, including XOR
Newsgroups: comp.arch
Distribution: world
References: <tr12ha$39saq$1@newsreader4.netcologne.de>
Lines: 21
Message-ID: <wAUAL.76198$5S78.44687@fx48.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Fri, 27 Jan 2023 18:19:08 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Fri, 27 Jan 2023 18:19:08 GMT
X-Received-Bytes: 1574
 by: Scott Lurndal - Fri, 27 Jan 2023 18:19 UTC

Thomas Koenig <tkoenig@netcologne.de> writes:
>This is _really_ rich.
>
>It seems that you have to set special CPU flags on both Intel and
>AMD to get constant time for such simple operations as XOR or ADD
>and not latency which depends on data.

ARM has addressed this architecturally over the last few years,
specifying that certain sets of instructions may not have timing
dependent upon the data, including all crypto instructions (the DIT feature).

The architecture makes no statement about the timing properties
when the PSTATE.DIT bit is not set. However, it is likely that
many of these instructions have timing that is invariant of the data in
many situations.

In particular, Arm strongly recommends that the Armv8.3 pointer
authentication instructions do not have their timing dependent on the
key value used in the pointer authentication in all cases,
regardless of the PSTATE.DIT bit.

Re: Non-constant timing for instructions, including XOR

<2023Jan27.192819@mips.complang.tuwien.ac.at>

  copy mid

https://rocksolidbbs.com/devel/article-flat.php?id=33415&group=comp.arch#33415

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.arch
Subject: Re: Non-constant timing for instructions, including XOR
Date: Fri, 27 Jan 2023 18:28:19 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 52
Distribution: world
Message-ID: <2023Jan27.192819@mips.complang.tuwien.ac.at>
References: <tr12ha$39saq$1@newsreader4.netcologne.de>
Injection-Info: reader01.eternal-september.org; posting-host="09e45832e67faa878ce4444a86f7403d";
logging-data="1903265"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/5qMMCf1lLYOS7BBk5qCPT"
Cancel-Lock: sha1:3YBzUTaScBxg7oNBAy40pl0uze8=
X-newsreader: xrn 10.11
 by: Anton Ertl - Fri, 27 Jan 2023 18:28 UTC

Thomas Koenig <tkoenig@netcologne.de> writes:
>This is _really_ rich.
>
>It seems that you have to set special CPU flags on both Intel and
>AMD to get constant time for such simple operations as XOR or ADD
>and not latency which depends on data.
>
>XOR? ADD? Seriously? If there ever was a single cycle latency
>instruction, XOR's the one, and ADD has been down to a single
>cycle for ages.
>
>See https://www.openwall.com/lists/oss-security/2023/01/25/3 which
>includes a links to the vendor documentation and a discussion on
>the Linux Kernel list.

Nearly all instructions are affected on Intel, the exceptions I have
noticed are multiplication instructions.

Given that the data-dependent timing was introduced only with Ice
Lake, but apparently affects almost all instructions there, including,
bitwise instructions, I wonder what data-dependent timing was
introduced. I found nothing about that in the posting you linked to
and the link to the Intel document I followed from there.

What I can imagine is that the renamer now knows that it can treat an
add of X and 0 (where already the renamer knows that it is 0) as X.
That would certainly be easy enough to disable with a single flag.
But is this a frequent-enough case to make it worth adding as a
hardware optimization? And why does it affect AND, but not multiply
instructions?

Given the limited speedup from Skylake to Ice Lake (and it's brethren
Tiger Lake and Rocket Lake), the speedup from this particular
optimization is likely to be miniscule.

Another, less likely theory is that Ice Lake uses a staggered addition
or somesuch, which takes 2 cycles if there is a carry from the lower
to the upper half and one cycle if there is not. However, in that
case I would expect bitwise operations to be unaffected.

Does anybody know what is really the reason for this data-dependent
timing?

>It seems people at Intel and AMD have chosen execution speed
>over sanity.

AMD?

- anton
--
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>

Re: Non-constant timing for instructions, including XOR

<tr188d$3a0q2$1@newsreader4.netcologne.de>

  copy mid

https://rocksolidbbs.com/devel/article-flat.php?id=33416&group=comp.arch#33416

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2a0a-a540-2398-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoenig@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: Non-constant timing for instructions, including XOR
Date: Fri, 27 Jan 2023 19:21:49 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <tr188d$3a0q2$1@newsreader4.netcologne.de>
References: <tr12ha$39saq$1@newsreader4.netcologne.de>
<2023Jan27.192819@mips.complang.tuwien.ac.at>
Injection-Date: Fri, 27 Jan 2023 19:21:49 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2a0a-a540-2398-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2a0a:a540:2398:0:7285:c2ff:fe6c:992d";
logging-data="3474242"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Fri, 27 Jan 2023 19:21 UTC

Anton Ertl <anton@mips.complang.tuwien.ac.at> schrieb:
> Thomas Koenig <tkoenig@netcologne.de> writes:

> AMD?

That should have been ARM.

Re: Non-constant timing for instructions, including XOR

<cf466f4d-8eb7-4c96-8d55-f41de546931bn@googlegroups.com>

  copy mid

https://rocksolidbbs.com/devel/article-flat.php?id=33417&group=comp.arch#33417

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:6214:1d0e:b0:537:cb41:1982 with SMTP id e14-20020a0562141d0e00b00537cb411982mr396225qvd.44.1674852922293;
Fri, 27 Jan 2023 12:55:22 -0800 (PST)
X-Received: by 2002:a9d:1b21:0:b0:688:5382:51e6 with SMTP id
l30-20020a9d1b21000000b00688538251e6mr596247otl.71.1674852922030; Fri, 27 Jan
2023 12:55:22 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Fri, 27 Jan 2023 12:55:21 -0800 (PST)
In-Reply-To: <tr12ha$39saq$1@newsreader4.netcologne.de>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:e992:55bf:8c0:3e2e;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:e992:55bf:8c0:3e2e
References: <tr12ha$39saq$1@newsreader4.netcologne.de>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <cf466f4d-8eb7-4c96-8d55-f41de546931bn@googlegroups.com>
Subject: Re: Non-constant timing for instructions, including XOR
From: MitchAlsup@aol.com (MitchAlsup)
Injection-Date: Fri, 27 Jan 2023 20:55:22 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2149
 by: MitchAlsup - Fri, 27 Jan 2023 20:55 UTC

On Friday, January 27, 2023 at 11:44:14 AM UTC-6, Thomas Koenig wrote:
> This is _really_ rich.
>
> It seems that you have to set special CPU flags on both Intel and
> AMD to get constant time for such simple operations as XOR or ADD
> and not latency which depends on data.
>
> XOR? ADD? Seriously? If there ever was a single cycle latency
> instruction, XOR's the one, and ADD has been down to a single
> cycle for ages.
>
> See https://www.openwall.com/lists/oss-security/2023/01/25/3 which
> includes a links to the vendor documentation and a discussion on
> the Linux Kernel list.
>
> It seems people at Intel and AMD have chosen execution speed
> over sanity.
<
Does anyone (else) see that this is just another manifestation of
"SIMD considered harmful", this time to cryptography.

BTW:: XOR is not in the list of Intel OpCodes that can be subject to
different timings on different implementations. The only Intel OpCodes
all start with P or V.

Re: Non-constant timing for instructions, including XOR

<ce77892d-f52b-41d4-937f-b50426f8d3b9n@googlegroups.com>

  copy mid

https://rocksolidbbs.com/devel/article-flat.php?id=33418&group=comp.arch#33418

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ad4:50c1:0:b0:534:6c47:849b with SMTP id e1-20020ad450c1000000b005346c47849bmr1456446qvq.60.1674902251677;
Sat, 28 Jan 2023 02:37:31 -0800 (PST)
X-Received: by 2002:a05:6870:46a3:b0:163:7a3d:3fa3 with SMTP id
a35-20020a05687046a300b001637a3d3fa3mr518850oap.42.1674902251245; Sat, 28 Jan
2023 02:37:31 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Sat, 28 Jan 2023 02:37:30 -0800 (PST)
In-Reply-To: <cf466f4d-8eb7-4c96-8d55-f41de546931bn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=99.251.79.92; posting-account=QId4bgoAAABV4s50talpu-qMcPp519Eb
NNTP-Posting-Host: 99.251.79.92
References: <tr12ha$39saq$1@newsreader4.netcologne.de> <cf466f4d-8eb7-4c96-8d55-f41de546931bn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ce77892d-f52b-41d4-937f-b50426f8d3b9n@googlegroups.com>
Subject: Re: Non-constant timing for instructions, including XOR
From: robfi680@gmail.com (robf...@gmail.com)
Injection-Date: Sat, 28 Jan 2023 10:37:31 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2434
 by: robf...@gmail.com - Sat, 28 Jan 2023 10:37 UTC

On Friday, January 27, 2023 at 3:55:23 PM UTC-5, MitchAlsup wrote:
> On Friday, January 27, 2023 at 11:44:14 AM UTC-6, Thomas Koenig wrote:
> > This is _really_ rich.
> >
> > It seems that you have to set special CPU flags on both Intel and
> > AMD to get constant time for such simple operations as XOR or ADD
> > and not latency which depends on data.
> >
> > XOR? ADD? Seriously? If there ever was a single cycle latency
> > instruction, XOR's the one, and ADD has been down to a single
> > cycle for ages.
> >
> > See https://www.openwall.com/lists/oss-security/2023/01/25/3 which
> > includes a links to the vendor documentation and a discussion on
> > the Linux Kernel list.
> >
> > It seems people at Intel and AMD have chosen execution speed
> > over sanity.
> <
> Does anyone (else) see that this is just another manifestation of
> "SIMD considered harmful", this time to cryptography.
>
> BTW:: XOR is not in the list of Intel OpCodes that can be subject to
> different timings on different implementations. The only Intel OpCodes
> all start with P or V.

Is the non-constant time for instructions possibly to combat viruses and
other malware? By making the execution speed inconsistent?

Re: Non-constant timing for instructions, including XOR

<tr3ctq$28usv$1@dont-email.me>

  copy mid

https://rocksolidbbs.com/devel/article-flat.php?id=33419&group=comp.arch#33419

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: terje.mathisen@tmsw.no (Terje Mathisen)
Newsgroups: comp.arch
Subject: Re: Non-constant timing for instructions, including XOR
Date: Sat, 28 Jan 2023 15:53:45 +0100
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <tr3ctq$28usv$1@dont-email.me>
References: <tr12ha$39saq$1@newsreader4.netcologne.de>
<cf466f4d-8eb7-4c96-8d55-f41de546931bn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 28 Jan 2023 14:53:46 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="93b09c9d4a82e2b3338b5930676ad1db";
logging-data="2390943"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/qSw1Luc2lYfZC9QfdKAkVBwotyTIdYrB2i+wXh7q5Nw=="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101
Firefox/68.0 SeaMonkey/2.53.14
Cancel-Lock: sha1:x8i9uIZppBhfPzj9E5Y49z/Mb3c=
In-Reply-To: <cf466f4d-8eb7-4c96-8d55-f41de546931bn@googlegroups.com>
 by: Terje Mathisen - Sat, 28 Jan 2023 14:53 UTC

MitchAlsup wrote:
> On Friday, January 27, 2023 at 11:44:14 AM UTC-6, Thomas Koenig wrote:
>> This is _really_ rich.
>>
>> It seems that you have to set special CPU flags on both Intel and
>> AMD to get constant time for such simple operations as XOR or ADD
>> and not latency which depends on data.
>>
>> XOR? ADD? Seriously? If there ever was a single cycle latency
>> instruction, XOR's the one, and ADD has been down to a single
>> cycle for ages.
>>
>> See https://www.openwall.com/lists/oss-security/2023/01/25/3 which
>> includes a links to the vendor documentation and a discussion on
>> the Linux Kernel list.
>>
>> It seems people at Intel and AMD have chosen execution speed
>> over sanity.
> <
> Does anyone (else) see that this is just another manifestation of
> "SIMD considered harmful", this time to cryptography.
>
> BTW:: XOR is not in the list of Intel OpCodes that can be subject to
> different timings on different implementations. The only Intel OpCodes
> all start with P or V.
>
That list looks like all SIMD PMADD variations, plus one (VPLZCNTD)
which I'm guessing is counting the leading zero bits?

Terje

Re: Non-constant timing for instructions, including XOR

<CabBL.571669$9sn9.133305@fx17.iad>

  copy mid

https://rocksolidbbs.com/devel/article-flat.php?id=33420&group=comp.arch#33420

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx17.iad.POSTED!not-for-mail
From: ThatWouldBeTelling@thevillage.com (EricP)
User-Agent: Thunderbird 2.0.0.24 (Windows/20100228)
MIME-Version: 1.0
Newsgroups: comp.arch
Subject: Re: Non-constant timing for instructions, including XOR
References: <tr12ha$39saq$1@newsreader4.netcologne.de> <cf466f4d-8eb7-4c96-8d55-f41de546931bn@googlegroups.com>
In-Reply-To: <cf466f4d-8eb7-4c96-8d55-f41de546931bn@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 61
Message-ID: <CabBL.571669$9sn9.133305@fx17.iad>
X-Complaints-To: abuse@UsenetServer.com
NNTP-Posting-Date: Sat, 28 Jan 2023 15:28:34 UTC
Date: Sat, 28 Jan 2023 10:28:02 -0500
X-Received-Bytes: 2289
 by: EricP - Sat, 28 Jan 2023 15:28 UTC

MitchAlsup wrote:
> On Friday, January 27, 2023 at 11:44:14 AM UTC-6, Thomas Koenig wrote:
>> This is _really_ rich.
>>
>> It seems that you have to set special CPU flags on both Intel and
>> AMD to get constant time for such simple operations as XOR or ADD
>> and not latency which depends on data.
>>
>> XOR? ADD? Seriously? If there ever was a single cycle latency
>> instruction, XOR's the one, and ADD has been down to a single
>> cycle for ages.
>>
>> See https://www.openwall.com/lists/oss-security/2023/01/25/3 which
>> includes a links to the vendor documentation and a discussion on
>> the Linux Kernel list.
>>
>> It seems people at Intel and AMD have chosen execution speed
>> over sanity.
> <
> Does anyone (else) see that this is just another manifestation of
> "SIMD considered harmful", this time to cryptography.
>
> BTW:: XOR is not in the list of Intel OpCodes that can be subject to
> different timings on different implementations. The only Intel OpCodes
> all start with P or V.

The instructions marked as affected are:

PMADDUBSW
PMADDWD
PMULDQ
PMULHRSW
PMULHUW
PMULHW
PMULLD
PMULLW
PMULUDQ

VPLZCNTD
VPLZCNTQ
VPMADD52HUQ
VPMADD52LUQ
VPMADDUBSW
VPMADDWD
VPMULDQ
VPMULHRSW
VPMULHUW
VPMULHW
VPMULLD
VPMULLQ
VPMULLW
VPMULUDQ

Possibly predication masking could affect the latency if
there are less calculation units than SIMD elements
and they only calculate the valid elements.
But then why wouldn't it affect the latency of
all predicate masked SIMD operations?

Re: Non-constant timing for instructions, including XOR

<acece168-4a4f-44b1-85bf-fc8a44b63985n@googlegroups.com>

  copy mid

https://rocksolidbbs.com/devel/article-flat.php?id=33421&group=comp.arch#33421

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a17:90a:5995:b0:22c:158d:88be with SMTP id l21-20020a17090a599500b0022c158d88bemr2060922pji.90.1674925872187;
Sat, 28 Jan 2023 09:11:12 -0800 (PST)
X-Received: by 2002:a05:6870:7390:b0:163:3ab5:b3f with SMTP id
z16-20020a056870739000b001633ab50b3fmr958712oam.218.1674925871900; Sat, 28
Jan 2023 09:11:11 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Sat, 28 Jan 2023 09:11:11 -0800 (PST)
In-Reply-To: <CabBL.571669$9sn9.133305@fx17.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=162.157.97.93; posting-account=1nOeKQkAAABD2jxp4Pzmx9Hx5g9miO8y
NNTP-Posting-Host: 162.157.97.93
References: <tr12ha$39saq$1@newsreader4.netcologne.de> <cf466f4d-8eb7-4c96-8d55-f41de546931bn@googlegroups.com>
<CabBL.571669$9sn9.133305@fx17.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <acece168-4a4f-44b1-85bf-fc8a44b63985n@googlegroups.com>
Subject: Re: Non-constant timing for instructions, including XOR
From: jsavard@ecn.ab.ca (Quadibloc)
Injection-Date: Sat, 28 Jan 2023 17:11:12 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1782
 by: Quadibloc - Sat, 28 Jan 2023 17:11 UTC

On Saturday, January 28, 2023 at 8:28:38 AM UTC-7, EricP wrote:

> But then why wouldn't it affect the latency of
> all predicate masked SIMD operations?

There are different numbers of calculation units of
different kinds?

Predicate masking is carried out by still going through
the motions for certain operations, because that's easier
or saves a few transistors?

Without a copy of the schematics, modern CPUs are
so complex that it's hard to even begin speculating on
the answers to questions like that. Well, maybe unless
your name is Mitch Alsup.

John Savard

Re: Non-constant timing for instructions, including XOR

<2023Jan28.175523@mips.complang.tuwien.ac.at>

  copy mid

https://rocksolidbbs.com/devel/article-flat.php?id=33422&group=comp.arch#33422

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.arch
Subject: Re: Non-constant timing for instructions, including XOR
Date: Sat, 28 Jan 2023 16:55:23 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 70
Message-ID: <2023Jan28.175523@mips.complang.tuwien.ac.at>
References: <tr12ha$39saq$1@newsreader4.netcologne.de> <cf466f4d-8eb7-4c96-8d55-f41de546931bn@googlegroups.com> <CabBL.571669$9sn9.133305@fx17.iad>
Injection-Info: reader01.eternal-september.org; posting-host="18319994b817eab6b7b1a75dd3068099";
logging-data="2440490"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18+oHyQQx+XjsHIzF426Xd+"
Cancel-Lock: sha1:i06kT6CVb2txRsxHpG6QhuQFAnU=
X-newsreader: xrn 10.11
 by: Anton Ertl - Sat, 28 Jan 2023 16:55 UTC

EricP <ThatWouldBeTelling@thevillage.com> writes:
>MitchAlsup wrote:
>>> See https://www.openwall.com/lists/oss-security/2023/01/25/3 which
>> BTW:: XOR is not in the list of Intel OpCodes that can be subject to
>> different timings on different implementations.

In that case I misinterpreted the documents by Intel. Apparently I
confused what false and true means in
<https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/resources/data-operand-independent-timing-instructions.html>.

The title talks about "Data Operand Independent Timing", then we get
"Instructions that May Exhibit MCDT Behavior", without explanation
what MCDT means (later it turns out it is "MXCSR Configuration
Dependent Timing", without explanation what MXCSR is. It turns out to
be a configuration register. What does that configuration register
have to do with the operands of other instructions? Intel needs to
hire someone who knows how to write if they want people to take notice
of such documents and apply the software mitigations (but do they want
that?).

>The instructions marked as affected are:
>
>PMADDUBSW
>PMADDWD
>PMULDQ
>PMULHRSW
>PMULHUW
>PMULHW
>PMULLD
>PMULLW
>PMULUDQ
>
>VPLZCNTD
>VPLZCNTQ
>VPMADD52HUQ
>VPMADD52LUQ
>VPMADDUBSW
>VPMADDWD
>VPMULDQ
>VPMULHRSW
>VPMULHUW
>VPMULHW
>VPMULLD
>VPMULLQ
>VPMULLW
>VPMULUDQ
>
>Possibly predication masking could affect the latency if
>there are less calculation units than SIMD elements
>and they only calculate the valid elements.

I think they discuss predication masking effects as an additional
source of timing variation somewhere in
<https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/best-practices/data-operand-independent-timing-isa-guidance.html>,
but AFAIK they have no mechanism like you suggest. And the P*
instructions have no such masking.

I am somewhat surprised that SIMD instructions are affected. Even if
you can have a shorter latency in some lanes, what is the probability
that no lane needs the longest latency?

Absent instructions: The DIV and IDIV instructions on Skylake
certainly have operand-dependent timing and are not listed here. The
configuration register probably does not control the
operation-dependence of DIV/IDIV.

- anton
--
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>

Re: Non-constant timing for instructions, including XOR

<4a283296-4d80-4f7b-bb0e-a4a021fde6b8n@googlegroups.com>

  copy mid

https://rocksolidbbs.com/devel/article-flat.php?id=33423&group=comp.arch#33423

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:6214:15c5:b0:537:4cb5:737 with SMTP id p5-20020a05621415c500b005374cb50737mr1704780qvz.31.1674928350804;
Sat, 28 Jan 2023 09:52:30 -0800 (PST)
X-Received: by 2002:a05:6808:1aac:b0:368:ca97:3a2a with SMTP id
bm44-20020a0568081aac00b00368ca973a2amr2768635oib.261.1674928350656; Sat, 28
Jan 2023 09:52:30 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Sat, 28 Jan 2023 09:52:30 -0800 (PST)
In-Reply-To: <2023Jan28.175523@mips.complang.tuwien.ac.at>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:80d:1590:9f48:40a0;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:80d:1590:9f48:40a0
References: <tr12ha$39saq$1@newsreader4.netcologne.de> <cf466f4d-8eb7-4c96-8d55-f41de546931bn@googlegroups.com>
<CabBL.571669$9sn9.133305@fx17.iad> <2023Jan28.175523@mips.complang.tuwien.ac.at>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4a283296-4d80-4f7b-bb0e-a4a021fde6b8n@googlegroups.com>
Subject: Re: Non-constant timing for instructions, including XOR
From: MitchAlsup@aol.com (MitchAlsup)
Injection-Date: Sat, 28 Jan 2023 17:52:30 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1711
 by: MitchAlsup - Sat, 28 Jan 2023 17:52 UTC

My Guess is that in certain power modes, the width of the
SIMD calculation units vary. At low temperatures, you get
512-bits = 8×64-bit lanes, at higher temperatures you get
256-bits = 4×64-bit lanes, and at still higher temperatures
you get 128-bits = 2×64-bit lanes. All done to smooth out
the power dissipation of the chip.

Re: Non-constant timing for instructions, including XOR

<HwdBL.39532$0XR7.8206@fx07.iad>

  copy mid

https://rocksolidbbs.com/devel/article-flat.php?id=33424&group=comp.arch#33424

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx07.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: scott@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Non-constant timing for instructions, including XOR
Newsgroups: comp.arch
References: <tr12ha$39saq$1@newsreader4.netcologne.de> <cf466f4d-8eb7-4c96-8d55-f41de546931bn@googlegroups.com> <CabBL.571669$9sn9.133305@fx17.iad> <2023Jan28.175523@mips.complang.tuwien.ac.at>
Lines: 15
Message-ID: <HwdBL.39532$0XR7.8206@fx07.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Sat, 28 Jan 2023 18:08:39 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Sat, 28 Jan 2023 18:08:39 GMT
X-Received-Bytes: 1375
 by: Scott Lurndal - Sat, 28 Jan 2023 18:08 UTC

anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>EricP <ThatWouldBeTelling@thevillage.com> writes:
>>MitchAlsup wrote:
>>>> See https://www.openwall.com/lists/oss-security/2023/01/25/3 which
>>> BTW:: XOR is not in the list of Intel OpCodes that can be subject to
>>> different timings on different implementations.
>

>
>I am somewhat surprised that SIMD instructions are affected. Even if
>you can have a shorter latency in some lanes, what is the probability
>that no lane needs the longest latency?

The problem occurs when the attacker chooses the data that the instruction
is performed upon, so the probablity is 1.

Re: Non-constant timing for instructions, including XOR

<2023Jan28.233849@mips.complang.tuwien.ac.at>

  copy mid

https://rocksolidbbs.com/devel/article-flat.php?id=33425&group=comp.arch#33425

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.arch
Subject: Re: Non-constant timing for instructions, including XOR
Date: Sat, 28 Jan 2023 22:38:49 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 17
Message-ID: <2023Jan28.233849@mips.complang.tuwien.ac.at>
References: <tr12ha$39saq$1@newsreader4.netcologne.de> <cf466f4d-8eb7-4c96-8d55-f41de546931bn@googlegroups.com> <CabBL.571669$9sn9.133305@fx17.iad> <2023Jan28.175523@mips.complang.tuwien.ac.at> <HwdBL.39532$0XR7.8206@fx07.iad>
Injection-Info: reader01.eternal-september.org; posting-host="18319994b817eab6b7b1a75dd3068099";
logging-data="2541749"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+vHjoD0j4+3gGctdToxoRU"
Cancel-Lock: sha1:o9owY3GGhvG749XrziKKTBpqTqo=
X-newsreader: xrn 10.11
 by: Anton Ertl - Sat, 28 Jan 2023 22:38 UTC

scott@slp53.sl.home (Scott Lurndal) writes:
>anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>>I am somewhat surprised that SIMD instructions are affected. Even if
>>you can have a shorter latency in some lanes, what is the probability
>>that no lane needs the longest latency?
>
>The problem occurs when the attacker chooses the data that the instruction
>is performed upon, so the probablity is 1.

The question is: If the probability of getting a shorter latency is
low, why did they Intel put the operand-dependent timing (and the
user-controlled chicken bit to disable it) into the hardware at all?

- anton
--
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>

Re: Non-constant timing for instructions, including XOR

<43dbc353-cf9d-4e52-871f-c412c0079ca1n@googlegroups.com>

  copy mid

https://rocksolidbbs.com/devel/article-flat.php?id=33427&group=comp.arch#33427

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:622a:5c0f:b0:3b6:3a58:911a with SMTP id gd15-20020a05622a5c0f00b003b63a58911amr1707202qtb.350.1674951731328;
Sat, 28 Jan 2023 16:22:11 -0800 (PST)
X-Received: by 2002:aca:2214:0:b0:36e:a53b:a77f with SMTP id
b20-20020aca2214000000b0036ea53ba77fmr2466058oic.79.1674951731085; Sat, 28
Jan 2023 16:22:11 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Sat, 28 Jan 2023 16:22:10 -0800 (PST)
In-Reply-To: <2023Jan28.233849@mips.complang.tuwien.ac.at>
Injection-Info: google-groups.googlegroups.com; posting-host=87.68.182.160; posting-account=ow8VOgoAAAAfiGNvoH__Y4ADRwQF1hZW
NNTP-Posting-Host: 87.68.182.160
References: <tr12ha$39saq$1@newsreader4.netcologne.de> <cf466f4d-8eb7-4c96-8d55-f41de546931bn@googlegroups.com>
<CabBL.571669$9sn9.133305@fx17.iad> <2023Jan28.175523@mips.complang.tuwien.ac.at>
<HwdBL.39532$0XR7.8206@fx07.iad> <2023Jan28.233849@mips.complang.tuwien.ac.at>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <43dbc353-cf9d-4e52-871f-c412c0079ca1n@googlegroups.com>
Subject: Re: Non-constant timing for instructions, including XOR
From: already5chosen@yahoo.com (Michael S)
Injection-Date: Sun, 29 Jan 2023 00:22:11 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2366
 by: Michael S - Sun, 29 Jan 2023 00:22 UTC

On Sunday, January 29, 2023 at 12:41:07 AM UTC+2, Anton Ertl wrote:
> sc...@slp53.sl.home (Scott Lurndal) writes:
> >an...@mips.complang.tuwien.ac.at (Anton Ertl) writes:
> >>I am somewhat surprised that SIMD instructions are affected. Even if
> >>you can have a shorter latency in some lanes, what is the probability
> >>that no lane needs the longest latency?
> >
> >The problem occurs when the attacker chooses the data that the instruction
> >is performed upon, so the probablity is 1.
> The question is: If the probability of getting a shorter latency is
> low, why did they Intel put the operand-dependent timing (and the
> user-controlled chicken bit to disable it) into the hardware at all?
> - anton
> --
> 'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
> Mitch Alsup, <c17fcd89-f024-40e7...@googlegroups.com>

PMULUDQ with all inputs < 2**16 are probably common and it makes sense
to execute this case faster.
For the rest of them I don't see a point.

Re: Non-constant timing for instructions, including XOR

<25c2cf73-0b51-41fa-a1f5-8364b494f273n@googlegroups.com>

  copy mid

https://rocksolidbbs.com/devel/article-flat.php?id=33430&group=comp.arch#33430

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a37:592:0:b0:706:6539:dcbd with SMTP id 140-20020a370592000000b007066539dcbdmr2534358qkf.306.1674955328000;
Sat, 28 Jan 2023 17:22:08 -0800 (PST)
X-Received: by 2002:a05:6871:9e:b0:163:36d5:35db with SMTP id
u30-20020a056871009e00b0016336d535dbmr1254771oaa.113.1674955327789; Sat, 28
Jan 2023 17:22:07 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Sat, 28 Jan 2023 17:22:07 -0800 (PST)
In-Reply-To: <ce77892d-f52b-41d4-937f-b50426f8d3b9n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:80d:1590:9f48:40a0;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:80d:1590:9f48:40a0
References: <tr12ha$39saq$1@newsreader4.netcologne.de> <cf466f4d-8eb7-4c96-8d55-f41de546931bn@googlegroups.com>
<ce77892d-f52b-41d4-937f-b50426f8d3b9n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <25c2cf73-0b51-41fa-a1f5-8364b494f273n@googlegroups.com>
Subject: Re: Non-constant timing for instructions, including XOR
From: MitchAlsup@aol.com (MitchAlsup)
Injection-Date: Sun, 29 Jan 2023 01:22:07 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2805
 by: MitchAlsup - Sun, 29 Jan 2023 01:22 UTC

On Saturday, January 28, 2023 at 4:37:33 AM UTC-6, robf...@gmail.com wrote:
> On Friday, January 27, 2023 at 3:55:23 PM UTC-5, MitchAlsup wrote:
> > On Friday, January 27, 2023 at 11:44:14 AM UTC-6, Thomas Koenig wrote:
> > > This is _really_ rich.
> > >
> > > It seems that you have to set special CPU flags on both Intel and
> > > AMD to get constant time for such simple operations as XOR or ADD
> > > and not latency which depends on data.
> > >
> > > XOR? ADD? Seriously? If there ever was a single cycle latency
> > > instruction, XOR's the one, and ADD has been down to a single
> > > cycle for ages.
> > >
> > > See https://www.openwall.com/lists/oss-security/2023/01/25/3 which
> > > includes a links to the vendor documentation and a discussion on
> > > the Linux Kernel list.
> > >
> > > It seems people at Intel and AMD have chosen execution speed
> > > over sanity.
> > <
> > Does anyone (else) see that this is just another manifestation of
> > "SIMD considered harmful", this time to cryptography.
> >
> > BTW:: XOR is not in the list of Intel OpCodes that can be subject to
> > different timings on different implementations. The only Intel OpCodes
> > all start with P or V.
> Is the non-constant time for instructions possibly to combat viruses and
> other malware? By making the execution speed inconsistent?
<
The converse is true:: it is easier to use a side channel attack on a non-fixed
timing critical calculation loop (such as crypto).

Re: Non-constant timing for instructions, including XOR

<e2b452f1-f87c-4d23-8513-c76b079763d3n@googlegroups.com>

  copy mid

https://rocksolidbbs.com/devel/article-flat.php?id=33432&group=comp.arch#33432

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:5309:b0:71d:9c4c:3ed2 with SMTP id oo9-20020a05620a530900b0071d9c4c3ed2mr46070qkn.11.1674955435615;
Sat, 28 Jan 2023 17:23:55 -0800 (PST)
X-Received: by 2002:aca:120f:0:b0:35e:cee9:4de7 with SMTP id
15-20020aca120f000000b0035ecee94de7mr2940964ois.23.1674955435384; Sat, 28 Jan
2023 17:23:55 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Sat, 28 Jan 2023 17:23:55 -0800 (PST)
In-Reply-To: <2023Jan28.175523@mips.complang.tuwien.ac.at>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:80d:1590:9f48:40a0;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:80d:1590:9f48:40a0
References: <tr12ha$39saq$1@newsreader4.netcologne.de> <cf466f4d-8eb7-4c96-8d55-f41de546931bn@googlegroups.com>
<CabBL.571669$9sn9.133305@fx17.iad> <2023Jan28.175523@mips.complang.tuwien.ac.at>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e2b452f1-f87c-4d23-8513-c76b079763d3n@googlegroups.com>
Subject: Re: Non-constant timing for instructions, including XOR
From: MitchAlsup@aol.com (MitchAlsup)
Injection-Date: Sun, 29 Jan 2023 01:23:55 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1654
 by: MitchAlsup - Sun, 29 Jan 2023 01:23 UTC

On Saturday, January 28, 2023 at 11:24:26 AM UTC-6, Anton Ertl wrote:

> Absent instructions: The DIV and IDIV instructions on Skylake
> certainly have operand-dependent timing and are not listed here. The
> configuration register probably does not control the
> operation-dependence of DIV/IDIV.
<
Unlikely to be used in a tight crypto loop.

Re: Non-constant timing for instructions, including XOR

<7e92f3c0-9c52-445b-9ef3-722c217007fcn@googlegroups.com>

  copy mid

https://rocksolidbbs.com/devel/article-flat.php?id=33433&group=comp.arch#33433

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:13d0:b0:6ff:afd8:f08e with SMTP id g16-20020a05620a13d000b006ffafd8f08emr2752846qkl.337.1674955497628;
Sat, 28 Jan 2023 17:24:57 -0800 (PST)
X-Received: by 2002:a05:6808:6198:b0:354:4a19:f09e with SMTP id
dn24-20020a056808619800b003544a19f09emr2711946oib.61.1674955497315; Sat, 28
Jan 2023 17:24:57 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Sat, 28 Jan 2023 17:24:57 -0800 (PST)
In-Reply-To: <2023Jan28.233849@mips.complang.tuwien.ac.at>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:80d:1590:9f48:40a0;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:80d:1590:9f48:40a0
References: <tr12ha$39saq$1@newsreader4.netcologne.de> <cf466f4d-8eb7-4c96-8d55-f41de546931bn@googlegroups.com>
<CabBL.571669$9sn9.133305@fx17.iad> <2023Jan28.175523@mips.complang.tuwien.ac.at>
<HwdBL.39532$0XR7.8206@fx07.iad> <2023Jan28.233849@mips.complang.tuwien.ac.at>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7e92f3c0-9c52-445b-9ef3-722c217007fcn@googlegroups.com>
Subject: Re: Non-constant timing for instructions, including XOR
From: MitchAlsup@aol.com (MitchAlsup)
Injection-Date: Sun, 29 Jan 2023 01:24:57 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2187
 by: MitchAlsup - Sun, 29 Jan 2023 01:24 UTC

On Saturday, January 28, 2023 at 4:41:07 PM UTC-6, Anton Ertl wrote:
> sc...@slp53.sl.home (Scott Lurndal) writes:
> >an...@mips.complang.tuwien.ac.at (Anton Ertl) writes:
> >>I am somewhat surprised that SIMD instructions are affected. Even if
> >>you can have a shorter latency in some lanes, what is the probability
> >>that no lane needs the longest latency?
> >
> >The problem occurs when the attacker chooses the data that the instruction
> >is performed upon, so the probablity is 1.
> The question is: If the probability of getting a shorter latency is
> low, why did they Intel put the operand-dependent timing (and the
> user-controlled chicken bit to disable it) into the hardware at all?
<
it is not low, as up to 50% of matrix multiplication have terms of zero.

Re: Non-constant timing for instructions, including XOR

<R7vBL.592254$9sn9.354103@fx17.iad>

  copy mid

https://rocksolidbbs.com/devel/article-flat.php?id=33439&group=comp.arch#33439

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx17.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: scott@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Non-constant timing for instructions, including XOR
Newsgroups: comp.arch
References: <2023Jan28.233849@mips.complang.tuwien.ac.at> <memo.20230129002624.24676D@jgd.cix.co.uk>
Lines: 14
Message-ID: <R7vBL.592254$9sn9.354103@fx17.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Sun, 29 Jan 2023 14:10:57 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Sun, 29 Jan 2023 14:10:57 GMT
X-Received-Bytes: 1378
 by: Scott Lurndal - Sun, 29 Jan 2023 14:10 UTC

jgd@cix.co.uk (John Dallman) writes:
>In article <2023Jan28.233849@mips.complang.tuwien.ac.at>,
>anton@mips.complang.tuwien.ac.at (Anton Ertl) wrote:
>
>> The question is: If the probability of getting a shorter latency is
>> low, why did they Intel put the operand-dependent timing (and the
>> user-controlled chicken bit to disable it) into the hardware at all?
>
>Maybe it provides a way to make benchmarks look better?

Isolated systems, not dependent upon data from outside, don't
need the DIT protection, and can thus tune for performance over
security. Not all systems are connected to the internet processing
untrusted data.


devel / comp.arch / Re: Non-constant timing for instructions, including XOR

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor