From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Johannes Berg <johannes@sipsolutions.net>
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
Date: Wed, 13 Jul 2022 11:53:03 +0200 [thread overview]
Message-ID: <Ys6V//WUKvDu3sjs@zx2c4.com> (raw)
In-Reply-To: <d2c55506bd0a93854320ce352a93303cf8080f48.camel@sipsolutions.net>
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 <irq_user.h>
> > #include <longjmp.h>
> > #include <mm_id.h>
> > +/* This is to get size_t */
> > +#ifndef __UM_HOST__
> > +#include <linux/types.h>
> > +#else
> > +#include <stddef.h>
> > +#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 <sys/types.h>, not <stddef.h>?
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
next prev parent reply other threads:[~2022-07-13 9:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-12 23:27 [PATCH] um: seed rng using host OS rng Jason A. Donenfeld
2022-07-13 6:58 ` Anton Ivanov
2022-07-13 7:03 ` Johannes Berg
2022-07-13 7:05 ` Johannes Berg
2022-07-13 9:53 ` Jason A. Donenfeld [this message]
2022-07-13 9:58 ` [PATCH v2] " Jason A. Donenfeld
2022-07-17 8:46 ` [PATCH v3] " Jason A. Donenfeld
2022-07-17 10:50 ` [PATCH v4] " Jason A. Donenfeld
2022-07-17 10:51 ` Johannes Berg
2022-07-13 7:06 ` [PATCH] " Anton Ivanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Ys6V//WUKvDu3sjs@zx2c4.com \
--to=jason@zx2c4.com \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox