Re: [PATCH v4 1/2] LoongArch: KVM: Add steal time support in kvm side

2024-07-05 Thread maobibo
Huacai, On 2024/7/6 上午11:00, Huacai Chen wrote: Hi, Bibo, On Fri, May 24, 2024 at 3:38 PM Bibo Mao wrote: Steal time feature is added here in kvm side, VM can search supported features provided by KVM hypervisor, feature KVM_FEATURE_STEAL_TIME is added here. Like x86, steal time structure is

[PATCH v3] init: staging: Fix missing warning/taint on builtin code

2024-07-05 Thread Ágatha Isabelle Chris Moreira Guedes
Fix the absence of warning message and kernel tainting when initializing drivers from the `drivers/staging` subtree from initcalls (when configured as built-in). When such a driver is built as module and the module is loaded, the `load_module()` function taints the kernel to signal code of unknown

Re: [PATCH v4 1/2] LoongArch: KVM: Add steal time support in kvm side

2024-07-05 Thread Huacai Chen
Hi, Bibo, On Fri, May 24, 2024 at 3:38 PM Bibo Mao wrote: > > Steal time feature is added here in kvm side, VM can search supported > features provided by KVM hypervisor, feature KVM_FEATURE_STEAL_TIME > is added here. Like x86, steal time structure is saved in guest memory, > one hypercall funct

Re: [PATCHv2 bpf-next 1/9] uprobe: Add support for session consumer

2024-07-05 Thread Kees Cook
On Fri, Jul 05, 2024 at 09:10:36AM +0200, Peter Zijlstra wrote: > On Wed, Jul 03, 2024 at 01:36:19PM -0700, Kees Cook wrote: > > > Yes, please use struct_size_t(). This is exactly what it was designed for. > > Kees, please, just let up, not going to happen. I'm getting really fed > up having to e

[PATCH] pwm: Make info in traces about affected pwm more useful

2024-07-05 Thread Uwe Kleine-König
The hashed pointer isn't useful to identify the pwm device. Instead store and emit chipid and hwpwm. Signed-off-by: Uwe Kleine-König --- include/trace/events/pwm.h | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/trace/events/pwm.h b/include/trace/events/pwm

Re: [PATCH 0/2] Support userspace hypercalls for TDX

2024-07-05 Thread Tim Merrifield
On Thu, Jul 04, 2024 at 03:05:05PM +0200, Peter Zijlstra wrote: > And how are we to ascertain the software using these hooks is deemed > secure? What security risks are there for the kernel if a malicious > userspace process asks for these rights? > > The kernel must assume malice on the part of u

[PATCH] remoteproc: Remove unneeded check in elf_strtbl_add()

2024-07-05 Thread Aleksandr Mishin
In elf_strtbl_add() pointer 'strtab', which value is a result of shifting after dereference of another pointer 'ehdr', is compared to NULL, which is useless. Fix this issue by removing unneeded check. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: abc72b646066 ("remotep

Re: [PATCH 0/2] Support userspace hypercalls for TDX

2024-07-05 Thread Tim Merrifield
Thanks for the response, Dave. On Wed, Jul 03, 2024 at 05:18:22PM -0700, Dave Hansen wrote: > > Could we please be frank and transparent about what you actually want > here and how you expect this mechanism to be used? > Sorry for being unclear. open-vm-tools is currently broken on TDX and the

Re: [RFC PATCH v2] ptp: Add vDSO-style vmclock support

2024-07-05 Thread David Woodhouse
On Fri, 2024-07-05 at 10:12 +0200, Peter Hilber wrote: > On 03.07.24 12:40, David Woodhouse wrote: > > [...] > > > > > > > This is what I currently have for 'struct vmclock_abi' that I'd like to > > persuade you to adopt. I need to tweak it some more, for at least the > > following reasons, as

Re: [PATCH for-next v3] tracing/kprobes: Add symbol counting check when module loads

2024-07-05 Thread Steven Rostedt
On Fri, 5 Jul 2024 16:11:25 +0900 "Masami Hiramatsu (Google)" wrote: > From: Masami Hiramatsu (Google) > > Currently, kprobe event checks whether the target symbol name is unique > or not, so that it does not put a probe on an unexpected place. But this > skips the check if the target is on a

Re: [PATCH v2] init: staging: Fix missing warning/taint on builtin code

2024-07-05 Thread Dan Carpenter
On Thu, Jul 04, 2024 at 09:20:49PM -0300, Ágatha Isabelle Chris Moreira Guedes wrote: > +#ifdef CONFIG_STAGING > +/** > + * staging_init_taint() - We need to taint the kernel whenever staging code > + * is initialized (from built-in drivers) or loaded (as modules) and issue > + * a warning the fir

Re: [PATCH v2] trace/pid_list: Change gfp flags in pid_list_fill_irq()

2024-07-05 Thread Google
On Thu, 4 Jul 2024 16:02:26 +0100 Levi Yun wrote: > From: "levi.yun" > > pid_list_fill_irq() runs via irq_work. > When CONFIG_PREEMPT_RT is disabled, it would run in irq_context. > so it shouldn't sleep while memory allocation. > > Change gfp flags from GFP_KERNEL to GFP_NOWAIT to prevent sle

Re: [PATCHv2 bpf-next 1/9] uprobe: Add support for session consumer

2024-07-05 Thread Jiri Olsa
On Fri, Jul 05, 2024 at 05:35:44PM +0900, Masami Hiramatsu wrote: SNIP > > > > > Also, if we can set session enabled by default, and skip ret_handler > > > > > by handler's > > > > > return value, it is more simpler. (If handler returns a specific > > > > > value, skip ret_handler) > > > > > >

Re: [PATCHv2 bpf-next 1/9] uprobe: Add support for session consumer

2024-07-05 Thread Jiri Olsa
On Wed, Jul 03, 2024 at 02:48:28PM -0700, Andrii Nakryiko wrote: > On Wed, Jul 3, 2024 at 10:13 AM Jiri Olsa wrote: > > > > On Tue, Jul 02, 2024 at 01:51:28PM -0700, Andrii Nakryiko wrote: > > > > SNIP > > > > > > #ifdef CONFIG_UPROBES > > > > @@ -80,6 +83,12 @@ struct uprobe_task { > > > >

Re: [PATCH RFT] arm64: dts: qcom: sm8350: Reenable crypto & cryptobam

2024-07-05 Thread Luca Weiss
On Wed Mar 27, 2024 at 10:34 PM CET, Konrad Dybcio wrote: > On 16.02.2024 11:36 AM, Luca Weiss wrote: > > On Mon Jan 8, 2024 at 11:45 PM CET, Dmitry Baryshkov wrote: > >> On Mon, 8 Jan 2024 at 16:23, Luca Weiss wrote: > >>> > >>> On Mon Jan 8, 2024 at 3:18 PM CET, Konrad Dybcio wrote: > On 8.

Re: [PATCH] vdpa_sim_blk: add `capacity` module parameter

2024-07-05 Thread Stefano Garzarella
On Fri, Jul 05, 2024 at 07:30:51AM GMT, Michael S. Tsirkin wrote: On Fri, Jul 05, 2024 at 01:28:21PM +0200, Stefano Garzarella wrote: The vDPA block simulator always allocated a 128 MiB ram-disk, but some filesystems (e.g. XFS) may require larger minimum sizes (see https://issues.redhat.com/brow

[PATCH v2 1/2] arm64: dts: qcom: sm7225-fairphone-fp4: Add PMK8003 thermals

2024-07-05 Thread Luca Weiss
Configure the thermals for the XO_THERM thermistor connected to the PMK8003 (which is called PMK8350 in software). The ADC configuration for PMK8350_ADC7_AMUX_THM1_100K_PU has already been added in the past. The trip points can really only be considered as placeholders, more configuration with co

[PATCH v2 2/2] arm64: dts: qcom: sm7225-fairphone-fp4: Add PM6150L thermals

2024-07-05 Thread Luca Weiss
Configure the thermals for the PA_THERM1, MSM_THERM, PA_THERM0, RFC_CAM_THERM, CAM_FLASH_THERM and QUIET_THERM thermistors connected to PM6150L. Due to hardware constraints we can only register 4 zones with pm6150l_adc_tm, the other 2 we can register via generic-adc-thermal. The trip points can r

[PATCH v2 0/2] More thermal configuration for Fairphone 4

2024-07-05 Thread Luca Weiss
Add the thermal configuration for the thermistors connected to PMK8003 and PM6150L. With that all the external thermistors on the phone should be present in the dts. Signed-off-by: Luca Weiss --- Changes in v2: - Remove polling-delay/polling-delay-passive=0 - Reorder props, e.g. put qcom,ratiomet

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

2024-07-05 Thread Andreas Hindborg
Hi Adam, "Andreas Hindborg" writes: > From: Andreas Hindborg > > This patch includes changes required for Rust kernel modules to utilize > module parameters. This code implements read only support for integer > types without `sysfs` support. > > This code is a reduced and updated version of cod

Re: [PATCH] vdpa_sim_blk: add `capacity` module parameter

2024-07-05 Thread Michael S. Tsirkin
On Fri, Jul 05, 2024 at 01:28:21PM +0200, Stefano Garzarella wrote: > The vDPA block simulator always allocated a 128 MiB ram-disk, but some > filesystems (e.g. XFS) may require larger minimum sizes (see > https://issues.redhat.com/browse/RHEL-45951). > > So to allow us to test these filesystems,

[PATCH] vdpa_sim_blk: add `capacity` module parameter

2024-07-05 Thread Stefano Garzarella
The vDPA block simulator always allocated a 128 MiB ram-disk, but some filesystems (e.g. XFS) may require larger minimum sizes (see https://issues.redhat.com/browse/RHEL-45951). So to allow us to test these filesystems, let's add a module parameter to control the size of the simulated virtio-blk d

[PATCH] rust: add `module_params` macro

2024-07-05 Thread Andreas Hindborg
From: Andreas Hindborg This patch includes changes required for Rust kernel modules to utilize module parameters. This code implements read only support for integer types without `sysfs` support. This code is a reduced and updated version of code by Adam available in the original `rust` branch [

Re: [PATCH v2] init: staging: Fix missing warning/taint on builtin code

2024-07-05 Thread Ágatha Isabelle Chris Moreira Guedes
Hello, Please disregard this one, there will be a v3 soon. There were some oversights on my side regarding some review points, and also the code itself. On Thu, Jul 04, 2024 at 09:20:49PM GMT, Ágatha Isabelle Chris Moreira Guedes wrote: > diff --git a/init/main.c b/init/main.c > index 206acdde5

[PATCH 2/2] virtio: fix vq # when vq skipped

2024-07-05 Thread Michael S. Tsirkin
virtio balloon communicates to the core that in some configurations vq #s are non-contiguous by setting name pointer to NULL. Unfortunately, core then turned around and just made them contiguous again. Result is that driver is out of spec. Implement what the API was supposed to do in the 1st plac

[PATCH 1/2] virtio_balloon: add work around for out of spec QEMU

2024-07-05 Thread Michael S. Tsirkin
QEMU implemented the configuration VIRTIO_BALLOON_F_REPORTING && ! VIRTIO_BALLOON_F_FREE_PAGE_HINT incorrectly: it then uses vq3 for reporting, spec says it is always 4. This is masked by a corresponding bug in driver: add a work around as I'm going to try and fix the driver bug. Signed-o

Re: [PATCH v4 0/3] x86/sgx: Fix two data races in EAUG/EREMOVE flows

2024-07-05 Thread Jarkko Sakkinen
On Fri Jul 5, 2024 at 10:45 AM EEST, Dmitrii Kuvaiskii wrote: > SGX runtimes such as Gramine may implement EDMM-based lazy allocation of > enclave pages and may support MADV_DONTNEED semantics [1]. The former > implies #PF-based page allocation, and the latter implies the usage of > SGX_IOC_ENCLAVE

Re: [PATCHv2 bpf-next 1/9] uprobe: Add support for session consumer

2024-07-05 Thread Google
On Wed, 3 Jul 2024 14:43:27 -0700 Andrii Nakryiko wrote: > On Wed, Jul 3, 2024 at 9:09 AM Jiri Olsa wrote: > > > > On Tue, Jul 02, 2024 at 05:13:38PM -0700, Andrii Nakryiko wrote: > > > On Tue, Jul 2, 2024 at 4:55 PM Masami Hiramatsu > > > wrote: > > > > > > > > Hi Jiri, > > > > > > > > On Mon

Re: [RFC PATCH v2] ptp: Add vDSO-style vmclock support

2024-07-05 Thread Peter Hilber
On 03.07.24 12:40, David Woodhouse wrote: [...] > > > This is what I currently have for 'struct vmclock_abi' that I'd like to > persuade you to adopt. I need to tweak it some more, for at least the > following reasons, as well as any more you can see: > > • size isn't big enough for 64KiB pag

[PATCH v4 0/3] x86/sgx: Fix two data races in EAUG/EREMOVE flows

2024-07-05 Thread Dmitrii Kuvaiskii
SGX runtimes such as Gramine may implement EDMM-based lazy allocation of enclave pages and may support MADV_DONTNEED semantics [1]. The former implies #PF-based page allocation, and the latter implies the usage of SGX_IOC_ENCLAVE_REMOVE_PAGES ioctl. EDMM-based lazy allocation and MADV_DONTNEED sem

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

2024-07-05 Thread Dmitrii Kuvaiskii
Two enclave threads may try to add and remove the same enclave page simultaneously (e.g., if the SGX runtime supports both lazy allocation and MADV_DONTNEED semantics). Consider some enclave page added to the enclave. User space decides to temporarily remove this page (e.g., emulating the MADV_DONT

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

2024-07-05 Thread Dmitrii Kuvaiskii
SGX_ENCL_PAGE_BEING_RECLAIMED flag is set when the enclave page is being reclaimed (moved to the backing store). This flag however has two logical meanings: 1. Don't attempt to load the enclave page (the page is busy). 2. Don't attempt to remove the PCMD page corresponding to this enclave page

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

2024-07-05 Thread Dmitrii Kuvaiskii
Imagine an mmap()'d file. Two threads touch the same address at the same time and fault. Both allocate a physical page and race to install a PTE for that page. Only one will win the race. The loser frees its page, but still continues handling the fault as a success and returns VM_FAULT_NOPAGE from

[PATCH v2] arm64: dts: qcom: sm6350: Add missing qcom,non-secure-domain property

2024-07-05 Thread Luca Weiss
By default the DSP domains are secure, add the missing qcom,non-secure-domain property to mark them as non-secure. Fixes: efc33c969f23 ("arm64: dts: qcom: sm6350: Add ADSP nodes") Fixes: 8eb5287e8a42 ("arm64: dts: qcom: sm6350: Add CDSP nodes") Reviewed-by: Dmitry Baryshkov Signed-off-by: Luca We

Re: [PATCH] arm64: dts: qcom: sm6350: Add missing qcom,non-secure-domain property

2024-07-05 Thread Luca Weiss
On Wed Jul 3, 2024 at 12:43 PM CEST, Dmitry Baryshkov wrote: > On Wed, Jul 03, 2024 at 09:03:01AM GMT, Luca Weiss wrote: > > By default the DSP domains are non secure, add the missing > > nit: secure I did copy paste it from previous commits but I guess they're wrong too. I'll fix it! > > With th

Re: [PATCH v8 2/5] remoteproc: Add TEE support

2024-07-05 Thread Arnaud POULIQUEN
On 7/4/24 17:32, Mathieu Poirier wrote: > On Thu, Jul 04, 2024 at 10:05:24AM +0200, Arnaud POULIQUEN wrote: >> >> >> On 7/3/24 17:14, Mathieu Poirier wrote: >>> On Wed, Jul 03, 2024 at 09:19:44AM +0200, Arnaud POULIQUEN wrote: Hello Mathieu On 7/2/24 18:44, Mathieu Poirier wrote:

[PATCH for-next v3] tracing/kprobes: Add symbol counting check when module loads

2024-07-05 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Currently, kprobe event checks whether the target symbol name is unique or not, so that it does not put a probe on an unexpected place. But this skips the check if the target is on a module because the module may not be loaded. To fix this issue, this patch checks

Re: [PATCHv2 bpf-next 1/9] uprobe: Add support for session consumer

2024-07-05 Thread Peter Zijlstra
On Wed, Jul 03, 2024 at 01:36:19PM -0700, Kees Cook wrote: > Yes, please use struct_size_t(). This is exactly what it was designed for. Kees, please, just let up, not going to happen. I'm getting really fed up having to endlessly repeat what a piece of shite struct_size() is. Put your time and e

Re: [PATCH] tracing/kprobes: Add missing check for skipping symbol counting logic

2024-07-05 Thread Google
Hi Nikolay, Thanks for the patch! But this remind me that I forgot to send a patch which can solve this issue more generically. https://lore.kernel.org/all/171338679446.616570.14456856697191949345.stgit@devnote2/ Why I did not send it...? Anyway let me send the update. Thank you, On Thu, 4 J