Closed Bug 1518760 Opened 5 years ago Closed 5 years ago

Add an API to get the chunk number of SafeBrowsing list

Categories

(Toolkit :: Safe Browsing, enhancement, P2)

enhancement

Tracking

()

RESOLVED WONTFIX

People

(Reporter: dlee, Assigned: dlee)

Details

Attachments

(1 file)

We may want to use the chunk number of tracking protection list as the list version number. If we want to do this, we need to implement the API to retrieve it.

Note that the chunk number is only available for SafeBrowsing V2 lists

Attached patch WIP Patch.patchSplinter Review

In this WIP patch, asynchronous GetTable API returns result:

base-track-digest256;a:1541603465
content-track-digest256;a:1541603465
mozstd-trackwhite-digest256;a:1541603465
mozplugin-block-digest256;a:1471849627
test-malware-simple;a:1
goog-downloadwhite-digest256;a:5s:2-12

Some notes:

  1. Only support calling this API in the parent process.
  2. this is an asynchronous API(MT-> worker thread -> MT) because the chunk number has to be read in the worker thread.
  3. This API involves disk read, so we should cache the result. The WIP patch caches the result but it doesn't prevent the MT->WT->MT.
  4. If we want to cache the chunk number in the caller, the caller has to clear the cache after a SafeBrowsing update.
Priority: P1 → P2
Summary: Support API to get the chunk number of SafeBrowsing list → Add an API to get the chunk number of SafeBrowsing list
Priority: P2 → P1

Hi Chutten,
Do you have an idea when this work needs to be done? And what is the requirement for this API?
Thanks!

Flags: needinfo?(chutten)

To my knowledge this API isn't needed until three things happen

  1. The Firefox Origin Telemetry prototype lands and is verified to be fit for Content Blocking's purposes.
  2. Firefox Origin Telemetry is enhanced to enable changing an origins list at runtime.
  3. Content Blocking provides to Origin Telemetry the origins list it wishes to use.

At point 3 we'll need some way for Content Blocking to name the origins list it is providing to Origin Telemetry, and this name should be shared only amongst clients with identical lists. (thus, it should be derived from the chunk number, which I'm led to understand is global).

Does that help?

Flags: needinfo?(chutten)

(In reply to Chris H-C :chutten from comment #4)

At point 3 we'll need some way for Content Blocking to name the origins list it is providing to Origin Telemetry, and this name should be shared only amongst clients with identical lists. (thus, it should be derived from the chunk number, which I'm led to understand is global).

Does that help?

Yes, that is super clear and helpful, thanks!

A note:
Given the fact that I am working on stuff to reduce IO caused by SafeBrowsing - Bug 1531354.
We need to make sure that this API shouldn't be called during startup(.sbstore file will be opened and read when the API is called), otherwise the work I am going to work in Bug 1531354 maybe useless.

Priority: P1 → P2

Hi Chris,
I guess the work for Origin Telemetry is completed, so we don't need this bug right?
If yes, I'll just close it.

Flags: needinfo?(chutten)

Correct. We might end up needing it later, but if that's the case there'll be a full design pass giving us plenty of opportunity to reopen :)

Flags: needinfo?(chutten)

(In reply to Chris H-C :chutten from comment #8)

Correct. We might end up needing it later, but if that's the case there'll be a full design pass giving us plenty of opportunity to reopen :)

Thanks for the information, I'll close it for now.

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: