LGTM3 On Wed, Mar 13, 2024 at 9:50 AM Mike Taylor <miketa...@chromium.org> wrote:
> LGTM2 > On 3/13/24 12:40 PM, Corentin Wallez wrote: > > Just to clarify, the ServiceWorker cannot do anything more than what the > main thread can do for DoS. Or I guess the only additional capability is > that it can trigger it up to 30 seconds after the user left the page. > > The reason why we can't prevent DoS in all cases is that most GPUs don't > have preemption so sending an infinite loop can make some of the processing > units stuck forever. Chromium has mechanisms to try to detect this and > assign the blame to a website that won't be allowed GPU access in the > future, and some OSes can restart a stuck GPU. But this is all best effort > (unfortunately, and already the case with WebGL, or potentially DOM with > crazy filters). > On Wednesday, March 13, 2024 at 3:28:42 PM UTC+1 Corentin Wallez wrote: > >> I don't know the ServiceWorker mechanisms too much, but if the Javascript >> dies in 30 seconds then WebGPU operations will soon after. There isn't a >> lot of use in keeping WebGPU computations running for much longer as >> Javascript is needed to get the result of any computation in any useful >> places (canvas, ArrayBuffer, MediaStream, etc). Technically the >> ServiceWorker could send a much longer running job to the GPU (think an >> infinite loop) but apart from DDoS there wouldn't be any use to this. >> >> You might also be interested in the privacy and security section >> <https://gpuweb.github.io/gpuweb/#malicious-use> of the WebGPU spec. >> On Wednesday, March 13, 2024 at 9:55:02 AM UTC+1 Daniel Bratell wrote: >> >>> Just to ask what is probably a FAQ to get it out here... >>> >>> The Service Worker timeout is 30 seconds right, so regardless of how >>> heavy the calculations are, a service worker and its associated >>> calculations will die in 30 seconds after the user closes the associated >>> page? >>> >>> I ask because while it's been possible to run heavy calculations in >>> various workers in the past, this explicitly encourages it. It would be a >>> bad situation if a user cannot detect or stop a runaway WebGPU operation >>> from a possibly hostile site. >>> >>> /Daniel >>> On 2024-03-13 08:06, 'François Beaufort' via blink-dev wrote: >>> >>> >>> >>> On Tue, Mar 12, 2024 at 10:14 PM Yoav Weiss (@Shopify) < >>> yoav...@chromium.org> wrote: >>> >>>> LGTM1 >>>> >>>> On Tue, Mar 12, 2024, 15:10 'François Beaufort' via blink-dev < >>>> blin...@chromium.org> wrote: >>>> >>>>> >>>>> >>>>> On Tue, Mar 12, 2024 at 6:58 PM Mike Taylor <mike...@chromium.org> >>>>> wrote: >>>>> >>>>>> On 3/11/24 4:06 PM, 'François Beaufort' via blink-dev wrote: >>>>>> >>>>>> Contact emails fbea...@google.com >>>>>> >>>>>> Explainer None >>>>>> >>>>>> Could you write a few sentences why this is a useful addition? >>>>>> >>>>> >>>>> Service Workers enable offline capabilities and background processing >>>>> for WebGPU. This means graphics-intensive web applications or Chrome >>>>> Extensions can cache resources and perform computations even when the user >>>>> isn't actively interacting with the page. >>>>> Shared Workers allow multiple tabs or extension contexts to coordinate >>>>> and share WebGPU resources. This leads to smoother performance and more >>>>> efficient use of the user's graphics hardware. >>>>> >>>>>> >>>>>> Specification https://gpuweb.github.io/gpuweb/#navigator-gpu >>>>>> >>>>>> Summary >>>>>> >>>>>> Functionality added to the WebGPU spec after its first shipment in a >>>>>> browser. ServiceWorker and SharedWorker support is added to WebGPU, >>>>>> aligning with existing WebGL capabilities. >>>>>> >>>>>> Blink component Blink>WebGPU >>>>>> <https://bugs.chromium.org/p/chromium/issues/list?q=component:Blink%3EWebGPU> >>>>>> >>>>>> TAG review None >>>>>> >>>>>> TAG review status Not applicable >>>>>> >>>>>> Risks >>>>>> >>>>>> >>>>>> Interoperability and Compatibility >>>>>> >>>>>> ServiceWorker and SharedWorker support have not yet been implemented >>>>>> in any browser, but have been approved by the GPU for the Web Community >>>>>> Group, with representatives from Chrome, Firefox, and Safari. See minutes >>>>>> at >>>>>> https://docs.google.com/document/d/15w7nsvqWwITA5yvCrsO3SEIEuZziXzj7YsrHN4Jd2uM/edit#heading=h.jbe7pg8ebd43 >>>>>> >>>>>> *Gecko*: No signal ( >>>>>> https://github.com/mozilla/standards-positions/issues/971) >>>>>> >>>>>> Not officially a positive signal, but looking positive based on the >>>>>> comments. >>>>>> >>>>> >>>>> Indeed. >>>>> >>>>>> >>>>>> *WebKit*: No signal ( >>>>>> https://github.com/WebKit/standards-positions/issues/294#issuecomment-1877411933 >>>>>> ) >>>>>> >>>>>> This is kind of an "N/A to positive", given it's WebGPU. >>>>>> >>>>> >>>>> Agree ;) >>>>> >>>>>> >>>>>> *Web developers*: Positive ( >>>>>> https://github.com/gpuweb/gpuweb/issues/4197) >>>>>> >>>>>> *Other signals*: >>>>>> >>>>>> WebView application risks >>>>>> >>>>>> Does this intent deprecate or change behavior of existing APIs, such >>>>>> that it has potentially high risk for Android WebView-based applications? >>>>>> >>>>>> None >>>>>> >>>>>> >>>>>> Debuggability >>>>>> >>>>>> None >>>>>> >>>>>> >>>>>> Will this feature be supported on all six Blink platforms (Windows, >>>>>> Mac, Linux, ChromeOS, Android, and Android WebView)? No >>>>>> All platforms will eventually have support. Will immediately be >>>>>> available on Android, ChromeOS, Mac, and Windows, since those platforms >>>>>> already support WebGPU. Linux is planned to have WebGPU support in the >>>>>> future, so this feature will become available when WebGPU does. >>>>>> >>>>>> What about WebView? Do we ship support for WebGPU there? >>>>>> >>>>> >>>>> Yes. WebGPU is supported on Android WebView as well. >>>>> >>>> >>> Note that Shared Workers are not available on Android for now. See >>> https://issues.chromium.org/issues/40290702 >>> >>>> >>>>>> Is this feature fully tested by web-platform-tests >>>>>> <https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md> >>>>>> ? Yes >>>>>> >>>>>> WebGPU/WGSL have a conformance test suite ( >>>>>> https://github.com/gpuweb/cts) that is regularly pulled into >>>>>> Chromium and part of the testing of Dawn/Tint in Chromium. PRs: >>>>>> https://github.com/gpuweb/cts/pull/3419 - >>>>>> https://github.com/gpuweb/cts/pull/3345 >>>>>> >>>>>> >>>>>> Flag name on chrome://flags None >>>>>> >>>>>> Finch feature name WebGPUExperimentalFeatures >>>>>> >>>>>> Requires code in //chrome? False >>>>>> >>>>>> Tracking bug >>>>>> https://bugs.chromium.org/p/chromium/issues/detail?id=1521763 >>>>>> >>>>>> Estimated milestones >>>>>> Shipping on desktop 124 >>>>>> Shipping on Android 124 >>>>>> >>>>>> Anticipated spec changes >>>>>> >>>>>> Open questions about a feature may be a source of future web compat >>>>>> or interop issues. Please list open issues (e.g. links to known github >>>>>> issues in the project for the feature specification) whose resolution may >>>>>> introduce web compat/interop risk (e.g., changing to naming or structure >>>>>> of >>>>>> the API in a non-backward-compatible way). >>>>>> None >>>>>> >>>>>> Link to entry on the Chrome Platform Status >>>>>> https://chromestatus.com/feature/4875951026733056 >>>>>> >>>>>> Links to previous Intent discussions Intent to prototype: >>>>>> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPpwU5%2BewUL-PTEQ_ZQgdtViKU2fSVXeDNab2oEy6RsGqkgcGQ%40mail.gmail.com >>>>>> >>>>>> This intent message was generated by Chrome Platform Status >>>>>> <https://chromestatus.com/>. >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "blink-dev" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to blink-dev+...@chromium.org. >>>>>> To view this discussion on the web visit >>>>>> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPpwU5Lo3k-Gynt4M%2BwgV3yfg%2BFvM1npij%2BGTNZLW-VZHojXYA%40mail.gmail.com >>>>>> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPpwU5Lo3k-Gynt4M%2BwgV3yfg%2BFvM1npij%2BGTNZLW-VZHojXYA%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> >>>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "blink-dev" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to blink-dev+...@chromium.org. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPpwU5LZJChJe3EwDeGMwkXgMNqRk%3DM5-bBAM7Jya6Ln5_0SOA%40mail.gmail.com >>>>> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPpwU5LZJChJe3EwDeGMwkXgMNqRk%3DM5-bBAM7Jya6Ln5_0SOA%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "blink-dev" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to blink-dev+...@chromium.org. >>> >>> To view this discussion on the web visit >>> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPpwU5L2HE3mLZWvRNGsrh0-5sr0M4wmXNzhBhcwYfQSiTKqzQ%40mail.gmail.com >>> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPpwU5L2HE3mLZWvRNGsrh0-5sr0M4wmXNzhBhcwYfQSiTKqzQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> >>> -- > You received this message because you are subscribed to the Google Groups > "blink-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to blink-dev+unsubscr...@chromium.org. > To view this discussion on the web visit > https://groups.google.com/a/chromium.org/d/msgid/blink-dev/7672cdee-f031-4819-8471-4cad3c04a91d%40chromium.org > <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/7672cdee-f031-4819-8471-4cad3c04a91d%40chromium.org?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "blink-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscr...@chromium.org. To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw-kuUtKzT-PU-CT8hSz86NAQvFNc4SED782BOgTt76iLg%40mail.gmail.com.