From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3EA2F3BB670 for ; Mon, 29 Jun 2026 11:38:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782733093; cv=none; b=Czue1ZAyBPZXMYg/XYh//74r0gRQCNghzQuF7J5CfbdVoCRyzp3Z5YE4y2OVtxNpaS3xXBd43VO8F1RaAs9F2bLzbMeZIC47M84pmK9PJ9SQbr1RfV/mXX1C8IG4zuC08QDPsDJokMiLz0uqeuu/x6k7lJZftcyZg9Bj0dxuXas= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782733093; c=relaxed/simple; bh=TePgk28pw9nEpIK9yqXWWcC9xjXv9gsRt+7mXvf+SgM=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:From:To:Cc: References:In-Reply-To; b=dVvtA9EB9ks01t+Jf7VM6B866k28ZdiHP8pvWtBZvFyX54KQBilvns+jvLJ+0x+GmRfPqhBMx3VOix/Qa8op9iyQsxX/UdcWuXgLrlyaRFMRADF+lQiIwzt4vrq70iaZzE49oAT7TP66kHCX28zhX5UHIV/3EQwpjwlz5AykV4E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=r9wGwaS0; arc=none smtp.client-ip=209.85.216.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="r9wGwaS0" Received: by mail-pj1-f51.google.com with SMTP id 98e67ed59e1d1-37df72c9984so1396783a91.3 for ; Mon, 29 Jun 2026 04:38:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782733091; x=1783337891; darn=vger.kernel.org; h=in-reply-to:references:cc:to:from:subject:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=TePgk28pw9nEpIK9yqXWWcC9xjXv9gsRt+7mXvf+SgM=; b=r9wGwaS0mIZO8U5jQa8rZLxOeBXBWqe0VrryZJoNgpeyozQNHjsX/y52Dvnk3X2ohs 7yDRn/vX9+s46FWxF6pgQH7OdSsDWTVTV/iHXd2x0FWAlT75LHAepL8fENS9d5szsZfp 5Cm+R4OsKpUsQcDC2zjjjG6AKRzWG8Fo20oo7NMaRY1XgAb7xJU10jlGH4YqMZOWXYWu eHZoiro8gJZ55yP4cQNIIi5PHv9LJwXc67I2v9GgjlMwNz9hVllkS7SRaL70k5bHOAZX WhF4O8HL7nqZeZLGZ33GOo+5L5dkgW6o8A6Wx2Q5m0Z7YEXx+rZD/mWpCXbxogSyFlHw 57Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782733091; x=1783337891; h=in-reply-to:references:cc:to:from:subject:message-id:date :content-transfer-encoding:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=TePgk28pw9nEpIK9yqXWWcC9xjXv9gsRt+7mXvf+SgM=; b=axADmdHHMdxBoxLoCOsiBK/eXXTPvjFzjVk5D/kgw27k3+TqsDz/g2FGXNultt09as pE7G1Eccnwuvm2LfZRQqEpbynaf1WY7dU2i+hPosJLPuq3aFGDusf3yEbkW/HZkvqLAK yXhJrMOhw0cdYPYYbPTclN5fh7Zj0MuGVY/7vhwEQnYjDAihJe2BRNgyuxpZIR2o6g12 eXAQRcaEyI+DU+H+YhGOr++ci3O7fxMIOTxlV32FfYm0OuANHhA0Ghzb03tOYL/l1gO7 coObkLj+HJFEpf99bWQHjV/h3RsA0cJq60xVIod032eOUYJrvQa1RbnDwj3YjYC+HrTc H99Q== X-Forwarded-Encrypted: i=1; AHgh+Rr8+8SqI/AJzOgcf4FLVML8946cnvjsAt+hadndXK5+ivZPYMnYz9uqqoAZWgByBUsn33hl0uQqqnE5Y6o=@vger.kernel.org X-Gm-Message-State: AOJu0YxGtWnyA7gqv+UnKIH01kBrbzCDzhFF3QERDoGwxxw88UmuyoMc xBMpvIyIyQUiJcKJBRXk1c1suyLjMjwOl9NO2QB4HnyM8tpnSIhE67MP X-Gm-Gg: AfdE7cnYi1UZaWygpGX8srDzL9aUbnsIOTEiInvyLxVMEjMfGOMNkMO69vpi5t9gEL7 h1zA652bQ6eiEDZzyuR3zQC+B3K/2zHYj+KSbsodkcVUZY3MfVSmtsIc/YiEmXESahvTrwi7aib 0UsagxyyLD9Aa8scuY5pdEn7K94orKKadjnkdLovbNF9P9WyJfk+WZ1UzzZpQlbxdrRtYYWZdbg +X60XIiIFtPqjecf07AwWgSJUNlMJ1lbrKONDIn4LQ+na7M9AokV7wuXzQRIP0xyLZQkf+imGxW wCau8FAoceIYAAI00wJwYwA26WeXZJrkyN7MoLBSldZlkJo0Gc7uCJ5Ezq7qOOsPjCEEHMZ5Y/v 07utK/44NtlBmRQUtEP4JPi4I9fDhA/AV5RmG/DpGnlPxu37WhrNr0qJYgFbM9DENKvtIUJOQyN 3rsy/tTvDizvWCNWZWffzyApUy+BHpIMqSFb5mW6wvflXZhJ4su9nuHDjYmkU6YFVsfElsoUScq 8+hYBa01QVsINfiQkbe0pop8+fCF6XizqHs/mwv X-Received: by 2002:a17:90b:560f:b0:37e:1cac:d2f7 with SMTP id 98e67ed59e1d1-37f7a557912mr8306827a91.6.1782733091454; Mon, 29 Jun 2026 04:38:11 -0700 (PDT) Received: from localhost ([143.248.188.236]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-37e24b13458sm5549594a91.13.2026.06.29.04.38.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 Jun 2026 04:38:11 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 29 Jun 2026 11:38:04 +0000 Message-Id: Subject: Re: [PATCH RFC 0/4] rust: dma: bridge zerocopy-derived types into the transmute byte-safety bound From: "SeungJong Ha" To: "Danilo Krummrich" , "Alistair Popple" Cc: "Alexandre Courbot" , "SeungJong Ha via B4 Relay" , , "Miguel Ojeda" , "Boqun Feng" , "Gary Guo" , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , "Benno Lossin" , "Andreas Hindborg" , "Alice Ryhl" , "Trevor Gross" , "Daniel Almeida" , "Tamir Duberstein" , =?utf-8?q?Onur_=C3=96zkan?= , "David Airlie" , "Simona Vetter" , , , , X-Mailer: aerc 0.21.0 References: <20260628-dma-zerocopy-bridge-v1-0-9a2895ebe30d@gmail.com> In-Reply-To: On Mon Jun 29, 2026 at 8:57 AM UTC, Danilo Krummrich wrote: > On Mon Jun 29, 2026 at 10:20 AM CEST, Alistair Popple wrote: >> I think the context is in the description for patch 1. It's not directly= related >> to the bindings generator. Basically the problem is that these bindings = are a >> little bit unique in that we access them using the dma_write/read macros= . In >> other words we use these with Dma::Coherent which still requires the tra= nsmute >> rather than zerocopy trait bounds to be implemented. >> >> That said I think the correct long-term fix here would be to fix Dma::Co= herent >> to make it work with the zerocopy traits. Not sure if anyone is looking = at that >> or not. > > I think it can just be done short term, please also see [1]. We can just = convert > the DMA code right away, no need for the proposed indirection. > > [1] https://lore.kernel.org/all/DJLEHDNJCUD0.38PFZ5773D6BX@kernel.org/ Same here [2], It'll be better to make full transition from transmute after= the new version of zerocopy[3] and auto derive is merged. Best Regards, SeungJong [2] https://lore.kernel.org/all/DJLHOQA5UAP4.340P2TKXGMME5@gmail.com/ [3] https://lore.kernel.org/all/20260625231919.692444-1-ojeda@kernel.org/