Received: by 2002:a05:7412:8d06:b0:f9:332d:97f1 with SMTP id bj6csp8306rdb; Mon, 18 Dec 2023 07:33:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IH9VHEShDjqIxOHU4vgNG/AOZW2473ySnguIB53gLncXQGfTUMHjLYERwp8U+P1jB+VccKq X-Received: by 2002:aa7:8c4f:0:b0:6d7:dcd8:3147 with SMTP id e15-20020aa78c4f000000b006d7dcd83147mr1465375pfd.18.1702913632447; Mon, 18 Dec 2023 07:33:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702913632; cv=none; d=google.com; s=arc-20160816; b=RR58sCMHR1cqZHBo9WYcBCGY5CNXpAIXWqjlYhKtFZaDMJQfRzzjcTyAGN9SRqARQX uRbdH/6TuQeMSjI3XwUm7yyhKFCz4408sAH4B9iO1wZMZk/3nugNRKno2kFrBtv3a82D V5oTC0DQjUH3+jTdxKkOr4BvqM2BFuRgpcNFDlHAtjTuHl/Rv2ju9/nZBuhVIc7Bl7cg yTOWn5fVfrmEFj31ftPft133fUfU7POGtLlhiVJnsa3PN0qZz+jYkJe5iCSJp8bDK/m6 okDarH6jXFuQwNXRIjYFW20SNGlkvcJ51jvPGplesUE7DJN7sF8BhDDioZ1kQ0x1xMRD GB1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature:dkim-signature:dkim-signature:dkim-signature; bh=njLtLC3itym9NrsTnjVi0xLEc93Pwe0Q5O8AXSr4XSM=; fh=3QIVKsEmsld8rvcEkMSr/XDw53o2lrGJeYcvS7FhzFk=; b=K2OxpPGDkBK20Hpsju+5tZOGw6dNrTBHl0vXZ3fImgXjcV0FJylp7SRoBEplt76873 FAhLbK1DuPNysdnab2J2BLtjz1kHyhSLcixz/9CAfUEtGLrIiEdyPDiMev4yESuY1bQ9 EV4Lcn+qW4xbiIEOneFHjFF/BwhZBbDhrkKVgsmOWRFnI11AAVL1U0msHoyTB76a4Cno 6yRZattHoi4o50geqQi7yua1CShbG7jPsSLy17LhIvUR5sN1obNkyPZ0MdqKQ7ZD5006 jLuOELhJPfNrxnTkhsEPPbYKVRceTWmKfky3hCnXp5eUZa7Y995uBADzA1wwWENtvTcY Leow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=AUFeoXIO; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=AUFeoXIO; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel+bounces-3938-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3938-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id p19-20020aa78613000000b006d5b3cdac9dsi2888137pfn.19.2023.12.18.07.33.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 07:33:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-3938-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=AUFeoXIO; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=AUFeoXIO; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel+bounces-3938-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3938-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C87B0282DC9 for ; Mon, 18 Dec 2023 15:33:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C0CF200C0; Mon, 18 Dec 2023 15:33:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="AUFeoXIO"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="/moo3VJ6"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="AUFeoXIO"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="/moo3VJ6" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3C38B3D54B for ; Mon, 18 Dec 2023 15:33:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [10.150.64.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 62ADF21F8C; Mon, 18 Dec 2023 15:33:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1702913614; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=njLtLC3itym9NrsTnjVi0xLEc93Pwe0Q5O8AXSr4XSM=; b=AUFeoXIO1HdHPLnHu4g7wm4ibAq19ZvIzhAZDtj9G4QuAA8r9yNxi3rpcj2EvHp+lwV8YS iRFxT8c+Y7nH7Z2AAwr6kOqcFYl0o/WR5R9tPANiMMtMCI2B45mPLN9IT+sskp29OJzhXY eDEoBZyg6GXgV/ayRwhbeGOnpSzZbok= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1702913614; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=njLtLC3itym9NrsTnjVi0xLEc93Pwe0Q5O8AXSr4XSM=; b=/moo3VJ6kR7me9WED5q1w9xpkYI6qcxDve4Sx4CJ4vKP1ezwjdxVt8siVzFkeqt7DJhBeU IxFDXoRgRsaMSiAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1702913614; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=njLtLC3itym9NrsTnjVi0xLEc93Pwe0Q5O8AXSr4XSM=; b=AUFeoXIO1HdHPLnHu4g7wm4ibAq19ZvIzhAZDtj9G4QuAA8r9yNxi3rpcj2EvHp+lwV8YS iRFxT8c+Y7nH7Z2AAwr6kOqcFYl0o/WR5R9tPANiMMtMCI2B45mPLN9IT+sskp29OJzhXY eDEoBZyg6GXgV/ayRwhbeGOnpSzZbok= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1702913614; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=njLtLC3itym9NrsTnjVi0xLEc93Pwe0Q5O8AXSr4XSM=; b=/moo3VJ6kR7me9WED5q1w9xpkYI6qcxDve4Sx4CJ4vKP1ezwjdxVt8siVzFkeqt7DJhBeU IxFDXoRgRsaMSiAQ== Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id 5240513BC8; Mon, 18 Dec 2023 15:33:34 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id vs5aE05mgGW7fAAAn2gu4w (envelope-from ); Mon, 18 Dec 2023 15:33:34 +0000 From: Daniel Wagner To: linux-nvme@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Christoph Hellwig , Sagi Grimberg , Keith Busch , James Smart , Hannes Reinecke , Daniel Wagner Subject: [PATCH v3 00/17] enable nvmet-fc for blktests Date: Mon, 18 Dec 2023 16:30:48 +0100 Message-ID: <20231218153105.12717-1-dwagner@suse.de> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Level: * Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: 0.71 X-Spamd-Result: default: False [0.71 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.19)[-0.926]; RCPT_COUNT_SEVEN(0.00)[8]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%] X-Spam-Flag: NO Another update on getting nvmet-fc ready for blktests. The main change here is that I tried make sense of the ref count taking in nvmet-fc. When running blktests with the auto connect udev rule activated the additional connect attempt etc made nvmet-fc explode and choke everywhere. After a lot of poking and pondering I decided to change the rules who the ref counts are taken for the ctrl, association, target port and host port. This made a big difference and I am able to get blktests pass the tests. Also KASAN was reporting a lot of UAFs. There are still some problems left as I can still observe hangers when running blktests in a loop for a while. But it doesn't explode immediately so I consider this a win. Apropos KASAN, it still reports the problem from [1], so anyone who want to run this series needs to revert ee6fdc5055e9 ("nvme-fc: fix race between error recovery and creating association"). The first four patches are independent of the rest and could go in sooner. [1] https://lore.kernel.org/linux-nvme/hkhl56n665uvc6t5d6h3wtx7utkcorw4xlwi7d2t2bnonavhe6@xaan6pu43ap6/ changes: v3: - collected all patches into one series - updated ref counting in nvmet-fc v2: - added RBs - added new patches - https://lore.kernel.org/linux-nvme/20230620133711.22840-1-dwagner@suse.de/ v1: - https://lore.kernel.org/linux-nvme/20230615094356.14878-1-dwagner@suse.de/ Daniel Wagner (16): nvmet: report ioccsz and iorcsz for disc ctrl nvmet-fc: remove unnecessary bracket nvmet-trace: avoid dereferencing pointer too early nvmet-trace: null terminate device name string correctly nvmet-fcloop: Remove remote port from list when unlinking nvme-fc: Do not wait in vain when unloading module nvmet-fc: Release reference on target port nvmet-fc: untangle cross refcounting objects nvmet-fc: free queue and assoc directly nvmet-fc: hold reference on hostport match nvmet-fc: remove null hostport pointer check nvmet-fc: do not tack refs on tgtports from assoc nvmet-fc: abort command if when there is binding nvmet-fc: free hostport after release reference to tgtport nvmet-fc: avoid deadlock on delete association path nvmet-fc: take ref count on tgtport before delete assoc drivers/nvme/host/fc.c | 20 +++-- drivers/nvme/target/discovery.c | 13 +++ drivers/nvme/target/fc.c | 153 ++++++++++++++++++-------------- drivers/nvme/target/fcloop.c | 7 +- drivers/nvme/target/trace.c | 6 +- drivers/nvme/target/trace.h | 33 ++++--- 6 files changed, 135 insertions(+), 97 deletions(-) -- 2.43.0