From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 5 May 2021 17:11:05 +0300 From: "Vladimir D. Seleznev" To: ALT Linux Team development discussions Message-ID: References: <20210501064431.C5F099A456D@gyle.altlinux.org> <20210501090437.bp7fx33thclcgman@example.org> <079b855b-b0d0-b0e6-2da3-4b31f4b4ab1f@basealt.ru> <20210504104532.bd2o2qmcgmves4wl@example.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [devel] hash collision in rpm X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2021 14:11:06 -0000 Archived-At: List-Archive: List-Post: On Wed, May 05, 2021 at 08:40:27AM +0300, Alexey Tourbin wrote: > [skip] > > So the expected number of collisions for short versions is smaller, > but we have two of them. By the linearity of expectation, the birthday > collision rate is the same. (This generally shows that it is pointless > to split a long set-version into a few shorter ones, under any classes > of equivalence on symbols such as ELF ABI tags. Counterintuitively, > you can't fight birthday collisions by partitioning, unless you also > increase the output length. So doing separate set-versions for > libfoo.so.0(FOO_1.0) and libfoo.so.0(FOO_1.1) is not necessarily a > good idea, we can just as well hash sym@FOO_1.0 and sym@FOO_1.1 and > package them into a single version.) Unfortunately, the symbol resolution is very flexible (some treat it as an advantage), so the dynamic linker can resolve sym@FOO_1.0 as sym and vice versa. That makes almost no point to hash symbols with their versions. -- WBR, Vladimir D. Seleznev