Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966904AbcLVUCk (ORCPT ); Thu, 22 Dec 2016 15:02:40 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:37365 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966325AbcLVUCg (ORCPT ); Thu, 22 Dec 2016 15:02:36 -0500 X-ME-Sender: X-Sasl-enc: hHeAABaxRIQ41urYkYHIy9jPyTWmdcng7M6Q5ZmgdTrK 1482436955 Subject: Re: BPF hash algo (Re: [kernel-hardening] Re: [PATCH v7 3/6] random: use SipHash in place of MD5) To: Andy Lutomirski , Alexei Starovoitov References: <1482425969.2673.5.camel@stressinduktion.org> Cc: Daniel Borkmann , "Jason A. Donenfeld" , "kernel-hardening@lists.openwall.com" , "Theodore Ts'o" , Netdev , LKML , Linux Crypto Mailing List , David Laight , Eric Dumazet , Linus Torvalds , Eric Biggers , Tom Herbert , Andi Kleen , "David S. Miller" , Jean-Philippe Aumasson From: Hannes Frederic Sowa Message-ID: Date: Thu, 22 Dec 2016 21:02:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 481 Lines: 9 On 22.12.2016 20:56, Andy Lutomirski wrote: > It's also not quite clear to me why userspace needs to be able to > calculate the digest on its own. A bpf(BPF_CALC_PROGRAM_DIGEST) > command that takes a BPF program as input and hashes it would seem to > serve the same purpose, and that would allow the kernel to key the > digest and change the algorithm down the road without breaking things. I think that people expect digests of BPF programs to be stable over time and reboots.