Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4444042rdh; Wed, 29 Nov 2023 01:28:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IETqE6NmEjVSFNitDYnFi6EW6aM6P/gEb2Lq9BAJw4MyMYYPb+4NjkV+TOrf+Bt+sdQ8yTm X-Received: by 2002:a05:6870:b28a:b0:1fa:2660:1a41 with SMTP id c10-20020a056870b28a00b001fa26601a41mr17896843oao.48.1701250106513; Wed, 29 Nov 2023 01:28:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701250106; cv=none; d=google.com; s=arc-20160816; b=C3+/sCT+JSg3T/I43/57FzdebfiXhXnFIS/Losq+5Enz8m9BUflqs8ze5IgIswmHkM gN6Zk5kD98d3TiFKs/GHdxPNM4ZiRa/3iBM7VciedhNy3hvxeYy/GmvAoNy8mUI3IZI6 lKuZL7GTNkRFuSCnwJbnR0PCLkpmgcVm2z934iW7VKPH7nqnxXAlwhN57RdlX6c9DQp6 VS/J6tQ5TilEF2YUXT61EfJcD/6Nn2dUT5p9v1PJrOINcY1vasfiPDogw6RBXOqTUBxP TXYwtU3d9b9A0izpKpQbhEQdq5RHQLX6s63fMNcrE47cLVxGXjW6HycX5jb/inHElV9C TIlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=cV3cidTfYmhmSEmql6w0XpvkQP5KN8Xk5Nui+lMKWpM=; fh=xm+YAjsSn0Sp/5suJLL3ETNZ2vDu32OEStZFUXWedyg=; b=c+uGIikjAq06Qr8CrMxd+ZAbHK37dCtF7aaAmDH2scYu8HOsZ9ASUBdXAY6OZTw2xL TDgpNeStnUGOOXmT/FBb6UfC5xs+qw9Mj5gVW+p/ZFmUZT7vYRkSTSF5FmNNRhuvjFFC 7UrWBlzbDuHt+5FAXnL2uw+3GxCOLDKOXMjByQ7bkzhFBUUXeTMcdfitNJnJFXFc6+nq QDrphQ7q45xvA52Si0MO+9zSNV8lO6oKEfpEZbEbIU/CgoRr2shCjps4L6wNnvif8xA0 sF77TcP9e0jK3wDZvARG/2qgcC+QykzfcgRJEsfOp/p4Ijx4nCLUjRlLbLitmBlviGYz 4YMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xXP/vZkv"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id h5-20020a655185000000b005c1c489bfc6si13780348pgq.627.2023.11.29.01.28.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 01:28:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xXP/vZkv"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id D54DB8051A33; Wed, 29 Nov 2023 01:28:23 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230146AbjK2J2C (ORCPT + 99 others); Wed, 29 Nov 2023 04:28:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230301AbjK2J1z (ORCPT ); Wed, 29 Nov 2023 04:27:55 -0500 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 237B91BE5 for ; Wed, 29 Nov 2023 01:27:54 -0800 (PST) Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-40b472f98b1so23751705e9.3 for ; Wed, 29 Nov 2023 01:27:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701250072; x=1701854872; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=cV3cidTfYmhmSEmql6w0XpvkQP5KN8Xk5Nui+lMKWpM=; b=xXP/vZkvKH2EOBk1WoODoDKb28pQAo4+I3EKc7Fy8z8szGbQC/q7HR1srmug2TI41q 81IdDT5fNiKmMDWvPMIi62L09+93bt1pd+xUjEJOUnidGZDOHy0QuYvukoV8tjxzs1Hm GVNOXKa5JYJKi3ga1SgZEuid40Qg1eBvfx71PO40kga3qHTCpH4D31M9izGFqQ8hUX0X oXQjohx8v4Mq2lnAlOVjXxVXZIuPC4ep40ScIeWkMTCTXHWiRLw/HkRgy0Is+kp8m9hL pCxhiCrF1gHXXEQGno3LeqKfxG0mNnt5ebzbUtfrASCoxOqtqdktRMDK7n1UlqQSPn8V oo9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701250072; x=1701854872; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=cV3cidTfYmhmSEmql6w0XpvkQP5KN8Xk5Nui+lMKWpM=; b=nI19XRY0RmsU1gpPvVDoenJgpaEQzGpLOcu01DidkC66yDVEbGzf6MdREg9Ud5eHUf N/Lkwzap/kmRtvt4kuXjORx/R5jZsTtJ+du5gpEs84rxQ75KO+4QZk5Fu/LHmxLxtvUu Nlw8osW53MUyXSj/224w0sdVzvGrSpzseZLx3z7tfhpiwrnCAFzdLU3L+xBF/GLtqRfS bfpsglG2CNvF5lvhX3Bl4oNgyp2pH0JEWyKj4RuTU39m5X+35mxr2JwxfjFXrm0N81EV C0pOi0inKK2c9boVytiE/Qa1QNdzl3TtfJCX4Uf5tKmjWksu/TANg2uOlIPd//rzFLNt LYOA== X-Gm-Message-State: AOJu0YyZmVpGNb3Ydr6msyW5wvEmj4zh6I0WYhzHLh75fHV+/j0VH+/9 bHMSDH4KKYvU6dwzIu9tfLbwWA== X-Received: by 2002:a05:600c:4e94:b0:40b:4bd3:f8e2 with SMTP id f20-20020a05600c4e9400b0040b4bd3f8e2mr3616704wmq.22.1701250072542; Wed, 29 Nov 2023 01:27:52 -0800 (PST) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id r14-20020a05600c458e00b0040a4751efaasm1517697wmo.17.2023.11.29.01.27.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 01:27:52 -0800 (PST) Date: Wed, 29 Nov 2023 12:27:47 +0300 From: Dan Carpenter To: Nitesh Shetty Cc: Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , James Smart , Chaitanya Kulkarni , error27@gmail.com, gost.dev@samsung.com, nitheshshetty@gmail.com, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] nvme: prevent potential spectre v1 gadget Message-ID: References: <20231128122958.2235-1-nj.shetty@samsung.com> <20231128122958.2235-2-nj.shetty@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231128122958.2235-2-nj.shetty@samsung.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 29 Nov 2023 01:28:24 -0800 (PST) On Tue, Nov 28, 2023 at 05:59:57PM +0530, Nitesh Shetty wrote: > This patch fixes the smatch warning, "nvmet_ns_ana_grpid_store() warn: > potential spectre issue 'nvmet_ana_group_enabled' [w] (local cap)" > Prevent the contents of kernel memory from being leaked to user space > via speculative execution by using array_index_nospec. > > Signed-off-by: Nitesh Shetty > --- When it comes to adding array_index_nospec(), then I don't know enough about it to comment. regards, dan carpenter