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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 817FFC43334 for ; Wed, 13 Jul 2022 09:53:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230381AbiGMJxN (ORCPT ); Wed, 13 Jul 2022 05:53:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235741AbiGMJxN (ORCPT ); Wed, 13 Jul 2022 05:53:13 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C205F9931; Wed, 13 Jul 2022 02:53:11 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 8E199CE1DF0; Wed, 13 Jul 2022 09:53:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3DF04C3411E; Wed, 13 Jul 2022 09:53:07 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="TrEXnIMP" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1657705985; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mArbs2A4NP1+bdAMtcm5yNBmM8qTNvow0Z/wnSY2eK8=; b=TrEXnIMPuj3qZf9ytsmBPXDcM7/sB/Q+XWrgYtiluN75/UeLvlpJ3IAVJivTznZ62kMAOb EKdRIG2Nq/djpsQYReIJNSyAphUerA6Eowd/+wLyVTEg7dOb4LwDpB68TOiJ0lTt9wZoEi WwgvYIT0abesdkOkLDQ4t5PA9dCdmkg= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 9893954c (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Wed, 13 Jul 2022 09:53:04 +0000 (UTC) Date: Wed, 13 Jul 2022 11:53:03 +0200 From: "Jason A. Donenfeld" To: Johannes Berg Cc: linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] um: seed rng using host OS rng Message-ID: References: <20220712232738.77737-1-Jason@zx2c4.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Hi Johannes, Thanks for the review. On Wed, Jul 13, 2022 at 09:05:03AM +0200, Johannes Berg wrote: > On Wed, 2022-07-13 at 01:27 +0200, Jason A. Donenfeld wrote: > > > > +++ b/arch/um/include/shared/os.h > > @@ -11,6 +11,12 @@ > > #include > > #include > > #include > > +/* This is to get size_t */ > > +#ifndef __UM_HOST__ > > +#include > > +#else > > +#include > > +#endif > > > > #define CATCH_EINTR(expr) while ((errno = 0, ((expr) < 0)) && (errno == EINTR)) > > > > @@ -243,6 +249,7 @@ extern void stack_protections(unsigned long address); > > extern int raw(int fd); > > extern void setup_machinename(char *machine_out); > > extern void setup_hostinfo(char *buf, int len); > > +extern ssize_t os_getrandom(void *buf, size_t len, unsigned int flags); > > For me, this doesn't compile, and per the man-page on my system, ssize_t > requires , not ? What you say about types.h strikes me as true from how libc programming usually works everywhere else. But I actually copy and pasted that snippet, including the comment, from user.h. So I guess user.h doesn't break because of something else. Anyway, I'll change it to sys/types.h and send a v2. Jason