Re: [PATCH v9 4/7] remoteproc: core: Add TEE interface support for firmware release

2024-09-02 Thread Arnaud POULIQUEN
On 8/31/24 18:43, kernel test robot wrote: > Hi Arnaud, > > kernel test robot noticed the following build warnings: > > [auto build test WARNING on 5be63fc19fcaa4c236b307420483578a56986a37] > > url: > https://github.com/intel-lab-lkp/linux/commits/Arnaud-Pouliquen/remoteproc-core-Introduc

Re: [PATCH] x86/sgx: Fix deadloop in __sgx_alloc_epc_page()

2024-09-02 Thread Aaron Lu
On Fri, Aug 30, 2024 at 07:03:33AM -0700, Dave Hansen wrote: > On 8/29/24 23:02, Aaron Lu wrote: > >> Also, I do think we should probably add some kind of sanity warning to > >> the SGX code in another patch. If a node on an SGX system has CPUs and > >> memory, it's very likely it will also have s

Re: [PATCH 5/5] KVM: VMX: Always honor guest PAT on CPUs that support self-snoop

2024-09-02 Thread Gerd Hoffmann
> > > Yes? :-) As Gerd described, video memory is "mapped into userspace so > > > the wayland / X11 display server can software-render into the buffer" > > > and it seems that wayland gets something unexpected in this memory and > > > crashes. > > > > Also, I don't know if it helps or not, but ou

[PATCH v5.10-v5.15] rcu-tasks: Fix show_rcu_tasks_trace_gp_kthread buffer overflow

2024-09-02 Thread Vamsi Krishna Brahmajosyula
From: Nikita Kiryushin [ Upstream commit cc5645fddb0ce28492b15520306d092730dffa48 ] There is a possibility of buffer overflow in show_rcu_tasks_trace_gp_kthread() if counters, passed to sprintf() are huge. Counter numbers, needed for this are unrealistically high, but buffer overflow is still po

Re: [PATCH 5/5] KVM: VMX: Always honor guest PAT on CPUs that support self-snoop

2024-09-02 Thread Vitaly Kuznetsov
had missed something of course. For now, it seems >> like a userspace misbehavior resulting in a segfault. > Could you please share steps launch the broken guest desktop? > (better also with guest kernel version, name of desktop processes, > name of X server) I think the easiest woul

Re: [PATCH v2 02/19] gendwarfksyms: Add symbol list handling

2024-09-02 Thread Petr Pavlu
On 8/29/24 01:09, Sami Tolvanen wrote: > On Wed, Aug 28, 2024 at 02:35:29PM +0200, Petr Pavlu wrote: >> On 8/15/24 19:39, Sami Tolvanen wrote: >>> diff --git a/scripts/gendwarfksyms/dwarf.c b/scripts/gendwarfksyms/dwarf.c >>> index 65a29d0bd8f4..71cfab0553da 100644 >>> --- a/scripts/gendwarfksyms/d

Re: [PATCH v2 00/19] Implement DWARF modversions

2024-09-02 Thread Petr Pavlu
On 8/29/24 00:53, Sami Tolvanen wrote: > On Wed, Aug 28, 2024 at 04:04:09PM +0900, Masahiro Yamada wrote: >> On Fri, Aug 16, 2024 at 2:39 AM Sami Tolvanen >> wrote: >>> - Added a --symtypes flag for generating a genksyms-style >>> symtypes output based on Petr's feedback, and refactored >>> s

Re: [PATCH v2 06/19] gendwarfksyms: Add a cache for processed DIEs

2024-09-02 Thread Petr Pavlu
On 8/15/24 19:39, Sami Tolvanen wrote: > Basic types in DWARF repeat frequently and traversing the DIEs using > libdw is relatively slow. Add a simple hashtable based cache for the > processed DIEs. > > Signed-off-by: Sami Tolvanen > --- > scripts/gendwarfksyms/Makefile| 1 + > scripts

Re: [PATCH v17 02/16] cgroup/misc: Add per resource callbacks for CSS events

2024-09-02 Thread Huang, Kai
On Fri, 2024-08-30 at 09:40 -0700, Haitao Huang wrote: > From: Kristen Carlson Accardi > > The misc cgroup controller (subsystem) currently does not perform > resource type specific action for Cgroups Subsystem State (CSS) events: > the 'css_alloc' event when a cgroup is created and the 'css_free

Re: [PATCH] dax: Remove an unused field in struct dax_operations

2024-09-02 Thread Jan Kara
On Sun 01-09-24 17:17:09, Christophe JAILLET wrote: > .dax_supported() was apparently removed by commit 7b0800d00dae ("dax: > remove dax_capable") on 2021-11. > > Remove the now unused function pointer from the struct dax_operations. > > Signed-off-by: Christophe JAILLET Looks good. Feel free t

[PATCH 03/13] media: i2c: imx214: Simplify with dev_err_probe()

2024-09-02 Thread André Apitzsch via B4 Relay
From: André Apitzsch Error handling in probe() can be a bit simpler with dev_err_probe(). Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 52 -- 1 file changed, 22 insertions(+), 30 deletions(-) diff --git a/drivers/media/i2c/imx214.c

[PATCH 02/13] media: i2c: imx214: Remove unneeded goto

2024-09-02 Thread André Apitzsch via B4 Relay
From: André Apitzsch Simplify the imx214_start_streaming() by removing unneeded goto statements, and the corresponding error label. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/media/i2c/i

[PATCH 01/13] media: i2c: imx214: Use subdev active state

2024-09-02 Thread André Apitzsch via B4 Relay
From: André Apitzsch Port the imx214 sensor driver to use the subdev active state. Move all the format configuration to the subdevice state and simplify the format handling, locking and initialization. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 129 +---

[PATCH 00/13] media: i2c: imx214: Miscellaneous cleanups and improvements

2024-09-02 Thread André Apitzsch via B4 Relay
This patch series is a collection of miscellaneous cleanups and improvements to the imx214 driver. The series converts the driver to the CCI helpers and adds controls needed to make the driver work with libcamera. The changes are inspired by the imx219 driver. Signed-off-by: André Apitzsch ---

[PATCH 07/13] media: i2c: imx214: Use number of lanes from device tree

2024-09-02 Thread André Apitzsch via B4 Relay
From: André Apitzsch The imx214 camera is capable of either two-lane or four-lane operation. Currently only the four-lane mode is supported, as proper pixel rates and link frequences for the two-lane mode are unknown. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 37 +

[PATCH 08/13] media: i2c: imx214: Add vblank and hblank controls

2024-09-02 Thread André Apitzsch via B4 Relay
From: André Apitzsch Add vblank control to allow changing the framerate / higher exposure values. The vblank and hblank controls are needed for libcamera support. While at it, fix the minimal exposure time according to the datasheet. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214

[PATCH 05/13] media: i2c: imx214: Replace register addresses with macros

2024-09-02 Thread André Apitzsch via B4 Relay
From: André Apitzsch Define macros for all the known registers used in the register arrays, and use them to replace the numerical addresses. This improves readability. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 407 ++--- 1 file chang

[PATCH 04/13] media: i2c: imx214: Convert to CCI register access helpers

2024-09-02 Thread André Apitzsch via B4 Relay
From: André Apitzsch Use the new common CCI register access helpers to replace the private register access helpers in the imx214 driver. This simplifies the driver by reducing the amount of code. Signed-off-by: André Apitzsch --- drivers/media/i2c/Kconfig | 1 + drivers/media/i2c/imx214.c |

[PATCH 10/13] media: i2c: imx214: Implement vflip/hflip controls

2024-09-02 Thread André Apitzsch via B4 Relay
From: André Apitzsch The imx214 sensor supports horizontal and vertical flipping. Add appropriate controls to the driver. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 73 +- 1 file changed, 65 insertions(+), 8 deletions(-) diff --g

[PATCH 11/13] media: i2c: imx214: Add analogue/digital gain control

2024-09-02 Thread André Apitzsch via B4 Relay
From: André Apitzsch The imx214 sensor supports analogue gain up to 8x and digital gain up to 16x. Implement the corresponding controls in the driver. Default gain values are not modified by this patch. Signed-off-by: André Apitzsch --- With the analogue gain control added by this patch, the

[PATCH 06/13] media: i2c: imx214: Drop IMX214_REG_EXPOSURE from mode reg arrays

2024-09-02 Thread André Apitzsch via B4 Relay
From: André Apitzsch The IMX214_REG_EXPOSURE is configured twice, once with a hardcoded value in the mode_ registers arrays, and once via v4l2_ctrl_ops. The latter is enough, drop the former. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 2 -- 1 file changed, 2 deletions(-) d

[PATCH 12/13] media: i2c: imx214: Verify chip ID

2024-09-02 Thread André Apitzsch via B4 Relay
From: André Apitzsch Check the chip ID and stop probing if it is no imx214 sensor. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 29 + 1 file changed, 29 insertions(+) diff --git a/drivers/media/i2c/imx214.c b/drivers/media/i2c/imx214.c index ce6d8

[PATCH 13/13] media: i2c: imx214: Add test pattern control

2024-09-02 Thread André Apitzsch via B4 Relay
From: André Apitzsch This adds V4L2_CID_TEST_PATTERN control support. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 77 -- 1 file changed, 75 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/imx214.c b/drivers/media/i2c/

[PATCH 09/13] media: i2c: imx214: Extract format and crop settings

2024-09-02 Thread André Apitzsch via B4 Relay
From: André Apitzsch Remove format and crop settings from register sequences and set them programmatically. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 137 ++--- 1 file changed, 105 insertions(+), 32 deletions(-) diff --git a/drivers

[RFC 00/31] objtool, livepatch: Livepatch module generation

2024-09-02 Thread Josh Poimboeuf
Hi, Here's a new way to build livepatch modules called klp-build. I started working on it when I realized that objtool already does 99% of the work needed for detecting function changes. This is similar in concept to kpatch-build, but the implementation is much cleaner. Personally I still have

[RFC 01/31] x86/alternative: Refactor INT3 call emulation selftest

2024-09-02 Thread Josh Poimboeuf
The INT3 call emulation selftest is a bit fragile as it relies on the compiler not inserting any extra instructions before the int3_selftest_ip() definition. Also, the int3_selftest_ip() symbol overlaps with the int3_selftest symbol(), which can confuse tooling like objtool. Fix those issues by s

[RFC 02/31] x86/module: Improve relocation error messages

2024-09-02 Thread Josh Poimboeuf
Add the section number and reloc index to relocation error messages to help find the faulty relocation. Signed-off-by: Josh Poimboeuf --- arch/x86/kernel/module.c | 15 +-- kernel/livepatch/core.c | 4 ++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/arch/x86/ke

[RFC 03/31] x86/kprobes: Remove STACK_FRAME_NON_STANDARD annotation

2024-09-02 Thread Josh Poimboeuf
Since commit 877b145f0f47 ("x86/kprobes: Move trampoline code into RODATA"), the optprobe template code is no longer analyzed by objtool so it doesn't need to be ignored. Signed-off-by: Josh Poimboeuf --- arch/x86/kernel/kprobes/opt.c | 4 1 file changed, 4 deletions(-) diff --git a/arch/x

[RFC 04/31] kernel/sys: Don't reference UTS_RELEASE directly

2024-09-02 Thread Josh Poimboeuf
Objtool will be getting a new feature to calculate build-time function checksums, so each function can be uniquely identified. A function's checksum is calculated based on its instructions, jump/call targets, alternatives, string literals, and more. When there are any changes to the git working t

[RFC 05/31] x86/compiler: Tweak __UNIQUE_ID naming

2024-09-02 Thread Josh Poimboeuf
Add an underscore between the "name" and the counter so tooling can distinguish between the non-unique and unique portions of the symbol name. This will come in handy for "objtool klp diff". Signed-off-by: Josh Poimboeuf --- include/linux/compiler.h | 8 ++-- 1 file changed, 6 insertions(+)

[RFC 06/31] elfnote: Use __UNIQUE_ID() for note symbols

2024-09-02 Thread Josh Poimboeuf
The name of an ELF note symbol isn't important. It just needs to be unique. Simplify by using the existing __UNIQUE_ID() macro. Signed-off-by: Josh Poimboeuf --- include/linux/elfnote.h | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/include/linux/elfnote.h b/i

[RFC 08/31] objtool: Remove .parainstructions reference

2024-09-02 Thread Josh Poimboeuf
The section no longer exists since commit 60bc276b129e ("x86/paravirt: Switch mixed paravirt/alternative calls to alternatives"). Signed-off-by: Josh Poimboeuf --- tools/objtool/check.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 0a33d91

[RFC 07/31] kbuild: Remove "kmod" prefix from __KBUILD_MODNAME

2024-09-02 Thread Josh Poimboeuf
Remove the arbitrary "kmod" prefix from __KBUILD_MODNAME and add it back manually in the __initcall_id() macro. This makes it more consistent, now __KBUILD_MODNAME is just the non-stringified version of KBUILD_MODNAME. It will come in handy for the upcoming "objtool klp diff". Signed-off-by: Jos

[RFC 09/31] objtool: Const string cleanup

2024-09-02 Thread Josh Poimboeuf
Use 'const char *' where applicable. Signed-off-by: Josh Poimboeuf --- tools/objtool/arch/loongarch/decode.c | 2 +- tools/objtool/arch/powerpc/decode.c | 2 +- tools/objtool/arch/x86/decode.c | 2 +- tools/objtool/elf.c | 6 +++--- tools/objtool/include/objtool/arch.h

[RFC 10/31] objtool: Use 'struct elf' in elf macros

2024-09-02 Thread Josh Poimboeuf
'struct objtool_file' is specific to the check code and doesn't belong in the elf code. Signed-off-by: Josh Poimboeuf --- tools/objtool/check.c | 22 +++--- tools/objtool/include/objtool/elf.h | 8 tools/objtool/orc_gen.c | 2 +- 3 files chang

[RFC 11/31] objtool: Add section/symbol type helpers

2024-09-02 Thread Josh Poimboeuf
Add some helper macros to improve readability. Signed-off-by: Josh Poimboeuf --- tools/objtool/arch/x86/special.c| 2 +- tools/objtool/check.c | 66 +- tools/objtool/elf.c | 24 +- tools/objtool/include/objtool/elf.h | 73 +++

[RFC 13/31] objtool: Support references to all symbol types in special sections

2024-09-02 Thread Josh Poimboeuf
Make the code simpler and more flexible. Signed-off-by: Josh Poimboeuf --- tools/objtool/check.c | 74 +-- 1 file changed, 15 insertions(+), 59 deletions(-) diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 92171ce458ec..9212b5edffc8 100644

[RFC 12/31] objtool: 'objname' refactoring

2024-09-02 Thread Josh Poimboeuf
Rename the global 'objname' variable to 'Objname' to avoid local variable conflicts, and initialize it in elf_open_read() which is a more natural place for that. Signed-off-by: Josh Poimboeuf --- tools/objtool/builtin-check.c | 2 +- tools/objtool/check.c | 4 ++--

[RFC 14/31] objtool: Refactor add_jump_destinations()

2024-09-02 Thread Josh Poimboeuf
The logic is a bit weird - simplify it. Signed-off-by: Josh Poimboeuf --- tools/objtool/check.c | 239 -- 1 file changed, 114 insertions(+), 125 deletions(-) diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 9212b5edffc8..6490bc939892 10064

[RFC 15/31] objtool: Interval tree cleanups

2024-09-02 Thread Josh Poimboeuf
Change some comments and variable names to improve readability of the interval tree code. Signed-off-by: Josh Poimboeuf --- tools/objtool/elf.c | 50 ++--- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/tools/objtool/elf.c b/tools/objtool/

[RFC 16/31] objtool: Simplify fatal error handling

2024-09-02 Thread Josh Poimboeuf
For fatal errors, exit right away instead of passing the error back. Signed-off-by: Josh Poimboeuf --- tools/objtool/arch/loongarch/orc.c | 30 +- tools/objtool/arch/x86/decode.c | 40 +- tools/objtool/arch/x86/orc.c| 27 +- tools/objtool/builtin-check.c |

[RFC 17/31] objtool: Open up the elf API

2024-09-02 Thread Josh Poimboeuf
Expose more functionality in the ELF library. This will be needed for the upcoming "objtool klp" support. Signed-off-by: Josh Poimboeuf --- tools/objtool/elf.c | 338 +++- tools/objtool/include/objtool/elf.h | 30 ++- tools/objtool/orc_gen.c

[RFC 18/31] objtool: Disallow duplicate prefix symbols

2024-09-02 Thread Josh Poimboeuf
Error out if a duplicate prefix symbol is attempted. Signed-off-by: Josh Poimboeuf --- tools/objtool/check.c | 5 - tools/objtool/elf.c | 9 + tools/objtool/include/objtool/elf.h | 3 +++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/too

[RFC 19/31] objtool: Add elf_create_file()

2024-09-02 Thread Josh Poimboeuf
Add interface to enable the creation of a new ELF file. Signed-off-by: Josh Poimboeuf --- tools/objtool/elf.c | 118 tools/objtool/include/objtool/elf.h | 3 +- 2 files changed, 120 insertions(+), 1 deletion(-) diff --git a/tools/objtool/elf.c b/to

[RFC 20/31] objtool: Add UD1 detection

2024-09-02 Thread Josh Poimboeuf
A UD1 isn't a BUG and shouldn't be treated like one. Signed-off-by: Josh Poimboeuf --- tools/objtool/arch/x86/decode.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/objtool/arch/x86/decode.c b/tools/objtool/arch/x86/decode.c index 6b34b058a821..72d55dcd3d7f

[RFC 21/31] objtool: Fix x86 addend calcuation

2024-09-02 Thread Josh Poimboeuf
arch_dest_reloc_offset() hard-codes the addend adjustment to 4, which isn't always true. In fact it's dependent on the instruction itself. Signed-off-by: Josh Poimboeuf --- tools/objtool/arch/loongarch/decode.c | 4 ++-- tools/objtool/arch/powerpc/decode.c | 4 ++-- tools/objtool/arch/x86/d

[RFC 22/31] objtool: Make find_symbol_containing() less arbitrary

2024-09-02 Thread Josh Poimboeuf
In the rare case of overlapping symbols, find_symbol_containing() just returns the first one it finds. Make it less arbitrary by returning the smallest symbol with size > 0. Eventually we should consider making such overlapping symbols illegal. Signed-off-by: Josh Poimboeuf --- tools/objtool/e

[RFC 23/31] objtool: Handle __pa_symbol() relocations

2024-09-02 Thread Josh Poimboeuf
A relocation created by __pa_symbol() has a large addend referring to a physical address. Convert it to back its virtual form before calculating the addend. Signed-off-by: Josh Poimboeuf --- tools/objtool/arch/x86/decode.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) dif

[RFC 24/31] objtool: Make STACK_FRAME_NON_STANDARD consistent

2024-09-02 Thread Josh Poimboeuf
The C version of STACK_FRAME_NON_STANDARD differs from its asm counterpart: - it uses an 8-byte entry (vs 4-byte) - it creates a superfluous temporary variable Make it identical to the asm version. Signed-off-by: Josh Poimboeuf --- include/linux/objtool.h | 7 --- 1 file changed, 4 inserti

[RFC 25/31] objtool: Fix interval tree insertion for zero-length symbols

2024-09-02 Thread Josh Poimboeuf
Zero-length symbols get inserted in the wrong spot. Fix that. Signed-off-by: Josh Poimboeuf --- tools/objtool/elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/objtool/elf.c b/tools/objtool/elf.c index 49528e7835aa..42a657268306 100644 --- a/tools/objtool/elf.c +++

[RFC 26/31] objtool: Make interval tree functions "static inline"

2024-09-02 Thread Josh Poimboeuf
Otherwise the compiler warns if a function isn't used. Signed-off-by: Josh Poimboeuf --- tools/objtool/elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/objtool/elf.c b/tools/objtool/elf.c index 42a657268306..471df0336aa7 100644 --- a/tools/objtool/elf.c +++ b/tools

[RFC 27/31] objtool: Fix weak symbol detection

2024-09-02 Thread Josh Poimboeuf
find_symbol_hole_containing() fails to find a symbol hole (aka stripped weak symbol) if its section has no symbols before the hole. This breaks weak symbol detection if -ffunction-sections is enabled. Fix it by allowing the interval tree to contain section symbols, which are always at offset zero

[RFC 28/31] x86/alternative: Create symbols for special section entries

2024-09-02 Thread Josh Poimboeuf
Create a symbol for each special section entry. This helps objtool extract needed entries. Signed-off-by: Josh Poimboeuf --- arch/x86/include/asm/alternative.h | 50 -- arch/x86/include/asm/asm.h | 24 +- arch/x86/include/asm/bug.h | 2 ++

[RFC 29/31] objtool: Calculate function checksums

2024-09-02 Thread Josh Poimboeuf
Calculate per-function checksums based on the functions' content and relocations. This will enable objtool to do binary diffs. Signed-off-by: Josh Poimboeuf --- scripts/Makefile.lib| 1 + tools/objtool/Makefile | 7 +- tools/objtool/builtin-check.c

[RFC 30/31] livepatch: Enable -ffunction-sections -fdata-sections

2024-09-02 Thread Josh Poimboeuf
Doing a binary diff of two objects can be problematic: - For intra-section references, the compiler might use hard-coded offsets rather than relocations. - Data references can be ambiguous if the compiler uses section symbol references: - Symbol overlap and zero-length symbols cr

[RFC 31/31] objtool, livepatch: Livepatch module generation

2024-09-02 Thread Josh Poimboeuf
Add a klp-build script which makes use of a new "objtool klp" subcommand to generate livepatch modules using a source patch as input. The concept is similar to kpatch-build which has been a successful out-of-tree project for over a decade. It takes a source .patch as an input, builds kernels befo

Re: [PATCH V2 2/4] remoteproc: qcom: add hexagon based WCSS secure PIL driver

2024-09-02 Thread Kathiravan Thirumoorthy
On 8/29/2024 7:10 PM, Gokul Sriram Palanisamy wrote: From: Vignesh Viswanathan Add support to bring up hexagon based WCSS secure PIL remoteproc. IPQ5332, IPQ9574 supports secure PIL remoteproc. Signed-off-by: Vignesh Viswanathan Signed-off-by: Manikanta Mylavarapu Signed-off-by: Gokul Sri

[PATCH] utimer-test: remove unused variables

2024-09-02 Thread bajing
The variable i is never referenced in the code, just remove it. Signed-off-by: bajing --- tools/testing/selftests/alsa/utimer-test.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/alsa/utimer-test.c b/tools/testing/selftests/alsa/utimer-test.c index 32ee3ce57721..9d2