Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp1787720ybj; Sun, 22 Sep 2019 11:56:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCmXNsYZMQpyLnow8a/jx3PK1FdbfgTL99apQ4orzr3zgOtiese7FqaH9Uuk3Lm9ZiCbSD X-Received: by 2002:aa7:d48f:: with SMTP id b15mr33160406edr.159.1569178615036; Sun, 22 Sep 2019 11:56:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569178615; cv=none; d=google.com; s=arc-20160816; b=HCytZsXI8W8QoSPgY80OZuMzKX+g975H1ch7Xpzhpa1vDCCfobkSxtTLzpTwLcE8ot Jy6KVTWM5dFp+ZO4Q8BNZNq7vmMld+7THQUNXYfGecFdNCRnkzX5AlRfFEIB7hiaRhx3 Bwz2AXtA9hJjZe+Jl6XPpoMlfW9iWzkqq4L88K49LaUhtncXOqpU2TyAjX5kFW45CjLd FT44kjWDHCEHBWA043F7BlDGcQwVkYcGezDDYqIi0VK7ySPFPmgFZMwANTlM7IXFITnH uXmrpfR48BVxtUo5y4R2BKEC6zg+raU9CH2pd0QTa2jM4g4sERGEZjLPpev6AexX1fHo orjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=ggY7nD3rvHpK6tokNICQv+FHBb6/w+0Y43sZjnmtaME=; b=wk3B8MNng80bL8R8X4SturMX9LTI0PRc8ArCZHp6+KUcpu+VJxA6m9UwtsV5U+8+Sm 8fj4wFg1xhH7GwsGBqnscPglDJxMR0L5OeUdfAEFNBvmEEbQWPbo/zZ788NE7Yo/Mz5y MXYSlEA7jSWamluRU/ACKvkT+9tZqHY6npUYZ1nidIcJM97gFstPZfOCvAkg+Vz0leSg HHmnqqK+fuWn9jpfPMIvkz+XHDuvF5S7q0g/S0T1tTcMPSObSjNnoszlWZqx0rHGu4kw HhudMXIr15V3pc738dyibcpmd+U/BaGS0uO5d3GZYkqUOwnEHCG7OPV4bPfl5dVBTJuy u8zA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i16si3965193ejc.140.2019.09.22.11.56.30; Sun, 22 Sep 2019 11:56:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729489AbfITR0V (ORCPT + 99 others); Fri, 20 Sep 2019 13:26:21 -0400 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:49204 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729485AbfITR0V (ORCPT ); Fri, 20 Sep 2019 13:26:21 -0400 Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id x8KHQ9oc001842; Fri, 20 Sep 2019 19:26:09 +0200 Date: Fri, 20 Sep 2019 19:26:09 +0200 From: Willy Tarreau To: "Ahmed S. Darwish" Cc: Linus Torvalds , Lennart Poettering , "Theodore Y. Ts'o" , "Eric W. Biederman" , "Alexander E. Patrakov" , Michael Kerrisk , Matthew Garrett , lkml , linux-ext4@vger.kernel.org, linux-api@vger.kernel.org, linux-man@vger.kernel.org Subject: Re: [PATCH RFC v4 1/1] random: WARN on large getrandom() waits and introduce getrandom2() Message-ID: <20190920172609.GA1832@1wt.eu> References: <20190912082530.GA27365@mit.edu> <20190914122500.GA1425@darwi-home-pc> <008f17bc-102b-e762-a17c-e2766d48f515@gmail.com> <20190915052242.GG19710@mit.edu> <20190918211503.GA1808@darwi-home-pc> <20190918211713.GA2225@darwi-home-pc> <20190920134609.GA2113@pc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190920134609.GA2113@pc> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Hi Ahmed, On Fri, Sep 20, 2019 at 03:46:09PM +0200, Ahmed S. Darwish wrote: > Problem is, glibc is still *really* slow in adopting linux syscall > wrappers, so I'm not optimistic about that... > > I still see the new system call as the sanest path, even provided > the cost of a new syscall number.. New syscalls are always a pain to deal with in userland, because when they are introduced, everyone wants them long before they're available in glibc. So userland has to define NR_xxx for each supported arch and to perform the call itself. With flags adoption is instantaneous. Just #ifndef/#define, check if the flag is supported and that's done. The only valid reason for a new syscall is when the API changes (e.g. one extra arg, a la accept4()), which doesn't seem to be the case here. Otherwise please by all means avoid this in general. Thanks, Willy