From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E9C3C52D7B for ; Wed, 14 Aug 2024 16:01:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9629C6B0083; Wed, 14 Aug 2024 12:01:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9126C6B0085; Wed, 14 Aug 2024 12:01:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7DA3B6B0088; Wed, 14 Aug 2024 12:01:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 5F44A6B0083 for ; Wed, 14 Aug 2024 12:01:52 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 4B14E81074 for ; Wed, 14 Aug 2024 16:01:49 +0000 (UTC) X-FDA: 82451316738.11.01E1381 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf25.hostedemail.com (Postfix) with ESMTP id 1AEF8A0014 for ; Wed, 14 Aug 2024 16:01:46 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=NFgHSrKK; spf=pass (imf25.hostedemail.com: domain of dakr@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=dakr@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1723651271; a=rsa-sha256; cv=none; b=BV/iF8RvyQ9EZzE51jVY9xqI3a5abGnScxgtqMGT3Jk2y6q+zzuesZCP/5XQY5x+Nmp0en 8aTR5vibtoHB/TqhVPBlLHssasYSQVNbHV74jID+7hViiA/tyz9+01IbXJbuolNmQ3jdzz qnseeq+rK7qnjglckBmPUh/DEhDHptA= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=NFgHSrKK; spf=pass (imf25.hostedemail.com: domain of dakr@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=dakr@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1723651271; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=s+8wEEspVmeblKw9qbUPiPAMAOKYNzRUCnroFGrvLdM=; b=XWh5sgTclL4vn8qBMzF0WxNZx1rr1ol4kYJueXR2/mH2IgHrwI1m3UFvotQ6h/WtHv2hjo IDfUWy+iIrBcmFvQSGPtq7RqojSOayiY4BpvyxYu/wzpfTsPgSfQRRabGjXY90r4TwCA1n iN8Us/XkZlTYHj8eGxkwtJuXl3nGyL0= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id E8636CE195D; Wed, 14 Aug 2024 16:01:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D51D9C116B1; Wed, 14 Aug 2024 16:01:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1723651302; bh=sqI86+s257b6BM/In45crAL7usB4OpYm9FJqWdk3u/w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NFgHSrKKeN9MNzjtW4J1Ij0pJ9I4ZGwp4xrhah5wK4palblivmfjBrApGa5tUoD6a 0Fru+/zYGPe/ASywMr0F8ALyP2x52lmbJbKiIA0i3HI4UwpInCPpQGPvHNzFFZC+Yg xSAdM2Ygu6tZ0SgeT6VEkBBXqDAjPzVo/J4fqXa08OjH4z6V6qCcDMBBi+kjocG9R1 eOyqGJtTHuecsnAOxC75uBNj75GYQimItqfWwBiDZNcfAax+MRnAtwdyFA7ox9zK4R zN8JYnAAgNHtupL8n7fG0OpegeN4IhH+MUBO0AB8wluEMU5Y/DrKHZ1rD8A1JPnFda PTBoA4FQjxwRQ== Date: Wed, 14 Aug 2024 18:01:34 +0200 From: Danilo Krummrich To: Benno Lossin Cc: Miguel Ojeda , Alice Ryhl , ojeda@kernel.org, alex.gaynor@gmail.com, wedsonaf@gmail.com, boqun.feng@gmail.com, gary@garyguo.net, bjorn3_gh@protonmail.com, a.hindborg@samsung.com, akpm@linux-foundation.org, daniel.almeida@collabora.com, faith.ekstrand@collabora.com, boris.brezillon@collabora.com, lina@asahilina.net, mcanal@igalia.com, zhiw@nvidia.com, cjia@nvidia.com, jhubbard@nvidia.com, airlied@redhat.com, ajanulgu@redhat.com, lyude@redhat.com, linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v5 04/26] rust: alloc: implement `Allocator` for `Kmalloc` Message-ID: References: <20240812182355.11641-5-dakr@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Stat-Signature: uffghyxcx91gm4p6d9tbtyj47ia9477z X-Rspamd-Queue-Id: 1AEF8A0014 X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1723651306-959062 X-HE-Meta: U2FsdGVkX1+pZ05S8D2cg+xBaxMjop2OtIy54T02DPVQ1Im0t8BM/6R+rOoCRqHvevz8gQz+qsvpP3tNHSIwm6IbkEzhcibb20LkV9WmxDG1XNivMxE6eMLtsKVFv5jA5t9wyKuXLE1UaVlNOcPnIHvb2Na+92vRXegcRLNv6OhW8uhdnKfkzVIHBV/qt8pKPVQ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jL/yYGAKoe3m6zhmzrVnP19m02feI7ZtpatOdh9OLcp9ZFQW6KI/1G42K9xDhNrG6B2KhhF/byHc8uKEan9w== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Wed, Aug 14, 2024 at 03:28:10PM +0000, Benno Lossin wrote: > On 14.08.24 17:19, Danilo Krummrich wrote: > > On Wed, Aug 14, 2024 at 05:03:21PM +0200, Miguel Ojeda wrote: > >> On Wed, Aug 14, 2024 at 4:00 PM Danilo Krummrich wrote: > >>> > >>> If we keep them, we'd consequently also need to add them for vrealloc() and > >>> kvrealloc(). But again, they don't do anything for us, and hence are more > >>> misleading than helpful IMO. > >> > >> In general, they could do something (e.g. `noreturn`), perhaps in the future. > > > > Indeed, and I think once they're honored we should add them again. > > That sounds like it will be a lot of work, going through every function > and checking if it has the given attribute. Especially when the > attributes are enabled one by one. I think we should keep them (and of > course introduce them on new functions). I don't think it's gonna be a lot of work, if they're honored one day, which we don't know, do we? Since it seems that everyone else prefers to have those attributes, I'll keep / add them accordingly. However, I think we should at least keep a comment in rust/helpers.c that documents which attributes are honored by bindgen and which aren't. For now, the comment should probably say that non of them are honored? > > --- > Cheers, > Benno > > > It's just that I think as long as compiler attributes aren't honored, we should > > not have them in the first place to avoid confusion about whether they do or do > > not have any effect. >