From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C55BC43331 for ; Mon, 11 Nov 2019 18:25:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6A8CD214E0 for ; Mon, 11 Nov 2019 18:25:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="jQlgh9zg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726978AbfKKSZJ (ORCPT ); Mon, 11 Nov 2019 13:25:09 -0500 Received: from mail-il1-f194.google.com ([209.85.166.194]:38804 "EHLO mail-il1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726821AbfKKSZJ (ORCPT ); Mon, 11 Nov 2019 13:25:09 -0500 Received: by mail-il1-f194.google.com with SMTP id u17so8075322ilq.5 for ; Mon, 11 Nov 2019 10:25:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=JCeoaT6SPhdsAFhAQGiiZtXxeeYRWs8SK2Q/QsJRHRw=; b=jQlgh9zg8O2oWvtUgxIK4YvQg67tSjZ4/A2rV1ETgxAixnV4Vn/xrsWyhToTtyWwZi ziQbIVgYEGgVjRL3axUjbSv0B3VJkvPJVKd+crjsiLycM39aenWS5AkkmkzIdK48RBP/ k10Ty3GJjTIO+o5o4apvbWJ7P2zH+pxX2UbDFNcms7e44AhfX6Cim3hGLEW0bndiyNsL HRTiSTZnO5Pko7+QtmofgLQ7iqr0jAb3LicadsvqZzGo2Ow4+pOhQ5HQPigrepQZMjv1 +bWwege4dM5pVO6JltOo2MyantbqK+OdRXHhKotv7a7oyD9HbOg+tKWmvawjR/+D5RsG q94w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JCeoaT6SPhdsAFhAQGiiZtXxeeYRWs8SK2Q/QsJRHRw=; b=r8ZV8qj2NruOZqUnXnr9Fm3YF9RUVSgkeg3SSmOoVs7tZJfU6LFO2iduHD8uD1zhji 5KRy/8L17exZz1mDCpogIA9LDYv7ezMbN8bGCRCtjau/X56CliFC6jH7leR6S0RvWom/ BiF38Rh495aIm0KdZWImvgh09F9R38KgJFircm0EC6vycIj+iXcskziTRW6KKkG8a7sH XZNlR1a77I9Ftb5n8ijNTCiRoKklthO7++6GiDGmwlWQpcjJ3wvT4CSaZ0Acea3GSaGc zfrB48c/C9TNx/d+R/LzIdnkIWHvV2TMtXSd9uc0qqAzdOvggufG9UW7sZuv7TUqj+Tc gUrg== X-Gm-Message-State: APjAAAWuKmM21IKJbM4MPyviY9LBBuGJOyYRePmcGEChqA5hNPgw+/XC kS3cyabz++4TR2nlIMAvp5WUh+DZYzY7jK07lziA7g== X-Google-Smtp-Source: APXvYqzHvkfiZBckd2jJeRCy/dDlhO8RqeOlsComYTZXSNlEorT+CbKY8qGYKd5JtTib+86a056DbXjDKUPm7UT04wk= X-Received: by 2002:a92:109c:: with SMTP id 28mr31333481ilq.142.1573496708105; Mon, 11 Nov 2019 10:25:08 -0800 (PST) MIME-Version: 1.0 References: <20191101173219.18631-1-edumazet@google.com> <20191101.145923.2168876543627475825.davem@davemloft.net> In-Reply-To: From: Eric Dumazet Date: Mon, 11 Nov 2019 10:24:56 -0800 Message-ID: Subject: Re: [PATCH net] inet: stop leaking jiffies on the wire To: Thiemo Nagel Cc: David Miller , netdev , Eric Dumazet Content-Type: text/plain; charset="UTF-8" Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Nov 11, 2019 at 9:49 AM Thiemo Nagel wrote: > Problem a) is hard -- as you mention, it may require hardware support > to solve it fully. However the problem that I'm suggesting to address > is b), and that likely can be solved by swapping out prandom_u32() for > get_random_u32(). > Make sure a server can still generates 10 millions packets per second using this thing :) I believe get_random_u32() is at least 5 times more expensive than prandom_u32(), and that is on x86 where arch_has_random() is true and rdrand instruction can be used. On other arches this would probably kill performance, and eat entropy way too much. Really this is a discussion that should be taken to random subsystem maintainers. We can not simply use get_random_u32() here.