Re: [PATCH bpf-next v5 2/2] bpf: allow bpf_current_task_under_cgroup() with BPF_CGROUP_*

2024-08-15 Thread kernel test robot
Hi Matteo, kernel test robot noticed the following build errors: [auto build test ERROR on bpf-next/master] url: https://github.com/intel-lab-lkp/linux/commits/Matteo-Croce/bpf-enable-generic-kfuncs-for-BPF_CGROUP_-programs/20240815-000517 base: https://git.kernel.org/pub/scm/linux/kernel

Re: [PATCH RFC 0/3] Revert "virtio_net: rx enable premapped mode by default"

2024-08-15 Thread Linux regression tracking (Thorsten Leemhuis)
On 15.08.24 12:22, Darren Kenny wrote: > On Thursday, 2024-08-15 at 09:14:27 +02, Linux regression tracking (Thorsten > Leemhuis) wrote: >> On 14.08.24 08:59, Michael S. Tsirkin wrote: >>> Note: Xuan Zhuo, if you have a better idea, pls post an alternative >>> patch. >>> >>> Note2: untested, posti

[PATCH] vhost_vdpa: assign irq bypass producer token correctly

2024-08-15 Thread Jason Wang
We used to call irq_bypass_unregister_producer() in vhost_vdpa_setup_vq_irq() which is problematic as we don't know if the token pointer is still valid or not. Actually, we use the eventfd_ctx as the token so the life cycle of the token should be bound to the VHOST_SET_VRING_CALL instead of vhost_

Re: [PATCH net-next v7 0/4] virtio-net: synchronize op/admin state

2024-08-15 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (main) by Jakub Kicinski : On Wed, 14 Aug 2024 13:22:24 +0800 you wrote: > Hi All: > > This series tries to synchronize the operstate with the admin state > which allows the lower virtio-net to propagate the link status to the > upper devices

Re: [PATCH v2] vduse: avoid using __GFP_NOFAIL

2024-08-15 Thread Jason Wang
On Fri, Aug 16, 2024 at 8:17 AM Barry Song <21cn...@gmail.com> wrote: > > On Thu, Aug 8, 2024 at 5:43 PM Jason Wang wrote: > > > > Barry said [1]: > > > > """ > > mm doesn't support non-blockable __GFP_NOFAIL allocation. Because > > __GFP_NOFAIL without direct reclamation may just result in a busy

Re: [PATCH v2] vduse: avoid using __GFP_NOFAIL

2024-08-15 Thread Barry Song
On Thu, Aug 8, 2024 at 5:43 PM Jason Wang wrote: > > Barry said [1]: > > """ > mm doesn't support non-blockable __GFP_NOFAIL allocation. Because > __GFP_NOFAIL without direct reclamation may just result in a busy > loop within non-sleepable contexts. > > The current code will result in returning a

[PATCH v2 2/2] x86/vmware: Fix steal time clock under SEV

2024-08-15 Thread Alexey Makhalov
Shared memory containing steal time counter should be set to decrypted when SEV is active. Co-developed-by: Bo Gan Signed-off-by: Bo Gan Signed-off-by: Alexey Makhalov --- arch/x86/kernel/cpu/vmware.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/arch/x86/kernel/

Re: [PATCH bpf-next v5 2/2] bpf: allow bpf_current_task_under_cgroup() with BPF_CGROUP_*

2024-08-15 Thread Andrii Nakryiko
On Tue, Aug 13, 2024 at 6:28 AM Matteo Croce wrote: > > From: Matteo Croce > > The helper bpf_current_task_under_cgroup() currently is only allowed for > tracing programs, allow its usage also in the BPF_CGROUP_* program types. > > Move the code from kernel/trace/bpf_trace.c to kernel/bpf/helpers

Re: [PATCH bpf-next v5 1/2] bpf: enable generic kfuncs for BPF_CGROUP_* programs

2024-08-15 Thread Andrii Nakryiko
On Tue, Aug 13, 2024 at 6:28 AM Matteo Croce wrote: > > From: Matteo Croce > > These kfuncs are enabled even in BPF_PROG_TYPE_TRACING, so they > should be safe also in BPF_CGROUP_* programs. > > In enum btf_kfunc_hook, rename BTF_KFUNC_HOOK_CGROUP_SKB to a more > generic BTF_KFUNC_HOOK_CGROUP, si

[PATCH v4 4/4] EDAC/mce_amd: Add support for FRU Text in MCA

2024-08-15 Thread Avadhut Naik
From: Yazen Ghannam A new "FRU Text in MCA" feature is defined where the Field Replaceable Unit (FRU) Text for a device is represented by a string in the new MCA_SYND1 and MCA_SYND2 registers. This feature is supported per MCA bank, and it is advertised by the McaFruTextInMca bit (MCA_CONFIG[9]).

[PATCH v4 3/4] x86/mce/apei: Handle variable register array size

2024-08-15 Thread Avadhut Naik
From: Yazen Ghannam ACPI Boot Error Record Table (BERT) is being used by the kernel to report errors that occurred in a previous boot. On some modern AMD systems, these very errors within the BERT are reported through the x86 Common Platform Error Record (CPER) format which consists of one or mor

[PATCH v4 1/4] x86/mce: Add wrapper for struct mce to export vendor specific info

2024-08-15 Thread Avadhut Naik
Currently, exporting new additional machine check error information involves adding new fields for the same at the end of the struct mce. This additional information can then be consumed through mcelog or tracepoint. However, as new MSRs are being added (and will be added in the future) by CPU ven

[PATCH v4 2/4] x86/mce, EDAC/mce_amd: Add support for new MCA_SYND{1,2} registers

2024-08-15 Thread Avadhut Naik
Starting with Zen4, AMD's Scalable MCA systems incorporate two new registers: MCA_SYND1 and MCA_SYND2. These registers will include supplemental error information in addition to the existing MCA_SYND register. The data within these registers is considered valid if MCA_STATUS[SyndV] is set. Usersp

[PATCH v4 0/4] MCE wrapper and support for new SMCA syndrome MSRs

2024-08-15 Thread Avadhut Naik
This patchset adds a new wrapper for struct mce to prevent its bloating and export vendor specific error information. Additionally, support is also introduced for two new "syndrome" MSRs used in newer AMD Scalable MCA (SMCA) systems. Also, a new "FRU Text in MCA" feature that uses these new "syndro

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

2024-08-15 Thread Sami Tolvanen
Hi Sedat, On Thu, Aug 15, 2024 at 8:14 PM Sedat Dilek wrote: > > so this work is on top of Linux v6.11-rc3 Correct. git format-patch also adds the base commit to the end of the cover letter. > can you tag it as gendwarfksyms-v2? Sure. Here you go: https://github.com/samitolvanen/linux/commits

Re: (subset) [PATCH v4 0/5] Add MPSS remoteproc support for SDX75

2024-08-15 Thread Bjorn Andersson
On Tue, 09 Jul 2024 12:19:19 +0530, Naina Mehta wrote: > Add modem support to SDX75 using the PAS remoteproc driver. > Also, add qlink_logging memory region and split MPSS DSM > region into 2 separate regions. > > These patches were co-authored by Rohit Agarwal while at > Qualcomm. > > [...] A

Re: (subset) [PATCH 0/7] Add CPU frequency scaling support for MSM8226

2024-08-15 Thread Bjorn Andersson
On Wed, 19 Jun 2024 23:02:44 +0200, Luca Weiss wrote: > Apart from a bunch of bindings updates, add support for the a7pll found > on the SoC and wire up everything in the dtsi. And finally switch over > to using apcs via mbox interface to stop using the apcs via syscon. > > Only a limited list o

Re: (subset) [PATCH v2 0/2] arm64: dts: qcom: msm8916-samsung-j3ltetw: Add initial device tree

2024-08-15 Thread Bjorn Andersson
On Sun, 04 Aug 2024 06:59:06 +, Lin, Meng-Bo wrote: > The dts and dtsi add support for msm8916 variant of Samsung Galaxy J3 > SM-J320YZ smartphone released in 2016. > > Add a device tree for SM-J320YZ with initial support for: > > - GPIO keys > - SDHCI (internal and external storage) > - US

Re: (subset) [PATCH v2 0/5] soc: qcom: fix rpm_requests module probing

2024-08-15 Thread Bjorn Andersson
On Mon, 29 Jul 2024 22:52:13 +0300, Dmitry Baryshkov wrote: > The GLINK RPMSG channels get modalias based on the compatible string > rather than the channel type, however the smd-rpm module uses rpmsg ID > instead. Thus if the smd-rpm is built as a module, it doesn't get > automatically loaded. A

Re: [PATCH v3 14/16] modules: Support extended MODVERSIONS info

2024-08-15 Thread Sami Tolvanen
Hi Matt, On Tue, Aug 6, 2024 at 9:25 PM Matthew Maurer wrote: > [...] > +void modversion_ext_start(const struct load_info *info, > + struct modversion_info_ext *start) > +{ > + unsigned int crc_idx = info->index.vers_ext_crc; > + unsigned int name_idx = info->i

Re: [PATCH RFC v3 13/13] uprobes: add speculative lockless VMA to inode resolution

2024-08-15 Thread Andrii Nakryiko
On Thu, Aug 15, 2024 at 11:58 AM Jann Horn wrote: > > +brauner for "struct file" lifetime > > On Thu, Aug 15, 2024 at 7:45 PM Suren Baghdasaryan wrote: > > On Thu, Aug 15, 2024 at 9:47 AM Andrii Nakryiko > > wrote: > > > > > > On Thu, Aug 15, 2024 at 6:44 AM Mateusz Guzik wrote: > > > > > > > >

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

2024-08-15 Thread Sedat Dilek
On Thu, Aug 15, 2024 at 7:39 PM Sami Tolvanen wrote: > > Hi, > > Here's v2 of the DWARF modversions series [1]. The main motivation > remains modversions support for Rust, which is important for > distributions like Android that are eager to ship Rust kernel > modules. However, per Luis' request [

Re: [PATCH RFC v3 13/13] uprobes: add speculative lockless VMA to inode resolution

2024-08-15 Thread Suren Baghdasaryan
On Thu, Aug 15, 2024 at 11:58 AM Jann Horn wrote: > > +brauner for "struct file" lifetime > > On Thu, Aug 15, 2024 at 7:45 PM Suren Baghdasaryan wrote: > > On Thu, Aug 15, 2024 at 9:47 AM Andrii Nakryiko > > wrote: > > > > > > On Thu, Aug 15, 2024 at 6:44 AM Mateusz Guzik wrote: > > > > > > > >

Re: [PATCH] rust: add `module_params` macro

2024-08-15 Thread Benno Lossin
On 15.08.24 15:11, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On 05.08.24 12:55, Andreas Hindborg wrote: >>> "Benno Lossin" writes: On 02.08.24 12:27, Andreas Hindborg wrote: > At a higher level where the bindings supply the parsing functions, we > can decide that passing an

Re: (subset) [PATCH v4 0/5] Add MPSS remoteproc support for SDX75

2024-08-15 Thread Bjorn Andersson
On Tue, 09 Jul 2024 12:19:19 +0530, Naina Mehta wrote: > Add modem support to SDX75 using the PAS remoteproc driver. > Also, add qlink_logging memory region and split MPSS DSM > region into 2 separate regions. > > These patches were co-authored by Rohit Agarwal while at > Qualcomm. > > [...] A

Re: [PATCH RFC v3 13/13] uprobes: add speculative lockless VMA to inode resolution

2024-08-15 Thread Mateusz Guzik
On Thu, Aug 15, 2024 at 8:58 PM Jann Horn wrote: > Stupid question: Is this uprobe stuff actually such a hot codepath > that it makes sense to optimize it to be faster than the page fault > path? > That's what I implicitly asked, hoping a down_read on vma would do it, but Andrii claims multiple p

Re: [PATCH RFC v3 13/13] uprobes: add speculative lockless VMA to inode resolution

2024-08-15 Thread Jann Horn
+brauner for "struct file" lifetime On Thu, Aug 15, 2024 at 7:45 PM Suren Baghdasaryan wrote: > On Thu, Aug 15, 2024 at 9:47 AM Andrii Nakryiko > wrote: > > > > On Thu, Aug 15, 2024 at 6:44 AM Mateusz Guzik wrote: > > > > > > On Tue, Aug 13, 2024 at 08:36:03AM -0700, Suren Baghdasaryan wrote: >

Re: [PATCH v4 3/3] x86/sgx: Resolve EREMOVE page vs EAUG page data race

2024-08-15 Thread Jarkko Sakkinen
On Thu Aug 15, 2024 at 9:34 PM EEST, Jarkko Sakkinen wrote: > On Mon Aug 12, 2024 at 11:25 AM EEST, Dmitrii Kuvaiskii wrote: > > On Wed, Jul 17, 2024 at 01:38:59PM +0300, Jarkko Sakkinen wrote: > > > > > Ditto. > > > > Just to be sure: I assume this means "Fixes should be in the head of the > > ser

Re: [PATCH v4 3/3] x86/sgx: Resolve EREMOVE page vs EAUG page data race

2024-08-15 Thread Jarkko Sakkinen
On Mon Aug 12, 2024 at 11:25 AM EEST, Dmitrii Kuvaiskii wrote: > On Wed, Jul 17, 2024 at 01:38:59PM +0300, Jarkko Sakkinen wrote: > > > Ditto. > > Just to be sure: I assume this means "Fixes should be in the head of the > series so please reorder"? If yes, please see my reply in the other email > [

Re: [PATCH v4 2/3] x86/sgx: Resolve EAUG race where losing thread returns SIGBUS

2024-08-15 Thread Jarkko Sakkinen
On Mon Aug 12, 2024 at 11:21 AM EEST, Dmitrii Kuvaiskii wrote: > On Wed, Jul 17, 2024 at 01:38:37PM +0300, Jarkko Sakkinen wrote: > > > Fixes should be in the head of the series so please reorder. > > Do you mean that the preparation patch [1] should be applied after the two > bug fixes? This seems

Re: [PATCH v4 1/3] x86/sgx: Split SGX_ENCL_PAGE_BEING_RECLAIMED into two flags

2024-08-15 Thread Jarkko Sakkinen
On Mon Aug 12, 2024 at 11:16 AM EEST, Dmitrii Kuvaiskii wrote: > On Wed, Jul 17, 2024 at 01:37:39PM +0300, Jarkko Sakkinen wrote: > > On Fri Jul 5, 2024 at 10:45 AM EEST, Dmitrii Kuvaiskii wrote: > > > +/* > > > + * 'desc' bit indicating that PCMD page associated with the enclave page > > > is > >

Re: [PATCH v4 1/3] x86/sgx: Split SGX_ENCL_PAGE_BEING_RECLAIMED into two flags

2024-08-15 Thread Jarkko Sakkinen
On Mon Aug 12, 2024 at 11:12 AM EEST, Dmitrii Kuvaiskii wrote: > On Wed, Jul 17, 2024 at 01:36:08PM +0300, Jarkko Sakkinen wrote: > > On Fri Jul 5, 2024 at 10:45 AM EEST, Dmitrii Kuvaiskii wrote: > > > SGX_ENCL_PAGE_BEING_RECLAIMED flag is set when the enclave page is being > > > reclaimed (moved t

Re: [PATCH RFC v3 13/13] uprobes: add speculative lockless VMA to inode resolution

2024-08-15 Thread Mateusz Guzik
On Thu, Aug 15, 2024 at 10:45:45AM -0700, Suren Baghdasaryan wrote: > >From all the above, my understanding of your objection is that > checking mmap_lock during our speculation is too coarse-grained and > you would prefer to use the VMA seq counter to check that the VMA we > are working on is unch

Re: [PATCH RFC v3 13/13] uprobes: add speculative lockless VMA to inode resolution

2024-08-15 Thread Suren Baghdasaryan
On Thu, Aug 15, 2024 at 9:47 AM Andrii Nakryiko wrote: > > On Thu, Aug 15, 2024 at 6:44 AM Mateusz Guzik wrote: > > > > On Tue, Aug 13, 2024 at 08:36:03AM -0700, Suren Baghdasaryan wrote: > > > On Mon, Aug 12, 2024 at 11:18 PM Mateusz Guzik wrote: > > > > > > > > On Mon, Aug 12, 2024 at 09:29:17

[PATCH v2 19/19] kbuild: Add gendwarfksyms as an alternative to genksyms

2024-08-15 Thread Sami Tolvanen
When MODVERSIONS is enabled, allow selecting gendwarfksyms as the implementation, but default to genksyms. Signed-off-by: Sami Tolvanen --- kernel/module/Kconfig | 25 - scripts/Makefile | 2 +- scripts/Makefile.build | 34 -- 3 fil

[PATCH v2 18/19] x86/asm-prototypes: Include

2024-08-15 Thread Sami Tolvanen
refers to struct pt_regs, make sure it's visible. Signed-off-by: Sami Tolvanen --- arch/x86/include/asm/asm-prototypes.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/asm-prototypes.h b/arch/x86/include/asm/asm-prototypes.h index 25466c4d2134..c82e68c8b7c2 100644 ---

[PATCH v2 17/19] export: Add __gendwarfksyms_ptr_ references to exported symbols

2024-08-15 Thread Sami Tolvanen
With gendwarfksyms, we need each TU where the EXPORT_SYMBOL() macro is used to also contain DWARF type information for the symbols it exports. However, as a TU can also export external symbols and compilers may choose not to emit debugging information for symbols not defined in the current TU, the

[PATCH v2 16/19] gendwarfksyms: Add support for reserved structure fields

2024-08-15 Thread Sami Tolvanen
Distributions that want to maintain a stable kABI need the ability to add reserved fields to kernel data structures that they anticipate will be modified during the ABI support timeframe, either by LTS updates or backports. With genksyms, developers would typically hide changes to the reserved fie

[PATCH v2 15/19] gendwarfksyms: Add support for declaration-only data structures

2024-08-15 Thread Sami Tolvanen
If a source file refers to an opaque data structure, the DWARF debugging information in the resulting object file will only contain a structure declation, which means the contents of the structure are not included when computing symbol versions. For example: Source code: struct struct0; int f

[PATCH v2 14/19] gendwarfksyms: Add symbol versioning

2024-08-15 Thread Sami Tolvanen
Add a basic CRC32 implementation adapted from genksyms, and produce matching output from symtypes strings in type_map. Signed-off-by: Sami Tolvanen --- scripts/gendwarfksyms/Makefile| 1 + scripts/gendwarfksyms/crc32.c | 69 ++ scripts/gendwarfksyms/crc32.h

[PATCH v2 13/19] gendwarfksyms: Add symtypes output

2024-08-15 Thread Sami Tolvanen
Add support for producing genksyms-style symtypes files. Process die_map to find the longest expansions for each type, and use symtypes references in type definitions. The basic file format is similar to genksyms, with two notable exceptions: 1. Type names with spaces (common with Rust) in refer

[PATCH v2 12/19] gendwarfksyms: Add die_map debugging

2024-08-15 Thread Sami Tolvanen
Debugging the DWARF processing can be somewhat challenging, so add more detailed debugging output for die_map operations. Move parsed die_map output behind --dump-dies to clean up the --debug output, and add a --dump-die-map flag, which adds highlighted tags to the output about die_map operations.

[PATCH v2 11/19] gendwarfksyms: Limit structure expansion

2024-08-15 Thread Sami Tolvanen
Expand each structure type only once per exported symbol. This is necessary to support self-referential structures, which would otherwise result in infinite recursion, but is still sufficient for catching ABI changes. For pointers to structure types, limit type expansion inside the pointer to two

[PATCH v2 10/19] gendwarfksyms: Expand structure types

2024-08-15 Thread Sami Tolvanen
Recursively expand DWARF structure types, i.e. structs, unions, and enums. Also include relevant DWARF attributes in type strings to encode structure layout, for example. Example output with --debug: subprogram( formal_parameter pointer_type *mut &str { structure_type &str { m

[PATCH v2 09/19] gendwarfksyms: Expand array_type

2024-08-15 Thread Sami Tolvanen
Add support for expanding DW_TAG_array_type, and the subrange type indicating array size. Example source code: const char *s[34]; Output with --debug: variable array_type [34] { pointer_type { const_type { base_type char byte_size(1) encoding(6) } } byte_size(8

[PATCH v2 08/19] gendwarfksyms: Expand subroutine_type

2024-08-15 Thread Sami Tolvanen
Add support for expanding DW_TAG_subroutine_type and the parameters in DW_TAG_formal_parameter. Use this to also expand subprograms. Example output with --debug: subprogram( formal_parameter base_type usize byte_size(8), formal_parameter base_type usize byte_size(8), ) -> base_type

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

2024-08-15 Thread Sami Tolvanen
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/gendwarfksyms/die.c | 170 ++

[PATCH v2 07/19] gendwarfksyms: Expand type modifiers and typedefs

2024-08-15 Thread Sami Tolvanen
Add support for expanding DWARF type modifiers, such as pointers, const values etc., and typedefs. These types all have DW_AT_type attribute pointing to the underlying type, and thus produce similar output. Also add linebreaks and indentation to debugging output to make it more readable. Signed-o

[PATCH v2 05/19] gendwarfksyms: Expand base_type

2024-08-15 Thread Sami Tolvanen
Start making gendwarfksyms more useful by adding support for expanding DW_TAG_base_type types and basic DWARF attributes. Example: $ echo loops_per_jiffy | \ scripts/gendwarfksyms/gendwarfksyms --debug vmlinux.o ... gendwarfksyms: process_exported_symbols: loops_per_jiffy variable b

[PATCH v2 04/19] gendwarfksyms: Add support for type pointers

2024-08-15 Thread Sami Tolvanen
The compiler may choose not to emit type information in DWARF for external symbols. Clang, for example, does this for symbols not defined in the current TU. To provide a way to work around this issue, add support for __gendwarfksyms_ptr_ pointers that force the compiler to emit the necessary type

[PATCH v2 03/19] gendwarfksyms: Add address matching

2024-08-15 Thread Sami Tolvanen
The compiler may choose not to emit type information in DWARF for all aliases, but it's possible for each alias to be exported separately. To ensure we find type information for the aliases as well, read {section, address} tuples from the symbol table and match symbols also by address. Signed-off-

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

2024-08-15 Thread Sami Tolvanen
Add support for passing a list of exported symbols to gendwarfksyms via stdin and filter out non-exported symbols from the output. Signed-off-by: Sami Tolvanen --- scripts/gendwarfksyms/Makefile| 1 + scripts/gendwarfksyms/dwarf.c | 53 ++- scripts/gendwarfksyms/gend

[PATCH v2 01/19] tools: Add gendwarfksyms

2024-08-15 Thread Sami Tolvanen
Add a basic DWARF parser, which uses libdw to traverse the debugging information in an object file and looks for functions and variables. In follow-up patches, this will be expanded to produce symbol versions for CONFIG_MODVERSIONS from DWARF. Signed-off-by: Sami Tolvanen --- kernel/module/Kconf

[PATCH v2 00/19] Implement DWARF modversions

2024-08-15 Thread Sami Tolvanen
Hi, Here's v2 of the DWARF modversions series [1]. The main motivation remains modversions support for Rust, which is important for distributions like Android that are eager to ship Rust kernel modules. However, per Luis' request [2], v2 drops all Rust specific bits from the series and instead add

Re: [PATCH] arm64: insn: Simulate nop and push instruction for better uprobe performance

2024-08-15 Thread Andrii Nakryiko
On Thu, Aug 15, 2024 at 2:58 AM Mark Rutland wrote: > > On Wed, Aug 14, 2024 at 08:03:56AM +, Liao Chang wrote: > > As Andrii pointed out, the uprobe/uretprobe selftest bench run into a > > counterintuitive result that nop and push variants are much slower than > > ret variant [0]. The root ca

Re: [PATCH] uprobes: Optimize the allocation of insn_slot for performance

2024-08-15 Thread Andrii Nakryiko
On Thu, Aug 15, 2024 at 12:59 AM Liao, Chang wrote: > > > > 在 2024/8/15 0:57, Andrii Nakryiko 写道: > > On Tue, Aug 13, 2024 at 9:17 PM Liao, Chang wrote: > >> > >> > >> > >> 在 2024/8/13 1:49, Andrii Nakryiko 写道: > >>> On Mon, Aug 12, 2024 at 4:11 AM Liao, Chang wrote: > > > >

Re: [PATCH] uprobes: Optimize the allocation of insn_slot for performance

2024-08-15 Thread Andrii Nakryiko
On Wed, Aug 14, 2024 at 7:58 PM Liao, Chang wrote: > > > > 在 2024/8/15 2:42, Andrii Nakryiko 写道: > > On Tue, Aug 13, 2024 at 9:17 PM Liao, Chang wrote: > >> > >> > >> > >> 在 2024/8/13 1:49, Andrii Nakryiko 写道: > >>> On Mon, Aug 12, 2024 at 4:11 AM Liao, Chang wrote: > > > > 在

Re: [PATCH v3 00/13] uprobes: RCU-protected hot path optimizations

2024-08-15 Thread Andrii Nakryiko
On Thu, Aug 15, 2024 at 6:25 AM Oleg Nesterov wrote: > > On 08/12, Andrii Nakryiko wrote: > > > > ( In addition to previously posted first 8 patches, I'm sending 5 more as an > > RFC for people to get the general gist of where this work heading and what > > uprobe performance is now achievable. I

Re: [PATCH RFC v3 13/13] uprobes: add speculative lockless VMA to inode resolution

2024-08-15 Thread Andrii Nakryiko
On Thu, Aug 15, 2024 at 6:44 AM Mateusz Guzik wrote: > > On Tue, Aug 13, 2024 at 08:36:03AM -0700, Suren Baghdasaryan wrote: > > On Mon, Aug 12, 2024 at 11:18 PM Mateusz Guzik wrote: > > > > > > On Mon, Aug 12, 2024 at 09:29:17PM -0700, Andrii Nakryiko wrote: > > > > Now that files_cachep is SLAB

Re: [PATCH v11 3/9] remoteproc: k3-m4: Add a remoteproc driver for M4F subsystem

2024-08-15 Thread Mathieu Poirier
Hi, On Fri, Aug 02, 2024 at 10:21:03AM -0500, Andrew Davis wrote: > From: Martyn Welch > > The AM62x and AM64x SoCs of the TI K3 family has a Cortex M4F core in > the MCU domain. This core is typically used for safety applications in a > stand alone mode. However, some application (non safety re

Re: [PATCH v3 0/2] Fix kallsyms with CONFIG_LTO_CLANG

2024-08-15 Thread Kees Cook
On Wed, 07 Aug 2024 15:05:11 -0700, Song Liu wrote: > With CONFIG_LTO_CLANG, the compiler/linker adds .llvm. suffix to > local symbols to avoid duplications. Existing scripts/kallsyms sorts > symbols without .llvm. suffix. However, this causes quite some > issues later on. Some users of kallsyms, s

Re: [PATCH v3 0/2] Fix kallsyms with CONFIG_LTO_CLANG

2024-08-15 Thread Song Liu
Hi Kees, > On Aug 15, 2024, at 9:05 AM, Kees Cook wrote: > > On Mon, Aug 12, 2024 at 06:13:22PM +, Song Liu wrote: >> Hi Luis, >> >>> On Aug 12, 2024, at 9:57 AM, Luis Chamberlain wrote: >>> >>> On Mon, Aug 12, 2024 at 09:21:02AM -0700, Song Liu wrote: Hi folks, Do we have

Re: [PATCH v3 0/2] Fix kallsyms with CONFIG_LTO_CLANG

2024-08-15 Thread Kees Cook
On Mon, Aug 12, 2024 at 06:13:22PM +, Song Liu wrote: > Hi Luis, > > > On Aug 12, 2024, at 9:57 AM, Luis Chamberlain wrote: > > > > On Mon, Aug 12, 2024 at 09:21:02AM -0700, Song Liu wrote: > >> Hi folks, > >> > >> Do we have more concerns and/or suggestions with this set? If not, > >> what

[PATCH] ring-buffer: Add magic and struct size to boot up meta data

2024-08-15 Thread Steven Rostedt
From: Steven Rostedt Add a magic number as well as save the struct size of the ring_buffer_meta structure in the meta data to also use as validation. Updating the magic number could be used to force a invalidation between kernel versions, and saving the structure size is also a good method to mak

[PATCH] ring-buffer: Don't reset persistent ring-buffer meta saved addresses

2024-08-15 Thread Steven Rostedt
From: Steven Rostedt The text and data address is saved in the meta data so that it can be used to know the delta of the text and data addresses of the last boot compared to the text and data addresses of the current boot. The delta is used to convert function pointer entries in the ring buffer t

Re: [PATCH RFC 0/3] Revert "virtio_net: rx enable premapped mode by default"

2024-08-15 Thread Michael S. Tsirkin
On Thu, Aug 15, 2024 at 11:23:19AM -0400, Michael S. Tsirkin wrote: > On Thu, Aug 15, 2024 at 09:14:27AM +0200, Linux regression tracking (Thorsten > Leemhuis) wrote: > > [side note: the message I have been replying to at least when downloaded > > from lore has two message-ids, one of them identic

Re: [PATCH RFC 0/3] Revert "virtio_net: rx enable premapped mode by default"

2024-08-15 Thread Michael S. Tsirkin
On Thu, Aug 15, 2024 at 09:14:27AM +0200, Linux regression tracking (Thorsten Leemhuis) wrote: > [side note: the message I have been replying to at least when downloaded > from lore has two message-ids, one of them identical two a older > message, which is why this looks odd in the lore archives:

[PATCH v6 3/4] scripts: add verifier script for builtin module range data

2024-08-15 Thread Kris Van Hees
The modules.builtin.ranges offset range data for builtin modules is generated at compile time based on the list of built-in modules and the vmlinux.map and vmlinux.o.map linker maps. This data can be used to determine whether a symbol at a particular address belongs to module code that was configu

[PATCH v6 4/4] module: add install target for modules.builtin.ranges

2024-08-15 Thread Kris Van Hees
When CONFIG_BUILTIN_MODULE_RANGES is enabled, the modules.builtin.ranges file should be installed in the module install location. Signed-off-by: Kris Van Hees Reviewed-by: Nick Alcock --- Changes since v3: - Only install modules.builtin.ranges if CONFIG_BUILTIN_MODULE_RANGES=y --- scri

[PATCH v6 2/4] kbuild, kconfig: generate offset range data for builtin modules

2024-08-15 Thread Kris Van Hees
Create file module.builtin.ranges that can be used to find where built-in modules are located by their addresses. This will be useful for tracing tools to find what functions are for various built-in modules. The offset range data for builtin modules is generated using: - modules.builtin: associa

[PATCH v6 1/4] kbuild: add mod(name,file)_flags to assembler flags for module objects

2024-08-15 Thread Kris Van Hees
In order to create the file at build time, modules.builtin.ranges, that contains the range of addresses for all built-in modules, there needs to be a way to identify what code is compiled into modules. To identify what code is compiled into modules during a kernel build, one can look for the prese

[PATCH v6 0/4] Generate address range data for built-in modules

2024-08-15 Thread Kris Van Hees
At build time, create the file modules.builtin.ranges that will hold address range data of the built-in modules that can be used by tracers. Especially for tracing applications, it is convenient to be able to refer to a symbol using a pair and to be able to translate an address into a pair. But

[PATCH v3 6/6] rtla: Documentation: Mention --deepest-idle-state

2024-08-15 Thread tglozar
From: Tomas Glozar Add --deepest-idle-state to manpage and mention libcpupower dependency in README.txt. Signed-off-by: Tomas Glozar --- Documentation/tools/rtla/common_timerlat_options.rst | 8 tools/tracing/rtla/README.txt| 4 2 files changed, 12 inserti

[PATCH v3 5/6] rtla/timerlat: Add --deepest-idle-state for hist

2024-08-15 Thread tglozar
From: Tomas Glozar Support limiting deepest idle state also for timerlat-hist. Signed-off-by: Tomas Glozar --- tools/tracing/rtla/src/timerlat_hist.c | 42 +- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/tools/tracing/rtla/src/timerlat_hist.c b/tools/t

[PATCH v3 3/6] rtla/utils: Add idle state disabling via libcpupower

2024-08-15 Thread tglozar
From: Tomas Glozar Add functions to utils.c to disable idle states through functions of libcpupower. This will serve as the basis for disabling idle states per cpu when running timerlat. Signed-off-by: Tomas Glozar --- tools/tracing/rtla/src/utils.c | 150 + too

[PATCH v3 4/6] rtla/timerlat: Add --deepest-idle-state for top

2024-08-15 Thread tglozar
From: Tomas Glozar Add option to limit deepest idle state on CPUs where timerlat is running for the duration of the workload. Signed-off-by: Tomas Glozar --- tools/tracing/rtla/src/timerlat_top.c | 42 ++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/to

[PATCH v3 2/6] rtla: Add optional dependency on libcpupower

2024-08-15 Thread tglozar
From: Tomas Glozar If libcpupower is present, set HAVE_LIBCPUPOWER_SUPPORT macro to allow features depending on libcpupower in rtla. Signed-off-by: Tomas Glozar --- tools/tracing/rtla/Makefile| 2 ++ tools/tracing/rtla/Makefile.config | 10 ++ 2 files changed, 12 insertions(+)

[PATCH v3 1/6] tools/build: Add libcpupower dependency detection

2024-08-15 Thread tglozar
From: Tomas Glozar Add the ability to detect the presence of libcpupower on a system to the Makefiles in tools/build. Signed-off-by: Tomas Glozar --- tools/build/Makefile.feature | 1 + tools/build/feature/Makefile | 4 2 files changed, 5 insertions(+) diff --git a/tools/build/Makefile.f

[PATCH v3 0/6] rtla: Support idle state disabling via libcpupower in timerlat

2024-08-15 Thread tglozar
From: Tomas Glozar rtla-timerlat allows reducing latency on wake up from idle by setting /dev/cpu_dma_latency during the timerlat measurement. This has an effect on the idle states of all CPUs, including those which are not used by timerlat. Add option --deepest-idle-state that allows limiting

Re: [POC 7/7] livepatching: Remove per-state version

2024-08-15 Thread Petr Mladek
On Thu 2024-07-25 16:16:44, Miroslav Benes wrote: > On Fri, 10 Nov 2023, Petr Mladek wrote: > > > The livepatch state API was added to help with maintaining: > > > >+ changes done by livepatch callbasks > >+ lifetime of shadow variables > > > > The original API was hard to use. Both obje

Re: [PATCH RFC v3 13/13] uprobes: add speculative lockless VMA to inode resolution

2024-08-15 Thread Mateusz Guzik
On Tue, Aug 13, 2024 at 08:36:03AM -0700, Suren Baghdasaryan wrote: > On Mon, Aug 12, 2024 at 11:18 PM Mateusz Guzik wrote: > > > > On Mon, Aug 12, 2024 at 09:29:17PM -0700, Andrii Nakryiko wrote: > > > Now that files_cachep is SLAB_TYPESAFE_BY_RCU, we can safely access > > > vma->vm_file->f_inode

Re: [POC 2/7] livepatch: Allow to handle lifetime of shadow variables using the livepatch state

2024-08-15 Thread Petr Mladek
On Thu 2024-07-25 13:31:40, Miroslav Benes wrote: > > diff --git a/kernel/livepatch/state.c b/kernel/livepatch/state.c > > index 6693d808106b..4ec65afe3a43 100644 > > --- a/kernel/livepatch/state.c > > +++ b/kernel/livepatch/state.c > > @@ -198,11 +198,17 @@ void klp_release_states(struct klp_patch

Re: [PATCH v3 00/13] uprobes: RCU-protected hot path optimizations

2024-08-15 Thread Oleg Nesterov
On 08/12, Andrii Nakryiko wrote: > > ( In addition to previously posted first 8 patches, I'm sending 5 more as an > RFC for people to get the general gist of where this work heading and what > uprobe performance is now achievable. I think first 8 patches are ready to be > applied and I'd appreciate

Re: [PATCH] rust: add `module_params` macro

2024-08-15 Thread Andreas Hindborg
"Benno Lossin" writes: > On 05.08.24 12:55, Andreas Hindborg wrote: >> "Benno Lossin" writes: >>> On 02.08.24 12:27, Andreas Hindborg wrote: At a higher level where the bindings supply the parsing functions, we can decide that passing an argument without a value yields a default p

Re: [PATCH bpf-next v5 2/2] bpf: allow bpf_current_task_under_cgroup() with BPF_CGROUP_*

2024-08-15 Thread kernel test robot
Hi Matteo, kernel test robot noticed the following build errors: [auto build test ERROR on bpf-next/master] url: https://github.com/intel-lab-lkp/linux/commits/Matteo-Croce/bpf-enable-generic-kfuncs-for-BPF_CGROUP_-programs/20240815-000517 base: https://git.kernel.org/pub/scm/linux/kernel

Re: [PATCH 2/2] x86/vmware: Fix steal time clock under SEV

2024-08-15 Thread kernel test robot
Hi Alexey, kernel test robot noticed the following build errors: [auto build test ERROR on tip/x86/vmware] [also build test ERROR on linus/master v6.11-rc3 next-20240815] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '-

[PATCH v2] tracing: Allow boot instances to use reserve_mem boot memory

2024-08-15 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Allow boot instances to use memory reserved by the reserve_mem boot option. reserve_mem=12M:4096:trace trace_instance=boot_mapped@trace The above will allocate 12 megs with 4096 alignment and label it "trace". The second parameter will create a "boot_mapped" i

Re: [PATCH 2/2] x86/vmware: Fix steal time clock under SEV

2024-08-15 Thread kernel test robot
Hi Alexey, kernel test robot noticed the following build errors: [auto build test ERROR on tip/x86/vmware] [also build test ERROR on linus/master v6.11-rc3 next-20240815] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '-

Re: [PATCH RFC 0/3] Revert "virtio_net: rx enable premapped mode by default"

2024-08-15 Thread Darren Kenny
On Thursday, 2024-08-15 at 09:14:27 +02, Linux regression tracking (Thorsten Leemhuis) wrote: > [side note: the message I have been replying to at least when downloaded > from lore has two message-ids, one of them identical two a older > message, which is why this looks odd in the lore archives:

Re: [POC 0/7] livepatch: Make livepatch states, callbacks, and shadow variables work together

2024-08-15 Thread Petr Mladek
On Thu 2024-07-25 16:19:30, Miroslav Benes wrote: > On Fri, 10 Nov 2023, Josh Poimboeuf wrote: > > > On Fri, Nov 10, 2023 at 06:04:21PM +0100, Petr Mladek wrote: > > > This POC is a material for the discussion "Simplify Livepatch Callbacks, > > > Shadow Variables, and States handling" at LPC 2013,

Re: [PATCH] arm64: insn: Simulate nop and push instruction for better uprobe performance

2024-08-15 Thread Mark Rutland
On Wed, Aug 14, 2024 at 08:03:56AM +, Liao Chang wrote: > As Andrii pointed out, the uprobe/uretprobe selftest bench run into a > counterintuitive result that nop and push variants are much slower than > ret variant [0]. The root cause lies in the arch_probe_analyse_insn(), > which excludes 'no

[PATCH v3 11/11] fs/fuse/virtio_fs: allow idmapped mounts

2024-08-15 Thread Alexander Mikhalitsyn
Allow idmapped mounts for virtiofs. It's absolutely safe as for virtiofs we have the same feature negotiation mechanism as for classical fuse filesystems. This does not affect any existing setups anyhow. virtiofsd support: https://gitlab.com/virtio-fs/virtiofsd/-/merge_requests/245 Cc: Christian

Re: [PATCH v2 1/1] livepatch: Add using attribute to klp_func for using function show

2024-08-15 Thread Petr Mladek
On Wed 2024-08-14 22:23:21, zhang warden wrote: > > > > On Aug 14, 2024, at 00:05, Petr Mladek wrote: > > > > Alternative solution would be to store the pointer of struct klp_ops > > *ops into struct klp_func. Then using_show() could just check if > > the related struct klp_func in on top of th

Re: [PATCH] uprobes: Optimize the allocation of insn_slot for performance

2024-08-15 Thread Liao, Chang
在 2024/8/15 0:57, Andrii Nakryiko 写道: > On Tue, Aug 13, 2024 at 9:17 PM Liao, Chang wrote: >> >> >> >> 在 2024/8/13 1:49, Andrii Nakryiko 写道: >>> On Mon, Aug 12, 2024 at 4:11 AM Liao, Chang wrote: 在 2024/8/9 2:26, Andrii Nakryiko 写道: > On Thu, Aug 8, 2024 at 1:45 AM Liao

Re: [PATCH RFC 0/3] Revert "virtio_net: rx enable premapped mode by default"

2024-08-15 Thread Linux regression tracking (Thorsten Leemhuis)
[side note: the message I have been replying to at least when downloaded from lore has two message-ids, one of them identical two a older message, which is why this looks odd in the lore archives: https://lore.kernel.org/all/20240511031404.30903-1-xuanz...@linux.alibaba.com/] On 14.08.24 08:59, Mi