Received: by 10.192.165.148 with SMTP id m20csp1131195imm; Sat, 21 Apr 2018 01:47:23 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+ML73v0XOY4BQsXQeCDPnwh1WdRinUviaoMxUOBSAqDtllb06YkOSQH92LXnLrC07aGZQJ X-Received: by 10.99.110.5 with SMTP id j5mr11048340pgc.246.1524300443179; Sat, 21 Apr 2018 01:47:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524300443; cv=none; d=google.com; s=arc-20160816; b=NESgYnDSVACVKMRiLSVZmedON+ADba6sMRYUESdyF/RhiDMpf6MUPB5yj/F2+76Xze FXmjaiAV9bmiOhyx0pHDj5tPTvh1FT1r3QFiCPweJLY27Pnskd28PdAUyj7egW/PrmNx U/T7p+F3sVws2Aq21JTa/8itVUuL4mAuKrxZL/3jKX0pD+DitzM3o+c8pvmZlrdySp5w 5oiEcxw7RR6ewZ/C+hme7qlpwicsXV+bVjEG5ANpCmjiTakPl3q3g6R77BPDbVdoMnmB 8zMsZl6NwnLIdCR3V2QnPH4EqxJAZDyDMzNQifMC5alPJ7arkgJBUuzqG2UXb9uVqqbL kldQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature:arc-authentication-results; bh=BSGiR/31HzPm4ratG7bU9qLOpvhahcXNWdhZwc/+jhs=; b=bCM2g6lOY/w4PI1Y0RLkayTB3qdftykqGjLpI5N+Mr+gPMlT2keiVTLc9WmbxnjwQB VITMCl0ZDhkkf6s/sHnmorJQp9SdhRhucmDPXYIxmG56i0ILA7+DD7hErcAg/lFJyHj8 NpViNW+o4ll4Rd/jOYf8Iib13HENF0eQWubW5z9g0HlVg2cLSCUMmHF6m4ayxAx73AGw P2Ws2MG6yXgnT7RT5p/IiQgmjQeKtjjgJJmXN9aGVFkgcfsBrchpHUC3KDcNXLb5PnMo 37jOPIRElW9y7LM5PLCg+AVLjO4Eg+Wl7SQCsZsqqgPMCSnwlgNSlgNWkrPMf1TeSWiq xwig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SkxrbZLr; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 32-v6si7494377plc.252.2018.04.21.01.46.45; Sat, 21 Apr 2018 01:47:23 -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=@linaro.org header.s=google header.b=SkxrbZLr; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752629AbeDUIoB (ORCPT + 99 others); Sat, 21 Apr 2018 04:44:01 -0400 Received: from mail-wr0-f172.google.com ([209.85.128.172]:38141 "EHLO mail-wr0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751436AbeDUIn5 (ORCPT ); Sat, 21 Apr 2018 04:43:57 -0400 Received: by mail-wr0-f172.google.com with SMTP id h3-v6so28522889wrh.5 for ; Sat, 21 Apr 2018 01:43:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=BSGiR/31HzPm4ratG7bU9qLOpvhahcXNWdhZwc/+jhs=; b=SkxrbZLrZ5lizsdUCNCVPqhJuyfYKxl+EPsdEYgw6Djd0H+52aR0xkDPrz8B3KHwu2 SCNcr1JRN2iYu0q5VkLKPkjvvjcRLoOhdGjZkADEpYoX97zknu/V7YiHrE2BSc6KjdMl hStOIu/vACKcBcIuC4fiujH3fV6maGJxC8d4U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=BSGiR/31HzPm4ratG7bU9qLOpvhahcXNWdhZwc/+jhs=; b=oBSRJuvPLuxk+lIHtdTA9fMAl7NSh1ok3j/xqegWBh8XzT/GtVb5Vwq7Q8AKnpnCCC y2fZqwxhXoCX+U5/CtrY5q5XYPtM4zRrUXvrHcpgce2X1oGw2V/gO8W0eHi0mYmDaomI BEpEYz55EbpRMZ66ZJ9Kdcttw4sX6V60V7gepMUQARaGxUxQRqj2p2igFub/hfRGgmIn VRuZXhg8Y/3tcvX/stPxLfrxWgWk2+WlD03ZHNjdr3OjHrLkMY0k/rW/INgeBFUgT8Ax PI8td6wLmq55oVp8kDPydyHM3J0Wm+wzfSCCRy3qhXffKILoVoXaYxQlI0xqcuPD9yPP oShA== X-Gm-Message-State: ALQs6tB9I7Y/HUl7lMlTmpmFk0wL4HZQDoWrL319akcKH20NnU5CXxK6 u/vgLoR0fm0CBeMc4kDEHTKyFg== X-Received: by 2002:adf:e985:: with SMTP id h5-v6mr6978378wrm.137.1524300235595; Sat, 21 Apr 2018 01:43:55 -0700 (PDT) Received: from [192.168.43.112] ([5.170.72.220]) by smtp.gmail.com with ESMTPSA id m6sm5172737wmb.9.2018.04.21.01.43.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Apr 2018 01:43:54 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: Re: usercopy whitelist woe in scsi_sense_cache From: Paolo Valente In-Reply-To: Date: Sat, 21 Apr 2018 10:43:52 +0200 Cc: Jens Axboe , Oleksandr Natalenko , Bart Van Assche , David Windsor , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, LKML , Christoph Hellwig , Hannes Reinecke , Johannes Thumshirn , linux-block , Ulf Hansson , Mark Brown , Linus Walleij Content-Transfer-Encoding: quoted-printable Message-Id: References: <10360653.ov98egbaqx@natalenko.name> <8473f909-2123-0cfc-43b1-beba0b1aef9b@kernel.dk> <07f263ff-cea6-ac3c-944b-0f36fee8ba25@kernel.dk> <8b32e079-d4e6-3fea-a89d-ff856e4e13b1@kernel.dk> <0fbf2b13-8bae-c7c5-d930-ebaafdc72202@kernel.dk> <011EF7D1-B095-4B8D-AD2A-993048932C49@linaro.org> <13DBFC76-4849-4DDA-AC44-B2C1257912E7@linaro.org> To: Kees Cook X-Mailer: Apple Mail (2.3445.5.20) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Il giorno 20 apr 2018, alle ore 22:23, Kees Cook = ha scritto: >=20 > On Thu, Apr 19, 2018 at 2:32 AM, Paolo Valente = wrote: >> I'm missing something here. When the request gets completed in the >> first place, the hook bfq_finish_requeue_request gets called, and = that >> hook clears both ->elv.priv elements (as the request has a non-null >> elv.icq). So, when bfq gets the same request again, those elements >> must be NULL. What am I getting wrong? >>=20 >> I have some more concern on this point, but I'll stick to this for = the >> moment, to not create more confusion. >=20 > I don't know the "how", I only found the "what". :) Got it, although I think you did much more than that ;) Anyway, my reply was exactly to a (Jens') detailed description of the how. And my concern is that there seems to be an inconsistency in that description. In addition, Jens is proposing a patch basing on that description. But, if this inconsistency is not solved, that patch may eliminate the symptom at hand, but it may not fix the real cause, or may even contribute to bury it deeper. > If you want, grab > the reproducer VM linked to earlier in this thread; it'll hit the > problem within about 30 seconds of running the reproducer. >=20 Yep. Actually, I've been investigating this kind of failure, in different incarnations, for months now. In this respect, other examples are the srp-test failures reported by Bart, e.g., here [1]. According to my analysis, the cause of the problem is somewhere in blk-mq, outside bfq. Unfortunately, I didn't make it to find where it exactly is, mainly because of my limited expertise on blk-mq internals. So I have asked for any kind of help and suggestions to Jens, Mike and any other knowledgeable guy. Probably those help requests got somehow lost on those threads, but your results, Kees, and the analysis that followed from Jens seems now to be carrying us to the solution of the not-so-recent issue. Time will tell. Thanks, Paolo [1] https://www.spinics.net/lists/linux-block/msg22760.html > -Kees >=20 > --=20 > Kees Cook > Pixel Security