Accessing a DMA buffer while owned by device is racy: The device
may have not written any data yet and in the case it has written data,
it may be hidden by stale cache lines caused by CPU's speculation in
the meantime. Only after sync'ing the buffer to the CPU are caches, if
any, invalidated, so th
Now that we poison/unpoison DMA buffers as part of ownership transfer,
it's possible for us to detect repeated sync's that are unnecessary at a
granularity of cache lines, which was not possible with the initial
approach in commit 1ad4b32702dd ("dma: debug: detect repeated DMA
sync").
Such repeate
There is litte we can do in software if a DMA master decides to corrupt
memory that is owned by the CPU. What we could do, however, is to ensure
that code doesn't access memory while not owned by the CPU.
This is done by recording ownership information into the KASAN shadow memory.
That way access
It turns out this check is too restrictive. The DMA API doesn't require
a 1:1 relation between mapping and sync. It's permissible to map a big
chunk and then managing it as a number of buffers that are synced
individually.
This is currently the case with the Designware MAC driver and having
this c
We export kasan_poison_shadow and kasan_unpoison_shadow for use by
allocators, but provide no API to query whether a region is poisoned
without triggering a stack trace.
This can be useful however for more unconventional "allocators" like the
DMA API debug code, which can use it to detect double p
Give all errata workaround functions a kernel-doc listing the title of
the erratum and what CPUs it affects for documentation purposes.
Signed-off-by: Ahmad Fatoum
---
arch/arm/include/asm/errata.h | 83 +++
1 file changed, 83 insertions(+)
diff --git a/arch/arm/
With binutils 2.39+, the barebox build started emitting this warning.
On platforms other than sandbox, we disable this warning by passing
--no-warn-rwx
to ld as we don't care for ELF attributes as they aren't used anyway.
On sandbox, however, the ELF attributes matter, so disabling the warning
co
It's possible for Linux notifiers to be removed from within the notifier
callback. Allow the same within barebox to avoid subtle bugs.
Signed-off-by: Ahmad Fatoum
---
lib/notifier.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/notifier.c b/lib/notifier.c
index c55e
The header has evolved upstream since we last imported
it. Sync it with Linux to make available some more functions for use in
barebox.
Signed-off-by: Ahmad Fatoum
---
include/linux/math.h | 173 ---
lib/math/Makefile| 1 +
lib/math/int_pow.c | 3
Linux defines int_sqrt in linux/math.h and has the implementations in
lib/math. We have both these locations, so move the existing code over
to simplify future sync of math functions.
Signed-off-by: Ahmad Fatoum
---
commands/fbtest.c | 2 +-
include/int_sqrt.h| 8
includ
With python 3.12, we now get following warning when running the script:
SyntaxWarning: invalid escape sequence '\#'
This and other minor issues have been fixed upstream since we first
imported the script, so let's sync and import the content of following
Linux v6.11-rc6 commits:
074075aea2
Hello Rouven,
On 03.09.24 11:37, Rouven Czerwinski wrote:
> In gcc 13.3 there is a warning that start may be used unitialized:
>
> include/linux/iopoll.h:42:21: warning: ‘start’ may be used uninitialized
> [-Wmaybe-uninitialized]
> 42 | is_timeout(start, ((timeout_us)
12 matches
Mail list logo