From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (mail.openvz.org [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id D6BEE80033 for ; Mon, 30 Nov 2026 16:04:31 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AUG34PQ017792; Mon, 30 Nov 2026 19:03:05 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AUG34PQ017792 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="tapSkLpe" Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AUG33h8017781 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Mon, 30 Nov 2026 19:03:03 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AUG33h8017781 Received: by mail-lf1-f72.google.com with SMTP id 2adb3069b0e04-5be48f8ead6so3403142e87.1 for ; Mon, 30 Nov 2026 08:03:03 -0800 (PST) X-Gm-Message-State: APuU4Z9i/oUXL92HvnvNY2k9zzWgI+nW75YEEhSmxfeYEC48UbcAxB7f jOK8O+YoWXGi+K0D+oAotyym4DyWQqElq0vDeNUpPFPF1p+cvTbOQH5yO4beS6La+swQcs8+f44 YI0LD9aB6AJnmjo2kdMYcW1mISZ1e+P4jVWlWpymq+7Ll+tcBPGBVEw== X-Gm-Gg: AZFdTZezANmVTlXTUjI8qiaM5XLMRob5H0d3tQHBzu+3+6q0GVlzdRQom1ZZnuP/9xP 0MDwkMrBuXmjc/csgSpOMNEYSOW4K9kExg8M3cv/6mKppBeia2HKkP3iu9q89wT7kIKBpA4PVUl UCOe5cPkV2hkCDKQS3rmS4a+A7SOKWt9D/BSR6r9+9x63TrMcDHriAB84E4I1mfIWIY37CvWT3S NWUzDSakCQyECd6Et0nouO/2H2F5Nfq70lEhDdARBGXXv8QaiCAtxhCrI7Lo9qi+Ya4coUo7CX5 gFmreu+NNf6pXjtty2QsLQeNPNYuuAVoBQmf7J2czlPByYvmXprH3GbeaGNgAfXHqhF1hCm+x6K WVthDN2reVydSizlDjQ== X-Received: by 2002:a05:6512:61aa:b0:5c1:57cd:5c3d with SMTP id 2adb3069b0e04-5c1bc806a59mr10465878e87.23.1796054582189; Mon, 30 Nov 2026 08:03:02 -0800 (PST) X-Received: by 2002:a05:6512:61aa:b0:5c1:57cd:5c3d with SMTP id 2adb3069b0e04-5c1bc806a59mr10465727e87.23.1796054580530; Mon, 30 Nov 2026 08:03:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1796054580; cv=none; d=google.com; s=arc-20260327; b=PNm5NE8WBaRkb9tGqN8iWNQqlMNBsImAUKQh6PKK4TvBuvXhQ6Hx27lQQtehh5n+ih Ch7f5vssea4nr/mGg1AFwNUnVuLXXKWMgQbs4ZXrRQ6A4jiERLwn37lA6llVaUsHC9iJ Urq44+rWcp5Qy2ZDoOCB/F5NX6S2jmPSw82bzhKBjfPOTnjTEsI1M/y0l665jDutSg6r PcCXZ6EYvHhhohY5M1VW6EOUCJZ4om2rnvBeUemRkOLQ0V3+NxDuH3x12zR581rHndp/ 5Smk2hWY4rnme3g4FsU1CgGI+w+QOaIwgkB4ZHDfbBf7CJKbq2Q332q9Xrbj2TZuFEbc myOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=message-id:date:references:in-reply-to:cc:to:from:subject :content-transfer-encoding:mime-version:dkim-signature; bh=hJEiL3ZjwcadwY00jatPZNZ08O5fsV1gZWMIoNILm0c=; fh=9a32gKL5KKeaohQjBh2D3pG89qkyVDxjDGg4yWgrCuo=; b=Ge1Jz5IGzLVHF7YCfWkZb5597t80CsUSavZczSmAYi47yRRpSc1ocJO8WSariHdktx 3FVKQGpOlgxrj9zqBXqhsIc5QOubsmfOJ3Cpv5lb9gZnvFnTHtnMieg603pnW5CLUfcU HiBEf+IdM80/StOX7qdf+S/LsCiyHFGTBC3yn2xdwXTKF5hkx1PbK/OT0jd1ku/KLTL6 ZZwg9VRmoFlHfJz7zY+0/dJqzzAU3k8MaWCiJcX4xHTuYRf6iEQKccu6so/5nIr6QgyX bXVL56YnnEfghcl0CKVs7rR71SsW359GWF8OsGWVdYXpbwb6GqWTv0mDOaDu6gM+ZqPg vSFg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=tapSkLpe; spf=pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=khorenko@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from relay.virtuozzo.com (relay.virtuozzo.com. [130.117.225.111]) by mx.google.com with ESMTPS id 38308e7fff4ca-3ae805b9d35si56063341fa.359.2026.11.30.08.03.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 08:03:00 -0800 (PST) Received-SPF: pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) client-ip=130.117.225.111; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=tapSkLpe; spf=pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=khorenko@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=Message-Id:Date:From:Subject:Content-Type: MIME-Version; bh=hJEiL3ZjwcadwY00jatPZNZ08O5fsV1gZWMIoNILm0c=; b=tapSkLpeC/Or oNAFIPedoDYpuoY5HNYGOC2JdE8nOSY0RqI4+vSfi5lTbPFL1/o5/qTw6/o+rkJEIurSwlDGt/pow +ZuObiLGWqf+xPvLkAJmTsnbbmbtcSfEAGkgN1fNJK9TB9uCygT+T/ba1ZC8u0oyjfqT69ev81rcJ GceTj4gyojYed6bTvCeBCAUY3tTEAnds7Jt4h2GLJpXHy6gdbcmAdBiutpmQrEFAbIhfOvXAc/Wub ySYLg+34tLSBkqYm1I60gQajkuIKGvTVSj1haOyKePVtsMjTKfvfMhaWZJUhnZDSR15IShS/6bNzo i9rqe9HfDz+D0aHl3YnGww==; Received: from ch-demo-asa.virtuozzo.com ([130.117.225.8] helo=f0.sw.ru) by relay.virtuozzo.com with esmtp (Exim 4.96) (envelope-from ) id 1xY3pw-00GMFB-1p; Mon, 30 Nov 2026 17:02:51 +0100 MIME-Version: 1.0 From: Konstantin Khorenko To: Alexey Kuznetsov In-Reply-To: References: Date: Mon, 30 Nov 2026 17:02:57 +0100 Message-Id: <179605457779.1088513.3574270513428350209.b4-review@b4> X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2143; i=khorenko@virtuozzo.com; h=from:subject:message-id; bh=vcbAJJ+0K/vQvswFb0ECcAesNX8+zek4+eg3G3M6DHM=; b=owEBbQKS/ZANAwAKAVGWCkf5YVwqAcsmYgBrDZ4y2+GYrmor24ezCbO6yTiQfD4UD/Ixjgdut C32V9nL84aJAjMEAAEKAB0WIQRWD23IPcXT0GO9CCxRlgpH+WFcKgUCaw2eMgAKCRBRlgpH+WFc KmLdEACvonwt9IJwYQkzx2llr1KB8s/1VYw9f7TlaGd1qUZ8UJUEjDnGi3RxrU7fOTQKqZcz58V 1DsoUqPoZ/qz3Y69W8TcyJ6fxxNW1O58KKAdvgJpc7J8PjaBlzEvS4v+WuRviFJPrDPgbO9TvkW +sJmE7DgLddSTlfRk+zTVTjZuKST/cm4LUftNZO23fB+uw9vpmBsQ4qrumFUhmJua+c4uMyEkD3 /HiyZ7Apms5OhACefHzY1eth725MvYf1OuV/U9p4i5vDshbd21Q6rpt9f7YJF+xoI1qN7cd4Hh4 B6vSuhvtihJ076rtMbWPDyPbwTESo04+8fJqPOlBVlH/oqK4f646GhmOdS4fAU0BOQ282KehF0+ 9+xx2o0duoIaiuFFIbsonbPxWXiKvCj7xqjJQ4/CJVM63DYjndXI56lTazxM/Lp4OSkqE95afNB LLl1vuxT0ZixEF91wfg0lToCv2VAtRsY+9HlhiHKo0l9tHCphzqe5C7HrXod1qBK+YEyFvHPOqv gjfC0ntMC/Rpm9ruoMEnyz4AxUom6bLWkl83rdNEJBlDA7JF+WF0EGg2z7xzuTxLAQ1H3Nimu03 cckZKtyGti+PGoIeKb/YMPUXw1j1dS7NiUAuNtCjt/Dk5UOGceoMTfx1gbsN/uWQZ3Jvcy8bJrj Jiq6fWcLadkl75g== X-Developer-Key: i=khorenko@virtuozzo.com; a=openpgp; fpr=560F6DC83DC5D3D063BD082C51960A47F9615C2A X-OZ-Fwd: true Cc: azaitsev@virtuozzo.com, devel@openvz.org, kui.liu@virtuozzo.com Subject: Re: [Devel] [PATCH hci-8.1] fs/fuse/kio: do not panic on unaligned memory access in cs accel X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org Please, send an ACK for the patch and after that i can apply this with the following fixes on my side: - trailers: dropped "Affects:" (it repeats the URL) and the blank lines between them, put them in the usual order: URL, Fixes, Feature, Signed-off-by. With the blank lines git saw only Feature: as a trailer. On Mon, 30 Nov 2026 22:57:17 +0800, Alexey Kuznetsov wrote: > Nevertheless, > new kernels have allowed O_DIRECT access to tmpfs > (e88e0d366f9c "tmpfs: trivial support for direct IO"), which does > not imply any memory alignment constraints. Our tests really use > tmpfs. Not only tmpfs. On ext4/xfs CS disks an O_DIRECT read of a hole or an unwritten extent goes through iomap_dio_hole_iter(), which fills the buffer without the memory alignment check of the bio path, and ext4 data=journal falls back to buffered reads. So the BUG_ON could fire in production before the tmpfs change, and the fix is worth having on every branch with 5acc64b761cd. > - vstorage deliberately does not check memory alignment anywhere. init_crypted_data() does check it, (bv_offset | bv_len) & 511, before the encrypted write is submitted. > + if (unlikely(len & 511)) { > + put_page(page); No change needed now, a thought for later: this fires only after the local read is done and the earlier pages are decrypted in place. The error then goes through map_notify_soft_error() and closes the congestion window of the local CS (eff_cwnd = 1) until its next success. The same check in csa_submit() for IREQ_F_CRYPT, as on the write path, would fall back before any IO and without that. Separate patches, not needed for this one. I created a task: 1. csa_submit() leaks the crc_page[] references taken by quick_crc_fetch() on its synchronous error returns ("Not a bvec", "AIO submit rejected"); the caller falls back to the network and the union with iochunk.ir overwrites the pointers. Unaligned O_DIRECT reads on block-backed CS storage with CRC take this path. https://virtuozzo.atlassian.net/browse/VSTOR-158112 -- Konstantin Khorenko, Virtuozzo Linux Kernel Team _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel