Both Tvrtko [1] and I [2] have recently proposed some improvals for
drm_sched.
While taking Tvrtko's feedback into account for my patch, I realized
that both his and my patch can be fully replaced with a bigger and far
more beautiful series.
If I am not mistaken, it turns out that the entire entity->entity_idle
completion is also nothing but a workaround around the grave mistake of
not using the greatest helper with parallel programming that exists in
computer science: Locking.
This series adds locking to the last_scheduled field and all checks
related to detect the idleness of the entity. As before, the
job_scheduled event queue causes the periodic checks.
This way, we can get rid of memory barriers, RCU, a few lines of code,
make things more readable, understandable...
Tested with drm-sched-unit tests. I'm a bit busy right now, but wanted
to show you guys the idea. Before merging I'd test it more exhaustively
with Nouveau.
Greetings,
Philipp
[1] https://lore.kernel.org/dri-devel/20260611123423.39819-1-tvrtko.ursulin@iga…
[2] https://lore.kernel.org/dri-devel/20260626081942.2122144-2-phasta@kernel.or…
Philipp Stanner (5):
drm/sched: Protect entity->last_scheduled with spinlock
drm/sched: Lock spsc_queue in drm_sched_entity_pop_job()
drm/sched: Avoid lock cycle for sched_entity
drm/sched: Lock drm_sched_entity_is_idle()
drm/sched: Remove entity->entity_idle
drivers/gpu/drm/scheduler/sched_entity.c | 75 +++++++++++-------------
drivers/gpu/drm/scheduler/sched_main.c | 2 -
drivers/gpu/drm/scheduler/sched_rq.c | 5 +-
include/drm/gpu_scheduler.h | 16 ++---
4 files changed, 41 insertions(+), 57 deletions(-)
base-commit: be4f10d44757211fd656fa57f37034657f26c883
--
2.54.0
On Wed, 1 Jul 2026 18:08:18 +0200, Thierry Reding wrote:
> From: Thierry Reding <treding(a)nvidia.com>
>
> Add a callback to struct dma_heap_ops that heap providers can implement
> to show information about the state of the heap in debugfs. A top-level
> directory named "dma_heap" is created in debugfs and individual files
>
> [ ... ]
Reviewed-by: Maxime Ripard <mripard(a)kernel.org>
Thanks!
Maxime
DMA_HEAP_IOCTL_ALLOC allocates a dma-buf and installs an fd into the
caller's fd table via fd_install() before dma_heap_ioctl() copies the
result back to userspace. If the trailing copy_to_user() fails, the
ioctl returns -EFAULT and userspace never learns the fd number, but
the fd (and the underlying dma-buf reference) remain in the caller's
fd table and are leaked for the lifetime of the process.
The failure is easily reachable from userspace: pass a struct
dma_heap_allocation_data that lives in a page whose protection is
flipped to PROT_READ between copy_from_user() and copy_to_user()
(e.g. via mprotect()). Each such ioctl leaks one dmabuf fd; repeating
the call quickly fills /proc/<pid>/fd with anonymous "/dmabuf:"
entries that only go away when the process exits.
Fix it by closing the installed fd (and clearing the fd field of the
kernel-side copy) when copy_to_user() fails after a successful
allocation, so the error path matches what userspace observes: no fd
was returned, therefore no fd is left behind.
Fixes: c02a81fba74f ("dma-buf: Add dma-buf heaps framework")
Cc: stable(a)vger.kernel.org
Signed-off-by: Baineng Shou <shoubaineng(a)gmail.com>
---
Reproducer (full source, gcc -o poc poc.c; run as root):
// poc.c -- leak one dma-buf fd per DMA_HEAP_IOCTL_ALLOC
// when copy_to_user() fails
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <linux/dma-heap.h>
int main(int argc, char **argv)
{
int n = argc > 1 ? atoi(argv[1]) : 100;
long ps = sysconf(_SC_PAGESIZE);
int heap = open("/dev/dma_heap/system", O_RDWR | O_CLOEXEC);
if (heap < 0)
return perror("open"), 1;
for (int i = 0; i < n; i++) {
/* Put a valid request in a page, then make the page
* read-only: copy_from_user() still succeeds and the
* dma-buf is allocated and fd_install()'d, but the
* trailing copy_to_user() fails and the fd, never
* returned to us, is leaked.
*/
struct dma_heap_allocation_data *req =
mmap(NULL, ps, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
memset(req, 0, sizeof(*req));
req->len = ps;
req->fd_flags = O_RDWR | O_CLOEXEC;
mprotect(req, ps, PROT_READ);
ioctl(heap, DMA_HEAP_IOCTL_ALLOC, req); /* -EFAULT */
munmap(req, ps);
}
printf("done: check ls -l /proc/%d/fd for %d leaked fds\n",
getpid(), n);
pause();
return 0;
}
Before the fix, ./poc 10 leaves 10 anonymous dmabuf fds in the
caller's fd table:
# ls -l /proc/$(pgrep poc)/fd
lrwx------ 1 root root 64 Jan 1 00:03 3 -> /dev/dma_heap/system
lrwx------ 1 root root 64 Jan 1 00:03 4 -> /dmabuf:
lrwx------ 1 root root 64 Jan 1 00:03 5 -> /dmabuf:
lrwx------ 1 root root 64 Jan 1 00:03 6 -> /dmabuf:
lrwx------ 1 root root 64 Jan 1 00:03 7 -> /dmabuf:
lrwx------ 1 root root 64 Jan 1 00:03 8 -> /dmabuf:
lrwx------ 1 root root 64 Jan 1 00:03 9 -> /dmabuf:
lrwx------ 1 root root 64 Jan 1 00:03 10 -> /dmabuf:
lrwx------ 1 root root 64 Jan 1 00:03 11 -> /dmabuf:
lrwx------ 1 root root 64 Jan 1 00:03 12 -> /dmabuf:
lrwx------ 1 root root 64 Jan 1 00:03 13 -> /dmabuf:
After the fix, only /dev/dma_heap/system remains open; the
anonymous "/dmabuf:" entries are gone.
drivers/dma-buf/dma-heap.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/dma-buf/dma-heap.c b/drivers/dma-buf/dma-heap.c
index a76bf3f8b071..0dd7a84b06bf 100644
--- a/drivers/dma-buf/dma-heap.c
+++ b/drivers/dma-buf/dma-heap.c
@@ -18,6 +18,7 @@
#include <linux/uaccess.h>
#include <linux/xarray.h>
#include <uapi/linux/dma-heap.h>
+#include <linux/fdtable.h>
#define DEVNAME "dma_heap"
@@ -181,8 +182,16 @@ static long dma_heap_ioctl(struct file *file, unsigned int ucmd,
goto err;
}
- if (copy_to_user((void __user *)arg, kdata, out_size) != 0)
+ if (copy_to_user((void __user *)arg, kdata, out_size) != 0) {
+ if (kcmd == DMA_HEAP_IOCTL_ALLOC && ret == 0) {
+ struct dma_heap_allocation_data *h = (void *)kdata;
+
+ close_fd(h->fd);
+ h->fd = -1;
+ }
ret = -EFAULT;
+ }
+
err:
if (kdata != stack_kdata)
kfree(kdata);
--
2.34.1
Changes since v4:
- Fix an uninitialized memory bug for FenceCbRegistration with
ManuallyDrop.
- Return FenceCtx as impl PinInit
- Make FenceCtx return an impl PinInit<T, Error> (Danilo)
- Reformat some comments
- Adjust the docu for rcu_barrier(), so that it matches the C side's
docu and our docu for rcu::synchronize_rcu().
Changes since v3:
- Add a FIXME for an encountered Rust compiler bug. (Gary)
- Add new Rust files also to DRM drivers & common infrastructure
MAINTAINERS file. (Danilo)
- Reposition ECANCELED error code. (Miguel)
- Replace refcounted FenceCtx in DriverFenceData with a reference plus
life time. (Boris)
- Re-add rcu_barrier() patch, since we now can use it for dropping the
fence context. (Danilo)
- Add forgotten R-b from Alice, and Acks for MAINTAINERS from
Christian and Sumit.
Changes since v2:
- Don't drop DriverFenceData as a whole, but only the members we
really want to drop. Gives more robustness. (Gary).
- Break apart large pin_init_from_closure(). (Danilo, Onur)
- Remove rcu_barrier() and synchronize_rcu() from FenceCtx::drop().
FenceCtx might drop in atomic context, where you must not perform
those operations. With the current way C dma_fence is designed, the
driver must wait for a grace period manually until it unloads.
- Repair the DriverFenceBorrow implementation, properly injecting a
life time into it. (Danilo)
- Fix memory layout bug for rcu_head. (Onur)
- Drop RCU patches, since this series doesn't need them anymore.
Changes since v1:
- Remove unnecessary mutable references (Alice)
- Split up unsafe comments where possible (Danilo)
- Remove PhantomData + implement FenceCtx ops trait (Boris)
- Consistently call FenceCtx generic data `T`. FenceDataType is
derived from that. (Boris)
- Add abstractions for call_rcu() and synchronize_rcu() (Danilo)
- Add ECANCELED error code in Rust (Alice)
- Remove the rcu_barrier() from FenceCtx::drop() – because we now use
call_rcu(), there can be no UAF access to the FenceCtx anymore. In
any case, it is illegal to use either call_rcu() or
synchronize_rcu() in FenceCtx::drop(), because our new
drop_driver_fence_data() can run in atomic context and might put the
last fence_ctx reference.
So we now only have to guard against module unload, which it seems
either the driver or Rust driver-core / module unload infrastructure
must solve.
- Minor formatting etc. changes
- Add C helpers to MAINTAINERS. (Danilo)
- Ensure that `Fence::is_signaled()` is fully synchronized, i.e., all
callbacks really have run. See [1] and [2]. (Myself, Christian
König)
Changes since the RFCs:
- Include support for ForeignOwnable for ARef, so that a Fence can be
stuffed into an XArray et al. (Code by Danilo)
- Implement ForeignOwnable (with new borrow type) for DriverFence, so
that it can be stuffed into an XArray.
- Include the rcu::RcuBox data type to defer dropping data with RCU
(Cody by Alice)
- Port DmaFence to RcuBox to make UAF bugs through later, new dma_fence
callbacks (backend_ops) impossible.
- Force users to pass their fence data in an RcuBox (or have it not
need drop()) through a Sealed trait.
- Document the rules for the user's DriverFence::data's drop
implementation very clearly (deadlock danger).
- rustfmt, Clippy.
- Various style suggestions, safety comments, etc. (Önur)
- Add __rust_helper prefix to helper functions. (Önur)
Changes in RFC v3:
- Omit JobQueue patches for now
- Completely redesign the memory layout: Instead of a Fence
refcounting a DriverFence, both now live in the same allocation to
allow for future support the dma_fence backend_ops callbacks which
need to do container_of. (mostly Boris's feedback)
- Allow for pre-allocating fences to avoid deadlocks when submitting
jobs to a GPU. (Boris)
- Simultaneously, allow for pre-preparing fence callback objects, so
the driver can allocate them when it sees fit. (code largely stolen
and inspired by Daniel).
- Signal fences on drop, ensure synchronization.
- Force users to set an error code when signalling.
- Write more documentation
- A ton of minor other changes.
[1] https://lore.kernel.org/dri-devel/20260608142436.265820-2-phasta@kernel.org/
[2] https://lore.kernel.org/dri-devel/20260612104251.2264707-2-phasta@kernel.or…
Alright, so since the last RFCs did not reveal significant design
issues, I decided to transition this series to a v1 and hope that we can
get it upstream.
This now includes code for more common infrastructure that dma_fence
needs, contributed by Danilo and Alice.
---
Old cover letter for RFC:
So, this is the spiritual successor of the first / second RFC [1]. v2
also contained code for drm::JobQueue, but mostly to show how the fence
code would be used. JobQueue is under heavy rework right now, so I don't
want to bother your eyes with it. The docstring examples should show how
Rust fences are supposed to be used, though.
This v3 contains a huge amount of highly valuable feedback from a
variety of people, notably Boris, but also from Alice, Gary and Danilo.
There are some TODOs open (a better trait for fence backend_ops and RCU
support), but my hope is that this effort is now finally approaching its
end.
I would greatly appreciate feedback and especially more information
about what might be missing to make this usable, which is obviously
where Daniel's and Boris's feedback will be valuable once more.
Please regard this patch just as what it's titled: an RFC, to discuss a
bit more and to inform a broader community about what the current state
is and where this is heading at.
Many regards,
Philipp
[1] https://lore.kernel.org/rust-for-linux/20260203081403.68733-2-phasta@kernel…
Danilo Krummrich (1):
rust: types: implement ForeignOwnable for ARef<T>
Philipp Stanner (4):
rust: error: Add ECANCELED error code
rust: sync: Add abstraction for rcu_barrier()
rust: Add dma_fence abstractions
MAINTAINERS: Add entry for Rust dma-buf
MAINTAINERS | 5 +
rust/bindings/bindings_helper.h | 1 +
rust/helpers/dma_fence.c | 48 ++
rust/helpers/helpers.c | 1 +
rust/kernel/dma_buf/dma_fence.rs | 894 +++++++++++++++++++++++++++++++
rust/kernel/dma_buf/mod.rs | 14 +
rust/kernel/error.rs | 1 +
rust/kernel/lib.rs | 1 +
rust/kernel/sync/aref.rs | 40 ++
rust/kernel/sync/rcu.rs | 20 +
10 files changed, 1025 insertions(+)
create mode 100644 rust/helpers/dma_fence.c
create mode 100644 rust/kernel/dma_buf/dma_fence.rs
create mode 100644 rust/kernel/dma_buf/mod.rs
base-commit: a73a398a68ca9b9e5116a617562471f16b8310c4
--
2.54.0
On 7/2/26 19:12, Nicolás Antinori wrote:
> In the structs dma_fence_array and dma_fence_chain, the field 'lock'
> has been removed, but its documentation comment remained. Remove the
> stale descriptions to clear up the following kernel-doc warnings:
>
> WARNING: ./include/linux/dma-fence-array.h:47 Excess struct member 'lock' description in 'dma_fence_array'
> WARNING: ./include/linux/dma-fence-array.h:47 Excess struct member 'lock' description in 'dma_fence_array'
> WARNING: ./include/linux/dma-fence-chain.h:48 Excess struct member 'lock' description in 'dma_fence_chain'
> WARNING: ./include/linux/dma-fence-chain.h:48 Excess struct member 'lock' description in 'dma_fence_chain'
>
> Fixes: 5943243914b9 ("dma-buf: use inline lock for the dma-fence-array")
> Fixes: a408c0ca0c41 ("dma-buf: use inline lock for the dma-fence-chain")
> Signed-off-by: Nicolás Antinori <nico.antinori.7(a)gmail.com>
Reviewed-by: Christian König <christian.koenig(a)amd.com>
Going to push that to drm-misc-next later today.
Regards,
Christian.
> ---
> include/linux/dma-fence-array.h | 1 -
> include/linux/dma-fence-chain.h | 1 -
> 2 files changed, 2 deletions(-)
>
> diff --git a/include/linux/dma-fence-array.h b/include/linux/dma-fence-array.h
> index 1b1d87579c38..0c49d7ccefb6 100644
> --- a/include/linux/dma-fence-array.h
> +++ b/include/linux/dma-fence-array.h
> @@ -28,7 +28,6 @@ struct dma_fence_array_cb {
> /**
> * struct dma_fence_array - fence to represent an array of fences
> * @base: fence base class
> - * @lock: spinlock for fence handling
> * @num_fences: number of fences in the array
> * @num_pending: fences in the array still pending
> * @fences: array of the fences
> diff --git a/include/linux/dma-fence-chain.h b/include/linux/dma-fence-chain.h
> index df3beadf1515..42289f505164 100644
> --- a/include/linux/dma-fence-chain.h
> +++ b/include/linux/dma-fence-chain.h
> @@ -20,7 +20,6 @@
> * @prev: previous fence of the chain
> * @prev_seqno: original previous seqno before garbage collection
> * @fence: encapsulated fence
> - * @lock: spinlock for fence handling
> */
> struct dma_fence_chain {
> struct dma_fence base;
> --
> 2.47.3
>
So, you're looking for a new game to sink your teeth into? Something challenging, maybe a little bit infuriating, and definitely memorable? Look no further than Level Devil. This deceptively simple platformer is a masterclass in trickery, constantly changing the rules and keeping you on your toes. But don't be intimidated! With a little patience (and maybe a stress ball), you can conquer its devilish design.
https://leveldevilfull.com
Gameplay: Expect the Unexpected
At its core, Level Devil is a 2D platformer. You control a little pixelated character tasked with reaching the exit door in each level. Sounds easy, right? Wrong. The beauty (and the frustration) lies in the unpredictable nature of the environment. Platforms crumble beneath your feet, spikes appear out of nowhere, and the ground itself can vanish unexpectedly.
Each level introduces new challenges, forcing you to adapt your strategy on the fly. You'll encounter moving platforms, disappearing blocks, and even gravity-defying puzzles. The real kicker? The layout of the levels often changes on each attempt, meaning memorization alone won't cut it. You need to be quick-witted and reactive.
The charm of Level Devil is its lack of hand-holding. There are no tutorials, no hints, and no mercy. You're thrown straight into the deep end, forced to learn from your mistakes (and trust me, there will be plenty). That feeling of finally overcoming a particularly difficult section is incredibly rewarding. It's a game that demands your full attention and rewards persistence.
Tips for Taming the Devil
While Level Devil thrives on its unpredictability, here are a few tips to help you navigate its treacherous landscape:
• Patience is Key: This game is designed to test your limits. Don't get discouraged by frequent deaths. Treat each attempt as a learning experience.
• Observe Carefully: Before making a move, take a moment to scan the environment. Look for subtle cues that might indicate impending danger.
• Embrace Failure: You will die. A lot. Embrace it as part of the learning process. Each death provides valuable insight into the level's design.
• Don't Overthink It: Sometimes, the solution is simpler than you think. Avoid overcomplicating your approach.
• Take Breaks: If you find yourself getting too frustrated, step away from the game for a while. Come back with a fresh perspective.
• Listen to the Sound: The game’s audio cues often hint at upcoming dangers. Pay close attention! Level Devil utilizes sound design to enhance the experience (and sometimes, to cleverly mislead you!).
Conclusion: A Test of Skill and Sanity
Level Devil isn't for the faint of heart. It's a challenging and often frustrating experience. However, it's also incredibly rewarding. The constant surprises, the need for quick thinking, and the sheer satisfaction of overcoming its devilish design make it a truly unique and memorable game. If you're looking for a platformer that will push you to your limits and leave you feeling accomplished, then Level Devil is definitely worth a try. Just be prepared to rage quit... and then come back for more.
Currently, `fill_sg_entry()` splits the scatterlist using `UINT_MAX`.
This creates a non-page-aligned DMA length (`0xFFFFFFFF`) for the
first entry, resulting in non-page-aligned DMA addresses for all
subsequent entries.
While the underlying IOMMU mapping may be contiguous, hardware
DMA engines often require explicit address alignment (e.g., page,
cacheline, or storage sector boundaries). Passing unaligned
addresses and lengths can cause explicit failures in DMA descriptor
creation or silent data corruption if lower unaligned bits are
truncated.
Fix this by splitting the scatterlist by the largest possible page
aligned chunk within `UINT_MAX` (`ALIGN_DOWN(UINT_MAX, PAGE_SIZE)`).
This ensures all scatterlist DMA addresses and lengths remain page
aligned and satisfy hardware constraints.
Page-aligned entries allow the system to cleanly chunk payloads into
PCIe MaxPayloadSize (MPS) (e.g., 128 bytes, 256 bytes, 512 bytes).
As a result, this may help reduce TLP fragmentation in P2P transfers
and alleviate potential congestion within a logical PCIe switch
partition, especially when Relaxed Ordering is not possible due to
hardware constraints.
Reported-by: sashiko-bot <sashiko-bot(a)kernel.org>
Closes: https://lore.kernel.org/all/20260609165431.778061F00893@smtp.kernel.org/
Fixes: 3aa31a8bb11e ("dma-buf: provide phys_vec to scatter-gather mapping routine")
Cc: stable(a)vger.kernel.org
Signed-off-by: David Hu <xuehaohu(a)google.com>
---
drivers/dma-buf/dma-buf-mapping.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/dma-buf/dma-buf-mapping.c b/drivers/dma-buf/dma-buf-mapping.c
index 794acff2546a..f2bde38fdb1f 100644
--- a/drivers/dma-buf/dma-buf-mapping.c
+++ b/drivers/dma-buf/dma-buf-mapping.c
@@ -5,6 +5,9 @@
*/
#include <linux/dma-buf-mapping.h>
#include <linux/dma-resv.h>
+#include <linux/align.h>
+
+#define MAX_ENT_SZ ALIGN_DOWN(UINT_MAX, PAGE_SIZE)
static struct scatterlist *fill_sg_entry(struct scatterlist *sgl, size_t length,
dma_addr_t addr)
@@ -12,9 +15,9 @@ static struct scatterlist *fill_sg_entry(struct scatterlist *sgl, size_t length,
unsigned int len, nents;
int i;
- nents = DIV_ROUND_UP(length, UINT_MAX);
+ nents = DIV_ROUND_UP(length, MAX_ENT_SZ);
for (i = 0; i < nents; i++) {
- len = min_t(size_t, length, UINT_MAX);
+ len = min_t(size_t, length, MAX_ENT_SZ);
length -= len;
/*
* DMABUF abuses scatterlist to create a scatterlist
@@ -24,7 +27,7 @@ static struct scatterlist *fill_sg_entry(struct scatterlist *sgl, size_t length,
* does not require the CPU list for mapping or unmapping.
*/
sg_set_page(sgl, NULL, 0, 0);
- sg_dma_address(sgl) = addr + (dma_addr_t)i * UINT_MAX;
+ sg_dma_address(sgl) = addr + (dma_addr_t)i * MAX_ENT_SZ;
sg_dma_len(sgl) = len;
sgl = sg_next(sgl);
}
@@ -41,14 +44,14 @@ static unsigned int calc_sg_nents(struct dma_iova_state *state,
if (!state || !dma_use_iova(state)) {
for (i = 0; i < nr_ranges; i++)
- nents += DIV_ROUND_UP(phys_vec[i].len, UINT_MAX);
+ nents += DIV_ROUND_UP(phys_vec[i].len, MAX_ENT_SZ);
} else {
/*
* In IOVA case, there is only one SG entry which spans
* for whole IOVA address space, but we need to make sure
* that it fits sg->length, maybe we need more.
*/
- nents = DIV_ROUND_UP(size, UINT_MAX);
+ nents = DIV_ROUND_UP(size, MAX_ENT_SZ);
}
return nents;
--
2.55.0.rc0.738.g0c8ab3ebcc-goog
Hi Logan,
On 02/07/2026 16:45, Logan Gunthorpe wrote:
>
>
> On 2026-07-01 11:12 a.m., Matt Evans wrote:>
>> PCI POWER CONTROL
>> diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
>> index 33c88432b728..59d70bc84cc9 100644
>> --- a/drivers/pci/Kconfig
>> +++ b/drivers/pci/Kconfig
>> @@ -206,11 +206,7 @@ config PCIE_TPH
>> config PCI_P2PDMA
>> bool "PCI peer-to-peer transfer support"
>> depends on ZONE_DEVICE
>> - #
>> - # The need for the scatterlist DMA bus address flag means PCI P2PDMA
>> - # requires 64bit
>> - #
>> - depends on 64BIT
>> + select PCI_P2PDMA_CORE
>
> Can we remove this dependency on 64BIT? Althogh it looks like
> af2880ec440 complicated the issue a bit.
>
> If I remember correctly, the original reason for this is because on
> 64bit systems dma_flags fit into unusued space in struct scatterlist and
> on 32bit systems this space didn't exist and thus adding the flag
> required increasing the size of the structure which wasn't desirable at
> the time.
>
> But af2880ec440 introduced CONFIG_NEED_SG_DMA_FLAGS which doesn't depend
> on 64bit which means if CONFIG_IOMMU_DMA and CONFIG_SWIOTLB are now set
> on 32bit systems that structure will grow quite a bit.
There was some discussion on this aspect of af2880ec440 in the
corresponding v3 patch, for example:
https://lore.kernel.org/all/feaefa41-9f67-4d4f-a3e0-282dca41f3eb@ozlabs.org/
It seems CONFIG_NEED_SG_DMA_FLAGS doesn't have a hard/functional
dependency on 64BIT (and it can be enabled on some !64BIT configs
already, despite what the stale comments say).
> So maybe at this point it's fine to enable this on 32bit systems and we
> can remove this requirement. However, I think we should do that
> explicitly in its own patch, not hide it in this refactoring patch.
Your question does prove it's too stealthy as-is. :) PCI_P2PDMA still
can't be enabled on 32-bit systems because of its ZONE_DEVICE ->
MEMORY_HOTPLUG -> 64BIT dependency. So we're not enabling 32-bit
support for PCI_P2PDMA here, but it's not obvious and so I'll re-add the
`depends on 64BIT`. At least then it won't be enabled without intention
if someone enables ZONE_DEVICE on 32-bit systems...
Thanks,
Matt
On Thu Jul 2, 2026 at 1:30 PM BST, Alice Ryhl wrote:
> The current name of `as_ptr` is very generic, and if you attempt to
> invoke `foo.as_ptr()` on a type for which this method is missing, then
> an error along these lines will be printed:
>
> error[E0599]: no method named `as_ptr` found for reference `&DmaBuf` in the current scope
> --> linux/rust/kernel/dma_buf/buf.rs:54:38
> |
> 54 | ptr::eq(self.as_ptr(), other.as_ptr())
> | ^^^^^^ method not found in `&DmaBuf`
> |
> = help: items from traits can only be used if the trait is implemented and in scope
> note: `device_id::IdTable` defines an item `as_ptr`, perhaps you need to implement it
> --> linux/rust/kernel/device_id.rs:165:1
> |
> 165 | pub trait IdTable<T: RawDeviceId, U> {
> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Suggesting the IdTable trait when an as_ptr() method is missing is not
> useful. Renaming it to `as_raw_id_table` makes the method name unique to
> this trait and avoids these bad suggestions.
I think the name is fine. Functions of this sort is named `as_ptr()` and I don't
see why it should differ just because it's on traits.
I'd rather say this is a Rust deficiency. Perhaps there needs to be a
improvement of `#[diagnostic::do_not_recommend]` so it can be sticked to methods
or traits as well.
Best,
Gary
>
> Assisted-by: Antigravity:Gemini
> Signed-off-by: Alice Ryhl <aliceryhl(a)google.com>
> ---
> rust/kernel/auxiliary.rs | 2 +-
> rust/kernel/device_id.rs | 4 ++--
> rust/kernel/driver.rs | 8 +++++---
> rust/kernel/i2c.rs | 8 ++++----
> rust/kernel/pci.rs | 2 +-
> rust/kernel/platform.rs | 4 ++--
> rust/kernel/usb.rs | 2 +-
> 7 files changed, 16 insertions(+), 14 deletions(-)
We offer high quality counterfeit money that looks real for all customers and we treat all customers the same . Our undetectable counterfeit money are use in Banks ,ATM Machines, supermarkets , currency exchange stores . Contact us today for your visit to this website is not by error and we assure you always good deals . Dream chasers for live . Here is your chance to be a millionaire. Order High Quality Counterfeit Euro Bills Online
FACE TO FACE AVAILABLE NOW FOR EXCHANGE
WhatsApp(+44 7397 620325)
{{Telegram @Frink002 }}
BUY CANADIAN DOLLARS ,FAKE CANADAIN MONEY FOR SALE,COUNTERFIET CAD DOOLARS FOR SALE , BUY FAKE EURO BILLS ,
Buy counterfeit USD notes in Greece
Buy Fake USD Notes in europe, Get counterfeit euro notes in Greece
The guidelines on detecting counterfeit currency give a comparison of genuine and falsified security features.
- Our bills/notes bypass everything, counterfeit pens and machines.
- Can be used in banks but can be used elsewhere same like normal money
- We have the best HOLOGRAMS AND DUPLICATING MACHINES
- UV Verification: YES
EUR - Euro
USD - US Dollar
GBP - British Pound
AUD - Australian Dollar
CAD - Canadian Dollar
WhatsApp(+44 7397 620325)
{{Telegram @Frink002 }}
{{Telegram @Frink002 }}
Email.( Realnotesupply(a)gmail.com )
Buy 50s -20s and 10s Euro from Italy -Spain, Fake money produced by us is good enough to pass through ATMs and other machines undetected, Buy fake 20s and 50s in Spain, Our bank notes are distributed in several countries like Italy, Germany Portugal, Belgium, Greece and more euros for sale online, fake 10 euro notes, buy fake 20 euros online, buy fake 20 euros, buy counterfeit 20 euro bills, buy fake 20 eurod bills, buy fake 20 euros notes online, buy fake 5o euro bills, buy fake 50 euro notes online, buy fake 50 counterfeit euros, buy counterfeit 50 euros bills, buy fake 10 euros bills online, buy 10 euro bills online, buy fake euro notes online.
BUY DRIVING LICENSE,BUY BOAT LICENSE , BUY GAMBLING LICENSE, BUY PILOT LICENSE Apply for a passport online , Buy Passport Online Apply for Passport Online Fast Passport Services Renew Passport Online Get Passport in 24 Hours EU Passport Application US Passport Renewal Cotact bellow FACE TO FACE DEALS ALSO AVAILABLE TO THOSE WHO ARE SKEPTICAL SO YOU CAN BUY FACE TO FACE AND ALSO GET TO TEST SAMPLES FIRST BEFORE YOU PLACE AN ORDER. CONTACT ME WITH CONFIDENT AND FIND OUT THE MAGIC IN COUNTERFEIT AND DOCUMENTS WORLD
WhatsApp(+44 7397 620325)
{{Telegram @Frink002 }})
Email.( Realnotesupply(a)gmail.com )