Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1073204rdb; Mon, 19 Feb 2024 03:32:14 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX6byQlSy/i4njrXtW3ZFJdWrJbYx04/NbK+d7Gcf6WWTPk7aKZHdRFiPdDTK1Oz1iPzvecXh6lrvtTV6oupbqoZhrysPXIWwVg5l2waA== X-Google-Smtp-Source: AGHT+IHjyr6vmQTmVSeDAqkv4Z32Zlz8wVy+rILXonmvM+eMxmfGTRICiw2UfuksXq7tLZAjNK0E X-Received: by 2002:a1f:4a87:0:b0:4c7:fa8d:2b9e with SMTP id x129-20020a1f4a87000000b004c7fa8d2b9emr2070913vka.10.1708342333993; Mon, 19 Feb 2024 03:32:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708342333; cv=pass; d=google.com; s=arc-20160816; b=TZDIu/C5z0KkL2djvoM6nXXEVjwBJ3Lwe+lLfECOSLH1mVzORyfl5KovSy8GgK6b7i 7tx9JumRyo+r4bNK0/ug/rkugcW9TqF1jwBHRpN/XDhdyCnYtub4QwWXKNaOFzUf2Lcy 4+tbsOhFN4cpHJCaQ/bBZzZH07FwEJZM0Ad2L50oUHGCrRZ64tBQHv+HJLtV3bjHVB08 pDOfnkKciHuRlL6EptJBdbltha2wQmYvjiMIweBtn4wF277vWHmhiLcbXa4BDu4VpaH4 kMhXs1tB98DNKB+S7wQ0I7wlrV7u6cfzyJcIWPT9C0FnrCSibN9I7pcRvFw9FUMb+8KS MvpQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:subject:cc:to:from:date:references :in-reply-to:message-id:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:user-agent:feedback-id:dkim-signature :dkim-signature; bh=ZTYwiFQEp8cThTaa6T2QNUW4Hfm+lei5RwnJjMUwvVI=; fh=MG146Q+uKF1khWKfaBs3Qo9+2vV1yM5siSsiHxce92U=; b=LwlTHcW8OhA1ATTRT729iAf3XkS0v4M9bzif94erI1LoUmMDHPgxdX4J/oPQnUh/go zo1XUDLtc0m3Ia/pmlpIz2tRGXRgb1sR3J32SbTB4PVR7YxjUJP5nIzzOUBBy3gSafwe dWA1bVRCvEDlcXmEIN+RvFD6i9YNFzIE2rWTuOIJ74AfQV6YoNB0gNo9Hu1g457sedrJ KVpkQ2ARYIBF9tsqYTCj/66QTV2zdCauOjjpxTOY90KCTN80EJZz+xZHJXrMD6rLdCBj QB/IujaZiheFM/Nt0kj42cripBFg8p5kz/oPXFyYeW4JAFwydOLT8IvyQBguNUjEw+ZP x3QQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=QMHV+HnQ; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=nblDJDTS; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-71207-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71207-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id z18-20020a056214041200b0068f0801d70asi5977435qvx.115.2024.02.19.03.32.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 03:32:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71207-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=QMHV+HnQ; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=nblDJDTS; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-71207-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71207-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id BB6F11C232CB for ; Mon, 19 Feb 2024 11:30:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D2D52C1BF; Mon, 19 Feb 2024 11:30:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="QMHV+HnQ"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="nblDJDTS" Received: from fhigh6-smtp.messagingengine.com (fhigh6-smtp.messagingengine.com [103.168.172.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B0082C1BC for ; Mon, 19 Feb 2024 11:30:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708342231; cv=none; b=LlNdh2EtuOfPd9Fe8EhiiPIgFzBLqfW6iIZvEIlMxkrPAVpp6JfCYjx5GV9ImoR49XV/VOLBryFSBkIvl4nKB4yBuQUgO9Xnv0og24ZwECoMqftef6LcPmt2pTyxqHeKCF9L1P7azKpLHlj3p49W88lfvow4D8G+P3qN/I2o/jk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708342231; c=relaxed/simple; bh=X9M+tjEeoip0TeLuPx3RYlT1m5MOUQ+xB9mh2j89o2g=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=GL8j5HhdUMkIyGbFKQIVK5+1aumP/vyZ2AkRWJ8vv8R9E7GVKpO03woPpWeFuwNGiNcApMymv2iRFCfZEuYZGp791+gS/4fAsJs4INg7m69rXf4tUGM91JSYKEsUXlJkuGjQfyp4jCzitZe5syZtYsQUil19bW0QsetcWqwdutk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=QMHV+HnQ; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=nblDJDTS; arc=none smtp.client-ip=103.168.172.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 9548F11400C3; Mon, 19 Feb 2024 06:30:28 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Mon, 19 Feb 2024 06:30:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1708342228; x=1708428628; bh=ZTYwiFQEp8cThTaa6T2QNUW4Hfm+lei5RwnJjMUwvVI=; b= QMHV+HnQ/Ms+W3R44Cr/1qex2YyCm6zb/EbvPgsSH0wu7U/uu7hUJJ1KqKvaXXex 5Ds/oCnEhN/eXFE5IFDj5feFJRYKAPFaWk8mLSjEeVuTGN5mJ2qw3s5shrzvALNN CrXnqwVje76o9aojr+pjb3kYdJz+1GSpu1Je75wEjIZV/q/whl9Q1jORx3sjGD9U GKcN7LEZO4l+TDMV5uYqoT7R9CF4qI5PoarzqlxR+W3QNbXQAsgho7h54l3mE/ND u5m29DeomnQ0ncY0gj4dn6SPl8bXh3AZ5tYXpe07wrzr8G+g+1Hawmg4LGSsj/Xa LnTop0Z/w9Dkktv7ONHsYQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1708342228; x= 1708428628; bh=ZTYwiFQEp8cThTaa6T2QNUW4Hfm+lei5RwnJjMUwvVI=; b=n blDJDTSgAdRv4JKz/DXFmuy+vw2sbTMeiqIVGmBsvCRUVYoyJwMyUytITeBNtOvW zOAcKqTOsoEnYpyOVXXzsSCsoYRt2DtR1tuKEBXngjEd8QHZd7sVlRJe1J37NrD8 LONbAkRIr2HgFNzckiAae4uAJ5lBt5a45DCDfuBGxoTrHKleQRlDk7bMEutrOkjn hf2NKSHRcfz2nsduvb+qNpb2U+AKwFmyCTprMU2Vjg00PTbx3AUi0EoDvH4I6zRN ZA/2SvX3ZjS7MuQu00AevLGWZVhrR1zBTS8xphqPNGIUgOww7B5J8egR66gC4S5M I8hrpA+IOeyJGDlkT90MQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdekgddvkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgfgsehtqhertderreejnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepgeefjeehvdelvdffieejieejiedvvdfhleeivdelveehjeelteegudektdfg jeevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id D0AC0B6008D; Mon, 19 Feb 2024 06:30:27 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-144-ge5821d614e-fm-20240125.002-ge5821d61 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: In-Reply-To: <4cdc5b58-11c1-490d-8c3b-6352d8f1b8cb@amd.com> References: <20240216202442.2493031-1-arnd@kernel.org> <745e156e-c3ec-427f-98ad-bfc7d3cfd846@infradead.org> <4cdc5b58-11c1-490d-8c3b-6352d8f1b8cb@amd.com> Date: Mon, 19 Feb 2024 12:29:57 +0100 From: "Arnd Bergmann" To: =?UTF-8?Q?Christian_K=C3=B6nig?= , "Randy Dunlap" , "Arnd Bergmann" , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" Cc: "Dave Airlie" , "Daniel Vetter" , "Arunpravin Paneer Selvam" , "David Gow" , =?UTF-8?Q?Ma=C3=ADra_Canal?= , "Matthew Auld" , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/tests/drm_buddy: avoid 64-bit calculation Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon, Feb 19, 2024, at 12:22, Christian K=C3=B6nig wrote: > Am 17.02.24 um 02:31 schrieb Randy Dunlap: >> On 2/16/24 12:24, Arnd Bergmann wrote: >>> From: Arnd Bergmann >>> >>> The newly added drm_test_buddy_alloc_contiguous() test fails to link= on >>> 32-bit targets because of inadvertent 64-bit calculations: >>> >>> ERROR: modpost: "__aeabi_uldivmod" [drivers/gpu/drm/tests/drm_buddy_= test.ko] undefined! >>> ERROR: modpost: "__aeabi_ldivmod" [drivers/gpu/drm/tests/drm_buddy_t= est.ko] undefined! >>> >>> >From what I can tell, the numbers cannot possibly overflow a 32-bit= size, >>> so use different types for these. >>> >>> I noticed that the function has another possible flaw in that is mix= es >>> what it calls pages with 4KB units. This is a big confusing at best, >>> or possibly broken when built on machines with larger pages. >>> >>> Fixes: a64056bb5a32 ("drm/tests/drm_buddy: add alloc_contiguous test= ") >>> Signed-off-by: Arnd Bergmann >> Tested-by: Randy Dunlap > > I've just pushed a similar patch Mathew came up a bit earlier to=20 > drm-misc-fixes. > > Sorry for the noise, I have to catch up on picking up patches for=20 > misc-fixes and misc-next. Ok, thanks. Have you looked at how this code works for larger values of PAGE_SIZE? Is there any need to change other things or will this work with the hardcoded 4KB chunks? Arnd