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 3553881B60 for ; Wed, 18 Nov 2026 11:41:03 +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 6AIBdhUb024400; Wed, 18 Nov 2026 14:39:45 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AIBdhUb024400 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="xGfW7BBU" Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AIBdglI024384 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Wed, 18 Nov 2026 14:39:42 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AIBdglI024384 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-48e0af48c18so516161f8f.2 for ; Wed, 18 Nov 2026 03:39:42 -0800 (PST) X-Gm-Message-State: APuU4Z+T8IqKVNVD/HhcJ5wddchXyQhUKyFNkylzGNbXx5XTV5PiOP9D SLisfIY5o3gQ30tMF0qYDHccOc6u9rrZrl2dFukOnDjHeCweAo6bYXWfrarmWKgbS1jaITnebhF zj5+rxeJQp1+5cICXmzBDR824CIfiUYzHZmlesWTcJjmDYKiJq8lRcA== X-Gm-Gg: AZFdTZeZQeI3R6UtlqRDOz/545Vd9Fh7N2w4wq71BepzXPhb5PSt2ONlSNMHlfP9Ew8 2s6dheo376pcthX868Lj3KDi4wY9ZU66XBRoDZVR8TZe1KDlyXrtBT5Mwya7HIzDLjP3R2k6dSC dbkNmfEqzeGXLjiw6ZUAntRh6HRD0/3h3ewCBBEloLsou+U4WoohA42JHOs03xnyq1uRyS9MO92 Tc2yl6J5YmUQa072CET3V4EHSqGxowO7PTmxY42iKx4eOEKGDngrOpfr2dU64qRKxyMev4FEy5B h8XhIJSbBQVD3E6J6DBZESu3pa2XC6vSlE98IVG2wgtf1fhRG/2N+z/tm2Y8eN0fbnq8oxNptp0 47/GCCiaHa7YmIcg0id6gDZNpgkDqkw== X-Received: by 2002:a05:6000:4812:b0:4a3:8b21:51c1 with SMTP id ffacd0b85a97d-4a63b9d99d6mr4971921f8f.53.1795001981931; Wed, 18 Nov 2026 03:39:41 -0800 (PST) X-Received: by 2002:a05:6000:4812:b0:4a3:8b21:51c1 with SMTP id ffacd0b85a97d-4a63b9d99d6mr4971866f8f.53.1795001981425; Wed, 18 Nov 2026 03:39:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1795001981; cv=none; d=google.com; s=arc-20260327; b=g9Cb3OotC/Oz0ySwHrlmMgJN6KeJyd/bRZIl+7Sz9EAMPS5o6XAfXr4oXYyNO8/w0U Je+P/LVv3WwyjjIPGTOfqgcxYHRkxxKDgdMG7XEVGqIAxYN7nvuJESZH8l7kq2+o4WuF 7rZG0bwsPu01cXgc/SpWPOJbt1BZX6F5VL7VxxH/xdFvBawxYSlxVSKufc1HbOQw5+B4 lo2qk/uf5wZc4a74sFtJCJJAtKBfkyGbIEQZkaA9iA6nYN7JfP/QR9W9NaypdbCCaE9J 7bEBfxrHWSZWrjo5kYT8L2DI2aMYyyr1njGzinoO7w1ziFkiRlFZ3owFJULjEQxJhxak Za/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=l/yasWb/ZNBWAYuZKCcVTDq7LPJYQX9OBERYPL0UoEU=; fh=7hWwk1OHawbnxBhSKSLSDZxabhsDTbWAwy3CCepxcVA=; b=EbihmuBr/6i1bsnIwUv0qHXkmX3ieZVthZq9h6H4pt5shVKoHsIGlUw3eLfluymPUt E+0f7fr2X7sSlwfESH3tveuoGEScTOG7+ZXlF41GyJsXVfo/D3uNuIbcjBRXu8bUYtS/ 5G7iMWC3ozWgYjWvO0a29TXqc/+VYAuz+jm4fcniRhiGSFRIAOhSLAGbrNdkTrOQuXEP wSTpD/YBN4bEMgTH1j7zFtdQAo4m6TP5pQpJoOnFxnaSnbrXaxtNtyZvd3TYLeKGzFzA QSdveFVWotj9RSgHniJ+ybjd1j/mKywcrOxkn1rLkrV/fMpqOEZAoy//EsrrVFov3aIG W+Cg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=xGfW7BBU; spf=pass (google.com: domain of mirian.shilakadze@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=mirian.shilakadze@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 ffacd0b85a97d-4a65a68372bsi4261234f8f.397.2026.11.18.03.39.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Nov 2026 03:39:41 -0800 (PST) Received-SPF: pass (google.com: domain of mirian.shilakadze@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=xGfW7BBU; spf=pass (google.com: domain of mirian.shilakadze@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=mirian.shilakadze@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=Content-Type:MIME-Version:Message-ID:Date:Subject :From; bh=l/yasWb/ZNBWAYuZKCcVTDq7LPJYQX9OBERYPL0UoEU=; b=xGfW7BBUs3pLNj0NbF9 ZfwaSodQWtCjHcJVAkXtQfGy/Du2nNUeuAtThr3ODx8fYj+tcIuIBiNdLpRyAAVuZMJB8FJ+lt9t3 iR2iUx76Y7l2gC0+gWhKxDJK3lPQX9I6abIYzCVWshOnVeerJdTlSNV/dbK8UPfxyzTLlBH/eaxNe +XVcjNGu9KCl8jxec2ROz+IN5JxHGDOePoZ0U/jCDtbFjNF9AUlfGhtZEYNhkuUJU34r+Cg/EYNPP TuuOoPOfjpLRAODMBJQ/JMlv8DW3x961DzzCkZ5grIryBxDUKGVD/K/NiChDX/5Ut2QgeFrLYTrZF mqp4uMhlrtuX6xQ==; Received: from ch-demo-asa.virtuozzo.com ([130.117.225.8] helo=localhost.localdomain) by relay.virtuozzo.com with esmtp (Exim 4.96) (envelope-from ) id 1xTdwY-0035FB-32; Wed, 18 Nov 2026 12:39:40 +0100 From: Mirian Shilakadze To: khorenko@virtuozzo.com Date: Wed, 18 Nov 2026 15:38:09 +0400 Message-ID: <20261118113935.381228-1-mirian.shilakadze@virtuozzo.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.2 0/4] drm/buddy: backport buddy allocator fixes 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 Item 1 from the review of VSTOR-154850 v1. Upstream fixes for the buddy allocator code that came with the RHEL import: 1. 5488a29596cd: a rounded up allocation larger than the memory size hits BUG_ON(order > mm->max_order). 2. 0251963afd22: a failed split_block() leaves a freed block in the free tree (use-after-free). 3. 56bc6384314f: the contiguous fallback can return a start that ignores min_block_size. 4. fb26cf4f1df4: when the contiguous fallback fails or retries, it frees the whole list the caller passed in, including blocks the caller allocated before. Not in the ticket and not in mainline yet (linux-next, Cc stable). Taken because it fixes the same fallback as 3 and the drm_buddy suite catches it: without 4, alloc_contiguous fails on the check that 4 adds. Patches 2 to 4 are adapted to the drm_buddy names. 264.x already has 1 from RHEL, and 2 to 4 apply to it as is. Tested with KUnit on the 211.75.1.26.2 debug kernel (KASAN, failslab), stock and patched drm_buddy.ko built from this tree: - drm_buddy suite with the test from 4: stock and 1-3 fail only alloc_contiguous, on the check that 4 adds. 1-4 pass. - dc0e3aa54eaa, the mainline test for 1: stock hits the BUG_ON, patched passes. - try_harder alignment (own test): stock returns 12K at 8K for a 16K min_block_size, patched returns -ENOSPC. - split_block() failing in alloc_from_freetree(), __alloc_range() and __alloc_range_bias() via failslab (own test): stock gives KASAN slab-use-after-free and then the BUG_ON in alloc_from_freetree(), patched passes at every injection point. - ve selftests: the same with stock and patched drm_buddy.ko (ve_ns_owner_test and ve_vtty_stress fail on both). https://virtuozzo.atlassian.net/browse/VSTOR-155318 Arunpravin Paneer Selvam (1): ms/gpu/buddy: bail out of try_harder when alignment cannot be honoured Francois Dugast (1): ms/gpu/buddy: Fix use-after-free in split_block() call sites Matthew Auld (1): ms/gpu/buddy: do not pass caller list to __alloc_contig_try_harder() Sanjay Yadav (1): ms/drm/buddy: Prevent BUG_ON by validating rounded allocation drivers/gpu/drm/drm_buddy.c | 107 ++++++++++++++++++------- drivers/gpu/drm/tests/drm_buddy_test.c | 9 +++ 2 files changed, 89 insertions(+), 27 deletions(-) -- 2.47.3 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel