All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/3] Switch get/put unaligned to use memcpy
@ 2025-06-17  0:57 Ian Rogers
  2025-06-17  0:57 ` [PATCH v1 1/3] vdso: Switch get/put unaligned from packed struct to memcpy Ian Rogers
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Ian Rogers @ 2025-06-17  0:57 UTC (permalink / raw)
  To: Eric Biggers, Yuzhuo Jing, Andy Lutomirski, Thomas Gleixner,
	Vincenzo Frascino, Arnaldo Carvalho de Melo, Al Viro,
	Christophe Leroy, Jason A. Donenfeld, linux-kernel,
	linux-perf-users
  Cc: Ian Rogers

The existing type punning approach with packed structs requires
 -fno-strict-aliasing to be passed to the compiler for
correctness. This is true in the kernel tree but not in the tools
directory resulting in this suggested patch from Eric Biggers
 <ebiggers@google.com>:
https://lore.kernel.org/lkml/20250614044133.660848-2-ebiggers@kernel.org/

Requiring -fno-strict-aliasing seems unfortunate and so this patch
makes the unaligned code work via memcpy for type punning rather than
the packed attribute.

Ian Rogers (3):
  vdso: Switch get/put unaligned from packed struct to memcpy
  tools headers: Update the linux/unaligned.h copy with the kernel
    sources
  tools headers: Remove unneeded ignoring of warnings in unaligned.h

 include/vdso/unaligned.h        | 48 ++++++++++++++++++++++++++++-----
 tools/include/linux/unaligned.h |  4 ---
 tools/include/vdso/unaligned.h  | 48 ++++++++++++++++++++++++++++-----
 3 files changed, 84 insertions(+), 16 deletions(-)

-- 
2.50.0.rc2.692.g299adb8693-goog


^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: [PATCH v1 1/3] vdso: Switch get/put unaligned from packed struct to memcpy
@ 2025-06-17 13:11 kernel test robot
  0 siblings, 0 replies; 10+ messages in thread
From: kernel test robot @ 2025-06-17 13:11 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "dynamic relocations are not supported"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20250617005800.1410112-2-irogers@google.com>
References: <20250617005800.1410112-2-irogers@google.com>
TO: Ian Rogers <irogers@google.com>
TO: Eric Biggers <ebiggers@google.com>
TO: Yuzhuo Jing <yuzhuo@google.com>
TO: Andy Lutomirski <luto@kernel.org>
TO: Thomas Gleixner <tglx@linutronix.de>
TO: Vincenzo Frascino <vincenzo.frascino@arm.com>
TO: Arnaldo Carvalho de Melo <acme@redhat.com>
TO: Al Viro <viro@zeniv.linux.org.uk>
TO: Christophe Leroy <christophe.leroy@csgroup.eu>
TO: "Jason A. Donenfeld" <Jason@zx2c4.com>
TO: linux-kernel@vger.kernel.org
TO: linux-perf-users@vger.kernel.org
CC: Ian Rogers <irogers@google.com>

Hi Ian,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.16-rc2 next-20250617]
[cannot apply to tip/timers/vdso acme/perf/core]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Ian-Rogers/vdso-Switch-get-put-unaligned-from-packed-struct-to-memcpy/20250617-085916
base:   linus/master
patch link:    https://lore.kernel.org/r/20250617005800.1410112-2-irogers%40google.com
patch subject: [PATCH v1 1/3] vdso: Switch get/put unaligned from packed struct to memcpy
:::::: branch date: 12 hours ago
:::::: commit date: 12 hours ago
config: riscv-alldefconfig (https://download.01.org/0day-ci/archive/20250617/202506172035.SjQ0518f-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250617/202506172035.SjQ0518f-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202506172035.SjQ0518f-lkp@intel.com/

All errors (new ones prefixed by >>):

>> arch/riscv/kernel/vdso/vdso.so.dbg: dynamic relocations are not supported
   make[3]: *** [arch/riscv/kernel/vdso/Makefile:61: arch/riscv/kernel/vdso/vdso.so.dbg] Error 1
   make[3]: Target 'include/generated/vdso-offsets.h' not remade because of errors.
   make[2]: *** [arch/riscv/Makefile:182: vdso_prepare] Error 2
   make[2]: Target 'prepare' not remade because of errors.
   make[1]: *** [Makefile:248: __sub-make] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:248: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

end of thread, other threads:[~2025-06-17 18:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-17  0:57 [PATCH v1 0/3] Switch get/put unaligned to use memcpy Ian Rogers
2025-06-17  0:57 ` [PATCH v1 1/3] vdso: Switch get/put unaligned from packed struct to memcpy Ian Rogers
2025-06-17  5:22   ` Christophe Leroy
2025-06-17  6:32     ` Eric Biggers
2025-06-17  9:13       ` Christophe Leroy
2025-06-17 17:21   ` kernel test robot
2025-06-17 18:55   ` kernel test robot
2025-06-17  0:57 ` [PATCH v1 2/3] tools headers: Update the linux/unaligned.h copy with the kernel sources Ian Rogers
2025-06-17  0:58 ` [PATCH v1 3/3] tools headers: Remove unneeded ignoring of warnings in unaligned.h Ian Rogers
  -- strict thread matches above, loose matches on Subject: below --
2025-06-17 13:11 [PATCH v1 1/3] vdso: Switch get/put unaligned from packed struct to memcpy kernel test robot

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.