diff --git a/infra.bs b/infra.bs index 38f6d3a..77aa667 100644 --- a/infra.bs +++ b/infra.bs @@ -240,6 +240,39 @@ as well as the single algorithm would. Therefore performance is best left as a f over. +

Avoid limits on algorithm inputs

+ +

A document using the Infra Standard generally should not enforce specific limits on algorithm +inputs with regards to their size, resource usage, or equivalent. This allows for competition among +user agents and avoids constraining the potential computing needs of the future. + +

Nevertheless, user agents may impose implementation-defined limits on +otherwise unconstrained inputs. E.g., to prevent denial of service attacks, to guard against running +out of memory, or to work around platform-specific limitations. + +

Global resource limits can be used as side channels through a variant on a resource +exhaustion attack, whereby the attacker can observe whether a victim application reaches the global +limit. Limits could also be used to fingerprint the user agent, but only if they make the user agent +more unique in some manner, e.g., if they are specific to the underlying hardware. + +

An API that allows creating an in-memory bitmap might +be specified to allow any dimensions, or any dimensions up to some large limit like JavaScript's +Number.MAX_SAFE_INTEGER. However, implementations can choose to impose some +implementation-defined (and thus not specified) limit on the dimensions, instead of +attempting to allocate huge amounts of memory. + +

A programming language might not have a +maximum call stack size specified. However, implementations could choose to impose one for practical +reasons. + +

As code can end up depending on a particular limit, it can be useful to define a limit for +interoperability. Sometimes, embracing that is not problematic for the future, and can make the code +run in more user agents. + +

It can also be useful to constrain an implementation-defined limit with a lower limit. +I.e., ensuring all implementations can handle inputs of a given minimum size. + +

Declaration

Algorithm names are usually verb phrases, but sometimes are given names that emphasize their @@ -1995,12 +2028,16 @@ Chris Rebert, Daniel Ehrenberg, Dominic Farolino, Gabriel Pivovarov, +Ian Hickson, +Jakob Ackermann, Jake Archibald, Jeff Hodges, +Jeffrey Yasskin, Jungkee Song, Leonid Vasilyev, Maciej Stachowiak, Malika Aubakirova, +Martin Thomson, Michaelâ„¢ Smith, Mike West, Ms2ger,