Re: linux-next: build warning after merge of the powerpc tree

2024-05-15 Thread Stephen Rothwell
Hi Michael, On Thu, 16 May 2024 12:42:01 +1000 Michael Ellerman wrote: > > Stephen Rothwell writes: > > > > After merging the powerpc tree, today's (it may have been yesterday's) > > linux-next build (powerpc allyesconfig) produced this warning: > > > > WARNING: modpost: vmlinux: section

Re: [PATCH 1/3] crypto: X25519 low-level primitives for ppc64le.

2024-05-15 Thread Michael Ellerman
Hi Danny, Danny Tsen writes: > Use the perl output of x25519-ppc64.pl from CRYPTOGAMs and added three > supporting functions, x25519_fe51_sqr_times, x25519_fe51_frombytes > and x25519_fe51_tobytes. For other algorithms we have checked-in the perl script and generated the code at runtime. Is

Re: linux-next: build warning after merge of the powerpc tree

2024-05-15 Thread Michael Ellerman
Stephen Rothwell writes: > Hi all, > > After merging the powerpc tree, today's (it may have been yesterday's) > linux-next build (powerpc allyesconfig) produced this warning: > > WARNING: modpost: vmlinux: section mismatch in reference: > fadump_setup_param_area+0x200 (section:

Re: [PATCH v3] kprobe/ftrace: bail out if ftrace was killed

2024-05-15 Thread Google
On Wed, 15 May 2024 15:18:08 -0700 Stephen Brennan wrote: > Masami Hiramatsu (Google) writes: > > On Thu, 2 May 2024 01:35:16 +0800 > > Guo Ren wrote: > > > >> On Thu, May 2, 2024 at 12:30 AM Stephen Brennan > >> wrote: > >> > > >> > If an error happens in ftrace, ftrace_kill() will prevent

Re: [PATCH v3] kprobe/ftrace: bail out if ftrace was killed

2024-05-15 Thread Stephen Brennan
Masami Hiramatsu (Google) writes: > On Thu, 2 May 2024 01:35:16 +0800 > Guo Ren wrote: > >> On Thu, May 2, 2024 at 12:30 AM Stephen Brennan >> wrote: >> > >> > If an error happens in ftrace, ftrace_kill() will prevent disarming >> > kprobes. Eventually, the ftrace_ops associated with the

Re: kswapd0: page allocation failure: order:0, mode:0x820(GFP_ATOMIC), nodemask=(null),cpuset=/,mems_allowed=0 (Kernel v6.5.9, 32bit ppc)

2024-05-15 Thread Yu Zhao
On Wed, May 15, 2024 at 2:45 PM Erhard Furtner wrote: > > On Wed, 8 May 2024 20:21:11 +0200 > Erhard Furtner wrote: > > > Greetings! > > > > Got that on my dual CPU PowerMac G4 DP shortly after boot. This does not > > happen every time at bootup though: > > > > [...] > > kswapd0: page

Re: [PATCH v15 00/16] Add audio support in v4l2 framework

2024-05-15 Thread Nicolas Dufresne
Hi, GStreamer hat on ... Le mercredi 15 mai 2024 à 12:46 +0200, Jaroslav Kysela a écrit : > On 15. 05. 24 12:19, Takashi Iwai wrote: > > On Wed, 15 May 2024 11:50:52 +0200, > > Jaroslav Kysela wrote: > > > > > > On 15. 05. 24 11:17, Hans Verkuil wrote: > > > > Hi Jaroslav, > > > > > > > > On

Re: [PATCH v2 1/1] arch/fault: don't print logs for pte marker poison errors

2024-05-15 Thread Borislav Petkov
On Wed, May 15, 2024 at 12:19:16PM -0700, Axel Rasmussen wrote: > An unprivileged process can allocate a VMA, use the userfaultfd API to > install one of these PTE markers, and then register a no-op SIGBUS > handler. Now it can access that address in a tight loop, Maybe the userfaultfd should not

Re: [PATCH v2 1/1] arch/fault: don't print logs for pte marker poison errors

2024-05-15 Thread Axel Rasmussen
On Wed, May 15, 2024 at 11:33 AM Borislav Petkov wrote: > > On Wed, May 15, 2024 at 10:33:03AM -0700, Axel Rasmussen wrote: > > Right, the goal is to still have the process get a SIGBUS, but to > > avoid the "MCE error" log message. The basic issue is, unprivileged > > users can set these markers

Re: [PATCH v2 1/1] arch/fault: don't print logs for pte marker poison errors

2024-05-15 Thread Borislav Petkov
On Wed, May 15, 2024 at 10:33:03AM -0700, Axel Rasmussen wrote: > Right, the goal is to still have the process get a SIGBUS, but to > avoid the "MCE error" log message. The basic issue is, unprivileged > users can set these markers up, and thereby completely spam up the > log. What is the real

Re: [PATCH v2 1/1] arch/fault: don't print logs for pte marker poison errors

2024-05-15 Thread Axel Rasmussen
On Wed, May 15, 2024 at 3:54 AM Oscar Salvador wrote: > > On Wed, May 15, 2024 at 12:41:42PM +0200, Borislav Petkov wrote: > > On Fri, May 10, 2024 at 11:29:26AM -0700, Axel Rasmussen wrote: > > > @@ -3938,7 +3938,7 @@ static vm_fault_t handle_pte_marker(struct vm_fault > > > *vmf) > > > > > >

Re: [PATCH 2/3] crypto: X25519 core functions for ppc64le

2024-05-15 Thread Andy Polyakov
Thanks for the info.  I should be able to do it.  I was hoping an assembly guru like you can show me some tricks here if there is :) No tricks in cswap, it's as straightforward as it gets, so go ahead :-)

Re: [PATCH v15 00/16] Add audio support in v4l2 framework

2024-05-15 Thread Pierre-Louis Bossart
On 5/9/24 06:13, Jaroslav Kysela wrote: > On 09. 05. 24 12:44, Shengjiu Wang wrote: mem2mem is just like the decoder in the compress pipeline. which is one of the components in the pipeline. >>> >>> I was thinking of loopback with endpoints using compress streams, >>> without physical

[PATCHv4 3/9] ASoC: fsl-asoc-card: add compatibility to use 2 codecs in dai-links

2024-05-15 Thread Elinor Montmasson
Adapt the driver to work with configurations using two codecs or more. Modify fsl_asoc_card_probe() to handle use cases where 2 codecs are given in the device tree. This will be needed for the generic codec case. Use cases using one codec will ignore any given codecs other than the first.

[PATCHv4 9/9] ASoC: dt-bindings: fsl-asoc-card: add compatible for generic codec

2024-05-15 Thread Elinor Montmasson
Add documentation about new dts bindings following new support for compatible "fsl,imx-audio-generic". Some CPU DAI don't require a real audio codec. The new compatible "fsl,imx-audio-generic" allows using the driver with codec drivers SPDIF DIT and SPDIF DIR as dummy codecs. It also allows using

[PATCHv4 0/9] ASoC: fsl-asoc-card: compatibility integration of a generic codec use case for use with S/PDIF controller

2024-05-15 Thread Elinor Montmasson
Hello, This is the v4 of the series of patch aiming to make the machine driver "fsl-asoc-card" compatible with use cases where there is no real codec driver. It proposes to use the "spdif_receiver" and "spdif_transmitter" drivers instead of the dummy codec. This is a first step in using the

[PATCHv4 4/9] ASoC: fsl-asoc-card: add new compatible for a generic codec use case

2024-05-15 Thread Elinor Montmasson
Add the new compatible "fsl,imx-audio-generic" for a generic codec use case. It allows using the fsl-asoc-card driver with the spdif_receiver and spdif_transmitter codec drivers used as dummy codecs. It can be used for cases where there is no real codec or codecs which do not require declaring

[PATCHv4 5/9] ASoC: fsl-asoc-card: set generic codec as clock provider

2024-05-15 Thread Elinor Montmasson
The default dai format defined by DAI_FMT_BASE doesn't set if the codec is consumer or provider of the bit and frame clocks. S/PDIF DIR usually converts audio signal to an asynchronous I2S/PCM stream, and doesn't consume a bit or frame clock. As S/PDIF DIR and DIT are used as codecs for the

[PATCHv4 1/9] ASoC: fsl-asoc-card: add support for dai links with multiple codecs

2024-05-15 Thread Elinor Montmasson
Add support for dai links using multiple codecs for multi-codec use cases. Signed-off-by: Elinor Montmasson Co-authored-by: Philip-Dylan Gleonec --- sound/soc/fsl/fsl-asoc-card.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git

[PATCHv4 7/9] ASoC: fsl-asoc-card: add DT clock "cpu_sysclk" with generic codec

2024-05-15 Thread Elinor Montmasson
Add an optional DT clock "cpu_sysclk" to get the CPU DAI system-clock frequency when using the generic codec. It is set for both Tx and Rx. The way the frequency value is used is up to the CPU DAI driver implementation. Signed-off-by: Elinor Montmasson --- sound/soc/fsl/fsl-asoc-card.c | 6

[PATCHv4 6/9] ASoC: fsl-asoc-card: add use of devicetree TDM slot properties

2024-05-15 Thread Elinor Montmasson
Add use of optional TDM slot properties "dai-tdm-slot-num" and "dai-tdm-slot-width" through snd_soc_of_parse_tdm_slot(). They allow setting a custom TDM slot width in bits and number of slots for the CPU DAI when using the generic codec. Signed-off-by: Elinor Montmasson ---

[PATCHv4 2/9] ASoC: fsl-asoc-card: add second dai link component for codecs

2024-05-15 Thread Elinor Montmasson
Add a second dai link component for codecs that will be used for the generic codec use case. It will use spdif_receiver and spdif_transmitter drivers as dummy codec drivers, needing 2 codecs slots for the links. To prevent deferring in use cases using only one codec, also set by default the

[PATCHv4 8/9] ASoC: fsl-asoc-card: add DT property "cpu-system-clock-direction-out"

2024-05-15 Thread Elinor Montmasson
Add new optional DT property "cpu-system-clock-direction-out" to set sysclk direction as "out" for the CPU DAI when using the generic codec. It is set for both Tx and Rx. If not set, the direction is "in". The way the direction value is used is up to the CPU DAI driver implementation.

Re: [PATCH 2/3] crypto: X25519 core functions for ppc64le

2024-05-15 Thread Danny Tsen
Hi Andy, Thanks for the info.  I should be able to do it.  I was hoping an assembly guru like you can show me some tricks here if there is :) Thanks. -Danny On 5/15/24 8:33 AM, Andy Polyakov wrote: +static void cswap(fe51 p, fe51 q, unsigned int bit) +{ +    u64 t, i; +    u64 c = 0 -

Re: [PATCH v15 00/16] Add audio support in v4l2 framework

2024-05-15 Thread Shengjiu Wang
On Wed, May 15, 2024 at 6:46 PM Jaroslav Kysela wrote: > > On 15. 05. 24 12:19, Takashi Iwai wrote: > > On Wed, 15 May 2024 11:50:52 +0200, > > Jaroslav Kysela wrote: > >> > >> On 15. 05. 24 11:17, Hans Verkuil wrote: > >>> Hi Jaroslav, > >>> > >>> On 5/13/24 13:56, Jaroslav Kysela wrote: >

Re: [PATCH 2/3] crypto: X25519 core functions for ppc64le

2024-05-15 Thread Andy Polyakov
+static void cswap(fe51 p, fe51 q, unsigned int bit) +{ +    u64 t, i; +    u64 c = 0 - (u64) bit; + +    for (i = 0; i < 5; ++i) { +    t = c & (p[i] ^ q[i]); +    p[i] ^= t; +    q[i] ^= t; +    } +} The "c" in cswap stands for "constant-time," and the problem is that

Re: [PATCH 2/3] crypto: X25519 core functions for ppc64le

2024-05-15 Thread Danny Tsen
Hi Andy, Points taken.  And much appreciate for the help. Thanks. -Danny On 5/15/24 3:29 AM, Andy Polyakov wrote: Hi, +static void cswap(fe51 p, fe51 q, unsigned int bit) +{ +    u64 t, i; +    u64 c = 0 - (u64) bit; + +    for (i = 0; i < 5; ++i) { +    t = c & (p[i] ^ q[i]); +   

Re: [PATCH 1/3] crypto: X25519 low-level primitives for ppc64le.

2024-05-15 Thread Danny Tsen
See inline. On 5/15/24 4:06 AM, Andy Polyakov wrote: Hi, +SYM_FUNC_START(x25519_fe51_sqr_times) ... + +.Lsqr_times_loop: ... + +    std    9,16(3) +    std    10,24(3) +    std    11,32(3) +    std    7,0(3) +    std    8,8(3) +    bdnz    .Lsqr_times_loop I see no reason for why the stores

Re: [PATCH 1/3] crypto: X25519 low-level primitives for ppc64le.

2024-05-15 Thread Danny Tsen
Thank you Andy.  Will fix this. On 5/15/24 3:11 AM, Andy Polyakov wrote: Hi, Couple of remarks inline. +# [1] https://www.openssl.org/~appro/cryptogams/ https://github.com/dot-asm/cryptogams/ is arguably better reference. +SYM_FUNC_START(x25519_fe51_mul) +.align    5 The goal is to

Re: [PATCH 1/3] crypto: X25519 low-level primitives for ppc64le.

2024-05-15 Thread Andy Polyakov
Hi, +SYM_FUNC_START(x25519_fe51_sqr_times) ... + +.Lsqr_times_loop: ... + + std 9,16(3) + std 10,24(3) + std 11,32(3) + std 7,0(3) + std 8,8(3) + bdnz.Lsqr_times_loop I see no reason for why the stores can't be moved outside the loop

Re: [PATCH 2/3] crypto: X25519 core functions for ppc64le

2024-05-15 Thread Andy Polyakov
Hi, +static void cswap(fe51 p, fe51 q, unsigned int bit) +{ + u64 t, i; + u64 c = 0 - (u64) bit; + + for (i = 0; i < 5; ++i) { + t = c & (p[i] ^ q[i]); + p[i] ^= t; + q[i] ^= t; + } +} The "c" in cswap stands for

Re: [PATCH 1/3] crypto: X25519 low-level primitives for ppc64le.

2024-05-15 Thread Andy Polyakov
Hi, Couple of remarks inline. +# [1] https://www.openssl.org/~appro/cryptogams/ https://github.com/dot-asm/cryptogams/ is arguably better reference. +SYM_FUNC_START(x25519_fe51_mul) +.align 5 The goal is to align the label, not the first instruction after the directive. It's not a

Re: [PATCH v2 1/1] arch/fault: don't print logs for pte marker poison errors

2024-05-15 Thread Oscar Salvador
On Wed, May 15, 2024 at 12:41:42PM +0200, Borislav Petkov wrote: > On Fri, May 10, 2024 at 11:29:26AM -0700, Axel Rasmussen wrote: > > @@ -3938,7 +3938,7 @@ static vm_fault_t handle_pte_marker(struct vm_fault > > *vmf) > > > > /* Higher priority than uffd-wp when data corrupted */ > >

Re: [PATCH v2 1/1] arch/fault: don't print logs for pte marker poison errors

2024-05-15 Thread Borislav Petkov
On Fri, May 10, 2024 at 11:29:26AM -0700, Axel Rasmussen wrote: > @@ -3938,7 +3938,7 @@ static vm_fault_t handle_pte_marker(struct vm_fault > *vmf) > > /* Higher priority than uffd-wp when data corrupted */ > if (marker & PTE_MARKER_POISONED) > - return

Re: [PATCH v15 00/16] Add audio support in v4l2 framework

2024-05-15 Thread Jaroslav Kysela
On 15. 05. 24 12:19, Takashi Iwai wrote: On Wed, 15 May 2024 11:50:52 +0200, Jaroslav Kysela wrote: On 15. 05. 24 11:17, Hans Verkuil wrote: Hi Jaroslav, On 5/13/24 13:56, Jaroslav Kysela wrote: On 09. 05. 24 13:13, Jaroslav Kysela wrote: On 09. 05. 24 12:44, Shengjiu Wang wrote: mem2mem

Re: [PATCH v2 1/1] arch/fault: don't print logs for pte marker poison errors

2024-05-15 Thread Oscar Salvador
On Tue, May 14, 2024 at 03:34:24PM -0600, Peter Xu wrote: > The question is whether we can't. > > Now we reserved a swp entry just for hwpoison and it makes sense only > because we cached the poisoned pfn inside. My long standing question is > why do we ever need that pfn after all. If we don't

Re: [PATCH v15 00/16] Add audio support in v4l2 framework

2024-05-15 Thread Takashi Iwai
On Wed, 15 May 2024 11:50:52 +0200, Jaroslav Kysela wrote: > > On 15. 05. 24 11:17, Hans Verkuil wrote: > > Hi Jaroslav, > > > > On 5/13/24 13:56, Jaroslav Kysela wrote: > >> On 09. 05. 24 13:13, Jaroslav Kysela wrote: > >>> On 09. 05. 24 12:44, Shengjiu Wang wrote: > >> mem2mem is just like

Re: [PATCH v15 00/16] Add audio support in v4l2 framework

2024-05-15 Thread Jaroslav Kysela
On 15. 05. 24 11:17, Hans Verkuil wrote: Hi Jaroslav, On 5/13/24 13:56, Jaroslav Kysela wrote: On 09. 05. 24 13:13, Jaroslav Kysela wrote: On 09. 05. 24 12:44, Shengjiu Wang wrote: mem2mem is just like the decoder in the compress pipeline. which is one of the components in the pipeline. I

Re: [PATCH v15 00/16] Add audio support in v4l2 framework

2024-05-15 Thread Hans Verkuil
Hi Jaroslav, On 5/13/24 13:56, Jaroslav Kysela wrote: > On 09. 05. 24 13:13, Jaroslav Kysela wrote: >> On 09. 05. 24 12:44, Shengjiu Wang wrote: > mem2mem is just like the decoder in the compress pipeline. which is > one of the components in the pipeline. I was thinking of

linux-next: build warning after merge of the powerpc tree

2024-05-15 Thread Stephen Rothwell
Hi all, After merging the powerpc tree, today's (it may have been yesterday's) linux-next build (powerpc allyesconfig) produced this warning: WARNING: modpost: vmlinux: section mismatch in reference: fadump_setup_param_area+0x200 (section: .text.fadump_setup_param_area) ->