Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2394041ybl; Thu, 29 Aug 2019 07:38:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqxztWhmUoH5IDLfuM2BmY7wmzbD8IerJj8mJ+3c6UBNyWO8aEyFvDWBrnp60yVDSxC6SUmb X-Received: by 2002:aa7:8a86:: with SMTP id a6mr11872963pfc.76.1567089491150; Thu, 29 Aug 2019 07:38:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567089491; cv=none; d=google.com; s=arc-20160816; b=tjJSdMh6XwZbxozRup0X54yrL8hw8BUs7TE/flqWhzu4ZtIvnnZdk6wIAlSduQ1IkV ai90DW24980J/hozSoNMGlobkL8m9ASfFK3NAWFaW7qT1TthYzYd/dqnFWlYO0m4W4t8 MDwpiED6SGPh8btoirJ9fuHPVh62G1b4b8S8hLmLAoRN9R1gq7pSVv9km0DiAzOazrcY 4S/Ci4FCVdYTW8b+rFHMLgc2cQplzHG77Sa0xdt7Ava2xZoS2XbnKie2VKcwpufsnfLW PWmAetzB7C/D/gHuysODbI3gKRTpXmwEj8tUKQckoCpKg+BApRGjEjCv/7EWZIbcJkxA cpbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=zyLUewIUplbNndfTnn5bzmpt3ytcxuYpD6Kp7b/yc+0=; b=xSxe8ej3Aix8U6fzL5DDeTLS4hp0ylrx7PxK4GxIRrfkPO7WrilRrpjKUrlLCh0Xsl bu4kdlS6zYWwyOpvztEGbqQL6hwnphvvlghtnlD30mWGIU7UYWsYYQQQ8qnXsNTrJxRV P2de+D2R86mkEo+6NF+kbeu3r50Nc+KOs3AggXRdz35AJu9pB0aCzvyixbmPJGTBhfrU 1TKbHQzYOiJr9LKIKem+ElKGZMEwUH7bTO1N2Qs8C6RDt2K0t8lUv/fWjxpvcf7jnutu Kl9CQcmeAi56K6b/4L+zJZQ/2/lMdprtHrebIqc4jFYvarNJzI2ELAtPGR8X6A4tyHvC b8eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@volatile.bz header.s=default header.b=fs9EH6dX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 j5si2423753pjf.60.2019.08.29.07.37.54; Thu, 29 Aug 2019 07:38:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@volatile.bz header.s=default header.b=fs9EH6dX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727252AbfH2Ogg (ORCPT + 99 others); Thu, 29 Aug 2019 10:36:36 -0400 Received: from mx1.volatile.bz ([185.163.46.97]:53822 "EHLO mx1.volatile.bz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726852AbfH2Ogg (ORCPT ); Thu, 29 Aug 2019 10:36:36 -0400 Received: from thedarkness.local (unknown [IPv6:2600:6c5d:4200:1e2a:a077:9bc9:2f0:8eb9]) by mx1.volatile.bz (Postfix) with ESMTPSA id 2E8E32F44; Thu, 29 Aug 2019 14:36:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=volatile.bz; s=default; t=1567089393; bh=dIygAd+GskXlJd02wsFKTXP3LiBbYusrlSD4b5VFWc4=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=fs9EH6dXvM3d12xH4cTty5GccnQcwDxZti5Ktd3Qshd982Aw7CBfXQ2KUH6JHp4Zg QBmxZFX2t/D34+0MZAZwyyqVpDOseNtgLodKzrtzOd2mSSPDitw/sylEUqMa3sDi1k 9J4PJuFYlxq8Q5glBMt32VbXPeaeUX61ILdJKk5w= Date: Thu, 29 Aug 2019 10:36:28 -0400 From: Dark To: Richard Weinberger , LKML Cc: Richard Weinberger , Anton Ivanov , linux-um@lists.infradead.org Subject: Re: [PATCH] um: Rewrite host RNG driver. Message-ID: <20190829103628.61953f50@thedarkness.local> In-Reply-To: References: <20190828204609.02a7ff70@TheDarkness> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 29 Aug 2019 15:26:24 +0200, Richard Weinberger wrote: > So, you removed -EAGAIN handling, made everything synchronous, > and changed the interface.t > I'm not sure if this really a much better option. I should have been more clear here that I'm using the interfaces provided by `drivers/char/hw_random/core.c` for consistency with the other hardware RNG drivers and to avoid reimplementing stuff that's already there. It might be a bit hard to see in the diff, but I pass the file descriptor to `os_set_fd_async()` to prevent it from blocking. For the -EAGAIN handling, I'm passing it onto the caller. Since you mentioned it, It would be better to handle it in the driver itself so I'll update the patch to address that. > Rewriting the driver in a modern manner is a good thing, but throwing the > old one way with a little hand weaving just because of a unspecified issue > is a little harsh. > Can you at lest provide more infos what problem you're facing with the > old driver? Most of it boiled down to it silently breaking if /dev/random on the host were to block for any reason, and there was the userspace tool requirement to properly make use of it. With that said, the interface was also inconsistent with the other hardware RNG drivers which would require a rewrite to address anyway.