Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3996194imj; Tue, 12 Feb 2019 08:07:24 -0800 (PST) X-Google-Smtp-Source: AHgI3IYpthG6SmtqjoPteCfMVUkEHJeObh+scX0gXHIw96/ItpQqpKdZMSp2Aams8d6iG9lhzVya X-Received: by 2002:a63:3fc8:: with SMTP id m191mr4333184pga.240.1549987644463; Tue, 12 Feb 2019 08:07:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549987644; cv=none; d=google.com; s=arc-20160816; b=Z2XqZu+xBfPBNHLxT3fDysvzMDLhqlgFJrhoF28rVzO82r5kgs7lNhLF+idk2AeHHB zUtgmwLwisi31gd2RpmpT5VjKyqyqBuoZwOf3FP/7XWsMz21A3AS6RZ++imHTdl4WucS waIcjuRhbGNHtRP2yn6wbzy5caaj7yNOlenhFBJAruIG9nxbN9n5Y0QgsNlQFJF7rG8r 1jKNr1JQ/HzaTfdv9G+Zv0xY6IoEyai215Yz3q9CX8nWtPH5sDTUl3pu1LJ2xdGGZUAo aij7cYGAjOaYp14OrnhNEJDCZmypz+uLV3fV7F/vAsvDapfd4BPx0hTVjDON/Mx9d6Uk 9eOA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=x5UGUdhlZ6jxGbIC2Rsw1FTby2fyMVTXpk0fljdo5BE=; b=Al/2HXW6oRtvKEUrJwgIxZFI+S4x1qcCG4MjgeNOunJjfnTL5GBs7InscT8ZpBgbMA 6stAGzMRvHpOq62wo2L2v4OSfV4snfILpDaXmQExDBkrmDBr76a7bxE6p3OeL29H8og8 INOEQD8sv6K3HwwI5k4jfOJkvR0jW0rQuU2JgxbXIQeVHvq1KAY6FhATixOtK8u9GQyo QjFSRL91SuTaujgKOUi6p/iWWuhkBysBDi/rlgCIcCQP/LI95hcQj4nX2KL9/90Xrxct gK7+Br0MOClUBuGAPeiEIUy9kma329uAXNLlOsYddEuDQucuwR1CI/U88k08wQ7+ZWzc 74YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=MkTo2X3q; 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 f2si5130421pgq.42.2019.02.12.08.07.07; Tue, 12 Feb 2019 08:07:24 -0800 (PST) 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=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=MkTo2X3q; 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 S1730824AbfBLQGd (ORCPT + 99 others); Tue, 12 Feb 2019 11:06:33 -0500 Received: from mail-it1-f196.google.com ([209.85.166.196]:55735 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730758AbfBLQGc (ORCPT ); Tue, 12 Feb 2019 11:06:32 -0500 Received: by mail-it1-f196.google.com with SMTP id o131so5099694itc.5 for ; Tue, 12 Feb 2019 08:06:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=x5UGUdhlZ6jxGbIC2Rsw1FTby2fyMVTXpk0fljdo5BE=; b=MkTo2X3qg+gR3GHtUXRYuV3ZhkpOT6/HBgMd15+FYiJv1yhX6rDThShwFQZZj2Sj03 0m7cE32LYpKzlQedFdGIvi8DGfn4EB08FVSpb6ZidKD1ZakpS29Me78TZX0sltnb903P 7Qky1rQ7ZvIZc+hT9gj3QoU7ILso5DhZHBnwjNTGy7SKgqw2PTTn8WhHianGO49ed+LN 7KNdifqWdVpiZx9112Raa2AgX6ukzWOYpEVE/1kncu/HO69EjriZIZE5URlz01bmB53K J8/+BzFr077leLuaB0xW4VKmLw/7/96ncZC7aid7xbz5mZdXvTRMLhOHwopiaWWBII7u Ut+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=x5UGUdhlZ6jxGbIC2Rsw1FTby2fyMVTXpk0fljdo5BE=; b=Ze0Py7jECTOPdg9/4Ag23KEl8CtwCKmj4qGNJoyyVvn6xumUGBHuEXrtMp3jHLkm9N BVosH6Gy0G3qXaMEwgk01aY9S1a6XTUyvz32N7jNDcKJBE1PduFCAIwScQnKnK1bvp9U UEGZ3uxUYTHKuMtsWFN8PXMUyVBpJgdFH0R1ASq9rGGyzfNFQojzljxaKgHN25Jf2Dkp OtLmdYKC4IOhFa4J0XUAJeQlIEAT6T7+faVjbELK+YfUJS5obmEwtDmyzZdWyC1BMTgV hAuOmzrqI32V7eI/izmNEGujcsGvwhT+kHi2xk5YFt+/suyREyhu+y9HjxPVPgGnu1Rn OQtA== X-Gm-Message-State: AHQUAua7pgAR9CLzHUuaEIUSkcv0fqUg6P9gQMPxfbODlU19f35Ckv4I yjygB272uCYz5BqIz99r1rOCbw== X-Received: by 2002:a5d:9650:: with SMTP id d16mr2425037ios.289.1549987591523; Tue, 12 Feb 2019 08:06:31 -0800 (PST) Received: from [192.168.1.158] ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id c128sm1598091itc.43.2019.02.12.08.06.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Feb 2019 08:06:30 -0800 (PST) Subject: Re: [PATCH] scsi: sd: fix entropy gathering for most rotational disks To: James Bottomley , linux-scsi Cc: Xuewei Zhang , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Mikael Pettersson References: <1549987525.3173.17.camel@HansenPartnership.com> From: Jens Axboe Message-ID: Date: Tue, 12 Feb 2019 09:06:29 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <1549987525.3173.17.camel@HansenPartnership.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/12/19 9:05 AM, James Bottomley wrote: > The problem is that the default for MQ is not to gather entropy, > whereas the default for the legacy queue was always to gather it. The > original attempt to fix entropy gathering for rotational disks under MQ > added an else branch in sd_read_block_characteristics(). > Unfortunately, the entire check isn't reached if the device has no > characteristics VPD page. Since this page was only introduced in SBC-3 > and its optional anyway, most less expensive rotational disks don't > have one, meaning they all stopped gathering entropy when we made MQ > the default. In a wholly unrelated change, openssl and openssh won't > function until the random number generator is initialised, meaning lots > of people have been seeing large delays before they could log into > systems with default MQ kernels due to this lack of entropy, because it > now can take tens of minutes to initialise the kernel random number > generator. > > The fix is to set the non-rotational and add-randomness flags > unconditionally early on in the disk initialization path, so they can > be reset only if the device actually reports being non-rotational via > the VPD page. Reviewed-by: Jens Axboe -- Jens Axboe