From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.222.181 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795960389; b=bk7TgS2sGRA78FnL2yhONhbSMxG1fAY7toxjF1GfGOjJZ5egSySHXniq9HPNwhB5xJmH RZVAnJ6XTbnrDHhTRA73syX6YI4s65VR4J6ZRzZm3/3dNXBlE7OUTJw1U9x4Qtv8xHREF 3tvYV63T74s5UF5fbg/NtjzTQoh05LIayoiqr7vufQzJAWmgL6iMXdpWSoRKqN+stwtI3 bIFpxCtRrmqJ6dpsdw9bda8eHL2GjvCUM9PVYwA3GHFwgN5cEIUYBnwyO9pPWwBy0M5/U URJwWhYTmVMYTXrEchm4U0gF500hlPVr5BzUlqTF8fspWtht1PxJ7/8IaP9v/G4C9Sw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795960389; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=xvRpy3CSF9S9Rmg1Z5lfZhXszwovj/O2adP3Duc+2Bc=; b=zkqb3YKU0rMa88qzY8Dq22jNOUDcppBPT1cX4nx82OwtxfWJaO/xMlZhhB9iTMMteQJr QE1UmD5RItJit3+CWZPbhG3WLXC5kWGOkBYhd6tKq9zdxRbZSjIKqNg6b7EXvFTjIQTLa SEQ8TmRDcUCprMbQYZupVbjA/gcu2WC0M59NffSMXFJYP+B6MXn5SoblevZl2Rp7WO2eg WTlmIdwsUbHgq/eVMtTlwjWRovqxq4Fn1/ox6hlA66S9OA6jNfAOYEOLbF53M8spTnP70 Hpu3R7ai3XY2ylsCq8XwNYaHgZr6dqyith7Y5oPxStrkz/C/7HQPDQoyicWgKKMh24A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=stellman-greene.com; spf=none smtp.mailfrom=stellman-greene.com; dkim=pass header.d=stellman-greene-com.20260707.gappssmtp.com header.i=@stellman-greene-com.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=r3AS91aM; arc=none smtp.remote-ip=209.85.222.181 Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25476606A31C for ; Sun, 29 Nov 2026 13:53:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 25476606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=stellman-greene.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=stellman-greene.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=stellman-greene-com.20260707.gappssmtp.com header.i=@stellman-greene-com.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=r3AS91aM Received: by mail-qk1-f181.google.com with SMTP id af79cd13be357-949b0d32315so781534085a.1 for ; Sun, 29 Nov 2026 05:53:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stellman-greene-com.20260707.gappssmtp.com; s=20260707; t=1795960388; x=1796565188; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=xvRpy3CSF9S9Rmg1Z5lfZhXszwovj/O2adP3Duc+2Bc=; b=r3AS91aM6bU5ZvlyEAjtiGiKIAQMggFvRxPh+ebvzZG8tPiZMIqq07bgECncf/5MaT Vb6zMrRf0JsKX2LFUVz219Aei/wiYjVzVZBXZdrpcnU04OSi8n6Yfqq5dNhoJvYqaLk6 0q//+g/kGo9o7mIkjWpl1K/pdOsqiUn1KQMpg5LGSiPmuSramAgBFdLm8WCTQg+cfZSM VogpgCsBtayvIJNXtc2oZVU2sW7xyaI8MmBfUK/oHXm90EFrJBFJRRAqBip3ac9OvLQD hdgGAJ8G7qKxklkDjO5f9dF+tg0OrYGWrOlS181Mag7Fb2ekY5sDQ8WtJ6JTCvtW4Rnf Hr3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795960388; x=1796565188; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=xvRpy3CSF9S9Rmg1Z5lfZhXszwovj/O2adP3Duc+2Bc=; b=wZgbbuA0x4ZzCuw4RQanojH0zsJBnHfdgpuDzKP4fHlH7j41dI5RqSK6MZ9H+omQOq ITUmLOvy6cWVCJwnIgotDfXiR4cpab0DdJqbW9hzmVX/gGRP5Wf/v4HaIzOPPAijhTvb 8BarnFGtfQzdIrdAU2xyg9ZMGpL+XR5/Muxi4zsCvKSuWjoQvMrEAjmPCGjLbRfmX5fo Y5gdkRVvPNACjBO1YES8uFMx0pj/uEtMz3TH1Kk/GkZ07qHTX3YIHGUEXDg4pQNj6iQJ D4ubFuvI0gxqiD+gqy7NGNZ6ykJLGi7yVnj2bP+TFWCVM8pGAd3q8D5svDPZfWq8sDfx hj1g== X-Forwarded-Encrypted: i=1; AL+hErEW8xgiOLjjBeF06migWp9PIgNp9k8+0Fxi0mjKYPnx8oUvJUq7ZLkq1Z4W9JdVDxxA4G5HbSxGvf7SCk8=@vger.kernel.org X-Gm-Message-State: APuU4Z/UOQeYFroWEGx0DsBgU5B8UFil31T5NhGmp58UUZ8mRpvIMdNJ oVmwKE1VrpBrzBIMPngtC6H2+EzfOPzfPR3+sPX2U7Jo+u9DBDPo0xHpAkx8zIk9HSU= X-Gm-Gg: AZFdTZc7g6br/9Vqr0DRfRgzEbBArJUbc5FSDMSuM/ZsjhVZiZfiUIPIBFQVsW6vZm7 2hhVAkVPj0L336Z3SkumfSPymIvLUtFc03z1ujGJu9xBHTiDvfSA4mBhvLxir1g7D1W6YxBdNiU cOzkk4kA6XPFoToG1RpRLFfDK4O2u/+9+NTNm7iGTmTGRvp3mPCMVh5na5TYBbtyONm66S8D6bn 7ka/ZdtTgUohryUTyg8BEnGkplgPDrWBAV6WqSZCMendOLJ79ZjlOwQwxoxYtMmBdNelVYSKb1a WTwavO/oBPP+M2O5/xV7pkA/UCzDuyA/T2bvr2+IqziMKX6bcvSZ9w/uGd4OlmUguzqQIC1C3Y7 4OjhdJ/QG2+/T8WGMAIjfmzFqUwYqJBO4uiOHM5ZTMM9pZPgxqrA+ydgC+0jEUkh1Dq/Lh34VhZ LBsp8uoqaTQLTKA1lOt8akkhECs4LhipMD2jF28RDzp+mFnu+9sZp4RdxdQ7yavb+FTL/lNX30F 3M4WZrU2vy2KAMqHt+kdVMjX+ffmuStoDQuhvbBunWx2pv9cjc88ww/3FFEFaY6srQcVCeciCps WEgFry9Hx3rcSt/SjAxzonP1qVDJTloCrCg9Faurl86chr9kUpcWCH2/OUvD19ib7ruBS9QLBFK szw== X-Received: by 2002:a05:620a:130f:b0:949:7b40:5678 with SMTP id af79cd13be357-949ba9e19a8mr5518267285a.53.1795960388292; Sun, 29 Nov 2026 05:53:08 -0800 (PST) Received: from Mac.mynetworksettings.com ([2600:4041:5c28:200:3c29:a645:a023:b4a7]) by smtp.gmail.com with ESMTPSA id af79cd13be357-949bb34ae74sm2289127785a.8.2026.11.29.05.53.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 29 Nov 2026 05:53:07 -0800 (PST) From: Andrew Stellman To: Zhu Yanjun , Zhu Yanjun Cc: Li Zhijian , Jason Gunthorpe , Leon Romanovsky , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH rdma-rc] RDMA/rxe: Bound MR copy and flush chunks to MR pages Date: Sun, 29 Nov 2026 08:53:06 -0500 Message-ID: <20261129135306.80838-1-bugs@stellman-greene.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <77aba02e-64a7-4987-80f8-46c5301ac106@linux.dev> References: <20261128140840.59003-1-bugs@stellman-greene.com> <20261129001904.79077-1-bugs@stellman-greene.com> <77aba02e-64a7-4987-80f8-46c5301ac106@linux.dev> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Sat, Nov 28, 2026 at 04:36:17PM -0800, Zhu Yanjun wrote: > Do you make tests in your local host? Or just use AI to make static > analysis? My last reply was from reading the source. After your question I ran a check in an arm64 QEMU guest on mainline 4f069ab1ec24 plus a test-only patch (logging and a root-only hook), with 64 KiB pages, KASAN and rxe: - Five user MRs registered with ibv_reg_mr, including buffers that were 4 KiB aligned but not 64 KiB aligned. A pr_info at the top of rxe_mr_fill_pages_from_sgt() logged mr_page_size=65536 and PAGE_SIZE=65536 for all five, and the WARN_ON didn't fire. - A root-only test hook called rxe_mr_init_fast() and then rxe_map_mr_sg() directly, with the MR page size set to 4 KiB. rxe_mr_fill_pages_from_sgt() wasn't called. The v1 patch was tested on mainline 7cd8495c0f16 in an arm64 QEMU guest with 64 KiB pages and KASAN, using a root-only test hook that calls rxe_mr_copy() directly. A read and a write across a 4 KiB MR-page boundary failed without the patch, passed with it, and failed again with it reverted. The flush path was built but not run. I can send the test-only probe patch and the user program (user-mr.c) if they'd help.