All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [LTP] [RFC PATCH] API: Allow testing of kernel features in development
From: Cyril Hrubis @ 2022-01-05 15:57 UTC (permalink / raw)
  To: Richard Palethorpe; +Cc: ltp
In-Reply-To: <20211221113042.21357-1-rpalethorpe@suse.com>

Hi!
> Add an unstable kernel ABI flag and a runtest file for unstable
> tests. This means we can add tests which are likely to be broken by
> changes in the kernel ABI. Without disrupting LTP releases which are
> required to be stable.
> 
> Users who require stability can filter the tests with this flag
> or not schedule the unstable runtest file(s).
> 
> Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
> ---
> 
> How about adding this to the fanotify22 patch?
> 
>  include/tst_test.h        | 12 ++++++++++++
>  lib/tst_test.c            |  6 ++++++
>  runtest/syscalls-unstable |  3 +++
>  3 files changed, 21 insertions(+)
>  create mode 100644 runtest/syscalls-unstable
> 
> diff --git a/include/tst_test.h b/include/tst_test.h
> index 450ddf086..ff31e972e 100644
> --- a/include/tst_test.h
> +++ b/include/tst_test.h
> @@ -174,6 +174,18 @@ struct tst_test {
>  	int skip_in_lockdown:1;
>  	int skip_in_compat:1;
>  
> +	/*
> +	 * Test is for a feature that has not been added to the stable
> +	 * kernel ABI. That is, it's for a feature only available in
> +	 * linux-next, an RC or some other development branch.
> +	 *
> +	 * This string should be set to some text describing the
> +	 * kernel branch and version the test was developed
> +	 * against. e.g. "5.16 RC2", "linux-next-20211220",
> +	 * "net-next".
> +	 */
> +	const char *const unstable_abi_version;

I would rather call this 'remove_after_release' or 'remove_after_kernel_release' but that is very minor.

>  	/*
>  	 * The skip_filesystem is a NULL terminated list of filesystems the
>  	 * test does not support. It can also be used to disable whole class of
> diff --git a/lib/tst_test.c b/lib/tst_test.c
> index 9b51bb5be..babb250d0 100644
> --- a/lib/tst_test.c
> +++ b/lib/tst_test.c
> @@ -1013,6 +1013,12 @@ static void do_setup(int argc, char *argv[])
>  	if (!tst_test)
>  		tst_brk(TBROK, "No tests to run");
>  
> +	if (tst_test->unstable_abi_version) {
> +		tst_res(TINFO,
> +			"This test was developed against pre-release kernel: %s",
> +			tst_test->unstable_abi_version);
> +	}
> +
>  	if (tst_test->tconf_msg)
>  		tst_brk(TCONF, "%s", tst_test->tconf_msg);
>  
> diff --git a/runtest/syscalls-unstable b/runtest/syscalls-unstable
> new file mode 100644
> index 000000000..a87284afe
> --- /dev/null
> +++ b/runtest/syscalls-unstable
> @@ -0,0 +1,3 @@
> +# Tests for kernel features which are not finalized
> +
> +fanotify22 fanotify22

I would be even tempted to add this to the default syscalls runtest file
but render the test resultless, e.g. replace the tst_res() and tst_brk()
handlers in tst_res.c so that it will print only INFO messages.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply

* Re: [PATCH] drm/amdkfd: Check for null pointer after calling kmemdup
From: Felix Kuehling @ 2022-01-05 15:56 UTC (permalink / raw)
  To: Jiasheng Jiang, alexander.deucher, christian.koenig, airlied,
	daniel
  Cc: dri-devel, amd-gfx, linux-kernel
In-Reply-To: <20220105090943.2434040-1-jiasheng@iscas.ac.cn>

Am 2022-01-05 um 4:09 a.m. schrieb Jiasheng Jiang:
> As the possible failure of the allocation, kmemdup() may return NULL
> pointer.
> Therefore, it should be better to check the 'props2' in order to prevent
> the dereference of NULL pointer.
>
> Fixes: 3a87177eb141 ("drm/amdkfd: Add topology support for dGPUs")
> Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>

Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>


> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
> index c60e82697385..d15380c65c6d 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
> @@ -410,6 +410,9 @@ static int kfd_parse_subtype_iolink(struct crat_subtype_iolink *iolink,
>  			return -ENODEV;
>  		/* same everything but the other direction */
>  		props2 = kmemdup(props, sizeof(*props2), GFP_KERNEL);
> +		if (!props2)
> +			return -ENOMEM;
> +
>  		props2->node_from = id_to;
>  		props2->node_to = id_from;
>  		props2->kobj = NULL;

^ permalink raw reply

* Re: [PATCH] drm/amdkfd: Check for null pointer after calling kmemdup
From: Felix Kuehling @ 2022-01-05 15:56 UTC (permalink / raw)
  To: Jiasheng Jiang, alexander.deucher, christian.koenig, airlied,
	daniel
  Cc: amd-gfx, dri-devel, linux-kernel
In-Reply-To: <20220105090943.2434040-1-jiasheng@iscas.ac.cn>

Am 2022-01-05 um 4:09 a.m. schrieb Jiasheng Jiang:
> As the possible failure of the allocation, kmemdup() may return NULL
> pointer.
> Therefore, it should be better to check the 'props2' in order to prevent
> the dereference of NULL pointer.
>
> Fixes: 3a87177eb141 ("drm/amdkfd: Add topology support for dGPUs")
> Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>

Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>


> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
> index c60e82697385..d15380c65c6d 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
> @@ -410,6 +410,9 @@ static int kfd_parse_subtype_iolink(struct crat_subtype_iolink *iolink,
>  			return -ENODEV;
>  		/* same everything but the other direction */
>  		props2 = kmemdup(props, sizeof(*props2), GFP_KERNEL);
> +		if (!props2)
> +			return -ENOMEM;
> +
>  		props2->node_from = id_to;
>  		props2->node_to = id_from;
>  		props2->kobj = NULL;

^ permalink raw reply

* [GIT PULL] Qualcomm clock updates for v5.17
From: Bjorn Andersson @ 2022-01-05 15:57 UTC (permalink / raw)
  To: Stephen Boyd; +Cc: linux-arm-msm

The following changes since commit fa55b7dcdc43c1aa1ba12bca9d2dd4318c2a0dbf:

  Linux 5.16-rc1 (2021-11-14 13:56:52 -0800)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git tags/qcom-clk-for-5.17

for you to fetch changes up to 96ea2a4291343613a7c2da03c03f23dc259171ff:

  clk: qcom: turingcc-qcs404: explicitly include clk-provider.h (2021-12-20 23:14:50 -0600)

----------------------------------------------------------------
Qualcomm clock updates for v5.17

This introduces bindings and drivers for the global clock controllers
found in SDX65, SM8450 and MSM8976, as well as RPMh clock support for
SDX65 and SM8450.

It cleans up the SMD RPM clock driver and it adds includes for
clk-provider.h throughout the clock providers that was lacking this.

----------------------------------------------------------------
AngeloGioacchino Del Regno (1):
      clk: qcom: Add MSM8976/56 Global Clock Controller (GCC) driver

Bjorn Andersson (3):
      MAINTAINERS: Add entry for Qualcomm clock drivers
      Merge tag 'e15509b2b7c9b600ab38c5269d4fac609c077b5b.1638861860.git.quic_vamslank@quicinc.com' into clk-for-5.17
      Merge tag '20211207114003.100693-2-vkoul@kernel.org' into clk-for-5.17

Marijn Suijten (1):
      dt-bindings: clk: qcom: Document MSM8976 Global Clock Controller

Shawn Guo (3):
      clk: qcom: smd-rpm: Drop MFD qcom-rpm reference
      clk: qcom: smd-rpm: Drop the use of struct rpm_cc
      clk: qcom: smd-rpm: Drop binary value handling for buffered clock

Vamsi Krishna Lanka (2):
      clk: qcom: Add LUCID_EVO PLL type for SDX65
      clk: qcom: Add SDX65 GCC support

Vamsi krishna Lanka (3):
      dt-bindings: clock: Introduce RPMHCC bindings for SDX65
      clk: qcom: Add support for SDX65 RPMh clocks
      dt-bindings: clock: Add SDX65 GCC clock bindings

Vinod Koul (12):
      dt-bindings: clock: Add RPMHCC bindings for SM8450
      clk: qcom: rpmh: add support for SM8450 rpmh clocks
      dt-bindings: clock: Add SM8450 GCC clock bindings
      clk: qcom: Add clock driver for SM8450
      clk: qcom: gcc-sm8350: explicitly include clk-provider.h
      clk: qcom: gcc-msm8994: explicitly include clk-provider.h
      clk: qcom: gcc-sm6350: explicitly include clk-provider.h
      clk: qcom: lpasscc-sc7280: explicitly include clk-provider.h
      clk: qcom: lpasscc-sdm845: explicitly include clk-provider.h
      clk: qcom: mmcc-apq8084: explicitly include clk-provider.h
      clk: qcom: q6sstop-qcs404: explicitly include clk-provider.h
      clk: qcom: turingcc-qcs404: explicitly include clk-provider.h

 .../bindings/clock/qcom,gcc-msm8976.yaml           |   97 +
 .../devicetree/bindings/clock/qcom,gcc-sdx65.yaml  |   80 +
 .../devicetree/bindings/clock/qcom,gcc-sm8450.yaml |   85 +
 .../devicetree/bindings/clock/qcom,rpmhcc.yaml     |    2 +
 MAINTAINERS                                        |    9 +
 drivers/clk/qcom/Kconfig                           |   24 +
 drivers/clk/qcom/Makefile                          |    3 +
 drivers/clk/qcom/clk-alpha-pll.c                   |  164 +-
 drivers/clk/qcom/clk-alpha-pll.h                   |    3 +
 drivers/clk/qcom/clk-rpmh.c                        |   52 +
 drivers/clk/qcom/clk-smd-rpm.c                     |   31 +-
 drivers/clk/qcom/gcc-msm8976.c                     | 4155 ++++++++++++++++++++
 drivers/clk/qcom/gcc-msm8994.c                     |    1 +
 drivers/clk/qcom/gcc-sdx65.c                       | 1611 ++++++++
 drivers/clk/qcom/gcc-sm6350.c                      |    1 +
 drivers/clk/qcom/gcc-sm8350.c                      |    1 +
 drivers/clk/qcom/gcc-sm8450.c                      | 3304 ++++++++++++++++
 drivers/clk/qcom/lpasscc-sc7280.c                  |    1 +
 drivers/clk/qcom/lpasscc-sdm845.c                  |    1 +
 drivers/clk/qcom/mmcc-apq8084.c                    |    1 +
 drivers/clk/qcom/q6sstop-qcs404.c                  |    1 +
 drivers/clk/qcom/turingcc-qcs404.c                 |    1 +
 include/dt-bindings/clock/qcom,gcc-msm8976.h       |  240 ++
 include/dt-bindings/clock/qcom,gcc-sdx65.h         |  122 +
 include/dt-bindings/clock/qcom,gcc-sm8450.h        |  244 ++
 25 files changed, 10202 insertions(+), 32 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,gcc-msm8976.yaml
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,gcc-sdx65.yaml
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,gcc-sm8450.yaml
 create mode 100644 drivers/clk/qcom/gcc-msm8976.c
 create mode 100644 drivers/clk/qcom/gcc-sdx65.c
 create mode 100644 drivers/clk/qcom/gcc-sm8450.c
 create mode 100644 include/dt-bindings/clock/qcom,gcc-msm8976.h
 create mode 100644 include/dt-bindings/clock/qcom,gcc-sdx65.h
 create mode 100644 include/dt-bindings/clock/qcom,gcc-sm8450.h

^ permalink raw reply

* [PATCH mptcp-next v8 0/8] Clarify when options can be used
From: Matthieu Baerts @ 2022-01-05 15:56 UTC (permalink / raw)
  To: mptcp; +Cc: Matthieu Baerts

This is a new version of Geliang's series called "send MP_FAIL with MP_RST and
others" (v6 + v7) but also include this time:

- "mptcp: fix a DSS option writting error" (v1)
- "selftests: mptcp: add mp_fail testcases" (v5)

On top of these two new patches from Geliang already sent on the ML, this new
version:

- includes one new patch 2/8 ("mptcp: fix opt size when sending DSS + MP_FAIL"):
  hopefuly fixing the issue reported by Geliang (MPF+DSS ok, DSS+MPF nok)
- has the Squash-to patch 1/8 split: the other part is in patch 4/8
  ("mptcp: reduce branching when writing MP_FAIL option")
- has one fix in patch 1/8 reported by Geliang

Notes: I still have issues with the mptcp_join selftests and TC but this can be
fixed later.

Geliang Tang (4):
  Squash to "mptcp: implement fastclose xmit path"
  mptcp: fix a DSS option writing error
  mptcp: print out reset infos of MP_RST
  selftests: mptcp: add mp_fail testcases

Matthieu Baerts (4):
  mptcp: fix opt size when sending DSS + MP_FAIL
  mptcp: reduce branching when writing MP_FAIL option
  mptcp: clarify when options can be used
  mptcp: allow sending both ADD_ADDR and RM_ADDR

 net/mptcp/options.c                           | 105 ++++++++++++-----
 tools/testing/selftests/net/mptcp/config      |   5 +
 .../testing/selftests/net/mptcp/mptcp_join.sh | 111 ++++++++++++++++--
 3 files changed, 182 insertions(+), 39 deletions(-)

-- 
2.33.1


^ permalink raw reply

* [PATCH mptcp-next v8 1/8] Squash to "mptcp: implement fastclose xmit path"
From: Matthieu Baerts @ 2022-01-05 15:56 UTC (permalink / raw)
  To: mptcp; +Cc: Geliang Tang, Paolo Abeni, Matthieu Baerts
In-Reply-To: <20220105155702.165123-1-matthieu.baerts@tessares.net>

From: Geliang Tang <geliang.tang@suse.com>

MP_FAIL can be sent with RST or DSS, and FASTCLOSE can be sent with
RST too. So we should use a similar xmit logic for FASTCLOSE and
MP_FAIL in both mptcp_write_options() and mptcp_established_options*().

Cc: Paolo Abeni <pabeni@redhat.com>
Co-developed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---

Notes:
    v8:
     - 'ptr += 2;' was missing for FastClose (Geliang)
     - moving the MP_FAIL option is now in a dedicated patch
       ("mptcp: reduce branching when writing MP_FAIL option")

 net/mptcp/options.c | 28 ++++++++++++++++++----------
 1 file changed, 18 insertions(+), 10 deletions(-)

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index c6726e8389ec..aa3ed37bc59a 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -829,8 +829,12 @@ bool mptcp_established_options(struct sock *sk, struct sk_buff *skb,
 
 	if (unlikely(skb && TCP_SKB_CB(skb)->tcp_flags & TCPHDR_RST)) {
 		if (mptcp_established_options_fastclose(sk, &opt_size, remaining, opts) ||
-		    mptcp_established_options_mp_fail(sk, &opt_size, remaining, opts) ||
-		    mptcp_established_options_rst(sk, skb, &opt_size, remaining, opts)) {
+		    mptcp_established_options_mp_fail(sk, &opt_size, remaining, opts)) {
+			*size += opt_size;
+			remaining -= opt_size;
+		}
+		/* MP_RST can be used with MP_FASTCLOSE and MP_FAIL if there is room */
+		if (mptcp_established_options_rst(sk, skb, &opt_size, remaining, opts)) {
 			*size += opt_size;
 			remaining -= opt_size;
 		}
@@ -1460,19 +1464,23 @@ void mptcp_write_options(__be32 *ptr, const struct tcp_sock *tp,
 				ptr += 1;
 			}
 		}
-	} else if (unlikely(OPTION_MPTCP_RST & opts->suboptions)) {
-		/* RST is mutually exclusive with everything else */
-		*ptr++ = mptcp_option(MPTCPOPT_RST,
-				      TCPOLEN_MPTCP_RST,
-				      opts->reset_transient,
-				      opts->reset_reason);
-		return;
 	} else if (unlikely(OPTION_MPTCP_FASTCLOSE & opts->suboptions)) {
-		/* FASTCLOSE is mutually exclusive with everything else */
+		/* FASTCLOSE is mutually exclusive with others except RST */
 		*ptr++ = mptcp_option(MPTCPOPT_MP_FASTCLOSE,
 				      TCPOLEN_MPTCP_FASTCLOSE,
 				      0, 0);
 		put_unaligned_be64(opts->rcvr_key, ptr);
+		ptr += 2;
+
+		if (OPTION_MPTCP_RST & opts->suboptions)
+			goto mp_rst;
+		return;
+	} else if (unlikely(OPTION_MPTCP_RST & opts->suboptions)) {
+mp_rst:
+		*ptr++ = mptcp_option(MPTCPOPT_RST,
+				      TCPOLEN_MPTCP_RST,
+				      opts->reset_transient,
+				      opts->reset_reason);
 		return;
 	}
 
-- 
2.33.1


^ permalink raw reply related

* [PATCH mptcp-next v8 3/8] mptcp: fix a DSS option writing error
From: Matthieu Baerts @ 2022-01-05 15:56 UTC (permalink / raw)
  To: mptcp; +Cc: Geliang Tang, Matthieu Baerts
In-Reply-To: <20220105155702.165123-1-matthieu.baerts@tessares.net>

From: Geliang Tang <geliang.tang@suse.com>

'ptr += 1;' was omitted in the original code.

If the DSS is the last option -- which is what we have most of the
time -- that's not an issue.

Fixes: 1bff1e43a30e ("mptcp: optimize out option generation")
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---
 net/mptcp/options.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 36ab69906af3..bbf61dedb4b5 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -1334,6 +1334,7 @@ void mptcp_write_options(__be32 *ptr, const struct tcp_sock *tp,
 				put_unaligned_be32(mpext->data_len << 16 |
 						   TCPOPT_NOP << 8 | TCPOPT_NOP, ptr);
 			}
+			ptr += 1;
 		}
 	} else if (OPTIONS_MPTCP_MPC & opts->suboptions) {
 		u8 len, flag = MPTCP_CAP_HMAC_SHA256;
-- 
2.33.1


^ permalink raw reply related

* [PATCH mptcp-next v8 2/8] mptcp: fix opt size when sending DSS + MP_FAIL
From: Matthieu Baerts @ 2022-01-05 15:56 UTC (permalink / raw)
  To: mptcp; +Cc: Matthieu Baerts
In-Reply-To: <20220105155702.165123-1-matthieu.baerts@tessares.net>

When these two options had to be sent -- which is not common -- the DSS
size was not being taken into account in the remaining size.

Additionaly in this situation, the reported size was only the one of
the MP_FAIL which can cause issue if at the end, we need to write more
in the TCP options than previously said.

Here we use a dedicated variable for MP_FAIL size to keep the
WARN_ON_ONCE() just after.

Fixes: c25aeb4e0953 ("mptcp: MP_FAIL suboption sending")
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---
 net/mptcp/options.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index aa3ed37bc59a..36ab69906af3 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -845,10 +845,13 @@ bool mptcp_established_options(struct sock *sk, struct sk_buff *skb,
 	if (mptcp_established_options_mp(sk, skb, snd_data_fin, &opt_size, remaining, opts))
 		ret = true;
 	else if (mptcp_established_options_dss(sk, skb, snd_data_fin, &opt_size, remaining, opts)) {
+		unsigned int mp_fail_size;
+
 		ret = true;
-		if (mptcp_established_options_mp_fail(sk, &opt_size, remaining, opts)) {
-			*size += opt_size;
-			remaining -= opt_size;
+		if (mptcp_established_options_mp_fail(sk, &mp_fail_size,
+						      remaining - opt_size, opts)) {
+			*size += opt_size + mp_fail_size;
+			remaining -= opt_size - mp_fail_size;
 			return true;
 		}
 	}
-- 
2.33.1


^ permalink raw reply related

* [PATCH mptcp-next v8 4/8] mptcp: reduce branching when writing MP_FAIL option
From: Matthieu Baerts @ 2022-01-05 15:56 UTC (permalink / raw)
  To: mptcp; +Cc: Matthieu Baerts, Geliang Tang
In-Reply-To: <20220105155702.165123-1-matthieu.baerts@tessares.net>

MP_FAIL should be use in very rare cases, either when the TCP RST flag
is set -- with or without an MP_RST -- or with a DSS, see
mptcp_established_options().

Here, we do the same in mptcp_write_options().

Co-developed-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---
 net/mptcp/options.c | 39 ++++++++++++++++++++++++---------------
 1 file changed, 24 insertions(+), 15 deletions(-)

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index bbf61dedb4b5..2f94069808a4 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -1264,21 +1264,7 @@ static u16 mptcp_make_csum(const struct mptcp_ext *mpext)
 void mptcp_write_options(__be32 *ptr, const struct tcp_sock *tp,
 			 struct mptcp_out_options *opts)
 {
-	if (unlikely(OPTION_MPTCP_FAIL & opts->suboptions)) {
-		const struct sock *ssk = (const struct sock *)tp;
-		struct mptcp_subflow_context *subflow;
-
-		subflow = mptcp_subflow_ctx(ssk);
-		subflow->send_mp_fail = 0;
-
-		*ptr++ = mptcp_option(MPTCPOPT_MP_FAIL,
-				      TCPOLEN_MPTCP_FAIL,
-				      0, 0);
-		put_unaligned_be64(opts->fail_seq, ptr);
-		ptr += 2;
-	}
-
-	/* DSS, MPC, MPJ, ADD_ADDR, FASTCLOSE and RST are mutually exclusive,
+	/* DSS, MPC, MPJ, ADD_ADDR, FASTCLOSE and FAIL are mutually exclusive,
 	 * see mptcp_established_options*()
 	 */
 	if (likely(OPTION_MPTCP_DSS & opts->suboptions)) {
@@ -1336,6 +1322,10 @@ void mptcp_write_options(__be32 *ptr, const struct tcp_sock *tp,
 			}
 			ptr += 1;
 		}
+
+		/* We might need to add MP_FAIL options in rare cases */
+		if (unlikely(OPTION_MPTCP_FAIL & opts->suboptions))
+			goto mp_fail;
 	} else if (OPTIONS_MPTCP_MPC & opts->suboptions) {
 		u8 len, flag = MPTCP_CAP_HMAC_SHA256;
 
@@ -1476,6 +1466,25 @@ void mptcp_write_options(__be32 *ptr, const struct tcp_sock *tp,
 		put_unaligned_be64(opts->rcvr_key, ptr);
 		ptr += 2;
 
+		if (OPTION_MPTCP_RST & opts->suboptions)
+			goto mp_rst;
+		return;
+	} else if (unlikely(OPTION_MPTCP_FAIL & opts->suboptions))
+mp_fail:
+	{
+		/* MP_FAIL is mutually exclusive with others except RST */
+		const struct sock *ssk = (const struct sock *)tp;
+		struct mptcp_subflow_context *subflow;
+
+		subflow = mptcp_subflow_ctx(ssk);
+		subflow->send_mp_fail = 0;
+
+		*ptr++ = mptcp_option(MPTCPOPT_MP_FAIL,
+				      TCPOLEN_MPTCP_FAIL,
+				      0, 0);
+		put_unaligned_be64(opts->fail_seq, ptr);
+		ptr += 2;
+
 		if (OPTION_MPTCP_RST & opts->suboptions)
 			goto mp_rst;
 		return;
-- 
2.33.1


^ permalink raw reply related

* [PATCH mptcp-next v8 5/8] mptcp: clarify when options can be used
From: Matthieu Baerts @ 2022-01-05 15:56 UTC (permalink / raw)
  To: mptcp; +Cc: Matthieu Baerts
In-Reply-To: <20220105155702.165123-1-matthieu.baerts@tessares.net>

RFC8684 doesn't seem to clearly specify which MPTCP options can be used
together.

Some options are mutually exclusive -- e.g. MP_CAPABLE and MP_JOIN --,
some can be used together -- e.g. DSS + MP_PRIO --, some can but we
prefer not to -- e.g. DSS + ADD_ADDR -- and some have to be used
together at some points -- e.g. MP_FAIL and DSS.

We need to clarify this as a base before allowing other modifications.

For example, does it make sense to send a RM_ADDR with an MPC or MPJ?
This remains open for possible future discussions.

Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---
 net/mptcp/options.c | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 2f94069808a4..8553b928c5bf 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -1264,8 +1264,27 @@ static u16 mptcp_make_csum(const struct mptcp_ext *mpext)
 void mptcp_write_options(__be32 *ptr, const struct tcp_sock *tp,
 			 struct mptcp_out_options *opts)
 {
-	/* DSS, MPC, MPJ, ADD_ADDR, FASTCLOSE and FAIL are mutually exclusive,
-	 * see mptcp_established_options*()
+	/* Which options can be used together?
+	 *
+	 * X: mutually exclusive
+	 * O: often used together
+	 * C: can be used together in some cases
+	 * P: could be used together but we prefer not to (optimisations)
+	 *
+	 *  Opt: | MPC  | MPJ  | DSS  | ADD  |  RM  | PRIO | FAIL |  FC  |
+	 * ------|------|------|------|------|------|------|------|------|
+	 *  MPC  |------|------|------|------|------|------|------|------|
+	 *  MPJ  |  X   |------|------|------|------|------|------|------|
+	 *  DSS  |  X   |  X   |------|------|------|------|------|------|
+	 *  ADD  |  X   |  X   |  P   |------|------|------|------|------|
+	 *  RM   |  C   |  C   |  C   |  C   |------|------|------|------|
+	 *  PRIO |  X   |  C   |  C   |  C   |  C   |------|------|------|
+	 *  FAIL |  X   |  X   |  C   |  X   |  X   |  X   |------|------|
+	 *  FC   |  X   |  X   |  X   |  X   |  X   |  X   |  X   |------|
+	 *  RST  |  X   |  X   |  X   |  X   |  X   |  X   |  O   |  O   |
+	 * ------|------|------|------|------|------|------|------|------|
+	 *
+	 * The same applies in mptcp_established_options() function.
 	 */
 	if (likely(OPTION_MPTCP_DSS & opts->suboptions)) {
 		struct mptcp_ext *mpext = &opts->ext_copy;
-- 
2.33.1


^ permalink raw reply related

* [PATCH mptcp-next v8 6/8] mptcp: allow sending both ADD_ADDR and RM_ADDR
From: Matthieu Baerts @ 2022-01-05 15:57 UTC (permalink / raw)
  To: mptcp; +Cc: Matthieu Baerts
In-Reply-To: <20220105155702.165123-1-matthieu.baerts@tessares.net>

This is mainly to be sync with what is done in mptcp_write_options()
where after having written the ADD_ADDR option, we check if the RM_ADDR
option also needs to be added.

But if we have room, it makes sense to write the two options in the same
packet. So best to remove the 'else'.

While at it, also mention that mptcp_established_options_add_addr() can
remove options.

Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---
 net/mptcp/options.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 8553b928c5bf..06f64101d27b 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -864,11 +864,14 @@ bool mptcp_established_options(struct sock *sk, struct sk_buff *skb,
 
 	*size += opt_size;
 	remaining -= opt_size;
+	/* Note: this can remove previously set options in some conditions */
 	if (mptcp_established_options_add_addr(sk, skb, &opt_size, remaining, opts)) {
 		*size += opt_size;
 		remaining -= opt_size;
 		ret = true;
-	} else if (mptcp_established_options_rm_addr(sk, &opt_size, remaining, opts)) {
+	}
+
+	if (mptcp_established_options_rm_addr(sk, &opt_size, remaining, opts)) {
 		*size += opt_size;
 		remaining -= opt_size;
 		ret = true;
-- 
2.33.1


^ permalink raw reply related

* [PATCH mptcp-next v8 7/8] mptcp: print out reset infos of MP_RST
From: Matthieu Baerts @ 2022-01-05 15:57 UTC (permalink / raw)
  To: mptcp; +Cc: Geliang Tang, Matthieu Baerts
In-Reply-To: <20220105155702.165123-1-matthieu.baerts@tessares.net>

From: Geliang Tang <geliang.tang@suse.com>

This patch printed out the reset infos, reset_transient and reset_reason,
of MP_RST in mptcp_parse_option() to show that MP_RST is received.

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---
 net/mptcp/options.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 06f64101d27b..182fb885f5e6 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -336,6 +336,8 @@ static void mptcp_parse_option(const struct sk_buff *skb,
 		flags = *ptr++;
 		mp_opt->reset_transient = flags & MPTCP_RST_TRANSIENT;
 		mp_opt->reset_reason = *ptr;
+		pr_debug("MP_RST: transient=%u reason=%u",
+			 mp_opt->reset_transient, mp_opt->reset_reason);
 		break;
 
 	case MPTCPOPT_MP_FAIL:
-- 
2.33.1


^ permalink raw reply related

* [PATCH mptcp-next v8 8/8] selftests: mptcp: add mp_fail testcases
From: Matthieu Baerts @ 2022-01-05 15:57 UTC (permalink / raw)
  To: mptcp; +Cc: Geliang Tang, Davide Caratti, Matthieu Baerts
In-Reply-To: <20220105155702.165123-1-matthieu.baerts@tessares.net>

From: Geliang Tang <geliang.tang@suse.com>

Added the test cases for MP_FAIL, use 'tc' command to trigger the
checksum failure.

Suggested-by: Davide Caratti <dcaratti@redhat.com>
Co-developed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
 tools/testing/selftests/net/mptcp/config      |   5 +
 .../testing/selftests/net/mptcp/mptcp_join.sh | 111 ++++++++++++++++--
 2 files changed, 107 insertions(+), 9 deletions(-)

diff --git a/tools/testing/selftests/net/mptcp/config b/tools/testing/selftests/net/mptcp/config
index d36b7da5082a..26955abe49f0 100644
--- a/tools/testing/selftests/net/mptcp/config
+++ b/tools/testing/selftests/net/mptcp/config
@@ -19,3 +19,8 @@ CONFIG_IP_ADVANCED_ROUTER=y
 CONFIG_IP_MULTIPLE_TABLES=y
 CONFIG_IP_NF_TARGET_REJECT=m
 CONFIG_IPV6_MULTIPLE_TABLES=y
+CONFIG_NET_ACT_CSUM=m
+CONFIG_NET_ACT_PEDIT=m
+CONFIG_NET_CLS_ACT=y
+CONFIG_NET_CLS_FLOWER=m
+CONFIG_NET_SCH_INGRESS=m
diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index e48ce23d2386..535baa3c01e7 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -16,6 +16,7 @@ mptcp_connect=""
 capture=0
 checksum=0
 do_all_tests=1
+nr_fail=0
 
 TEST_COUNT=0
 
@@ -58,6 +59,8 @@ init()
 		fi
 	done
 
+	validate_checksum=$checksum
+
 	#  ns1              ns2
 	# ns1eth1    ns2eth1
 	# ns1eth2    ns2eth2
@@ -161,6 +164,45 @@ reset_with_allow_join_id0()
 	ip netns exec $ns2 sysctl -q net.mptcp.allow_join_initial_addr_port=$ns2_enable
 }
 
+# Modify TCP payload without corrupting the TCP packet
+#
+# This rule inverts a 32-bit word at byte offset 148 for all TCP ACK
+# packets carrying enough data.
+# Once it is done, the TCP Checksum field is updated so the packet
+# is still considered as valid at the TCP level.
+# But because the MPTCP checksum, covering the TCP options and data,
+# has not been updated, we will detect the modification and emit an
+# MP_FAIL: what we want to validate here.
+#
+# Please note that this rule will produce this pr_info() message for
+# each TCP ACK packets not carrying enough data:
+#
+#     tc action pedit offset 162 out of bounds
+#
+# But this should be limited to a very few numbers of packets as we
+# restrict this rule to outgoing TCP traffic with only the ACK flag
+# + except the 3rd ACK, only packets carrying data should be seen in
+# this direction.
+reset_with_fail()
+{
+	reset
+
+	ip netns exec $ns1 sysctl -q net.mptcp.checksum_enabled=1
+	ip netns exec $ns2 sysctl -q net.mptcp.checksum_enabled=1
+
+	validate_checksum=1
+	nr_fail=0
+	i="$1"
+
+	tc -n $ns2 qdisc add dev ns2eth$i clsact
+	tc -n $ns2 filter add dev ns2eth$i egress \
+		protocol ip prio 1000 \
+		flower ip_proto tcp tcp_flags 0x10/0xff \
+		action pedit munge offset 148 u32 invert \
+		pipe csum tcp \
+		index 100
+}
+
 ip -Version > /dev/null 2>&1
 if [ $? -ne 0 ];then
 	echo "SKIP: Could not run test without ip tool"
@@ -179,6 +221,12 @@ if [ $? -ne 0 ];then
 	exit $ksft_skip
 fi
 
+jq -V > /dev/null 2>&1
+if [ $? -ne 0 ];then
+	echo "SKIP: Could not run all tests without jq tool"
+	exit $ksft_skip
+fi
+
 print_file_err()
 {
 	ls -l "$1" 1>&2
@@ -233,6 +281,21 @@ link_failure()
 	done
 }
 
+get_nr_fail()
+{
+	i="$1"
+
+	local action=$(tc -n $ns2 -j -s action show action pedit index 100)
+	local packets=$(echo $action | jq '.[1].actions[0].stats.packets')
+	local overlimits=$(echo $action | jq '.[1].actions[0].stats.overlimits')
+
+	let pkt=$packets-$overlimits
+	if [ $pkt -gt 0 ]; then
+		nr_fail=1
+	fi
+	tc -n $ns2 qdisc del dev ns2eth$i clsact
+}
+
 # $1: IP address
 is_v6()
 {
@@ -589,6 +652,8 @@ dump_stats()
 chk_csum_nr()
 {
 	local msg=${1:-""}
+	local csum_ns1=${2:-0}
+	local csum_ns2=${3:-0}
 	local count
 	local dump_stats
 
@@ -600,8 +665,8 @@ chk_csum_nr()
 	printf " %-36s %s" "$msg" "sum"
 	count=`ip netns exec $ns1 nstat -as | grep MPTcpExtDataCsumErr | awk '{print $2}'`
 	[ -z "$count" ] && count=0
-	if [ "$count" != 0 ]; then
-		echo "[fail] got $count data checksum error[s] expected 0"
+	if [ "$count" != $csum_ns1 ]; then
+		echo "[fail] got $count data checksum error[s] expected $csum_ns1"
 		ret=1
 		dump_stats=1
 	else
@@ -610,8 +675,8 @@ chk_csum_nr()
 	echo -n " - csum  "
 	count=`ip netns exec $ns2 nstat -as | grep MPTcpExtDataCsumErr | awk '{print $2}'`
 	[ -z "$count" ] && count=0
-	if [ "$count" != 0 ]; then
-		echo "[fail] got $count data checksum error[s] expected 0"
+	if [ "$count" != $csum_ns2 ]; then
+		echo "[fail] got $count data checksum error[s] expected $csum_ns2"
 		ret=1
 		dump_stats=1
 	else
@@ -690,6 +755,8 @@ chk_join_nr()
 	local syn_nr=$2
 	local syn_ack_nr=$3
 	local ack_nr=$4
+	local fail_nr=${5:-0}
+	local infi_nr=${6:-0}
 	local count
 	local dump_stats
 
@@ -726,10 +793,10 @@ chk_join_nr()
 		echo "[ ok ]"
 	fi
 	[ "${dump_stats}" = 1 ] && dump_stats
-	if [ $checksum -eq 1 ]; then
-		chk_csum_nr
-		chk_fail_nr 0 0
-		chk_infi_nr 0 0
+	if [ $validate_checksum -eq 1 ]; then
+		chk_csum_nr "" $fail_nr
+		chk_fail_nr $fail_nr $fail_nr
+		chk_infi_nr $infi_nr $infi_nr
 	fi
 }
 
@@ -1985,6 +2052,27 @@ userspace_tests()
 	chk_rm_nr 0 0
 }
 
+fail_tests()
+{
+	# multiple subflows
+	reset_with_fail 2
+	ip netns exec $ns1 ./pm_nl_ctl limits 0 2
+	ip netns exec $ns2 ./pm_nl_ctl limits 0 2
+	ip netns exec $ns2 ./pm_nl_ctl add 10.0.3.2 dev ns2eth3 flags subflow
+	ip netns exec $ns2 ./pm_nl_ctl add 10.0.2.2 dev ns2eth2 flags subflow
+	run_tests $ns1 $ns2 10.0.1.1 2
+	get_nr_fail 2
+	chk_join_nr "$nr_fail MP_FAIL, multiple subflows" 2 2 2 $nr_fail
+
+	# single subflow
+	reset_with_fail 1
+	ip netns exec $ns1 ./pm_nl_ctl limits 0 2
+	ip netns exec $ns2 ./pm_nl_ctl limits 0 2
+	run_tests $ns1 $ns2 10.0.1.1 2
+	get_nr_fail 1
+	chk_join_nr "$nr_fail MP_FAIL, single subflow" 0 0 0 $nr_fail $nr_fail
+}
+
 all_tests()
 {
 	subflows_tests
@@ -2003,6 +2091,7 @@ all_tests()
 	deny_join_id0_tests
 	fullmesh_tests
 	userspace_tests
+	fail_tests
 }
 
 usage()
@@ -2024,6 +2113,7 @@ usage()
 	echo "  -d deny_join_id0_tests"
 	echo "  -m fullmesh_tests"
 	echo "  -u userspace_tests"
+	echo "  -F fail_tests"
 	echo "  -c capture pcap files"
 	echo "  -C enable data checksum"
 	echo "  -h help"
@@ -2059,7 +2149,7 @@ if [ $do_all_tests -eq 1 ]; then
 	exit $ret
 fi
 
-while getopts 'fesltra64bpkdmuchCS' opt; do
+while getopts 'fesltra64bpkdmuchCSF' opt; do
 	case $opt in
 		f)
 			subflows_tests
@@ -2109,6 +2199,9 @@ while getopts 'fesltra64bpkdmuchCS' opt; do
 		u)
 			userspace_tests
 			;;
+		F)
+			fail_tests
+			;;
 		c)
 			;;
 		C)
-- 
2.33.1


^ permalink raw reply related

* Re: [PATCH 1/3 v3] net: usb: r8152: Check used MAC passthrough address
From: Henning Schild @ 2022-01-05 15:57 UTC (permalink / raw)
  To: Aaron Ma; +Cc: kuba, linux-usb, netdev, linux-kernel, davem, hayeswang, tiwai
In-Reply-To: <20220105151427.8373-1-aaron.ma@canonical.com>

Ok this now will claim only the first plugged in dongle. Probably as
you wanted it. But still breaking my always two ethernet cables and no
"lenovo dock" anywhere.

Still feels very wrong to me, but i have no clue how it is supposed to
work. Lenovo documentation talks about PXE use-cases ... which means
BIOS is spoofing and not OS. OS should probably just take the active
MAC instead of the one from EEPROM.
But it also has a link to one "dock" that is really just a dongle. And
the whole thing is super dated.

https://support.lenovo.com/ie/en/solutions/ht503574

Henning

Am Wed,  5 Jan 2022 23:14:25 +0800
schrieb Aaron Ma <aaron.ma@canonical.com>:

> When plugin multiple r8152 ethernet dongles to Lenovo Docks
> or USB hub, MAC passthrough address from BIOS should be
> checked if it had been used to avoid using on other dongles.
> 
> Currently builtin r8152 on Dock still can't be identified.
> First detected r8152 will use the MAC passthrough address.
> 
> v2:
> Skip builtin PCI MAC address which is share MAC address with
> passthrough MAC.
> Check thunderbolt based ethernet.
> 
> v3:
> Add return value.
> 
> Fixes: f77b83b5bbab ("net: usb: r8152: Add MAC passthrough support for
> more Lenovo Docks")
> Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
> ---
>  drivers/net/usb/r8152.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
> index f9877a3e83ac..2483dc421dff 100644
> --- a/drivers/net/usb/r8152.c
> +++ b/drivers/net/usb/r8152.c
> @@ -25,6 +25,7 @@
>  #include <linux/atomic.h>
>  #include <linux/acpi.h>
>  #include <linux/firmware.h>
> +#include <linux/pci.h>
>  #include <crypto/hash.h>
>  #include <linux/usb/r8152.h>
>  
> @@ -1605,6 +1606,7 @@ static int vendor_mac_passthru_addr_read(struct
> r8152 *tp, struct sockaddr *sa) char *mac_obj_name;
>  	acpi_object_type mac_obj_type;
>  	int mac_strlen;
> +	struct net_device *ndev;
>  
>  	if (tp->lenovo_macpassthru) {
>  		mac_obj_name = "\\MACA";
> @@ -1662,6 +1664,19 @@ static int
> vendor_mac_passthru_addr_read(struct r8152 *tp, struct sockaddr *sa)
> ret = -EINVAL; goto amacout;
>  	}
> +	rcu_read_lock();
> +	for_each_netdev_rcu(&init_net, ndev) {
> +		if (ndev->dev.parent && dev_is_pci(ndev->dev.parent)
> &&
> +
> !pci_is_thunderbolt_attached(to_pci_dev(ndev->dev.parent)))
> +			continue;
> +		if (strncmp(buf, ndev->dev_addr, 6) == 0) {
> +			ret = -EINVAL;
> +			rcu_read_unlock();
> +			goto amacout;
> +		}
> +	}
> +	rcu_read_unlock();
> +
>  	memcpy(sa->sa_data, buf, 6);
>  	netif_info(tp, probe, tp->netdev,
>  		   "Using pass-thru MAC addr %pM\n", sa->sa_data);


^ permalink raw reply

* Re: Handling SIGTSTP (Ctrl+Z) /SIGCONT/fg with aplay/cplay
From: Vinod Koul @ 2022-01-05 15:56 UTC (permalink / raw)
  To: Daniel Baluta
  Cc: Linux-ALSA, S.j. Wang, Takashi Iwai, Mark Brown,
	sound-open-firmware
In-Reply-To: <CAEnQRZB3gp3DwemnTwzbq78pxxpeU-TR=KjSKxgWowFmf+_bXw@mail.gmail.com>

Hi Daniel,

On 05-01-22, 16:31, Daniel Baluta wrote:
> Hi all,
> 
> Is there any quick document for handling Ctrl + Z with aplay/cplay?

cplay does have have handler for it, patches would be welcome :)

> I don't see this signal handled with alsa-lib or tinycompress although
> linux kernel offers PAUSE/RESUME ioctls.

Are you sure, I checked with aplay, it seems to me work for me on Fedora

$ aplay test.wav
Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
^Z
[1]+  Stopped                 aplay test.wav

It did pause the file and I was able to resume it from the last
position.

FWIW:
$ aplay --version
aplay: version 1.2.6 by Jaroslav Kysela <perex@perex.cz>

> 
> What should be the expected behavior?

Pause the stream should be apt behaviour, unless Takashi or Jaroslav
have better ideas

-- 
~Vinod

^ permalink raw reply

* Re: [PATCH] ext4/033: test EXT4_IOC_RESIZE_FS by calling the ioctl directly
From: Zorro Lang @ 2022-01-05 15:57 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: guan, fstests, Ext4 Developers List, Eric Whitney
In-Reply-To: <20211220204059.2248577-1-tytso@mit.edu>

On Mon, Dec 20, 2021 at 03:40:59PM -0500, Theodore Ts'o wrote:
> E2fsprogs commits 4ea80d031c7e ("resize2fs: adjust new size of the
> file system to allow a successful resize") and 50088b1996cc
> ("resize2fs: attempt to keep the # of inodes valid by removing the
> last bg") will automatically reduce the requested new size of the file
> system by up to a single block group to avoid overflowing the 32-bit
> inode count.   This interferes with ext4/033's test of kernel commit
> 4f2f76f75143 ("ext4: Forbid overflowing inode count when # resizing".)
> 
> Address this by creating a new test program, ext4_resize which calls
> the EXT4_IOC_RESIZE_FS ioctl directly so we can correctly test the
> kernel's online resize code.
> 
> Reported-by: Eric Whitney <enwlinux@gmail.com>
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> ---
>  .gitignore        |  1 +
>  src/Makefile      |  2 +-
>  src/ext4_resize.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++
>  tests/ext4/033    | 16 ++++++++++-----
>  4 files changed, 63 insertions(+), 6 deletions(-)
>  create mode 100644 src/ext4_resize.c
> 
> diff --git a/.gitignore b/.gitignore
> index 9e6d2fd5..65b93307 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -77,6 +77,7 @@ tags
>  /src/dirperf
>  /src/dirstress
>  /src/e4compact
> +/src/ext4_resize
>  /src/fault
>  /src/feature
>  /src/fiemap-tester
> diff --git a/src/Makefile b/src/Makefile
> index 25ab061d..1737ed0e 100644
> --- a/src/Makefile
> +++ b/src/Makefile
> @@ -31,7 +31,7 @@ LINUX_TARGETS = xfsctl bstat t_mtab getdevicesize preallo_rw_pattern_reader \
>  	dio-invalidate-cache stat_test t_encrypted_d_revalidate \
>  	attr_replace_test swapon mkswap t_attr_corruption t_open_tmpfiles \
>  	fscrypt-crypt-util bulkstat_null_ocount splice-test chprojid_fail \
> -	detached_mounts_propagation
> +	detached_mounts_propagation ext4_resize
>  
>  EXTRA_EXECS = dmerror fill2attr fill2fs fill2fs_check scaleread.sh \
>  	      btrfs_crc32c_forged_name.py
> diff --git a/src/ext4_resize.c b/src/ext4_resize.c
> new file mode 100644
> index 00000000..1ac51e6f
> --- /dev/null
> +++ b/src/ext4_resize.c
> @@ -0,0 +1,50 @@
> +// SPDX-License-Identifier: GPL-2.0
> +
> +/*
> + * Test program which uses the raw ext4 resize_fs ioctl directly.
> + */
> +
> +#include <stdio.h>
> +#include <fcntl.h>
> +#include <errno.h>
> +#include <unistd.h>
> +#include <stdint.h>
> +#include <stdlib.h>
> +#include <sys/ioctl.h>
> +#include <sys/mount.h>
> +
> +typedef unsigned long long __u64;
> +
> +#ifndef EXT4_IOC_RESIZE_FS
> +#define EXT4_IOC_RESIZE_FS		_IOW('f', 16, __u64)
> +#endif

This patch looks good to me, I just want to ask if we'd better to try to include
ext2fs/ext2fs.h at here? And of course, check it in configure.ac.
The EXT4_IOC_RESIZE_FS looks like defined in ext2fs/ext2_fs.h which comes from
e2fsprogs-devel package. I can't find this definition from kernel-hearders package.
As you're the expert of this part, please correct me if it's wrong :)

Thanks,
Zorro

> +
> +int main(int argc, char **argv)
> +{
> +	__u64	new_size;
> +	int	error, fd;
> +	char	*tmp = NULL;
> +
> +	if (argc != 3) {
> +		fputs("insufficient arguments\n", stderr);
> +		return 1;
> +	}
> +	fd = open(argv[1], O_RDONLY);
> +	if (!fd) {
> +		perror(argv[1]);
> +		return 1;
> +	}
> +
> +	new_size = strtoull(argv[2], &tmp, 10);
> +	if ((errno) || (*tmp != '\0')) {
> +		fprintf(stderr, "%s: invalid new size\n", argv[0]);
> +		return 1;
> +	}
> +
> +	error = ioctl(fd, EXT4_IOC_RESIZE_FS, &new_size);
> +	if (error < 0) {
> +		perror("EXT4_IOC_RESIZE_FS");
> +		return 1;
> +	}
> +	return 0;
> +}
> diff --git a/tests/ext4/033 b/tests/ext4/033
> index 1bc14c03..22041a17 100755
> --- a/tests/ext4/033
> +++ b/tests/ext4/033
> @@ -5,7 +5,8 @@
>  # FS QA Test 033
>  #
>  # Test s_inodes_count overflow for huge filesystems. This bug was fixed
> -# by commit "ext4: Forbid overflowing inode count when resizing".
> +# by commit 4f2f76f75143 ("ext4: Forbid overflowing inode count when
> +# resizing".)
>  #
>  . ./common/preamble
>  _begin_fstest auto ioctl resize
> @@ -28,7 +29,9 @@ _supported_fs ext4
>  _require_scratch_nocheck
>  _require_dmhugedisk
>  _require_dumpe2fs
> -_require_command "$RESIZE2FS_PROG" resize2fs
> +_require_test_program ext4_resize
> +
> +EXT4_RESIZE=$here/src/ext4_resize
>  
>  # Figure out whether device is large enough
>  devsize=$(blockdev --getsize64 $SCRATCH_DEV)
> @@ -68,7 +71,8 @@ $DUMPE2FS_PROG -h $DMHUGEDISK_DEV >> $seqres.full 2>&1
>  
>  # This should fail, s_inodes_count would just overflow!
>  echo "Resizing to inode limit + 1..."
> -$RESIZE2FS_PROG $DMHUGEDISK_DEV $((limit_groups*group_blocks)) >> $seqres.full 2>&1
> +echo $EXT4_RESIZE $SCRATCH_MNT $((limit_groups*group_blocks)) >> $seqres.full 2>&1
> +$EXT4_RESIZE $SCRATCH_MNT $((limit_groups*group_blocks)) >> $seqres.full 2>&1
>  if [ $? -eq 0 ]; then
>  	echo "Resizing succeeded but it should fail!"
>  	exit
> @@ -76,7 +80,8 @@ fi
>  
>  # This should succeed, we are maxing out inodes
>  echo "Resizing to max group count..."
> -$RESIZE2FS_PROG $DMHUGEDISK_DEV $(((limit_groups-1)*group_blocks)) >> $seqres.full 2>&1
> +echo $EXT4_RESIZE $SCRATCH_MNT $(((limit_groups-1)*group_blocks)) >> $seqres.full 2>&1
> +$EXT4_RESIZE $SCRATCH_MNT $(((limit_groups-1)*group_blocks)) >> $seqres.full 2>&1
>  if [ $? -ne 0 ]; then
>  	echo "Resizing failed!"
>  	exit
> @@ -87,7 +92,8 @@ $DUMPE2FS_PROG -h $DMHUGEDISK_DEV >> $seqres.full 2>&1
>  
>  # This should fail, s_inodes_count would overflow by quite a bit!
>  echo "Resizing to device size..."
> -$RESIZE2FS_PROG $DMHUGEDISK_DEV >> $seqres.full 2>&1
> +echo $EXT4_RESIZE $SCRATCH_MNT $(((limit_groups + 16)*group_blocks)) >> $seqres.full 2>&1
> +$EXT4_RESIZE $SCRATCH_MNT $(((limit_groups + 16)*group_blocks)) >> $seqres.full 2>&1
>  if [ $? -eq 0 ]; then
>  	echo "Resizing succeeded but it should fail!"
>  	exit
> -- 
> 2.31.0
> 


^ permalink raw reply

* stable/linux-5.10.y build: 184 builds: 3 failed, 181 passed, 4 errors, 10 warnings (v5.10.90)
From: kernelci.org bot @ 2022-01-05 15:57 UTC (permalink / raw)
  To: stable, kernel-build-reports, kernelci-results

stable/linux-5.10.y build: 184 builds: 3 failed, 181 passed, 4 errors, 10 warnings (v5.10.90)

Full Build Summary: https://kernelci.org/build/stable/branch/linux-5.10.y/kernel/v5.10.90/

Tree: stable
Branch: linux-5.10.y
Git Describe: v5.10.90
Git Commit: d3e491a20d152e5fba6c02a38916d63f982d98a5
Git URL: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Built: 7 unique architectures

Build Failures Detected:

arm:
    rpc_defconfig: (gcc-10) FAIL

mips:
    ip27_defconfig: (gcc-10) FAIL
    ip28_defconfig: (gcc-10) FAIL

Errors and Warnings Detected:

arc:

arm64:

arm:
    rpc_defconfig (gcc-10): 4 errors

i386:

mips:
    32r2el_defconfig (gcc-10): 1 warning
    decstation_64_defconfig (gcc-10): 1 warning
    decstation_defconfig (gcc-10): 1 warning
    decstation_r4k_defconfig (gcc-10): 1 warning
    lemote2f_defconfig (gcc-10): 1 warning
    rm200_defconfig (gcc-10): 1 warning

riscv:
    rv32_defconfig (gcc-10): 4 warnings

x86_64:

Errors summary:

    2    arm-linux-gnueabihf-gcc: error: unrecognized -march target: armv3m
    2    arm-linux-gnueabihf-gcc: error: missing argument to ‘-march=’

Warnings summary:

    3    kernel/rcu/tasks.h:707:13: warning: ‘show_rcu_tasks_rude_gp_kthread’ defined but not used [-Wunused-function]
    2    <stdin>:830:2: warning: #warning syscall fstat64 not implemented [-Wcpp]
    2    <stdin>:1127:2: warning: #warning syscall fstatat64 not implemented [-Wcpp]
    1    net/mac80211/mlme.c:4335:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]
    1    drivers/block/paride/bpck.c:32: warning: "PC" redefined
    1    WARNING: modpost: Symbol info of vmlinux is missing. Unresolved symbol check will be entirely skipped.

Section mismatches summary:

    1    WARNING: modpost: vmlinux.o(.text+0xd040): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
    1    WARNING: modpost: vmlinux.o(.text+0xce9c): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
    1    WARNING: modpost: vmlinux.o(.text+0xcda4): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
    1    WARNING: modpost: vmlinux.o(.text+0xcd38): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
    1    WARNING: modpost: vmlinux.o(.text+0xcb84): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
    1    WARNING: modpost: vmlinux.o(.text+0xcb74): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
    1    WARNING: modpost: vmlinux.o(.text+0xcb6c): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
    1    WARNING: modpost: vmlinux.o(.text+0xcb4c): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
    1    WARNING: modpost: vmlinux.o(.text+0xcaa8): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
    1    WARNING: modpost: vmlinux.o(.text+0xc8ec): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
    1    WARNING: modpost: vmlinux.o(.text+0xb904): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
    1    WARNING: modpost: vmlinux.o(.text+0x8054): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
    1    WARNING: modpost: vmlinux.o(.text+0x7670): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

================================================================================

Detailed per-defconfig build reports:

--------------------------------------------------------------------------------
32r2el_defconfig (mips, gcc-10) — PASS, 0 errors, 1 warning, 0 section mismatches

Warnings:
    WARNING: modpost: Symbol info of vmlinux is missing. Unresolved symbol check will be entirely skipped.

--------------------------------------------------------------------------------
allnoconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
allnoconfig (i386, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
allnoconfig (x86_64, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
am200epdkit_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
ar7_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
aspeed_g4_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
aspeed_g5_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
assabet_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

Section mismatches:
    WARNING: modpost: vmlinux.o(.text+0xcb6c): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

--------------------------------------------------------------------------------
at91_dt_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
ath25_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
ath79_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
axm55xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
axs103_defconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
axs103_smp_defconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
badge4_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

Section mismatches:
    WARNING: modpost: vmlinux.o(.text+0xcd38): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

--------------------------------------------------------------------------------
bcm2835_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
bcm47xx_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
bcm63xx_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
bigsur_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
bmips_be_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
bmips_stb_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
capcella_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
cavium_octeon_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
cerfcube_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

Section mismatches:
    WARNING: modpost: vmlinux.o(.text+0x7670): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

--------------------------------------------------------------------------------
ci20_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
cm_x300_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
cobalt_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
colibri_pxa270_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
colibri_pxa300_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
collie_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

Section mismatches:
    WARNING: modpost: vmlinux.o(.text+0xb904): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

--------------------------------------------------------------------------------
corgi_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
cu1000-neo_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
cu1830-neo_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
davinci_all_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
db1xxx_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
decstation_64_defconfig (mips, gcc-10) — PASS, 0 errors, 1 warning, 0 section mismatches

Warnings:
    kernel/rcu/tasks.h:707:13: warning: ‘show_rcu_tasks_rude_gp_kthread’ defined but not used [-Wunused-function]

--------------------------------------------------------------------------------
decstation_defconfig (mips, gcc-10) — PASS, 0 errors, 1 warning, 0 section mismatches

Warnings:
    kernel/rcu/tasks.h:707:13: warning: ‘show_rcu_tasks_rude_gp_kthread’ defined but not used [-Wunused-function]

--------------------------------------------------------------------------------
decstation_r4k_defconfig (mips, gcc-10) — PASS, 0 errors, 1 warning, 0 section mismatches

Warnings:
    kernel/rcu/tasks.h:707:13: warning: ‘show_rcu_tasks_rude_gp_kthread’ defined but not used [-Wunused-function]

--------------------------------------------------------------------------------
defconfig (arm64, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
defconfig (riscv, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
defconfig+arm64-chromebook (arm64, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
dove_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
e55_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
ebsa110_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
efm32_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
ep93xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

Section mismatches:
    WARNING: modpost: vmlinux.o(.text+0x8054): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

--------------------------------------------------------------------------------
eseries_pxa_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
exynos_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
ezx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
footbridge_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
fuloong2e_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
gcw0_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
gemini_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
gpr_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
h3600_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

Section mismatches:
    WARNING: modpost: vmlinux.o(.text+0xcb84): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

--------------------------------------------------------------------------------
h5000_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
hackkit_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

Section mismatches:
    WARNING: modpost: vmlinux.o(.text+0xce9c): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

--------------------------------------------------------------------------------
haps_hs_defconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
haps_hs_smp_defconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
hisi_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
hsdk_defconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
i386_defconfig (i386, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
imote2_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
imx_v4_v5_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
imx_v6_v7_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
integrator_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
iop32x_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
ip22_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
ip27_defconfig (mips, gcc-10) — FAIL, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
ip28_defconfig (mips, gcc-10) — FAIL, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
ip32_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
ixp4xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
jazz_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
jmr3927_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
jornada720_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

Section mismatches:
    WARNING: modpost: vmlinux.o(.text+0xcaa8): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

--------------------------------------------------------------------------------
keystone_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
lart_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

Section mismatches:
    WARNING: modpost: vmlinux.o(.text+0xcb74): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

--------------------------------------------------------------------------------
lemote2f_defconfig (mips, gcc-10) — PASS, 0 errors, 1 warning, 0 section mismatches

Warnings:
    net/mac80211/mlme.c:4335:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]

--------------------------------------------------------------------------------
loongson1b_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
loongson1c_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
loongson3_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
lpc18xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
lpc32xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
lpd270_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
lubbock_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
magician_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
mainstone_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
malta_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
malta_kvm_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
malta_kvm_guest_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
malta_qemu_32r6_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
maltaaprp_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
maltasmvp_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
maltasmvp_eva_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
maltaup_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
maltaup_xpa_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
milbeaut_m10v_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
mini2440_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
mmp2_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
moxart_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
mpc30x_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
mps2_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
mtx1_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
multi_v4t_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
multi_v5_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
multi_v7_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
mvebu_v5_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
mvebu_v7_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
mxs_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
neponset_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

Section mismatches:
    WARNING: modpost: vmlinux.o(.text+0xcda4): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

--------------------------------------------------------------------------------
netwinder_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
nhk8815_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
nlm_xlp_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
nlm_xlr_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
nommu_k210_defconfig (riscv, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
nsimosci_hs_defconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
nsimosci_hs_smp_defconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
omap1_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
omap2plus_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
omega2p_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
orion5x_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
oxnas_v6_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
palmz72_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
pcm027_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
pic32mzda_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
pistachio_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
pleb_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

Section mismatches:
    WARNING: modpost: vmlinux.o(.text+0xc8ec): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

--------------------------------------------------------------------------------
prima2_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
pxa168_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
pxa255-idp_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
pxa3xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
pxa910_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
pxa_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
qcom_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
qi_lb60_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
rb532_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
rbtx49xx_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
realview_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
rm200_defconfig (mips, gcc-10) — PASS, 0 errors, 1 warning, 0 section mismatches

Warnings:
    drivers/block/paride/bpck.c:32: warning: "PC" redefined

--------------------------------------------------------------------------------
rpc_defconfig (arm, gcc-10) — FAIL, 4 errors, 0 warnings, 0 section mismatches

Errors:
    arm-linux-gnueabihf-gcc: error: unrecognized -march target: armv3m
    arm-linux-gnueabihf-gcc: error: missing argument to ‘-march=’
    arm-linux-gnueabihf-gcc: error: unrecognized -march target: armv3m
    arm-linux-gnueabihf-gcc: error: missing argument to ‘-march=’

--------------------------------------------------------------------------------
rs90_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
rt305x_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
rv32_defconfig (riscv, gcc-10) — PASS, 0 errors, 4 warnings, 0 section mismatches

Warnings:
    <stdin>:830:2: warning: #warning syscall fstat64 not implemented [-Wcpp]
    <stdin>:1127:2: warning: #warning syscall fstatat64 not implemented [-Wcpp]
    <stdin>:830:2: warning: #warning syscall fstat64 not implemented [-Wcpp]
    <stdin>:1127:2: warning: #warning syscall fstatat64 not implemented [-Wcpp]

--------------------------------------------------------------------------------
s3c2410_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
s3c6400_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
s5pv210_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
sama5_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
sb1250_swarm_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
shannon_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

Section mismatches:
    WARNING: modpost: vmlinux.o(.text+0xcb4c): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

--------------------------------------------------------------------------------
shmobile_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
simpad_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

Section mismatches:
    WARNING: modpost: vmlinux.o(.text+0xd040): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

--------------------------------------------------------------------------------
socfpga_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
spear13xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
spear3xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
spear6xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
spitz_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
stm32_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
sunxi_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
tango4_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
tb0219_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
tb0226_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
tb0287_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
tct_hammer_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
tegra_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
tinyconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
tinyconfig (i386, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
tinyconfig (x86_64, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
trizeps4_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
u300_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
u8500_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
vdk_hs38_defconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
versatile_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
vexpress_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
vf610m4_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
viper_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
vocore2_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
vt8500_v6_v7_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
workpad_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
x86_64_defconfig (x86_64, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
x86_64_defconfig+x86-chromebook (x86_64, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
xcep_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
zeus_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
zx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

---
For more info write to <info@kernelci.org>

^ permalink raw reply

* [mips-linux:mips-next 47/47] sound/pci/ca0106/ca0106.h:62: warning: "PTR" redefined
From: kernel test robot @ 2022-01-05 15:58 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3487 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git mips-next
head:   f0b7ddbd794bdffade370f22bb7a774002208ef4
commit: f0b7ddbd794bdffade370f22bb7a774002208ef4 [47/47] MIPS: retire "asm/llsc.h"
config: mips-allmodconfig (https://download.01.org/0day-ci/archive/20220105/202201052319.tzeOWazm-lkp(a)intel.com/config)
compiler: mips-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/commit/?id=f0b7ddbd794bdffade370f22bb7a774002208ef4
        git remote add mips-linux https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git
        git fetch --no-tags mips-linux mips-next
        git checkout f0b7ddbd794bdffade370f22bb7a774002208ef4
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=mips SHELL=/bin/bash lib/ sound/pci/ca0106/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from sound/pci/ca0106/ca0106_main.c:156:
>> sound/pci/ca0106/ca0106.h:62: warning: "PTR" redefined
      62 | #define PTR                     0x00            /* Indexed register set pointer register        */
         | 
   In file included from arch/mips/include/asm/bitops.h:19,
                    from include/linux/bitops.h:33,
                    from include/linux/log2.h:12,
                    from include/asm-generic/div64.h:55,
                    from arch/mips/include/asm/div64.h:89,
                    from include/linux/math.h:5,
                    from include/linux/delay.h:22,
                    from sound/pci/ca0106/ca0106_main.c:124:
   arch/mips/include/asm/asm.h:288: note: this is the location of the previous definition
     288 | #define PTR             .word
         | 
--
>> lib/test_printf.c:247: warning: "PTR" redefined
     247 | #define PTR ((void *)0x456789ab)
         | 
   In file included from arch/mips/include/asm/bitops.h:19,
                    from include/linux/bitops.h:33,
                    from include/linux/kernel.h:13,
                    from lib/test_printf.c:9:
   arch/mips/include/asm/asm.h:288: note: this is the location of the previous definition
     288 | #define PTR             .word
         | 


vim +/PTR +62 sound/pci/ca0106/ca0106.h

^1da177e4c3f41 Linus Torvalds 2005-04-16  61  
^1da177e4c3f41 Linus Torvalds 2005-04-16 @62  #define PTR			0x00		/* Indexed register set pointer register	*/
^1da177e4c3f41 Linus Torvalds 2005-04-16  63  						/* NOTE: The CHANNELNUM and ADDRESS words can	*/
^1da177e4c3f41 Linus Torvalds 2005-04-16  64  						/* be modified independently of each other.	*/
^1da177e4c3f41 Linus Torvalds 2005-04-16  65  						/* CNL[1:0], ADDR[27:16]                        */
^1da177e4c3f41 Linus Torvalds 2005-04-16  66  

:::::: The code at line 62 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply

* Re: Memory clearing in swiotlb_update_mem_attributes()
From: Kirill A. Shutemov @ 2022-01-05 15:58 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Tom Lendacky, iommu
In-Reply-To: <YdWnUmJsjPUYiycV@infradead.org>

On Wed, Jan 05, 2022 at 06:12:34AM -0800, Christoph Hellwig wrote:
> On Wed, Jan 05, 2022 at 08:06:10AM -0600, Tom Lendacky wrote:
> > On 1/4/22 4:49 PM, Kirill A. Shutemov wrote:
> > > Hi Tom,
> > > 
> > > For larger TDX VM, memset() after set_memory_decrypted() in
> > > swiotlb_update_mem_attributes() takes substantial portion of boot time.
> > > 
> > > It makes me wounder why do we need it there? Malicious VMM can mess with
> > > decrypted/shared buffer at any point and for normal use it will be
> > > populated with real data anyway.
> > > 
> > > Can we drop it?
> > 
> > Probably more a question for Christoph. Does SWIOTLB need to be initialized
> > to zeroes? If it does, then the memset after the set_memory_decrypted() is
> > required, otherwise it will appear as ciphertext to SWIOTLB.
> 
> While the traditional swiotlb initialization zeroes it I can't really
> see any reason why we would want to zero it.  If we really care about
> not leaking data to the device we'd need to zero the padding at mapping
> time.

Does the patch below look fine?

From ab1aa6abbdbba9e34ac7b86e5af1f9f488afaa07 Mon Sep 17 00:00:00 2001
From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Date: Wed, 5 Jan 2022 18:48:01 +0300
Subject: [PATCH] swiotlb: Do not zero buffer in set_memory_decrypted()

For larger TDX VM, memset() after set_memory_decrypted() in
swiotlb_update_mem_attributes() takes substantial portion of boot time.

Zeroing doesn't serve any functional purpose. Malicious VMM can mess
with decrypted/shared buffer at any point.

Remove the memset().

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
---
 kernel/dma/swiotlb.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
index 8e840fbbed7c..4546c834accb 100644
--- a/kernel/dma/swiotlb.c
+++ b/kernel/dma/swiotlb.c
@@ -172,7 +172,6 @@ void __init swiotlb_update_mem_attributes(void)
 	vaddr = phys_to_virt(mem->start);
 	bytes = PAGE_ALIGN(mem->nslabs << IO_TLB_SHIFT);
 	set_memory_decrypted((unsigned long)vaddr, bytes >> PAGE_SHIFT);
-	memset(vaddr, 0, bytes);
 }
 
 static void swiotlb_init_io_tlb_mem(struct io_tlb_mem *mem, phys_addr_t start,
-- 
 Kirill A. Shutemov
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply related

* [Buildroot] [Bug 14501] lttng-modules v2.11 package fails to build
From: bugzilla @ 2022-01-05 15:58 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <bug-14501-163@https.bugs.busybox.net/>

https://bugs.busybox.net/show_bug.cgi?id=14501

Sreedhar Mahadevan <sreedharmahadevan@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sreedharmahadevan@gmail.com

--- Comment #2 from Sreedhar Mahadevan <sreedharmahadevan@gmail.com> ---
Created attachment 9196
  --> https://bugs.busybox.net/attachment.cgi?id=9196&action=edit
Buildroot .config files

Hi Thomas,

I am attaching two .config files here. The reason is that I suspected the
external tool chain option to create the issue, because of which I tried using
buildroot's own tool chain. Unfortunately I encountered the same error using
both configurations. 

Request you to kindly use these configurations and check if you can reproduce
the issue at your end.

Thanks and regards,
Sreedhar

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply

* MES:
From: Mustafa Ayvaz @ 2022-01-05 15:48 UTC (permalink / raw)
  To: linux-sctp

Hello linux-sctp,

I was only wondering if you got my previous email? I have been 
trying to reach you on your email linux-sctp@vger.kernel.org , 
kindly get back to me swiftly, it is very important.

Thanks
Mustafa Ayvaz
mustafa@ayvazburosu.com

^ permalink raw reply

* Re: [LTP] [RFC PATCH] API: Allow testing of kernel features in development
From: Cyril Hrubis @ 2022-01-05 16:00 UTC (permalink / raw)
  To: Richard Palethorpe; +Cc: ltp
In-Reply-To: <YdW/0BUm+vBY3PHy@yuki>

Hi!
> I would be even tempted to add this to the default syscalls runtest file
> but render the test resultless, e.g. replace the tst_res() and tst_brk()
> handlers in tst_res.c so that it will print only INFO messages.

And that would also allow us to have env variable switch that would
enable all tests for unrelased features, something as
LTP_ENABLE_UNRELASED or so. Also with that we can really just TCONF if
that variable is not set which would be much simpler.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply

* [mips-linux:mips-next 47/47] sound/pci/ca0106/ca0106.h:62: warning: "PTR" redefined
From: kernel test robot @ 2022-01-05 15:58 UTC (permalink / raw)
  To: Huang Pei; +Cc: kbuild-all, linux-mips, Thomas Bogendoerfer

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git mips-next
head:   f0b7ddbd794bdffade370f22bb7a774002208ef4
commit: f0b7ddbd794bdffade370f22bb7a774002208ef4 [47/47] MIPS: retire "asm/llsc.h"
config: mips-allmodconfig (https://download.01.org/0day-ci/archive/20220105/202201052319.tzeOWazm-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/commit/?id=f0b7ddbd794bdffade370f22bb7a774002208ef4
        git remote add mips-linux https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git
        git fetch --no-tags mips-linux mips-next
        git checkout f0b7ddbd794bdffade370f22bb7a774002208ef4
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=mips SHELL=/bin/bash lib/ sound/pci/ca0106/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from sound/pci/ca0106/ca0106_main.c:156:
>> sound/pci/ca0106/ca0106.h:62: warning: "PTR" redefined
      62 | #define PTR                     0x00            /* Indexed register set pointer register        */
         | 
   In file included from arch/mips/include/asm/bitops.h:19,
                    from include/linux/bitops.h:33,
                    from include/linux/log2.h:12,
                    from include/asm-generic/div64.h:55,
                    from arch/mips/include/asm/div64.h:89,
                    from include/linux/math.h:5,
                    from include/linux/delay.h:22,
                    from sound/pci/ca0106/ca0106_main.c:124:
   arch/mips/include/asm/asm.h:288: note: this is the location of the previous definition
     288 | #define PTR             .word
         | 
--
>> lib/test_printf.c:247: warning: "PTR" redefined
     247 | #define PTR ((void *)0x456789ab)
         | 
   In file included from arch/mips/include/asm/bitops.h:19,
                    from include/linux/bitops.h:33,
                    from include/linux/kernel.h:13,
                    from lib/test_printf.c:9:
   arch/mips/include/asm/asm.h:288: note: this is the location of the previous definition
     288 | #define PTR             .word
         | 


vim +/PTR +62 sound/pci/ca0106/ca0106.h

^1da177e4c3f41 Linus Torvalds 2005-04-16  61  
^1da177e4c3f41 Linus Torvalds 2005-04-16 @62  #define PTR			0x00		/* Indexed register set pointer register	*/
^1da177e4c3f41 Linus Torvalds 2005-04-16  63  						/* NOTE: The CHANNELNUM and ADDRESS words can	*/
^1da177e4c3f41 Linus Torvalds 2005-04-16  64  						/* be modified independently of each other.	*/
^1da177e4c3f41 Linus Torvalds 2005-04-16  65  						/* CNL[1:0], ADDR[27:16]                        */
^1da177e4c3f41 Linus Torvalds 2005-04-16  66  

:::::: The code at line 62 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply

* Re: [PATCH v5 2/6] powercap/drivers/dtpm: Add hierarchy creation
From: Daniel Lezcano @ 2022-01-05 16:00 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: rjw, lukasz.luba, robh, heiko, arnd, linux-kernel, linux-pm,
	Rafael J. Wysocki, Daniel Lezcano
In-Reply-To: <CAPDyKFrLTsUxG8JHdK33h2BT8pxeHk6kiU-4uGrvxUhcQKg3Sw@mail.gmail.com>

On 31/12/2021 14:45, Ulf Hansson wrote:

[ ... ]

>> +static struct dtpm *dtpm_setup_dt(const struct dtpm_node *hierarchy,
>> +                                 struct dtpm *parent)
>> +{
>> +       struct dtpm_descr *dtpm_descr;
>> +       struct device_node *np;
>> +       int ret;
>> +
>> +       np = of_find_node_by_path(hierarchy->name);
>> +       if (!np) {
>> +               pr_err("Failed to find '%s'\n", hierarchy->name);
>> +               return ERR_PTR(-ENXIO);
>> +       }
>> +
>> +       for_each_dtpm_table(dtpm_descr) {
>> +
>> +               ret = dtpm_descr->setup(parent, np);
> 
> This will unconditionally call the ->setup callback() for each dtpm
> desc in the dtpm table. At this point the ->setup() callback has not
> been assigned by anyone that uses DTPM_DECLARE(), so if this would be
> called, it would trigger a NULL pointer dereference error.
> 
> On the other hand, we don't have someone calling
> dtpm_create_hierarchy() yet, so this code doesn't get exercised, but

Yes, that is the reason why the test is not here.

> it still looks a bit odd to me. Maybe squashing patch2 and patch3 is
> an option?
Sure

>> +               if (ret) {
>> +                       pr_err("Failed to setup '%s': %d\n", hierarchy->name, ret);
>> +                       of_node_put(np);
>> +                       return ERR_PTR(ret);
>> +               }
>> +
>> +               of_node_put(np);
> 
> This will be called for every loop in the dtpm table. This is wrong,
> you only want to call it once, outside the loop.

Right, good catch

>> +       }
>> +
>> +       /*
>> +        * By returning a NULL pointer, we let know the caller there
>> +        * is no child for us as we are a leaf of the tree
>> +        */
>> +       return NULL;
>> +}
>> +
>> +typedef struct dtpm * (*dtpm_node_callback_t)(const struct dtpm_node *, struct dtpm *);
>> +
>> +dtpm_node_callback_t dtpm_node_callback[] = {
>> +       [DTPM_NODE_VIRTUAL] = dtpm_setup_virtual,
>> +       [DTPM_NODE_DT] = dtpm_setup_dt,
>> +};
>> +
>> +static int dtpm_for_each_child(const struct dtpm_node *hierarchy,
>> +                              const struct dtpm_node *it, struct dtpm *parent)
>> +{
>> +       struct dtpm *dtpm;
>> +       int i, ret;
>> +
>> +       for (i = 0; hierarchy[i].name; i++) {
>> +
>> +               if (hierarchy[i].parent != it)
>> +                       continue;
>> +
>> +               dtpm = dtpm_node_callback[hierarchy[i].type](&hierarchy[i], parent);
>> +               if (!dtpm || IS_ERR(dtpm))
>> +                       continue;
>> +
>> +               ret = dtpm_for_each_child(hierarchy, &hierarchy[i], dtpm);
> 
> Why do you need to recursively call dtpm_for_each_child() here?
> 
> Is there a restriction on how the dtpm core code manages adding
> children/parents?

[ ... ]

The recursive call is needed given the structure of the tree in an array
in order to connect with the parent.


>> + *
>> + * struct dtpm_node hierarchy[] = {
>> + *     [0] { .name = "topmost" },
> 
> For clarity, I think we should also specify DTPM_NODE_VIRTUAL here.
> 
>> + *      [1] { .name = "package", .parent = &hierarchy[0] },
> 
> Ditto.

Sure

[ ... ]

>> +static int __init init_dtpm(void)
>> +{
>>         pct = powercap_register_control_type(NULL, "dtpm", NULL);
>>         if (IS_ERR(pct)) {
>>                 pr_err("Failed to register control type\n");
>>                 return PTR_ERR(pct);
>>         }
> 
> It looks like powercap_register_control_type() should be able to be
> called from dtpm_create_hierarchy(). In this way we can simply drop
> the initcall below, altogether.
>
> Of course, that assumes that dtpm_create_hierachy() is being called
> from a regular module_platform_driver() path - or at least from a
> later initcall than fs_initcall(), which is when the "powercap_class"
> is being registered. But that sounds like a reasonable assumption we
> should be able to make, no?

Yes, agree. Good suggestion, I will do the change.

[ ... ]

>>  int dtpm_register(const char *name, struct dtpm *dtpm, struct dtpm *parent);
>>
>> +int dtpm_create_hierarchy(struct of_device_id *dtpm_match_table);
> 
> To start simple, I think dtpm_create_hiearchy() is the sufficient
> interface to add at this point.
> 
> However, it's quite likely that it's going to be called from a regular
> module (SoC specific platform driver), which means it needs to manage
> ->remove() operations too. Anyway, I am fine if we look into that as
> improvements on top of the $subject series.

Yes, ATM, the modules can not be unloaded on purpose. The removal can be
added later


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply

* Re: [PATCH 00/11] Add support for SUNIV and F1C100s.
From: Giulio Benetti @ 2022-01-05 16:00 UTC (permalink / raw)
  To: Jesse Taube, Andre Przywara, Icenowy Zheng
  Cc: u-boot, jagan, hdegoede, sjg, marek.behun, festevam, narmstrong,
	tharvey, christianshewitt, pbrobinson, lokeshvutla,
	jernej.skrabec, hs, samuel, arnaud.ferraris, thirtythreeforty
In-Reply-To: <8e85b8ea-d400-c3c1-4610-c88f5ed0510c@gmail.com>

Hi All,

On 05/01/22 13:54, Jesse Taube wrote:
> 
> 
> On 1/5/22 07:14, Andre Przywara wrote:
>> On Wed, 05 Jan 2022 19:36:29 +0800
>> Icenowy Zheng <icenowy@aosc.io> wrote:
>>
>> Hi Jesse,
>>
>>> 在 2022-01-04星期二的 19:34 -0500,Jesse Taube写道:
>>>> This patch set aims to add suport for the SUNIV and F1C100s.
>>>> Suport has been in linux for a while now, but not in u-boot.
>>>>
>>>> This patchset contains:
>>>> - CPU specific initialization code
>>>> - SUNIV dram driver
>>>> - SUNIV clock driver adaption
>>>> - SUNIV gpio driver adaption
>>>> - SUNIV uart driver adaption
>>>> - F1C100s basic support
>>>>
>>>> I am hoping to get Icenowy's patches in as it seems she hasnt
>>>> submitted
>>>> in a while. The only edits I made to her code is rebasing it against
>>>> ML
>>>> and changing some formating. I also re-grouped her commits.
>>>
>>> I got too lazy to send it (because I think F1C100s is just too weak)...
>>>
>>>>
>>>> I am wondering if the dram driver should be moved into device drivers
>>>> rather than in mach-sunxi.
>>>> I am also wondering if it is okay to submit some one elses code,
>>>> and if so how should I do so.
>>>
>>> As you are keeping my SoB and adding yours, it's totally okay.
>>
>> Thanks Icenowy for confirming!
>>
>> Jesse: yes, it's perfectly fine to send patches from someone else, as
>> long as you keep the authorship, their SoB, and add your's.
>> Typical reasons are lack of time or interest from the original author.
>>
>> But it's customary to ask the author first
> I did but it must have gotten lost in the cosmos.
> , and care should be taken
>> when changing patches, as this might not be in the interest of the
>> original author (and they are the ones who will get blamed for bugs).
>> Also please mark the series either as a Resend or as a v2.
>>
>> So with Icenowy's confirmation above I consider this fine.
>>
>> But what was actually holding back this series was lack of review,
>> testing and/or interest.
> Well the price of the SOC has gained it some popularity, aswell as a
> couple forum posts.
>> Similar to Icenowy my personal interest in
>> crufty old cores is somewhat limited, so this wasn't very high on my
>> priority list.
> It is very slow but its a good challenge.

Slow depending on application :-)
Two of my customers would like to use it in Q2/Q3 for very low-end HMIs.

And as I see, one of the last F1Cxxx is F1C800s released in 2017. Here 
the good thing they have is ram onboard.

>>
>> So given that there is apparently some interest now:
>> Can you confirm that you have reviewed the series, or at least tested
>> this?
> I have tested this yes.
> I would be interested to know if a second pair of eyes had a
>> look, and to what extent.
> I'm Sending giulio.benetti@ some boards I made he will also test. I'm
> sure many other people will be willing to test aswell.

Yes, I'll test on Jesse's board and on Lichee-pi-nano too when I have 
time, this way I'll be able to give a Tested-by: me.

Best regards
-- 
Giulio Benetti
Benetti Engineering sas

>> I don't have any hardware, so would need to
>> rely on others to make sure this code is somewhat sane.
> I can send you one of my many boards :)
>> And it basically looks like a v2 of Icenowy's series, so can you give a
>> Changelog of the differences? I skimmed over her original series back
>> then, so I would be interested in what makes this version special.
> It passes checkpatch on the latest.
>>
>> Cheers,
>> Andre
>>
>>> Thanks for cleaning up these patches! ;-)
> NP!
> 
> I took https://github.com/Lichee-Pi/u-boot/tree/nano-v2018.01
> re-based it against mainline and fixed formatting in a few files.
> I also removed the spi-flash driver as it was causing issues and we can
> boot from sdcard for now. there are some things I did to make the old
> code compatible with new code but mostly preprocessor and configs.
> 
> For the dram driver I had to change a bit but none of the logic, i am
> worried that i may have to move it to /drivers.
> 
> Do you want a more comprehensive list of changes?
> 


^ permalink raw reply


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.