All of lore.kernel.org
 help / color / mirror / Atom feed
* sparse: Lots of (erroneous?) "different address space" errrors in new version
@ 2025-11-24  8:55 Ricardo Ribalda
  2025-12-01  7:31 ` Ricardo Ribalda
  2025-12-01  8:27 ` Dan Carpenter
  0 siblings, 2 replies; 4+ messages in thread
From: Ricardo Ribalda @ 2025-11-24  8:55 UTC (permalink / raw)
  To: Dan Carpenter, Uros Bizjak; +Cc: Linux Media Mailing List, Hans Verkuil

Hi Dan

Every week we bump the smatch/sparse version used by Linux-media's CI.

We were almost error free, but the last version has introduced a huge
amount of errors:
https://linux-media.pages.freedesktop.org/-/users/ci/-/jobs/88441453/artifacts/junit/test-sparse.log.txt

(It is also reproducible with linus/master)


I have bisected your tool and it seems like they were introduced by:
commit e53027a4e816a772403baafa83c09e4a94c1cb8f (HEAD)
Author: Dan Carpenter <dan.carpenter@linaro.org>
Date:   Sat Oct 18 12:31:01 2025 +0300

    symbol: preserver address space qualifiers with typeof()

    When we're parsing typeof(var) we should preserve the address space
    qualifiers as well.

    Reported-by: Uros Bizjak <ubizjak@gmail.com>
    Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>


One example of the new error found is:

make -i W=1 C=1 CHECK="sparse" CF="-D__CHECK_ENDIAN__
-fmemcpy-max-count=11000000" KCFLAGS="-Wmaybe-uninitialized"
drivers/media/v4l2-core/v4l2-compat-ioctl32.o
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:763:13: warning:
incorrect type in argument 2 (different address spaces)
09:08 drivers/media/v4l2-core/v4l2-compat-ioctl32.c:763:13: expected
void const *from
09:08 drivers/media/v4l2-core/v4l2-compat-ioctl32.c:763:13: got
unsigned int __user *


static int put_v4l2_event32_time32(struct v4l2_event *p64,
                                   struct v4l2_event32_time32 __user *p32)
{
        if (put_user(p64->type, &p32->type)


Seems like if we would like to fix the error, put_user should be modified....

Maybe it would be better to revert `symbol: preserver address space
qualifiers with typeof()` until the codebase is ready for it?

Regards

-- 
Ricardo Ribalda

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-12-01 14:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-24  8:55 sparse: Lots of (erroneous?) "different address space" errrors in new version Ricardo Ribalda
2025-12-01  7:31 ` Ricardo Ribalda
2025-12-01  8:27 ` Dan Carpenter
2025-12-01 14:57   ` Ricardo Ribalda

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.