Re: [PATCH 08/10] fast-export: add a "data" callback parameter to anonymize_str()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> writes:

> The anonymize_str() function takes a generator callback, but there's no
> way to pass extra context to it. Let's add the usual "void *data"
> parameter to the generator interface and pass it along.
>
> This is mildly annoying for existing callers, all of which pass NULL,
> but is necessary to avoid extra globals in some cases we'll add in a
> subsequent patch.

> While we're touching each of these callbacks, we can further observe
> that none of them use the existing orig/len parameters at all. This
> makes sense, since the point is for their output to have no discernable
> basis in the original (my original version had some notion that we might
> use a one-way function to obfuscate the names, but it was never
> implemented). So let's drop those extra parameters. If a caller really
> wants to do something with them, it can pass a struct through the new
> data parameter.

I guess it was giving a perfect proof that the anonymization is
good---you cannot leak the info in data you did not even look at
;-).

And we must keep passing the <orig,len> pair to the anonymize API,
of course, because that would be used as a look-up key for the
customized/seeded mapping, which makes sense.  But of course it is
not necessary to pass them to the lower-level "generate" callbacks.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux