6.1.21-rc1 review
Greg Kroah-Hartman
maintainerPATCH 158/198 drm/i915/dg2: Add HDMI pixel clock frequencies 267.30 and 319.89 MHz
In reply to Greg Kroah-HartmanFrom: Ankit Nautiyal <[email protected]>
commit 46bc23dcd94569270d02c4c1f7e62ae01ebd53bb upstream.
Add snps phy table values for HDMI pixel clocks 267.30 MHz and 319.89 MHz. Values are based on the Bspec algorithm for PLL programming for HDMI.
--- drivers/gpu/drm/i915/display/intel_snps_phy.c | 62 ++++++++++++++++++++++++++ 1 file changed, 62 insertions(+)
drivers/gpu/drm/i915/display/intel_snps_phy.c +62 -0
@@ -1418,6 +1418,36 @@ static const struct intel_mpllb_state dg REG_FIELD_PREP(SNPS_PHY_MPLLB_SSC_UP_SPREAD, 1), }; +static const struct intel_mpllb_state dg2_hdmi_267300 = { + .clock =267300 , + .ref_control = +REG_FIELD_PREP (SNPS_PHY_REF_CONTROL_REF_RANGE ,3 ), + .mpllb_cp = +REG_FIELD_PREP (SNPS_PHY_MPLLB_CP_INT ,7 ) | +REG_FIELD_PREP (SNPS_PHY_MPLLB_CP_PROP ,14 ) | +REG_FIELD_PREP (SNPS_PHY_MPLLB_CP_INT_GS ,64 ) | +REG_FIELD_PREP (SNPS_PHY_MPLLB_CP_PROP_GS ,124 ), + .mpllb_div = +REG_FIELD_PREP (SNPS_PHY_MPLLB_DIV5_CLK_EN ,1 ) | +REG_FIELD_PREP (SNPS_PHY_MPLLB_TX_CLK_DIV ,1 ) | +REG_FIELD_PREP (SNPS_PHY_MPLLB_PMIX_EN ,1 ) | +REG_FIELD_PREP (SNPS_PHY_MPLLB_V2I ,2 ) | +REG_FIELD_PREP (SNPS_PHY_MPLLB_FREQ_VCO ,3 ), + .mpllb_div2 = +REG_FIELD_PREP (SNPS_PHY_MPLLB_REF_CLK_DIV ,1 ) | +REG_FIELD_PREP (SNPS_PHY_MPLLB_MULTIPLIER ,74 ) | +REG_FIELD_PREP (SNPS_PHY_MPLLB_HDMI_DIV ,1 ), + .mpllb_fracn1 = +REG_FIELD_PREP (SNPS_PHY_MPLLB_FRACN_CGG_UPDATE_EN ,1 ) | +REG_FIELD_PREP (SNPS_PHY_MPLLB_FRACN_EN ,1 ) | +REG_FIELD_PREP (SNPS_PHY_MPLLB_FRACN_DEN ,65535 ), + .mpllb_fracn2 = +REG_FIELD_PREP (SNPS_PHY_MPLLB_FRACN_QUOT ,30146 ) | +REG_FIELD_PREP (SNPS_PHY_MPLLB_FRACN_REM ,36699 ), + .mpllb_sscen = +REG_FIELD_PREP (SNPS_PHY_MPLLB_SSC_UP_SPREAD ,1 ), +}; +static const struct intel_mpllb_state dg2_hdmi_268500 = { .clock =268500 , .ref_control =
@@ -1508,6 +1538,36 @@ static const struct intel_mpllb_state dg REG_FIELD_PREP(SNPS_PHY_MPLLB_SSC_UP_SPREAD, 1), }; +static const struct intel_mpllb_state dg2_hdmi_319890 = { + .clock =319890 , + .ref_control = +REG_FIELD_PREP (SNPS_PHY_REF_CONTROL_REF_RANGE ,3 ), + .mpllb_cp = +REG_FIELD_PREP (SNPS_PHY_MPLLB_CP_INT ,6 ) | +REG_FIELD_PREP (SNPS_PHY_MPLLB_CP_PROP ,14 ) | +REG_FIELD_PREP (SNPS_PHY_MPLLB_CP_INT_GS ,64 ) | +REG_FIELD_PREP (SNPS_PHY_MPLLB_CP_PROP_GS ,124 ), + .mpllb_div = +REG_FIELD_PREP (SNPS_PHY_MPLLB_DIV5_CLK_EN ,1 ) | +REG_FIELD_PREP (SNPS_PHY_MPLLB_TX_CLK_DIV ,1 ) | +REG_FIELD_PREP (SNPS_PHY_MPLLB_PMIX_EN ,1 ) | +REG_FIELD_PREP (SNPS_PHY_MPLLB_V2I ,2 ) | +REG_FIELD_PREP (SNPS_PHY_MPLLB_FREQ_VCO ,2 ), + .mpllb_div2 = +REG_FIELD_PREP (SNPS_PHY_MPLLB_REF_CLK_DIV ,1 ) | +REG_FIELD_PREP (SNPS_PHY_MPLLB_MULTIPLIER ,94 ) | +REG_FIELD_PREP (SNPS_PHY_MPLLB_HDMI_DIV ,1 ), + .mpllb_fracn1 = +REG_FIELD_PREP (SNPS_PHY_MPLLB_FRACN_CGG_UPDATE_EN ,1 ) | +REG_FIELD_PREP (SNPS_PHY_MPLLB_FRACN_EN ,1 ) | +REG_FIELD_PREP (SNPS_PHY_MPLLB_FRACN_DEN ,65535 ), + .mpllb_fracn2 = +REG_FIELD_PREP (SNPS_PHY_MPLLB_FRACN_QUOT ,64094 ) | +REG_FIELD_PREP (SNPS_PHY_MPLLB_FRACN_REM ,13631 ), + .mpllb_sscen = +REG_FIELD_PREP (SNPS_PHY_MPLLB_SSC_UP_SPREAD ,1 ), +}; +static const struct intel_mpllb_state dg2_hdmi_497750 = { .clock =497750 , .ref_control =
@@ -1695,8 +1755,10 @@ static const struct intel_mpllb_state * &dg2_hdmi_209800, &dg2_hdmi_241500, &dg2_hdmi_262750, + &dg2_hdmi_267300, &dg2_hdmi_268500, &dg2_hdmi_296703, + &dg2_hdmi_319890, &dg2_hdmi_497750, &dg2_hdmi_592000, &dg2_hdmi_593407,
Greg Kroah-Hartman
maintainerPATCH 159/198 drm/amdgpu: Dont resume IOMMU after incomplete init
In reply to Greg Kroah-HartmanFrom: Felix Kuehling <[email protected]>
commit f3921a9a641483784448fb982b2eb738b383d9b9 upstream.
Check kfd->init_complete in kgd2kfd_iommu_resume, consistent with other kgd2kfd calls. This should fix IOMMU errors on resume from suspend when KFD IOMMU initialization failed.
--- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_device.c +10 -1
@@ -59,6 +59,7 @@ static int kfd_gtt_sa_init(struct kfd_de unsigned int chunk_size);static void kfd_gtt_sa_fini (struct kfd_dev *kfd); +static int kfd_resume_iommu (struct kfd_dev *kfd);static int kfd_resume (struct kfd_dev *kfd);static void kfd_device_info_set_sdma_info (struct kfd_dev *kfd)
@@ -634,7 +635,7 @@ bool kgd2kfd_device_init(struct kfd_devsvm_migrate_init (kfd->adev); -if (kgd2kfd_resume_iommu (kfd)) +if (kfd_resume_iommu (kfd)) goto device_iommu_error;if (kfd_resume (kfd))
@@ -783,6 +784,14 @@ int kgd2kfd_resume(struct kfd_dev *kfd,int kgd2kfd_resume_iommu (struct kfd_dev *kfd) { +if (!kfd->init_complete) +return 0 ; + +return kfd_resume_iommu (kfd); +} + +static int kfd_resume_iommu (struct kfd_dev *kfd) +{int err =0 ; err =kfd_iommu_resume (kfd);
Greg Kroah-Hartman
maintainerPATCH 160/198 drm/amd/pm: Fix sienna cichlid incorrect OD volage after resume
In reply to Greg Kroah-HartmanFrom: Błażej Szczygieł <[email protected]>
commit a9386ee9681585794dbab95d4ce6826f73d19af6 upstream.
Always setup overdrive tables after resume. Preserve only some user-defined settings in user_overdrive_table if they're set.
Copy restored user_overdrive_table into od_table to get correct values.
On cold boot, BTC was triggered and GfxVfCurve was calibrated. We got VfCurve settings (a). On resuming back, BTC will be triggered again and GfxVfCurve will be recalibrated. VfCurve settings (b) got may be different from those of cold boot. So if we reuse those VfCurve settings (a) got on cold boot on suspend, we can run into discrepencies.
--- drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 43 ++++++++++++---- 1 file changed, 33 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +33 -10
@@ -2143,16 +2143,9 @@ static int sienna_cichlid_set_default_od (OverDriveTable_t *)smu->smu_table.boot_overdrive_table;OverDriveTable_t *user_od_table = (OverDriveTable_t *)smu->smu_table.user_overdrive_table; +OverDriveTable_t user_od_table_bak;int ret =0 ; -/* -* For S3/S4/Runpm resume, no need to setup those overdrive tables again as -* - either they already have the default OD settings got during cold bootup -* - or they have some user customized OD settings which cannot be overwritten -*/ -if (smu->adev->in_suspend) -return 0 ; - ret =smu_cmn_update_table (smu,SMU_TABLE_OVERDRIVE ,0 , (void *)boot_od_table, false);if (ret) {
@@ -2163,7 +2156,23 @@ static int sienna_cichlid_set_default_odsienna_cichlid_dump_od_table (smu, boot_od_table);memcpy (od_table, boot_od_table,sizeof (OverDriveTable_t)); -memcpy (user_od_table, boot_od_table,sizeof (OverDriveTable_t)); + +/* +* For S3/S4/Runpm resume, we need to setup those overdrive tables again, +* but we have to preserve user defined values in "user_od_table". +*/ +if (!smu->adev->in_suspend) { +memcpy (user_od_table, boot_od_table,sizeof (OverDriveTable_t)); + smu->user_dpm_profile.user_od = false; + }else if (smu->user_dpm_profile.user_od) { +memcpy (&user_od_table_bak, user_od_table,sizeof (OverDriveTable_t)); +memcpy (user_od_table, boot_od_table,sizeof (OverDriveTable_t)); + user_od_table->GfxclkFmin = user_od_table_bak.GfxclkFmin; + user_od_table->GfxclkFmax = user_od_table_bak.GfxclkFmax; + user_od_table->UclkFmin = user_od_table_bak.UclkFmin; + user_od_table->UclkFmax = user_od_table_bak.UclkFmax; + user_od_table->VddGfxOffset = user_od_table_bak.VddGfxOffset; + }return 0 ; }
@@ -2373,6 +2382,20 @@ static int sienna_cichlid_od_edit_dpm_tareturn ret; } +static int sienna_cichlid_restore_user_od_settings (struct smu_context *smu) +{ +struct smu_table_context *table_context = &smu->smu_table; +OverDriveTable_t *od_table = table_context->overdrive_table; +OverDriveTable_t *user_od_table = table_context->user_overdrive_table; +int res; + + res =smu_v11_0_restore_user_od_settings (smu); +if (res ==0 ) +memcpy (od_table, user_od_table,sizeof (OverDriveTable_t)); + +return res; +} +static int sienna_cichlid_run_btc (struct smu_context *smu) {int res;
@@ -4400,7 +4423,7 @@ static const struct pptable_funcs sienna .set_soft_freq_limited_range = smu_v11_0_set_soft_freq_limited_range, .set_default_od_settings = sienna_cichlid_set_default_od_settings, .od_edit_dpm_table = sienna_cichlid_od_edit_dpm_table, - .restore_user_od_settings = smu_v11_0_restore_user_od_settings, + .restore_user_od_settings = sienna_cichlid_restore_user_od_settings, .run_btc = sienna_cichlid_run_btc, .set_power_source = smu_v11_0_set_power_source, .get_pp_feature_mask = smu_cmn_get_pp_feature_mask,
Greg Kroah-Hartman
maintainerPATCH 161/198 drm/amd/pm: bump SMU 13.0.4 driver_if header version
In reply to Greg Kroah-HartmanFrom: Tim Huang <[email protected]>
commit ab9bdb1213b4b40942af6a383f555d0c14874c1b upstream.
Align the SMU driver interface version with PMFW to suppress the version mismatch message on driver loading.
--- drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_4.h | 4 ++-- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_4.h +2 -2
@@ -27,7 +27,7 @@// *** IMPORTANT *** // SMU TEAM: Always increment the interface version if // any structure is changed in this file -#define PMFW_DRIVER_IF_VERSION 7 +#define PMFW_DRIVER_IF_VERSION 8 typedef struct { int32_t value;
@@ -198,7 +198,7 @@ typedef struct {uint16_t SkinTemp;uint16_t DeviceState;uint16_t CurTemp;//[centi-Celsius] -uint16_t spare2; +uint16_t FilterAlphaValue;uint16_t AverageGfxclkFrequency;uint16_t AverageFclkFrequency;
drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h +1 -1
@@ -29,7 +29,7 @@#define SMU13_DRIVER_IF_VERSION_YELLOW_CARP 0x04#define SMU13_DRIVER_IF_VERSION_ALDE 0x08#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_0_0 0x37 -#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_4 0x07 +#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_4 0x08#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_5 0x04#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_0_10 0x32#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_7 0x37
Greg Kroah-Hartman
maintainerPATCH 162/198 drm/amd/display: Do not set DRR on pipe Commit
In reply to Greg Kroah-HartmanFrom: Wesley Chalmers <[email protected]>
commit 56574f89dbd84004c3fd6485bcaafb5aa9b8be14 upstream.
[WHY]
Writing to DRR registers such as OTG_V_TOTAL_MIN on the same frame as a pipe commit can cause underflow.
--- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c | 3 --- 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c +0 -3
@@ -992,8 +992,5 @@ void dcn30_prepare_bandwidth(struct dc * dc->clk_mgr->funcs->set_max_memclk (dc->clk_mgr, dc->clk_mgr->bw_params->clk_table.entries[dc->clk_mgr->bw_params->clk_table.num_entries -1 ].memclk_mhz);dcn20_prepare_bandwidth (dc, context); - -dc_dmub_srv_p_state_delegate (dc, - context->bw_ctx.bw.dcn.clk.fw_based_mclk_switching, context); }
Greg Kroah-Hartman
maintainerPATCH 163/198 drm/amd/display: disconnect MPCC only on OTG change
In reply to Greg Kroah-HartmanFrom: Ayush Gupta <[email protected]>
commit 7304ee979b6b6422f41a1312391a5e505fc29ccd upstream.
[Why]
Framedrops are observed while playing Vp9 and Av1 10 bit video on 8k resolution using VSR while playback controls are disappeared/appeared
[How]
Now ODM 2 to 1 is disabled for 5k or greater resolutions on VSR.
--- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c +5 -1
@@ -1883,6 +1883,7 @@ int dcn32_populate_dml_pipes_from_contexbool subvp_in_use = false;uint8_t is_pipe_split_expected[MAX_PIPES ] = {0 };struct dc_crtc_timing *timing; +bool vsr_odm_support = false;dcn20_populate_dml_pipes_from_context (dc, context, pipes, fast_validate);
@@ -1900,12 +1901,15 @@ int dcn32_populate_dml_pipes_from_contex timing = &pipe->stream->timing; pipes[pipe_cnt].pipe.dest.odm_combine_policy = dm_odm_combine_policy_dal; + vsr_odm_support = (res_ctx->pipe_ctx[i].stream->src.width >=5120 && + res_ctx->pipe_ctx[i].stream->src.width > res_ctx->pipe_ctx[i].stream->dst.width);if (context->stream_count ==1 && context->stream_status[0 ].plane_count ==1 && !dc_is_hdmi_signal (res_ctx->pipe_ctx[i].stream->signal) &&is_h_timing_divisible_by_2 (res_ctx->pipe_ctx[i].stream) && pipe->stream->timing.pix_clk_100hz *100 >DCN3_2_VMIN_DISPCLK_HZ && - dc->debug.enable_single_display_2to1_odm_policy) { + dc->debug.enable_single_display_2to1_odm_policy && + !vsr_odm_support) {//excluding 2to1 ODM combine on >= 5k vsr pipes[pipe_cnt].pipe.dest.odm_combine_policy = dm_odm_combine_policy_2to1; } pipe_cnt++;
Greg Kroah-Hartman
maintainerPATCH 164/198 mptcp: fix possible deadlock in subflow_error_report
In reply to Greg Kroah-HartmanFrom: Paolo Abeni <[email protected]>
commit b7a679ba7c652587b85294f4953f33ac0b756d40 upstream.
Christoph reported a possible deadlock while the TCP stack destroys an unaccepted subflow due to an incoming reset: the MPTCP socket error path tries to acquire the msk-level socket lock while TCP still owns the listener socket accept queue spinlock, and the reverse dependency already exists in the TCP stack.
Note that the above is actually a lockdep false positive, as the chain involves two separate sockets. A different per-socket lockdep key will address the issue, but such a change will be quite invasive.
Instead, we can simply stop earlier the socket error handling for orphaned or unaccepted subflows, breaking the critical lockdep chain. Error handling in such a scenario is a no-op.
--- net/mptcp/subflow.c | 7 +++++++ 1 file changed, 7 insertions(+)
net/mptcp/subflow.c +7 -0
@@ -1376,6 +1376,13 @@ static void subflow_error_report(struct {struct sock *sk =mptcp_subflow_ctx (ssk)->conn; +/* bail early if this is a no-op, so that we avoid introducing a +* problematic lockdep dependency between TCP accept queue lock +* and msk socket spinlock +*/ +if (!sk->sk_socket) +return ; +mptcp_data_lock (sk);if (!sock_owned_by_user (sk))__mptcp_error_report (sk);
Greg Kroah-Hartman
maintainerPATCH 165/198 mptcp: add ro_after_init for tcp{,v6}_prot_override
In reply to Greg Kroah-HartmanFrom: Geliang Tang <[email protected]>
commit 822467a48e938e661965d09df5fcac66f7291050 upstream.
Add __ro_after_init labels for the variables tcp_prot_override and tcpv6_prot_override, just like other variables adjacent to them, to indicate that they are initialised from the init hooks and no writes occur afterwards.
--- net/mptcp/subflow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/mptcp/subflow.c +2 -2
@@ -560,7 +560,7 @@ static struct request_sock_ops mptcp_substatic struct tcp_request_sock_ops subflow_request_sock_ipv6_ops__ro_after_init ;static struct inet_connection_sock_af_ops subflow_v6_specific__ro_after_init ;static struct inet_connection_sock_af_ops subflow_v6m_specific__ro_after_init ; -static struct proto tcpv6_prot_override; +static struct proto tcpv6_prot_override__ro_after_init ;static int subflow_v6_conn_request (struct sock *sk,struct sk_buff *skb) {
@@ -846,7 +846,7 @@ dispose_child: }static struct inet_connection_sock_af_ops subflow_specific__ro_after_init ; -static struct proto tcp_prot_override; +static struct proto tcp_prot_override__ro_after_init ;enum mapping_status {MAPPING_OK ,
Greg Kroah-Hartman
maintainerPATCH 166/198 mptcp: avoid setting TCP_CLOSE state twice
In reply to Greg Kroah-HartmanFrom: Matthieu Baerts <[email protected]>
commit 3ba14528684f528566fb7d956bfbfb958b591d86 upstream.
tcp_set_state() is called from tcp_done() already.
There is then no need to first set the state to TCP_CLOSE, then call tcp_done().
--- net/mptcp/subflow.c | 1 - 1 file changed, 1 deletion(-)
net/mptcp/subflow.c +0 -1
@@ -358,7 +358,6 @@ void mptcp_subflow_reset(struct sock *ss/* must hold: tcp_done() could drop last reference on parent */ sock_hold (sk); -tcp_set_state (ssk,TCP_CLOSE );tcp_send_active_reset (ssk,GFP_ATOMIC );tcp_done (ssk); if (!test_and_set_bit(MPTCP_WORK_CLOSE_SUBFLOW, &mptcp_sk(sk)->flags) &&
Greg Kroah-Hartman
maintainerPATCH 167/198 mptcp: fix lockdep false positive in mptcp_pm_nl_create_listen_socket()
In reply to Greg Kroah-HartmanFrom: Paolo Abeni <[email protected]>
commit cee4034a3db1d30c3243dd51506a9d4ab1a849fa upstream.
Christoph reports a lockdep splat in the mptcp_subflow_create_socket() error path, when such function is invoked by mptcp_pm_nl_create_listen_socket().
Such code path acquires two separates, nested socket lock, with the internal lock operation lacking the "nested" annotation. Adding that in sock_release() for mptcp's sake only could be confusing.
Instead just add a new lockclass to the in-kernel msk socket, re-initializing the lockdep infra after the socket creation.
--- net/mptcp/pm_netlink.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
net/mptcp/pm_netlink.c +16 -0
@@ -987,9 +987,13 @@ out:return ret; } +static struct lock_class_key mptcp_slock_keys[2 ]; +static struct lock_class_key mptcp_keys[2 ]; +static int mptcp_pm_nl_create_listen_socket (struct sock *sk,struct mptcp_pm_addr_entry *entry) { +bool is_ipv6 = sk->sk_family ==AF_INET6 ;int addrlen =sizeof (struct sockaddr_in );struct sockaddr_storage addr;struct socket *ssock;
@@ -1006,6 +1010,18 @@ static int mptcp_pm_nl_create_listen_socif (!newsk)return -EINVAL ; +/* The subflow socket lock is acquired in a nested to the msk one +* in several places, even by the TCP stack, and this msk is a kernel +* socket: lockdep complains. Instead of propagating the _nested +* modifiers in several places, re-init the lock class for the msk +* socket to an mptcp specific one. +*/ +sock_lock_init_class_and_name (newsk, + is_ipv6 ?"mlock-AF_INET6" :"mlock-AF_INET" , + &mptcp_slock_keys[is_ipv6], + is_ipv6 ?"msk_lock-AF_INET6" :"msk_lock-AF_INET" , + &mptcp_keys[is_ipv6]); +lock_sock (newsk); ssock =__mptcp_nmpc_socket (mptcp_sk (newsk));release_sock (newsk);
Greg Kroah-Hartman
maintainerPATCH 168/198 ftrace: Fix invalid address access in lookup_rec() when index is 0
In reply to Greg Kroah-HartmanFrom: Chen Zhongjin <[email protected]>
commit ee92fa443358f4fc0017c1d0d325c27b37802504 upstream.
KASAN reported follow problem:
BUG: KASAN: use-after-free in lookup_rec Read of size 8 at addr ffff000199270ff0 by task modprobe CPU: 2 Comm: modprobe Call trace: kasan_report __asan_load8 lookup_rec ftrace_location arch_check_ftrace_location check_kprobe_address_safe register_kprobe
When checking pg->records[pg->index - 1].ip in lookup_rec(), it can get a pg which is newly added to ftrace_pages_start in ftrace_process_locs(). Before the first pg->index++, index is 0 and accessing pg->records[-1].ip will cause this problem.
Don't check the ip when pg->index is 0.
--- kernel/trace/ftrace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/trace/ftrace.c +2 -1
@@ -1537,7 +1537,8 @@ static struct dyn_ftrace *lookup_rec(uns key.flags = end;/* overload flags, as it is unsigned long */ for (pg = ftrace_pages_start; pg; pg = pg->next) { -if (end < pg->records[0 ].ip || +if (pg->index ==0 || + end < pg->records[0 ].ip || start >= (pg->records[pg->index -1 ].ip +MCOUNT_INSN_SIZE ))continue ; rec = bsearch(&key, pg->records, pg->index,
Greg Kroah-Hartman
maintainerPATCH 169/198 ocfs2: fix data corruption after failed write
In reply to Greg Kroah-HartmanFrom: Jan Kara via Ocfs2-devel <[email protected]>
commit 90410bcf873cf05f54a32183afff0161f44f9715 upstream.
When buffered write fails to copy data into underlying page cache page, ocfs2_write_end_nolock() just zeroes out and dirties the page. This can leave dirty page beyond EOF and if page writeback tries to write this page before write succeeds and expands i_size, page gets into inconsistent state where page dirty bit is clear but buffer dirty bits stay set resulting in page data never getting written and so data copied to the page is lost. Fix the problem by invalidating page beyond EOF after failed write.
--- fs/ocfs2/aops.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-)
fs/ocfs2/aops.c +17 -2
@@ -1977,11 +1977,26 @@ int ocfs2_write_end_nolock(struct addres }if (unlikely (copied < len) && wc->w_target_page) { +loff_t new_isize; +if (!PageUptodate (wc->w_target_page)) copied =0 ; -ocfs2_zero_new_buffers (wc->w_target_page, start+copied, - start+len); + new_isize =max_t (loff_t,i_size_read (inode), pos + copied); +if (new_isize >page_offset (wc->w_target_page)) +ocfs2_zero_new_buffers (wc->w_target_page, start+copied, + start+len); +else { +/* +* When page is fully beyond new isize (data copy +* failed), do not bother zeroing the page. Invalidate +* it instead so that writeback does not get confused +* put page & buffer dirty bits into inconsistent +* state. +*/ +block_invalidate_folio (page_folio (wc->w_target_page), +0 ,PAGE_SIZE ); + } }if (wc->w_target_page)flush_dcache_page (wc->w_target_page);
Greg Kroah-Hartman
maintainerPATCH 170/198 nvme-pci: add NVME_QUIRK_BOGUS_NID for Netac NV3000
In reply to Greg Kroah-HartmanFrom: Elmer Miroslav Mosher Golovin <[email protected]>
commit 9630d80655bfe7e62e4aff2889dc4eae7ceeb887 upstream.
Added a quirk to fix the Netac NV3000 SSD reporting duplicate NGUIDs.
--- drivers/nvme/host/pci.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/nvme/host/pci.c +2 -0
@@ -3525,6 +3525,8 @@ static const struct pci_device_id nvme_i .driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, }, { PCI_DEVICE(0x2646, 0x501E), /* KINGSTON OM3PGP4xxxxQ OS21011 NVMe SSD */ .driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, }, + { PCI_DEVICE(0x1f40, 0x1202), /* Netac Technologies Co. NV3000 NVMe SSD */ + .driver_data = NVME_QUIRK_BOGUS_NID, }, { PCI_DEVICE(0x1f40, 0x5236), /* Netac Technologies Co. NV7000 NVMe SSD */ .driver_data = NVME_QUIRK_BOGUS_NID, }, { PCI_DEVICE(0x1e4B, 0x1001), /* MAXIO MAP1001 */
Greg Kroah-Hartman
maintainerPATCH 171/198 ice: avoid bonding causing auxiliary plug/unplug under RTNL lock
In reply to Greg Kroah-HartmanFrom: Dave Ertman <[email protected]>
commit 248401cb2c4612d83eb0c352ee8103b78b8eb365 upstream.
RDMA is not supported in ice on a PF that has been added to a bonded interface. To enforce this, when an interface enters a bond, we unplug the auxiliary device that supports RDMA functionality. This unplug currently happens in the context of handling the netdev bonding event. This event is sent to the ice driver under RTNL context. This is causing a deadlock where the RDMA driver is waiting for the RTNL lock to complete the removal.
Defer the unplugging/re-plugging of the auxiliary device to the service task so that it is not performed under the RTNL lock context.
--- drivers/net/ethernet/intel/ice/ice.h | 14 +++++--------- drivers/net/ethernet/intel/ice/ice_main.c | 19 ++++++++----------- 2 files changed, 13 insertions(+), 20 deletions(-)
drivers/net/ethernet/intel/ice/ice.h +5 -9
@@ -485,6 +485,7 @@ enum ice_pf_flags {ICE_FLAG_VF_VLAN_PRUNING ,ICE_FLAG_LINK_LENIENT_MODE_ENA ,ICE_FLAG_PLUG_AUX_DEV , +ICE_FLAG_UNPLUG_AUX_DEV ,ICE_FLAG_MTU_CHANGED ,ICE_FLAG_GNSS ,/* GNSS successfully initialized */ ICE_PF_FLAGS_NBITS /* must be last */
@@ -926,16 +927,11 @@ static inline void ice_set_rdma_cap(stru*/ static inline void ice_clear_rdma_cap (struct ice_pf *pf) { -/* We can directly unplug aux device here only if the flag bit -* ICE_FLAG_PLUG_AUX_DEV is not set because ice_unplug_aux_dev() -* could race with ice_plug_aux_dev() called from -* ice_service_task(). In this case we only clear that bit now and -* aux device will be unplugged later once ice_plug_aux_device() -* called from ice_service_task() finishes (see ice_service_task()). +/* defer unplug to service task to avoid RTNL lock and +* clear PLUG bit so that pending plugs don't interfere */ -if (!test_and_clear_bit (ICE_FLAG_PLUG_AUX_DEV , pf->flags)) -ice_unplug_aux_dev (pf); - +clear_bit (ICE_FLAG_PLUG_AUX_DEV , pf->flags); +set_bit (ICE_FLAG_UNPLUG_AUX_DEV , pf->flags);clear_bit (ICE_FLAG_RDMA_ENA , pf->flags); }#endif /* _ICE_H_ */
drivers/net/ethernet/intel/ice/ice_main.c +8 -11
@@ -2326,18 +2326,15 @@ static void ice_service_task(struct work } } -if (test_bit (ICE_FLAG_PLUG_AUX_DEV , pf->flags)) { -/* Plug aux device per request */ -ice_plug_aux_dev (pf); +/* unplug aux dev per request, if an unplug request came in +* while processing a plug request, this will handle it +*/ +if (test_and_clear_bit (ICE_FLAG_UNPLUG_AUX_DEV , pf->flags)) +ice_unplug_aux_dev (pf); -/* Mark plugging as done but check whether unplug was -* requested during ice_plug_aux_dev() call -* (e.g. from ice_clear_rdma_cap()) and if so then -* plug aux device. -*/ -if (!test_and_clear_bit (ICE_FLAG_PLUG_AUX_DEV , pf->flags)) -ice_unplug_aux_dev (pf); - } +/* Plug aux device per request */ +if (test_and_clear_bit (ICE_FLAG_PLUG_AUX_DEV , pf->flags)) +ice_plug_aux_dev (pf);if (test_and_clear_bit (ICE_FLAG_MTU_CHANGED , pf->flags)) {struct iidc_event *event;
Greg Kroah-Hartman
maintainerPATCH 172/198 vp_vdpa: fix the crash in hot unplug with vp_vdpa
In reply to Greg Kroah-HartmanFrom: Cindy Lu <[email protected]>
commit aed8efddd39b3434c96718d39009285c52b1cafc upstream.
While unplugging the vp_vdpa device, it triggers a kernel panic The root cause is: vdpa_mgmtdev_unregister() will accesses modern devices which will cause a use after free.
So need to change the sequence in vp_vdpa_remove
[ 195.003359] BUG: unable to handle page fault for address: ff4e8beb80199014 [ 195.004012] #PF: supervisor read access in kernel mode [ 195.004486] #PF: error_code(0x0000) - not-present page [ 195.004960] PGD 100000067 P4D 1001b6067 PUD 1001b7067 PMD 1001b8067 PTE 0 [ 195.005578] Oops: 0000 1 PREEMPT SMP PTI [ 195.005968] CPU: 13 PID: 164 Comm: kworker/u56:10 Kdump: loaded Not tainted 5.14.0-252.el9.x86_64 #1 [ 195.006792] Hardware name: Red Hat KVM/RHEL, BIOS edk2-20221207gitfff6d81270b5-2.el9 unknown [ 195.007556] Workqueue: kacpi_hotplug acpi_hotplug_work_fn [ 195.008059] RIP: 0010:ioread8+0x31/0x80 [ 195.008418] Code: 77 28 48 81 ff 00 00 01 00 76 0b 89 fa ec 0f b6 c0 c3 cc cc cc cc 8b 15 ad 72 93 01 b8 ff 00 00 00 85 d2 75 0f c3 cc cc cc cc <8a> 07 0f b6 c0 c3 cc cc cc cc 83 ea 01 48 83 ec 08 48 89 fe 48 c7 [ 195.010104] RSP: 0018:ff4e8beb8067bab8 EFLAGS: 00010292 [ 195.010584] RAX: ffffffffc05834a0 RBX: ffffffffc05843c0 RCX: ff4e8beb8067bae0 [ 195.011233] RDX: ff1bcbd580f88000 RSI: 0000000000000246 RDI: ff4e8beb80199014 [ 195.011881] RBP: ff1bcbd587e39000 R08: ffffffff916fa2d0 R09: ff4e8beb8067ba68 [ 195.012527] R10: 000000000000001c R11: 0000000000000000 R12: ff1bcbd5a3de9120 [ 195.013179] R13: ffffffffc062d000 R14: 0000000000000080 R15: ff1bcbe402bc7805 [ 195.013826] FS: 0000000000000000(0000) GS:ff1bcbe402740000(0000) knlGS:0000000000000000 [ 195.014564] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 195.015093] CR2: ff4e8beb80199014 CR3: 0000000107dea002 CR4: 0000000000771ee0 [ 195.015741] PKRU: 55555554 [ 195.016001] Call Trace: [ 195.016233] <TASK> [ 195.016434] vp_modern_get_status+0x12/0x20 [ 195.016823] vp_vdpa_reset+0x1b/0x50 [vp_vdpa] [ 195.017238] virtio_vdpa_reset+0x3c/0x48 [virtio_vdpa] [ 195.017709] remove_vq_common+0x1f/0x3a0 [virtio_net] [ 195.018178] virtnet_remove+0x5d/0x70 [virtio_net] [ 195.018618] virtio_dev_remove+0x3d/0x90 [ 195.018986] device_release_driver_internal+0x1aa/0x230 [ 195.019466] bus_remove_device+0xd8/0x150 [ 195.019841] device_del+0x18b/0x3f0 [ 195.020167] ? kernfs_find_ns+0x35/0xd0 [ 195.020526] device_unregister+0x13/0x60 [ 195.020894] unregister_virtio_device+0x11/0x20 [ 195.021311] device_release_driver_internal+0x1aa/0x230 [ 195.021790] bus_remove_device+0xd8/0x150 [ 195.022162] device_del+0x18b/0x3f0 [ 195.022487] device_unregister+0x13/0x60 [ 195.022852] ? vdpa_dev_remove+0x30/0x30 [vdpa] [ 195.023270] vp_vdpa_dev_del+0x12/0x20 [vp_vdpa] [ 195.023694] vdpa_match_remove+0x2b/0x40 [vdpa] [ 195.024115] bus_for_each_dev+0x78/0xc0 [ 195.024471] vdpa_mgmtdev_unregister+0x65/0x80 [vdpa] [ 195.024937] vp_vdpa_remove+0x23/0x40 [vp_vdpa] [ 195.025353] pci_device_remove+0x36/0xa0 [ 195.025719] device_release_driver_internal+0x1aa/0x230 [ 195.026201] pci_stop_bus_device+0x6c/0x90 [ 195.026580] pci_stop_and_remove_bus_device+0xe/0x20 [ 195.027039] disable_slot+0x49/0x90 [ 195.027366] acpiphp_disable_and_eject_slot+0x15/0x90 [ 195.027832] hotplug_event+0xea/0x210 [ 195.028171] ? hotplug_event+0x210/0x210 [ 195.028535] acpiphp_hotplug_notify+0x22/0x80 [ 195.028942] ? hotplug_event+0x210/0x210 [ 195.029303] acpi_device_hotplug+0x8a/0x1d0 [ 195.029690] acpi_hotplug_work_fn+0x1a/0x30 [ 195.030077] process_one_work+0x1e8/0x3c0 [ 195.030451] worker_thread+0x50/0x3b0 [ 195.030791] ? rescuer_thread+0x3a0/0x3a0 [ 195.031165] kthread+0xd9/0x100 [ 195.031459] ? kthread_complete_and_exit+0x20/0x20 [ 195.031899] ret_from_fork+0x22/0x30 [ 195.032233] </TASK>
Message-Id: <[email protected]>
--- drivers/vdpa/virtio_pci/vp_vdpa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/vdpa/virtio_pci/vp_vdpa.c +1 -1
@@ -645,8 +645,8 @@ static void vp_vdpa_remove(struct pci_destruct virtio_pci_modern_device *mdev =NULL ; mdev = vp_vdpa_mgtdev->mdev; -vp_modern_remove (mdev);vdpa_mgmtdev_unregister (&vp_vdpa_mgtdev->mgtdev); +vp_modern_remove (mdev);kfree (vp_vdpa_mgtdev->mgtdev.id_table);kfree (mdev);kfree (vp_vdpa_mgtdev);
Greg Kroah-Hartman
maintainerPATCH 173/198 mm/userfaultfd: propagate uffd-wp bit when PTE-mapping the huge zeropage
In reply to Greg Kroah-HartmanFrom: David Hildenbrand <[email protected]>
commit 42b2af2c9b7eede8ef21d0943f84d135e21a32a3 upstream.
Currently, we'd lose the userfaultfd-wp marker when PTE-mapping a huge zeropage, resulting in the next write faults in the PMD range not triggering uffd-wp events.
Various actions (partial MADV_DONTNEED, partial mremap, partial munmap, partial mprotect) could trigger this. However, most importantly, un-protecting a single sub-page from the userfaultfd-wp handler when processing a uffd-wp event will PTE-map the shared huge zeropage and lose the uffd-wp bit for the remainder of the PMD.
Let's properly propagate the uffd-wp bit to the PMDs.
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <inttypes.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <poll.h>
#include <pthread.h>
#include <sys/mman.h>
#include <sys/syscall.h>
#include <sys/ioctl.h>
#include <linux/userfaultfd.h>
static size_t pagesize;
static int uffd;
static volatile bool uffd_triggered;
#define barrier() __asm__ __volatile__("": : :"memory")
static void uffd_wp_range(char *start, size_t size, bool wp) {
struct uffdio_writeprotect uffd_writeprotect;
uffd_writeprotect.range.start = (unsigned long) start; uffd_writeprotect.range.len = size;
if (wp) {
uffd_writeprotect.mode = UFFDIO_WRITEPROTECT_MODE_WP;
} else {
uffd_writeprotect.mode = 0;
}
if (ioctl(uffd, UFFDIO_WRITEPROTECT, &uffd_writeprotect)) {
fprintf(stderr, "UFFDIO_WRITEPROTECT failed: %d\n", errno); exit(1);
}
}
static void *uffd_thread_fn(void *arg)
{
static struct uffd_msg msg;
ssize_t nread;
while (1) {
struct pollfd pollfd;
int nready;
pollfd.fd = uffd;
pollfd.events = POLLIN;
nready = poll(&pollfd, 1, -1);
if (nready == -1) {
fprintf(stderr, "poll() failed: %d\n", errno); exit(1);
}
nread = read(uffd, &msg, sizeof(msg)); if (nread <= 0)
continue;
if (msg.event != UFFD_EVENT_PAGEFAULT ||
!(msg.arg.pagefault.flags & UFFD_PAGEFAULT_FLAG_WP)) {
printf("FAIL: wrong uffd-wp event fired\n"); exit(1);
}
/* un-protect the single page. */ uffd_triggered = true;
uffd_wp_range((char *)(uintptr_t)msg.arg.pagefault.address,
pagesize, false);
}
return arg;
}
static int setup_uffd(char *map, size_t size)
{
struct uffdio_api uffdio_api;
struct uffdio_register uffdio_register;
pthread_t thread;
uffd = syscall(__NR_userfaultfd,
O_CLOEXEC | O_NONBLOCK | UFFD_USER_MODE_ONLY);
if (uffd < 0) {
fprintf(stderr, "syscall() failed: %d\n", errno); return -errno;
}
uffdio_api.api = UFFD_API;
uffdio_api.features = UFFD_FEATURE_PAGEFAULT_FLAG_WP; if (ioctl(uffd, UFFDIO_API, &uffdio_api) < 0) {
fprintf(stderr, "UFFDIO_API failed: %d\n", errno); return -errno;
}
if (!(uffdio_api.features & UFFD_FEATURE_PAGEFAULT_FLAG_WP)) {
fprintf(stderr, "UFFD_FEATURE_WRITEPROTECT missing\n"); return -ENOSYS;
}
uffdio_register.range.start = (unsigned long) map; uffdio_register.range.len = size; uffdio_register.mode = UFFDIO_REGISTER_MODE_WP;
if (ioctl(uffd, UFFDIO_REGISTER, &uffdio_register) < 0) {
fprintf(stderr, "UFFDIO_REGISTER failed: %d\n", errno); return -errno;
}
pthread_create(&thread, NULL, uffd_thread_fn, NULL);
return 0;
}
int main(void)
{
const size_t size = 4 * 1024 * 1024ull;
char *map, *cur;
pagesize = getpagesize();
map = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0); if (map == MAP_FAILED) {
fprintf(stderr, "mmap() failed\n");
return -errno;
}
if (madvise(map, size, MADV_HUGEPAGE)) {
fprintf(stderr, "MADV_HUGEPAGE failed\n"); return -errno;
}
if (setup_uffd(map, size))
return 1;
/* Read the whole range, populating zeropages. */ madvise(map, size, MADV_POPULATE_READ);
/* Write-protect the whole range. */
uffd_wp_range(map, size, true);
/* Make sure uffd-wp triggers on each page. */ for (cur = map; cur < map + size; cur += pagesize) {
uffd_triggered = false;
barrier();
/* Trigger a write fault. */
*cur = 1;
barrier();
if (!uffd_triggered) {
printf("FAIL: uffd-wp did not trigger\n"); return 1;
}
}
printf("PASS: uffd-wp triggered\n");
return 0;
}
--- mm/huge_memory.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
mm/huge_memory.c +4 -2
@@ -2004,7 +2004,7 @@ static void __split_huge_zero_page_pmd(s {struct mm_struct *mm = vma->vm_mm;pgtable_t pgtable; -pmd_t _pmd; +pmd_t _pmd, old_pmd;int i;/*
@@ -2015,7 +2015,7 @@ static void __split_huge_zero_page_pmd(s* * See Documentation/mm/mmu_notifier.rst */ -pmdp_huge_clear_flush (vma, haddr, pmd); + old_pmd =pmdp_huge_clear_flush (vma, haddr, pmd); pgtable =pgtable_trans_huge_withdraw (mm, pmd);pmd_populate (mm, &_pmd, pgtable);
@@ -2024,6 +2024,8 @@ static void __split_huge_zero_page_pmd(spte_t *pte, entry; entry =pfn_pte (my_zero_pfn (haddr), vma->vm_page_prot); entry =pte_mkspecial (entry); +if (pmd_uffd_wp (old_pmd)) + entry =pte_mkuffd_wp (entry); pte =pte_offset_map (&_pmd, haddr);VM_BUG_ON (!pte_none (*pte));set_pte_at (mm, haddr, pte, entry);
Greg Kroah-Hartman
maintainerPATCH 174/198 mm: teach mincore_hugetlb about pte markers
In reply to Greg Kroah-HartmanFrom: James Houghton <[email protected]>
commit 63cf584203f3367c8b073d417c8e5cbbfc450506 upstream.
By checking huge_pte_none(), we incorrectly classify PTE markers as "present". Instead, check huge_pte_none_mostly(), classifying PTE markers the same as if the PTE were completely blank.
PTE markers, unlike other kinds of swap entries, don't reference any physical page and don't indicate that a physical page was mapped previously. As such, treat them as non-present for the sake of mincore().
--- mm/mincore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/mincore.c +1 -1
@@ -33,7 +33,7 @@ static int mincore_hugetlb(pte_t *pte, unsigned long hmask, unsigned long addr,* Hugepages under user process are always in RAM and never * swapped out, but theoretically it needs to be checked. */ - present = pte && !huge_pte_none (huge_ptep_get (pte)); + present = pte && !huge_pte_none_mostly (huge_ptep_get (pte));for (; addr != end; vec++, addr +=PAGE_SIZE ) *vec = present; walk->private = vec;
Signature · 1 line
2.40.0
Greg Kroah-Hartman
maintainerPATCH 175/198 powerpc/64: Set default CPU in Kconfig
In reply to Greg Kroah-HartmanFrom: Christophe Leroy <[email protected]>
commit 45f7091aac3546ef8112bf62836650ca0bbf0b79 upstream.
Since commit 0069f3d14e7a ("powerpc/64e: Tie PPC_BOOK3E_64 to PPC_E500MC"), the only possible BOOK3E/64 are E500, so no need of a default CPU over the E5500.
When the user selects book3e, they must have an e500 compatible compiler, and it won't work anymore with the default -mcpu=power64, see commit d6b551b8f90c ("powerpc/64e: Fix build failure with GCC 12 (unrecognized opcode: `wrteei')").
For book3s/64, replace GENERIC_CPU by POWERPC64_CPU to match the PPC32 POWERPC_CPU, and set a default mpcu value in Kconfig directly.
When a user selects a particular CPU, they must ensure the compiler has the requested capability. Therefore, remove hidden fallback, instead offer user the possibility to say they want to use the toolchain default.
--- arch/powerpc/Makefile | 22 +++++----------------- arch/powerpc/platforms/Kconfig.cputype | 12 +++++++----- 2 files changed, 12 insertions(+), 22 deletions(-)
arch/powerpc/Makefile +5 -17
@@ -146,19 +146,6 @@ CFLAGS-$(CONFIG_PPC32) += $(call cc-opti CFLAGS-$(CONFIG_PPC32) += $(call cc-option,-mno-readonly-in-sdata) -ifdef CONFIG_PPC_BOOK3S_64 -ifdef CONFIG_CPU_LITTLE_ENDIAN -CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power8 -else -CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power4 -endif -CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power10, \ - $(call cc-option,-mtune=power9, \ - $(call cc-option,-mtune=power8))) -else ifdef CONFIG_PPC_BOOK3E_64 -CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64 -endif - ifdef CONFIG_FUNCTION_TRACER CC_FLAGS_FTRACE := -pg ifdef CONFIG_MPROFILE_KERNEL
@@ -166,11 +153,12 @@ CC_FLAGS_FTRACE += -mprofile-kernel endif endif -CFLAGS-$(CONFIG_TARGET_CPU_BOOL) += $(call cc-option,-mcpu=$(CONFIG_TARGET_CPU)) -AFLAGS-$(CONFIG_TARGET_CPU_BOOL) += $(call cc-option,-mcpu=$(CONFIG_TARGET_CPU)) +CFLAGS-$(CONFIG_TARGET_CPU_BOOL) += -mcpu=$(CONFIG_TARGET_CPU) +AFLAGS-$(CONFIG_TARGET_CPU_BOOL) += -mcpu=$(CONFIG_TARGET_CPU) -CFLAGS-$(CONFIG_E5500_CPU) += $(call cc-option,-mcpu=e500mc64,-mcpu=powerpc64) -CFLAGS-$(CONFIG_E6500_CPU) += $(call cc-option,-mcpu=e6500,$(E5500_CPU)) +CFLAGS-$(CONFIG_POWERPC64_CPU) += $(call cc-option,-mtune=power10, \ + $(call cc-option,-mtune=power9, \ + $(call cc-option,-mtune=power8))) asinstr := $(call as-instr,lis 9$(comma)foo@high,-DHAVE_AS_ATHIGH=1)
arch/powerpc/platforms/Kconfig.cputype +7 -5
@@ -118,19 +118,18 @@ endchoice choice prompt "CPU selection" - default GENERIC_CPU help This will create a kernel which is optimised for a particular CPU. The resulting kernel may not run on other CPUs, so use this with care. If unsure, select Generic. -config GENERIC_CPU +config POWERPC64_CPU bool "Generic (POWER5 and PowerPC 970 and above)" depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN select PPC_64S_HASH_MMU -config GENERIC_CPU +config POWERPC64_CPU bool "Generic (POWER8 and above)" depends on PPC_BOOK3S_64 && CPU_LITTLE_ENDIAN select ARCH_HAS_FAST_MULTIPLIER
@@ -228,13 +227,12 @@ config E500MC_CPU config TOOLCHAIN_DEFAULT_CPU bool "Rely on the toolchain's implicit default CPU" - depends on PPC32 endchoice config TARGET_CPU_BOOL bool - default !GENERIC_CPU && !TOOLCHAIN_DEFAULT_CPU + default !TOOLCHAIN_DEFAULT_CPU config TARGET_CPU string
@@ -246,6 +244,10 @@ config TARGET_CPU default "power8" if POWER8_CPU default "power9" if POWER9_CPU default "power10" if POWER10_CPU + default "e500mc64" if E5500_CPU + default "e6500" if E6500_CPU + default "power4" if POWERPC64_CPU && !CPU_LITTLE_ENDIAN + default "power8" if POWERPC64_CPU && CPU_LITTLE_ENDIAN default "405" if 405_CPU default "440" if 440_CPU default "464" if 464_CPU
Greg Kroah-Hartman
maintainerPATCH 176/198 powerpc/boot: Dont always pass -mcpu=powerpc when building 32-bit uImage
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
commit ff7c76f66d8bad4e694c264c789249e1d3a8205d upstream.
When CONFIG_TARGET_CPU is specified then pass its value to the compiler -mcpu option. This fixes following build error when building kernel with powerpc e500 SPE capable cross compilers:
BOOTAS arch/powerpc/boot/crt0.o
powerpc-linux-gnuspe-gcc: error: unrecognized argument in option ‘-mcpu=powerpc’
powerpc-linux-gnuspe-gcc: note: valid arguments to ‘-mcpu=’ are: 8540 8548 native make[1]: *** [arch/powerpc/boot/Makefile:231: arch/powerpc/boot/crt0.o] Error 1
Similar change was already introduced for the main powerpc Makefile in commit 446cda1b21d9 ("powerpc/32: Don't always pass -mcpu=powerpc to the compiler").
--- arch/powerpc/boot/Makefile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
arch/powerpc/boot/Makefile +10 -4
@@ -39,13 +39,19 @@ BOOTCFLAGS := -Wall -Wundef -Wstrict- $(LINUXINCLUDE) ifdef CONFIG_PPC64_BOOT_WRAPPER -ifdef CONFIG_CPU_LITTLE_ENDIAN -BOOTCFLAGS += -m64 -mcpu=powerpc64le +BOOTCFLAGS += -m64 else -BOOTCFLAGS += -m64 -mcpu=powerpc64 +BOOTCFLAGS += -m32 endif + +ifdef CONFIG_TARGET_CPU_BOOL +BOOTCFLAGS += -mcpu=$(CONFIG_TARGET_CPU) +else ifdef CONFIG_PPC64_BOOT_WRAPPER +ifdef CONFIG_CPU_LITTLE_ENDIAN +BOOTCFLAGS += -mcpu=powerpc64le else -BOOTCFLAGS += -m32 -mcpu=powerpc +BOOTCFLAGS += -mcpu=powerpc64 +endif endif BOOTCFLAGS += -isystem $(shell $(BOOTCC) -print-file-name=include)
Greg Kroah-Hartman
maintainerPATCH 177/198 mmc: sdhci_am654: lower power-on failed message severity
In reply to Greg Kroah-HartmanFrom: Francesco Dolcini <[email protected]>
commit 11440da77d6020831ee6f9ce4551b545dea789ee upstream.
Lower the power-on failed message severity from warn to info when the controller does not power-up. It's normal to have this situation when the SD card slot is empty, therefore we should not warn the user about it.
--- drivers/mmc/host/sdhci_am654.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/sdhci_am654.c +1 -1
@@ -369,7 +369,7 @@ static void sdhci_am654_write_b(struct sMAX_POWER_ON_TIMEOUT , false, host, val, reg);if (ret) -dev_warn (mmc_dev (host->mmc),"Power on failed\n" ); +dev_info (mmc_dev (host->mmc),"Power on failed\n" ); } }
Greg Kroah-Hartman
maintainerPATCH 178/198 fbdev: stifb: Provide valid pixelclock and add fb_check_var() checks
In reply to Greg Kroah-HartmanFrom: Helge Deller <[email protected]>
commit 203873a535d627c668f293be0cb73e26c30f9cc7 upstream.
Find a valid modeline depending on the machine graphic card configuration and add the fb_check_var() function to validate Xorg provided graphics settings.
--- drivers/video/fbdev/stifb.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)
drivers/video/fbdev/stifb.c +27 -0
@@ -922,6 +922,28 @@ SETUP_HCRX(struct stifb_info *fb)/* ------------------- driver specific functions --------------------------- */ static int +stifb_check_var (struct fb_var_screeninfo *var,struct fb_info *info) +{ + struct stifb_info *fb = container_of(info, struct stifb_info, info); + +if (var->xres != fb->info.var.xres || + var->yres != fb->info.var.yres || + var->bits_per_pixel != fb->info.var.bits_per_pixel) +return -EINVAL ; + + var->xres_virtual = var->xres; + var->yres_virtual = var->yres; + var->xoffset =0 ; + var->yoffset =0 ; + var->grayscale = fb->info.var.grayscale; + var->red.length = fb->info.var.red.length; + var->green.length = fb->info.var.green.length; + var->blue.length = fb->info.var.blue.length; + +return 0 ; +} + +static int stifb_setcolreg (u_int regno,u_int red,u_int green,u_int blue,u_int transp,struct fb_info *info) {
@@ -1145,6 +1167,7 @@ stifb_init_display(struct stifb_info *fbstatic const struct fb_ops stifb_ops = { .owner =THIS_MODULE , + .fb_check_var = stifb_check_var, .fb_setcolreg = stifb_setcolreg, .fb_blank = stifb_blank, .fb_fillrect = stifb_fillrect,
@@ -1164,6 +1187,7 @@ static int __init stifb_init_fb(struct sstruct stifb_info *fb;struct fb_info *info;unsigned long sti_rom_address; +char modestr[32 ];char *dev_name;int bpp, xres, yres;
@@ -1342,6 +1366,9 @@ static int __init stifb_init_fb(struct s info->flags =FBINFO_HWACCEL_COPYAREA |FBINFO_HWACCEL_FILLRECT ; info->pseudo_palette = &fb->pseudo_palette; +scnprintf (modestr,sizeof (modestr),"%dx%d-%d" , xres, yres, bpp); +fb_find_mode (&info->var, info, modestr,NULL ,0 ,NULL , bpp); +/* This has to be done !!! */ if (fb_alloc_cmap (&info->cmap,NR_PALETTE ,0 )) goto out_err1;
Greg Kroah-Hartman
maintainerPATCH 179/198 trace/hwlat: Do not wipe the contents of per-cpu thread data
In reply to Greg Kroah-HartmanFrom: Tero Kristo <[email protected]>
commit 4c42f5f0d1dd20bddd9f940beb1e6ccad60c4498 upstream.
Do not wipe the contents of the per-cpu kthread data when starting the tracer, as this will completely forget about already running instances and can later start new additional per-cpu threads.
--- kernel/trace/trace_hwlat.c | 3 --- 1 file changed, 3 deletions(-)
kernel/trace/trace_hwlat.c +0 -3
@@ -584,9 +584,6 @@ static int start_per_cpu_kthreads(struct*/ cpumask_and (current_mask, cpu_online_mask, tr->tracing_cpumask); -for_each_online_cpu (cpu) -per_cpu (hwlat_per_cpu_data, cpu).kthread =NULL ; -for_each_cpu (cpu, current_mask) { retval =start_cpu_kthread (cpu);if (retval)
Greg Kroah-Hartman
maintainerPATCH 180/198 trace/hwlat: Do not start per-cpu thread if it is already running
In reply to Greg Kroah-HartmanFrom: Tero Kristo <[email protected]>
commit 08697bca9bbba15f2058fdbd9f970bd5f6a8a2e8 upstream.
The hwlatd tracer will end up starting multiple per-cpu threads with the following script:
#!/bin/sh
cd /sys/kernel/debug/tracing
echo 0 > tracing_on
echo hwlat > current_tracer
echo per-cpu > hwlat_detector/mode
echo 100000 > hwlat_detector/width
echo 200000 > hwlat_detector/window
echo 1 > tracing_on
To fix the issue, check if the hwlatd thread for the cpu is already running, before starting a new one. Along with the previous patch, this avoids running multiple instances of the same CPU thread on the system.
--- kernel/trace/trace_hwlat.c | 4 ++++ 1 file changed, 4 insertions(+)
kernel/trace/trace_hwlat.c +4 -0
@@ -492,6 +492,10 @@ static int start_cpu_kthread(unsigned in {struct task_struct *kthread; +/* Do not start a new hwlatd thread if it is already running */ +if (per_cpu (hwlat_per_cpu_data, cpu).kthread) +return 0 ; + kthread =kthread_run_on_cpu (kthread_fn,NULL , cpu,"hwlatd/%u" );if (IS_ERR (kthread)) {pr_err (BANNER "could not start sampling thread\n" );
Greg Kroah-Hartman
maintainerPATCH 181/198 ACPI: PPTT: Fix to avoid sleep in the atomic context when PPTT is absent
In reply to Greg Kroah-HartmanFrom: Sudeep Holla <[email protected]>
commit 91d7b60a65d9f71230ea09b86d2058a884a3c2af upstream.
Commit 0c80f9e165f8 ("ACPI: PPTT: Leave the table mapped for the runtime usage") enabled to map PPTT once on the first invocation of acpi_get_pptt() and never unmapped the same allowing it to be used at runtime with out the hassle of mapping and unmapping the table. This was needed to fetch LLC information from the PPTT in the cpuhotplug path which is executed in the atomic context as the acpi_get_table() might sleep waiting for a mutex.
However it missed to handle the case when there is no PPTT on the system which results in acpi_get_pptt() being called from all the secondary CPUs attempting to fetch the LLC information in the atomic context without knowing the absence of PPTT resulting in the splat like below:
| BUG: sleeping function called from invalid context at kernel/locking/semaphore.c:164 | in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 0, name: swapper/1 | preempt_count: 1, expected: 0 | RCU nest depth: 0, expected: 0 | no locks held by swapper/1/0. | irq event stamp: 0 | hardirqs last enabled at (0): 0x0 | hardirqs last disabled at (0): copy_process+0x61c/0x1b40 | softirqs last enabled at (0): copy_process+0x61c/0x1b40 | softirqs last disabled at (0): 0x0 | CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.3.0-rc1 #1 | Call trace: | dump_backtrace+0xac/0x138 | show_stack+0x30/0x48 | dump_stack_lvl+0x60/0xb0 | dump_stack+0x18/0x28 | __might_resched+0x160/0x270 | __might_sleep+0x58/0xb0 | down_timeout+0x34/0x98 | acpi_os_wait_semaphore+0x7c/0xc0 | acpi_ut_acquire_mutex+0x58/0x108 | acpi_get_table+0x40/0xe8 | acpi_get_pptt+0x48/0xa0 | acpi_get_cache_info+0x38/0x140 | init_cache_level+0xf4/0x118 | detect_cache_attributes+0x2e4/0x640 | update_siblings_masks+0x3c/0x330 | store_cpu_topology+0x88/0xf0 | secondary_start_kernel+0xd0/0x168 | __secondary_switched+0xb8/0xc0
Update acpi_get_pptt() to consider the fact that PPTT is once checked and is not available on the system and return NULL avoiding any attempts to fetch PPTT and thereby avoiding any possible sleep waiting for a mutex in the atomic context.
--- drivers/acpi/pptt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/acpi/pptt.c +4 -1
@@ -537,16 +537,19 @@ static int topology_get_acpi_cpu_tag(strstatic struct acpi_table_header *acpi_get_pptt (void ) {static struct acpi_table_header *pptt; +static bool is_pptt_checked;acpi_status status;/* * PPTT will be used at runtime on every CPU hotplug in path, so we * don't need to call acpi_put_table() to release the table mapping. */ -if (!pptt) { +if (!pptt && !is_pptt_checked) { status =acpi_get_table (ACPI_SIG_PPTT ,0 , &pptt);if (ACPI_FAILURE (status))acpi_pptt_warn_missing (); + + is_pptt_checked = true; }return pptt;
Greg Kroah-Hartman
maintainerPATCH 182/198 net: phy: nxp-c45-tja11xx: fix MII_BASIC_CONFIG_REV bit
In reply to Greg Kroah-HartmanFrom: Radu Pirea (OSS) <[email protected]>
commit 8ba572052a4b8fe5b205854d27e54e3486049b71 upstream.
According to the TJA1103 user manual, the bit for the reversed role in MII or RMII modes is bit 4.
--- drivers/net/phy/nxp-c45-tja11xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/phy/nxp-c45-tja11xx.c +1 -1
@@ -79,7 +79,7 @@#define SGMII_ABILITY BIT(0)#define VEND1_MII_BASIC_CONFIG 0xAFC6 -#define MII_BASIC_CONFIG_REV BIT(8) +#define MII_BASIC_CONFIG_REV BIT(4)#define MII_BASIC_CONFIG_SGMII 0x9#define MII_BASIC_CONFIG_RGMII 0x7#define MII_BASIC_CONFIG_RMII 0x5
Greg Kroah-Hartman
maintainerPATCH 183/198 fbdev: Fix incorrect page mapping clearance at fb_deferred_io_release()
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit fe9ae05cfbe587dda724fcf537c00bc2f287da62 upstream.
The recent fix for the deferred I/O by the commit
3efc61d95259 ("fbdev: Fix invalid page access after closing deferred I/O devices")
caused a regression when the same fb device is opened/closed while it's being used. It resulted in a frozen screen even if something
is redrawn there after the close. The breakage is because the patch was made under a wrong assumption of a single open; in the current code, fb_deferred_io_release() cleans up the page mapping of the pageref list and it calls cancel_delayed_work_sync() unconditionally, where both are no correct behavior for multiple opens.
This patch adds a refcount for the opens of the device, and applies the cleanup only when all files get closed.
As both fb_deferred_io_open() and _close() are called always in the fb_info lock (mutex), it's safe to use the normal int for the refcounting.
Also, a useless BUG_ON() is dropped.
--- drivers/video/fbdev/core/fb_defio.c | 17 +++++++++++++---- include/linux/fb.h | 1 + 2 files changed, 14 insertions(+), 4 deletions(-)
drivers/video/fbdev/core/fb_defio.c +13 -4
@@ -309,17 +309,18 @@ void fb_deferred_io_open(struct fb_info *info,struct inode *inode, struct file *file) { + struct fb_deferred_io *fbdefio = info->fbdefio; + file->f_mapping->a_ops = &fb_deferred_io_aops; + fbdefio->open_count++; }EXPORT_SYMBOL_GPL (fb_deferred_io_open); -void fb_deferred_io_release (struct fb_info *info) +static void fb_deferred_io_lastclose (struct fb_info *info) { -struct fb_deferred_io *fbdefio = info->fbdefio;struct page *page;int i; -BUG_ON (!fbdefio);cancel_delayed_work_sync (&info->deferred_work);/* clear out the mapping that we setup */
@@ -328,13 +329,21 @@ void fb_deferred_io_release(struct fb_info *info) page->mapping =NULL ; } } + +void fb_deferred_io_release (struct fb_info *info) +{ +struct fb_deferred_io *fbdefio = info->fbdefio; + +if (!--fbdefio->open_count) +fb_deferred_io_lastclose (info); +}EXPORT_SYMBOL_GPL (fb_deferred_io_release);void fb_deferred_io_cleanup (struct fb_info *info) {struct fb_deferred_io *fbdefio = info->fbdefio; -fb_deferred_io_release (info); +fb_deferred_io_lastclose (info);kvfree (info->pagerefs);mutex_destroy (&fbdefio->lock);
include/linux/fb.h +1 -0
@@ -212,6 +212,7 @@ struct fb_deferred_io {/* delay between mkwrite and deferred handler */ unsigned long delay;bool sort_pagereflist;/* sort pagelist by offset */ +int open_count;/* number of opened files; protected by fb_info lock */ struct mutex lock;/* mutex that protects the pageref list */ struct list_head pagereflist;/* list of pagerefs for touched pages */ /* callback */
Signature · 1 line
2.40.0
Greg Kroah-Hartman
maintainerPATCH 184/198 cpuidle: psci: Iterate backwards over list in psci_pd_remove()
In reply to Greg Kroah-HartmanFrom: Shawn Guo <[email protected]>
commit 6b0313c2fa3d2cf991c9ffef6fae6e7ef592ce6d upstream.
In case that psci_pd_init_topology() fails for some reason, psci_pd_remove() will be responsible for deleting provider and removing genpd from psci_pd_providers list. There will be a failure when removing the cluster PD, because the cpu (child) PDs haven't been removed.
[ 0.050232] CPUidle PSCI: init PM domain cpu0 [ 0.050278] CPUidle PSCI: init PM domain cpu1 [ 0.050329] CPUidle PSCI: init PM domain cpu2 [ 0.050370] CPUidle PSCI: init PM domain cpu3 [ 0.050422] CPUidle PSCI: init PM domain cpu-cluster0 [ 0.050475] PM: genpd_remove: unable to remove cpu-cluster0 [ 0.051412] PM: genpd_remove: removed cpu3 [ 0.051449] PM: genpd_remove: removed cpu2 [ 0.051499] PM: genpd_remove: removed cpu1 [ 0.051546] PM: genpd_remove: removed cpu0
Fix the problem by iterating the provider list reversely, so that parent PD gets removed after child's PDs like below.
[ 0.029052] CPUidle PSCI: init PM domain cpu0 [ 0.029076] CPUidle PSCI: init PM domain cpu1 [ 0.029103] CPUidle PSCI: init PM domain cpu2 [ 0.029124] CPUidle PSCI: init PM domain cpu3 [ 0.029151] CPUidle PSCI: init PM domain cpu-cluster0 [ 0.029647] PM: genpd_remove: removed cpu0 [ 0.029666] PM: genpd_remove: removed cpu1 [ 0.029690] PM: genpd_remove: removed cpu2 [ 0.029714] PM: genpd_remove: removed cpu3 [ 0.029738] PM: genpd_remove: removed cpu-cluster0
--- drivers/cpuidle/cpuidle-psci-domain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/cpuidle/cpuidle-psci-domain.c +2 -1
@@ -103,7 +103,8 @@ static void psci_pd_remove(void)struct psci_pd_provider *pd_provider, *it;struct generic_pm_domain *genpd; -list_for_each_entry_safe (pd_provider, it, &psci_pd_providers, link) { +list_for_each_entry_safe_reverse (pd_provider, it, + &psci_pd_providers, link) {of_genpd_del_provider (pd_provider->node); genpd =of_genpd_remove_last (pd_provider->node);
Greg Kroah-Hartman
maintainerPATCH 185/198 ASoC: Intel: soc-acpi: fix copy-paste issue in topology names
In reply to Greg Kroah-HartmanFrom: Pierre-Louis Bossart <[email protected]>
commit 858a438a6cf919e5727d2a0f5f3f0e68b2d5354e upstream.
For some reason the convention for topology names was not followed and the name inspired by another unrelated hardware configuration. As a result, the kernel will request a non-existent topology file.
--- sound/soc/intel/common/soc-acpi-intel-adl-match.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/common/soc-acpi-intel-adl-match.c +1 -1
@@ -547,7 +547,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_in { .comp_ids = &essx_83x6, .drv_name = "sof-essx8336", - .sof_tplg_filename = "sof-adl-es83x6", /* the tplg suffix is added at run time */ + .sof_tplg_filename = "sof-adl-es8336", /* the tplg suffix is added at run time */ .tplg_quirk_mask =SND_SOC_ACPI_TPLG_INTEL_SSP_NUMBER |SND_SOC_ACPI_TPLG_INTEL_SSP_MSB | SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER,
Greg Kroah-Hartman
maintainerPATCH 186/198 ASoC: qcom: q6prm: fix incorrect clk_root passed to ADSP
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
commit 65882134bc622a1e57bd5928ac588855ea2e3ddd upstream.
The second to last argument is clk_root (root of the clock), however the code called q6prm_request_lpass_clock() with clk_attr instead (copy-paste error). This effectively was passing value of 1 as root clock which worked on some of the SoCs (e.g. SM8450) but fails on others, depending on the ADSP. For example on SM8550 this "1" as root clock is not accepted and results in errors coming from ADSP.
--- sound/soc/qcom/qdsp6/q6prm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/qcom/qdsp6/q6prm.c +2 -2
@@ -183,9 +183,9 @@ int q6prm_set_lpass_clock(struct device unsigned int freq) {if (freq) -return q6prm_request_lpass_clock (dev, clk_id, clk_attr, clk_attr, freq); +return q6prm_request_lpass_clock (dev, clk_id, clk_attr, clk_root, freq); -return q6prm_release_lpass_clock (dev, clk_id, clk_attr, clk_attr, freq); +return q6prm_release_lpass_clock (dev, clk_id, clk_attr, clk_root, freq); }EXPORT_SYMBOL_GPL (q6prm_set_lpass_clock);
Greg Kroah-Hartman
maintainerPATCH 187/198 x86/mce: Make sure logged MCEs are processed after sysfs update
In reply to Greg Kroah-HartmanFrom: Yazen Ghannam <[email protected]>
commit 4783b9cb374af02d49740e00e2da19fd4ed6dec4 upstream.
A recent change introduced a flag to queue up errors found during boot-time polling. These errors will be processed during late init once the MCE subsystem is fully set up.
A number of sysfs updates call mce_restart() which goes through a subset of the CPU init flow. This includes polling MCA banks and logging any errors found. Since the same function is used as boot-time polling, errors will be queued. However, the system is now past late init, so the errors will remain queued until another error is found and the workqueue is triggered.
Call mce_schedule_work() at the end of mce_restart() so that queued errors are processed.
--- arch/x86/kernel/cpu/mce/core.c | 1 + 1 file changed, 1 insertion(+)
arch/x86/kernel/cpu/mce/core.c +1 -0
@@ -2365,6 +2365,7 @@ static void mce_restart(void) {mce_timer_delete_all ();on_each_cpu (mce_cpu_restart,NULL ,1 ); +mce_schedule_work (); }/* Toggle features for corrected errors */
Greg Kroah-Hartman
maintainerPATCH 188/198 x86/mm: Fix use of uninitialized buffer in sme_enable()
In reply to Greg Kroah-HartmanFrom: Nikita Zhandarovich <[email protected]>
commit cbebd68f59f03633469f3ecf9bea99cd6cce3854 upstream.
cmdline_find_option() may fail before doing any initialization of the buffer array. This may lead to unpredictable results when the same buffer is used later in calls to strncmp() function. Fix the issue by returning early if cmdline_find_option() returns an error.
Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE.
--- arch/x86/mm/mem_encrypt_identity.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/mm/mem_encrypt_identity.c +2 -1
@@ -600,7 +600,8 @@ void __init sme_enable(struct boot_param cmdline_ptr = (const char *)((u64 )bp->hdr.cmd_line_ptr | ((u64 )bp->ext_cmd_line_ptr <<32 )); -cmdline_find_option (cmdline_ptr, cmdline_arg, buffer,sizeof (buffer)); +if (cmdline_find_option (cmdline_ptr, cmdline_arg, buffer,sizeof (buffer)) <0 ) +return ;if (!strncmp (buffer, cmdline_on,sizeof (buffer))) sme_me_mask = me_mask;
Greg Kroah-Hartman
maintainerPATCH 189/198 x86/resctrl: Clear staged_config[] before and after it is used
In reply to Greg Kroah-HartmanFrom: Shawn Wang <[email protected]>
commit 0424a7dfe9129b93f29b277511a60e87f052ac6b upstream.
As a temporary storage, staged_config[] in rdt_domain should be cleared before and after it is used. The stale value in staged_config[] could cause an MSR access error.
Here is a reproducer on a system with 16 usable CLOSIDs for a 15-way L3 Cache (MBA should be disabled if the number of CLOSIDs for MB is less than 16.) :
mount -t resctrl resctrl -o cdp /sys/fs/resctrl
mkdir /sys/fs/resctrl/p{1..7}
umount /sys/fs/resctrl/
mount -t resctrl resctrl /sys/fs/resctrl
mkdir /sys/fs/resctrl/p{1..8}An error occurs when creating resource group named p8:
unchecked MSR access error: WRMSR to 0xca0 (tried to write 0x00000000000007ff) at rIP: 0xffffffff82249142 (cat_wrmsr+0x32/0x60)
Call Trace:
<IRQ>
__flush_smp_call_function_queue+0x11d/0x170
__sysvec_call_function+0x24/0xd0
sysvec_call_function+0x89/0xc0
</IRQ>
<TASK>
asm_sysvec_call_function+0x16/0x20When creating a new resource control group, hardware will be configured by the following process:
rdtgroup_mkdir()
rdtgroup_mkdir_ctrl_mon()
rdtgroup_init_alloc()
resctrl_arch_update_domains()
resctrl_arch_update_domains() iterates and updates all resctrl_conf_type whose have_new_ctrl is true. Since staged_config[] holds the same values as when CDP was enabled, it will continue to update the CDP_CODE and CDP_DATA configurations. When group p8 is created, get_config_index() called in resctrl_arch_update_domains() will return 16 and 17 as the CLOSIDs for CDP_CODE and CDP_DATA, which will be translated to an invalid register - 0xca0 in this scenario.
Fix it by clearing staged_config[] before and after it is used.
[reinette: re-order commit tags]
--- arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 7 ++----- arch/x86/kernel/cpu/resctrl/internal.h | 1 + arch/x86/kernel/cpu/resctrl/rdtgroup.c | 25 +++++++++++++++++++++---- 3 files changed, 24 insertions(+), 9 deletions(-)
arch/x86/kernel/cpu/resctrl/ctrlmondata.c +2 -5
@@ -374,7 +374,6 @@ ssize_t rdtgroup_schemata_write(struct k {struct resctrl_schema *s;struct rdtgroup *rdtgrp; -struct rdt_domain *dom;struct rdt_resource *r;char *tok, *resname;int ret =0 ;
@@ -403,10 +402,7 @@ ssize_t rdtgroup_schemata_write(struct k goto out; } -list_for_each_entry (s, &resctrl_schema_all, list) { -list_for_each_entry (dom, &s->res->domains, list) -memset (dom->staged_config,0 ,sizeof (dom->staged_config)); - } +rdt_staged_configs_clear ();while ((tok =strsep (&buf,"\n" )) !=NULL ) { resname =strim (strsep (&tok,":" ));
@@ -451,6 +447,7 @@ ssize_t rdtgroup_schemata_write(struct k } out: +rdt_staged_configs_clear ();rdtgroup_kn_unlock (of->kn);cpus_read_unlock ();return ret ?: nbytes;
arch/x86/kernel/cpu/resctrl/internal.h +1 -0
@@ -537,5 +537,6 @@ bool has_busy_rmid(struct rdt_resource *void __check_limbo (struct rdt_domain *d,bool force_free);void rdt_domain_reconfigure_cdp (struct rdt_resource *r);void __init thread_throttle_mode_init (void ); +void rdt_staged_configs_clear (void );#endif /* _ASM_X86_RESCTRL_INTERNAL_H */
arch/x86/kernel/cpu/resctrl/rdtgroup.c +21 -4
@@ -78,6 +78,19 @@ void rdt_last_cmd_printf(const char *fmtva_end (ap); } +void rdt_staged_configs_clear (void ) +{ +struct rdt_resource *r; +struct rdt_domain *dom; + +lockdep_assert_held (&rdtgroup_mutex); + +for_each_alloc_capable_rdt_resource (r) { +list_for_each_entry (dom, &r->domains, list) +memset (dom->staged_config,0 ,sizeof (dom->staged_config)); + } +} +/* * Trivial allocator for CLOSIDs. Since h/w only supports a small number, * we can keep a bitmap of free CLOSIDs in a single integer.
@@ -2851,7 +2864,9 @@ static int rdtgroup_init_alloc(struct rd {struct resctrl_schema *s;struct rdt_resource *r; -int ret; +int ret =0 ; + +rdt_staged_configs_clear ();list_for_each_entry (s, &resctrl_schema_all, list) { r = s->res;
@@ -2862,20 +2877,22 @@ static int rdtgroup_init_alloc(struct rd }else { ret =rdtgroup_init_cat (s, rdtgrp->closid);if (ret <0 ) -return ret; + goto out; } ret =resctrl_arch_update_domains (r, rdtgrp->closid);if (ret <0 ) {rdt_last_cmd_puts ("Failed to initialize allocations\n" ); -return ret; + goto out; } } rdtgrp->mode =RDT_MODE_SHAREABLE ; -return 0 ; +out: +rdt_staged_configs_clear (); +return ret; } static int mkdir_rdt_prepare(struct kernfs_node *parent_kn,
Greg Kroah-Hartman
maintainerPATCH 190/198 powerpc: Pass correct CPU reference to assembler
In reply to Greg Kroah-HartmanFrom: Christophe Leroy <[email protected]>
commit bfb03af71a3798b5a88a945a9c19ad67e1c4986d upstream.
Jan-Benedict reported issue with building ppc64e_defconfig with mainline GCC work:
powerpc64-linux-gcc -Wp,-MMD,arch/powerpc/kernel/vdso/.gettimeofday-64.o.d -nostdinc -I./arch/powerpc/include -I./arch/powerpc/include/generated -I./include -I./arch/powerpc/include/uapi -I./arch/powerpc/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -D__KERNEL__ -I ./arch/powerpc -DHAVE_AS_ATHIGH=1 -fmacro-prefix-map=./= -D__ASSEMBLY__ -fno-PIE -m64 -Wl,-a64 -mabi=elfv1 -Wa,-me500 -Wa,-me500mc -mabi=elfv1 -mbig-endian -Wl,-soname=linux-vdso64.so.1 -D__VDSO64__ -s -c -o arch/powerpc/kernel/vdso/gettimeofday-64.o arch/powerpc/kernel/vdso/gettimeofday.S
arch/powerpc/kernel/vdso/gettimeofday.S: Assembler messages:
arch/powerpc/kernel/vdso/gettimeofday.S:72: Error: unrecognized opcode: stdu' arch/powerpc/kernel/vdso/gettimeofday.S:72: Error: unrecognized opcode: stdu' arch/powerpc/kernel/vdso/gettimeofday.S:72: Error: unrecognized opcode: std' arch/powerpc/kernel/vdso/gettimeofday.S:72: Error: unrecognized opcode: std' arch/powerpc/kernel/vdso/gettimeofday.S:72: Error: unrecognized opcode: ld' arch/powerpc/kernel/vdso/gettimeofday.S:72: Error: unrecognized opcode: ld'
...
make[1]: *** [arch/powerpc/kernel/vdso/Makefile:76: arch/powerpc/kernel/vdso/gettimeofday-64.o] Error 1
make: *** [arch/powerpc/Makefile:387: vdso_prepare] Error 2
This is due to assembler being called with -me500mc which is a 32 bits target.
The problem comes from the fact that CONFIG_PPC_E500MC is selected for both the e500mc (32 bits) and the e5500 (64 bits), and therefore the following makefile rule is wrong:
cpu-as-$(CONFIG_PPC_E500MC) += $(call as-option,-Wa$(comma)-me500mc)
Today we have CONFIG_TARGET_CPU which provides the identification of the expected CPU, it is used for GCC. Once GCC knows the target CPU, it adds the correct CPU option to assembler, no need to add it explicitly.
With that change (And also commit 45f7091aac35 ("powerpc/64: Set default CPU in Kconfig")), it now is:
powerpc64-linux-gcc -Wp,-MMD,arch/powerpc/kernel/vdso/.gettimeofday-64.o.d -nostdinc -I./arch/powerpc/include -I./arch/powerpc/include/generated -I./include -I./arch/powerpc/include/uapi -I./arch/powerpc/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -D__KERNEL__ -I ./arch/powerpc -DHAVE_AS_ATHIGH=1 -fmacro-prefix-map=./= -D__ASSEMBLY__ -fno-PIE -m64 -Wl,-a64 -mabi=elfv1 -mcpu=e500mc64 -mabi=elfv1 -mbig-endian -Wl,-soname=linux-vdso64.so.1 -D__VDSO64__ -s -c -o arch/powerpc/kernel/vdso/gettimeofday-64.o arch/powerpc/kernel/vdso/gettimeofday.S
--- arch/powerpc/Makefile | 4 ---- 1 file changed, 4 deletions(-)
arch/powerpc/Makefile +0 -4
@@ -201,10 +201,7 @@ KBUILD_CFLAGS += -fno-asynchronous-unwin # often slow when they are implemented at all KBUILD_CFLAGS += $(call cc-option,-mno-string) -cpu-as-$(CONFIG_40x) += -Wa,-m405 -cpu-as-$(CONFIG_44x) += -Wa,-m440 cpu-as-$(CONFIG_ALTIVEC) += $(call as-option,-Wa$(comma)-maltivec) -cpu-as-$(CONFIG_PPC_E500) += -Wa,-me500 # When using '-many -mpower4' gas will first try and find a matching power4 # mnemonic and failing that it will allow any valid mnemonic that GAS knows
@@ -212,7 +209,6 @@ cpu-as-$(CONFIG_PPC_E500) += -Wa,-me500 # LLVM IAS doesn't understand either flag: https://github.com/ClangBuiltLinux/linux/issues/675 # but LLVM IAS only supports ISA >= 2.06 for Book3S 64 anyway... cpu-as-$(CONFIG_PPC_BOOK3S_64) += $(call as-option,-Wa$(comma)-mpower4) $(call as-option,-Wa$(comma)-many) -cpu-as-$(CONFIG_PPC_E500MC) += $(call as-option,-Wa$(comma)-me500mc) KBUILD_AFLAGS += $(cpu-as-y) KBUILD_CFLAGS += $(cpu-as-y)
Greg Kroah-Hartman
maintainerPATCH 191/198 virt/coco/sev-guest: Check SEV_SNP attribute at probe time
In reply to Greg Kroah-HartmanFrom: Borislav Petkov (AMD) <[email protected]>
commit d6fd48eff7506bb866a54e40369df8899f2078a9 upstream.
No need to check it on every ioctl. And yes, this is a common SEV driver but it does only SNP-specific operations currently. This can be revisited later, when more use cases appear.
No functional changes.
--- arch/x86/kernel/sev.c | 3 --- drivers/virt/coco/sev-guest/sev-guest.c | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-)
arch/x86/kernel/sev.c +0 -3
@@ -2183,9 +2183,6 @@ int snp_issue_guest_request(u64 exit_codstruct ghcb *ghcb;int ret; -if (!cc_platform_has (CC_ATTR_GUEST_SEV_SNP )) -return -ENODEV ; -if (!fw_err)return -EINVAL ;
drivers/virt/coco/sev-guest/sev-guest.c +3 -0
@@ -705,6 +705,9 @@ static int __init sev_guest_probe(structvoid __iomem *mapping;int ret; +if (!cc_platform_has (CC_ATTR_GUEST_SEV_SNP )) +return -ENODEV ; +if (!dev->platform_data)return -ENODEV ;
Greg Kroah-Hartman
maintainerPATCH 192/198 virt/coco/sev-guest: Simplify extended guest request handling
In reply to Greg Kroah-HartmanFrom: Borislav Petkov (AMD) <[email protected]>
commit 970ab823743fb54b42002ec76c51481f67436444 upstream.
Return a specific error code - -ENOSPC - to signal the too small cert data buffer instead of checking exit code and exitinfo2.
While at it, hoist the *fw_err assignment in snp_issue_guest_request() so that a proper error value is returned to the callers.
[ Tom: check override_err instead of err. ]
--- arch/x86/kernel/sev.c | 11 ++++--- drivers/virt/coco/sev-guest/sev-guest.c | 48 +++++++++++++++++--------------- 2 files changed, 32 insertions(+), 27 deletions(-)
arch/x86/kernel/sev.c +6 -5
@@ -2209,15 +2209,16 @@ int snp_issue_guest_request(u64 exit_codif (ret) goto e_put; + *fw_err = ghcb->save.sw_exit_info_2;if (ghcb->save.sw_exit_info_2) {/* Number of expected pages are returned in RBX */ if (exit_code ==SVM_VMGEXIT_EXT_GUEST_REQUEST && - ghcb->save.sw_exit_info_2 ==SNP_GUEST_REQ_INVALID_LEN ) + ghcb->save.sw_exit_info_2 ==SNP_GUEST_REQ_INVALID_LEN ) { input->data_npages =ghcb_get_rbx (ghcb); - - *fw_err = ghcb->save.sw_exit_info_2; - - ret = -EIO ; + ret = -ENOSPC ; + }else { + ret = -EIO ; + } } e_put:
drivers/virt/coco/sev-guest/sev-guest.c +26 -22
85 lines not on this page · raw message
Greg Kroah-Hartman
maintainerPATCH 193/198 virt/coco/sev-guest: Remove the disable_vmpck label in handle_guest_request()
In reply to Greg Kroah-HartmanFrom: Borislav Petkov (AMD) <[email protected]>
commit c5a338274bdb894f088767bea856be344d0ccaef upstream.
Call the function directly instead.
No functional changes.
--- drivers/virt/coco/sev-guest/sev-guest.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/virt/coco/sev-guest/sev-guest.c +4 -6
@@ -407,7 +407,8 @@ retry_request:dev_alert (snp_dev->dev,"Detected error from ASP request. rc: %d, fw_err: %llu\n" , rc, *fw_err); - goto disable_vmpck; +snp_disable_vmpck (snp_dev); +return rc; } rc =verify_and_dec_payload (snp_dev, resp_buf, resp_sz);
@@ -415,14 +416,11 @@ retry_request:dev_alert (snp_dev->dev,"Detected unexpected decode failure from ASP. rc: %d\n" , rc); - goto disable_vmpck; +snp_disable_vmpck (snp_dev); +return rc; }return 0 ; - -disable_vmpck: -snp_disable_vmpck (snp_dev); -return rc; }static int get_report (struct snp_guest_dev *snp_dev,struct snp_guest_request_ioctl *arg)
Greg Kroah-Hartman
maintainerPATCH 194/198 virt/coco/sev-guest: Carve out the request issuing logic into a helper
In reply to Greg Kroah-HartmanFrom: Borislav Petkov (AMD) <[email protected]>
commit 0fdb6cc7c89cb5e0cbc45dbdbafb8e3fb92ddc95 upstream.
This makes the code flow a lot easier to follow.
No functional changes.
[ Tom: touchups. ]
--- drivers/virt/coco/sev-guest/sev-guest.c | 44 +++++++++++++++++++------------- 1 file changed, 27 insertions(+), 17 deletions(-)
drivers/virt/coco/sev-guest/sev-guest.c +27 -17
@@ -320,27 +320,12 @@ static int enc_payload(struct snp_guest_return __enc_payload (snp_dev, req, payload, sz); } -static int handle_guest_request (struct snp_guest_dev *snp_dev,u64 exit_code,int msg_ver, -u8 type,void *req_buf,size_t req_sz,void *resp_buf, -u32 resp_sz,__u64 *fw_err) +static int __handle_guest_request (struct snp_guest_dev *snp_dev,u64 exit_code,__u64 *fw_err) {unsigned long err, override_err =0 ;unsigned int override_npages =0 ; -u64 seqno;int rc; -/* Get message sequence and verify that its a non-zero */ - seqno =snp_get_msg_seqno (snp_dev); -if (!seqno) -return -EIO ; - -memset (snp_dev->response,0 ,sizeof (struct snp_guest_msg )); - -/* Encrypt the userspace provided payload */ - rc =enc_payload (snp_dev, seqno, msg_ver, type, req_buf, req_sz); -if (rc) -return rc; - retry_request:/* * Call firmware to process the request. In this function the encrypted
@@ -349,7 +334,6 @@ retry_request:* prevent reuse of the IV. */ rc =snp_issue_guest_request (exit_code, &snp_dev->input, &err); -switch (rc) {case -ENOSPC :/*
@@ -403,7 +387,33 @@ retry_request:if (!rc && override_err ==SNP_GUEST_REQ_INVALID_LEN )return -EIO ; +return rc; +} + +static int handle_guest_request (struct snp_guest_dev *snp_dev,u64 exit_code,int msg_ver, +u8 type,void *req_buf,size_t req_sz,void *resp_buf, +u32 resp_sz,__u64 *fw_err) +{ +u64 seqno; +int rc; + +/* Get message sequence and verify that its a non-zero */ + seqno =snp_get_msg_seqno (snp_dev); +if (!seqno) +return -EIO ; + +memset (snp_dev->response,0 ,sizeof (struct snp_guest_msg )); + +/* Encrypt the userspace provided payload */ + rc =enc_payload (snp_dev, seqno, msg_ver, type, req_buf, req_sz); +if (rc) +return rc; + + rc =__handle_guest_request (snp_dev, exit_code, fw_err);if (rc) { +if (rc == -EIO && *fw_err ==SNP_GUEST_REQ_INVALID_LEN ) +return rc; +dev_alert (snp_dev->dev,"Detected error from ASP request. rc: %d, fw_err: %llu\n" , rc, *fw_err);
Greg Kroah-Hartman
maintainerPATCH 195/198 virt/coco/sev-guest: Do some code style cleanups
In reply to Greg Kroah-HartmanFrom: Borislav Petkov (AMD) <[email protected]>
commit d25bae7dc7b0668cb2a1325c64eb32d5fea4e5a9 upstream.
Remove unnecessary linebreaks, make the code more compact.
No functional changes.
--- drivers/virt/coco/sev-guest/sev-guest.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/virt/coco/sev-guest/sev-guest.c +2 -6
@@ -414,18 +414,14 @@ static int handle_guest_request(struct sif (rc == -EIO && *fw_err ==SNP_GUEST_REQ_INVALID_LEN )return rc; -dev_alert (snp_dev->dev, -"Detected error from ASP request. rc: %d, fw_err: %llu\n" , - rc, *fw_err); +dev_alert (snp_dev->dev,"Detected error from ASP request. rc: %d, fw_err: %llu\n" , rc, *fw_err);snp_disable_vmpck (snp_dev);return rc; } rc =verify_and_dec_payload (snp_dev, resp_buf, resp_sz);if (rc) { -dev_alert (snp_dev->dev, -"Detected unexpected decode failure from ASP. rc: %d\n" , - rc); +dev_alert (snp_dev->dev,"Detected unexpected decode failure from ASP. rc: %d\n" , rc);snp_disable_vmpck (snp_dev);return rc; }
Greg Kroah-Hartman
maintainerPATCH 196/198 virt/coco/sev-guest: Convert the sw_exit_info_2 checking to a switch-case
In reply to Greg Kroah-HartmanFrom: Borislav Petkov (AMD) <[email protected]>
commit fa4ae42cc60a7dea30e8f2db444b808d80862345 upstream.
snp_issue_guest_request() checks the value returned by the hypervisor in sw_exit_info_2 and returns a different error depending on it.
Convert those checks into a switch-case to make it more readable when more error values are going to be checked in the future.
No functional changes.
--- arch/x86/kernel/sev.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
arch/x86/kernel/sev.c +11 -5
@@ -2210,15 +2210,21 @@ int snp_issue_guest_request(u64 exit_cod goto e_put; *fw_err = ghcb->save.sw_exit_info_2; -if (ghcb->save.sw_exit_info_2) { +switch (*fw_err) { +case 0 : +break ; + +case SNP_GUEST_REQ_INVALID_LEN :/* Number of expected pages are returned in RBX */ -if (exit_code ==SVM_VMGEXIT_EXT_GUEST_REQUEST && - ghcb->save.sw_exit_info_2 ==SNP_GUEST_REQ_INVALID_LEN ) { +if (exit_code ==SVM_VMGEXIT_EXT_GUEST_REQUEST ) { input->data_npages =ghcb_get_rbx (ghcb); ret = -ENOSPC ; - }else { - ret = -EIO ; +break ; } + fallthrough; +default : + ret = -EIO ; +break ; } e_put:
Greg Kroah-Hartman
maintainerPATCH 197/198 virt/coco/sev-guest: Add throttling awareness
In reply to Greg Kroah-HartmanFrom: Dionna Glaze <[email protected]>
commit 72f7754dcf31c87c92c0c353dcf747814cc5ce10 upstream.
A potentially malicious SEV guest can constantly hammer the hypervisor using this driver to send down requests and thus prevent or at least considerably hinder other guests from issuing requests to the secure processor which is a shared platform resource.
Therefore, the host is permitted and encouraged to throttle such guest requests.
Add the capability to handle the case when the hypervisor throttles excessive numbers of requests issued by the guest. Otherwise, the VM platform communication key will be disabled, preventing the guest from attesting itself.
Realistically speaking, a well-behaved guest should not even care about throttling. During its lifetime, it would end up issuing a handful of requests which the hardware can easily handle.
This is more to address the case of a malicious guest. Such guest should get throttled and if its VMPCK gets disabled, then that's its own wrongdoing and perhaps that guest even deserves it.
To the implementation: the hypervisor signals with SNP_GUEST_REQ_ERR_BUSY that the guest requests should be throttled. That error code is returned in the upper 32-bit half of exitinfo2 and this is part of the GHCB spec v2.
So the guest is given a throttling period of 1 minute in which it retries the request every 2 seconds. This is a good default but if it turns out to not pan out in practice, it can be tweaked later.
For safety, since the encryption algorithm in GHCBv2 is AES_GCM, control must remain in the kernel to complete the request with the current sequence number. Returning without finishing the request allows the guest to make another request but with different message contents. This is IV reuse, and breaks cryptographic protections.
[ bp:
- Rewrite commit message and do a simplified version.
- The stable tags are supposed to denote that a cleanup should go upfront before backporting this so that any future fixes to this can preserve the sanity of the backporter(s). ]
--- arch/x86/include/asm/sev-common.h | 3 ++- arch/x86/kernel/sev.c | 4 ++++ drivers/virt/coco/sev-guest/sev-guest.c | 19 ++++++++++++++++++- 3 files changed, 24 insertions(+), 2 deletions(-)
arch/x86/include/asm/sev-common.h +2 -1
@@ -128,8 +128,9 @@ struct snp_psc_desc {struct psc_entry entries[VMGEXIT_PSC_MAX_ENTRY ]; } __packed; -/* Guest message request error code */ +/* Guest message request error codes */ #define SNP_GUEST_REQ_INVALID_LEN BIT_ULL(32) +#define SNP_GUEST_REQ_ERR_BUSY BIT_ULL(33)#define GHCB_MSR_TERM_REQ 0x100#define GHCB_MSR_TERM_REASON_SET_POS 12
arch/x86/kernel/sev.c +4 -0
@@ -2214,6 +2214,10 @@ int snp_issue_guest_request(u64 exit_codcase 0 :break ; +case SNP_GUEST_REQ_ERR_BUSY : + ret = -EAGAIN ; +break ; +case SNP_GUEST_REQ_INVALID_LEN :/* Number of expected pages are returned in RBX */ if (exit_code ==SVM_VMGEXIT_EXT_GUEST_REQUEST ) {
drivers/virt/coco/sev-guest/sev-guest.c +18 -1
@@ -31,6 +31,9 @@#define AAD_LEN 48#define MSG_HDR_VER 1 +#define SNP_REQ_MAX_RETRY_DURATION (60*HZ) +#define SNP_REQ_RETRY_DELAY (2*HZ) +struct snp_guest_crypto {struct crypto_aead *tfm;u8 *iv, *authtag;
@@ -322,7 +325,8 @@ static int enc_payload(struct snp_guest_static int __handle_guest_request (struct snp_guest_dev *snp_dev,u64 exit_code,__u64 *fw_err) { -unsigned long err, override_err =0 ; +unsigned long err =0xff , override_err =0 ; +unsigned long req_start = jiffies;unsigned int override_npages =0 ;int rc;
@@ -362,6 +366,19 @@ retry_request:* user as an ioctl() return code. */ goto retry_request; + +/* +* The host may return SNP_GUEST_REQ_ERR_EBUSY if the request has been +* throttled. Retry in the driver to avoid returning and reusing the +* message sequence number on a different message. +*/ +case -EAGAIN : +if (jiffies - req_start >SNP_REQ_MAX_RETRY_DURATION ) { + rc = -ETIMEDOUT ; +break ; + } +schedule_timeout_killable (SNP_REQ_RETRY_DELAY ); + goto retry_request; }/*
Greg Kroah-Hartman
maintainerPATCH 198/198 io_uring/msg_ring: let target know allocated index
In reply to Greg Kroah-HartmanFrom: Pavel Begunkov <[email protected]>
commit 5da28edd7bd5518f97175ecea77615bb729a7a28 upstream.
msg_ring requests transferring files support auto index selection via IORING_FILE_INDEX_ALLOC, however they don't return the selected index to the target ring and there is no other good way for the userspace to know where is the receieved file.
Return the index for allocated slots and 0 otherwise, which is consistent with other fixed file installing requests.
--- io_uring/msg_ring.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
io_uring/msg_ring.c +3 -1
@@ -84,6 +84,8 @@ static int io_msg_send_fd(struct io_kiocstruct file *src_file;int ret; +if (msg->len) +return -EINVAL ;if (target_ctx == ctx)return -EINVAL ;if (target_ctx->flags &IORING_SETUP_R_DISABLED )
@@ -120,7 +122,7 @@ static int io_msg_send_fd(struct io_kioc* completes with -EOVERFLOW, then the sender must ensure that a * later IORING_OP_MSG_RING delivers the message. */ -if (!io_post_aux_cqe (target_ctx, msg->user_data, msg->len,0 , true)) +if (!io_post_aux_cqe (target_ctx, msg->user_data, ret,0 , true)) ret = -EOVERFLOW ; out_unlock:io_double_unlock_ctx (ctx, target_ctx, issue_flags);
Hello Greg,
Quoted 10 lines
From: Greg Kroah-Hartman <[email protected]>
Sent: 20 March 2023 14:52This is the start of the stable review cycle for the 6.1.21 release. There are 198 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 22 Mar 2023 14:54:29 +0000. Anything received after that time might be too late.
CIP configurations built and booted with Linux 6.1.21-rc1 (a6e5071b9d96):
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/pipelines/812172264
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/commits/linux-6.1.y
Kind regards, Chris
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.21 release. There are 198 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 22 Mar 2023 14:54:29 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.21-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
Regressions on PowerPC build failures.
Quoted 3 lines
Christophe Leroy <[email protected]>
powerpc/64: Set default CPU inKconfig
We see PowerPC build failures with Clang 16 and nightly on the following configurations:
* cell_defconfig
* ppc64e_defconfig
* tqm8xx_defconfig
Error messages respectively:
-----8<-----
error: unknown target CPU 'cell'
note: valid target CPU values are: generic, 440, 450, 601, 602, 603, 603e, 603ev, 604, 604e, 620, 630, g3, 7400, g4, 7450, g4+, 750, 8548, 970, g5, a2, e500, e500mc, e5500, power3, pwr3, power4, pwr4, power5, pwr5, power5x, pwr5x, power6, pwr6, power6x, pwr6x, power7, pwr7, power8, pwr8, power9, pwr9, power10, pwr10, powerpc, ppc, ppc32, powerpc64, ppc64, powerpc64le, ppc64le, future ----->8-----
-----8<-----
error: unknown target CPU 'e500mc64'
note: valid target CPU values are: generic, 440, 450, 601, 602, 603, 603e, 603ev, 604, 604e, 620, 630, g3, 7400, g4, 7450, g4+, 750, 8548, 970, g5, a2, e500, e500mc, e5500, power3, pwr3, power4, pwr4, power5, pwr5, power5x, pwr5x, power6, pwr6, power6x, pwr6x, power7, pwr7, power8, pwr8, power9, pwr9, power10, pwr10, powerpc, ppc, ppc32, powerpc64, ppc64, powerpc64le, ppc64le, future ----->8-----
-----8<-----
error: unknown target CPU '860'
note: valid target CPU values are: generic, 440, 450, 601, 602, 603, 603e, 603ev, 604, 604e, 620, 630, g3, 7400, g4, 7450, g4+, 750, 8548, 970, g5, a2, e500, e500mc, e5500, power3, pwr3, power4, pwr4, power5, pwr5, power5x, pwr5x, power6, pwr6, power6x, pwr6x, power7, pwr7, power8, pwr8, power9, pwr9, power10, pwr10, powerpc, ppc, ppc32, powerpc64, ppc64, powerpc64le, ppc64le, future ----->8-----
The bisection pointed to this commit,
45f7091aac35 ("powerpc/64: Set default CPU in Kconfig")
Follow up fix patch is here as per Christophe Leroy comments,
powerpc: Disable CPU unknown by CLANG when CC_IS_CLANG
--
Linaro LKFT
https://lkft.linaro.org
Greg Kroah-Hartman
maintainerQuoted 68 lines · Naresh Kamboju
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.21 release. There are 198 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 22 Mar 2023 14:54:29 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.21-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
Regressions on PowerPC build failures.Quoted 3 lines
Christophe Leroy <[email protected]>
powerpc/64: Set default CPU inKconfigWe see PowerPC build failures with Clang 16 and nightly on the following configurations:
*cell_defconfig
*ppc64e_defconfig
*tqm8xx_defconfigError messages respectively:
-----8<-----
error: unknown target CPU 'cell'
note: valid target CPU values are: generic, 440, 450, 601, 602, 603, 603e, 603ev, 604, 604e, 620, 630, g3, 7400, g4, 7450, g4+, 750, 8548, 970, g5, a2, e500, e500mc, e5500, power3, pwr3, power4, pwr4, power5, pwr5, power5x, pwr5x, power6, pwr6, power6x, pwr6x, power7, pwr7, power8, pwr8, power9, pwr9, power10, pwr10, powerpc, ppc, ppc32, powerpc64, ppc64, powerpc64le, ppc64le, future ----->8----------8<-----
error: unknown target CPU 'e500mc64'
note: valid target CPU values are: generic, 440, 450, 601, 602, 603, 603e, 603ev, 604, 604e, 620, 630, g3, 7400, g4, 7450, g4+, 750, 8548, 970, g5, a2, e500, e500mc, e5500, power3, pwr3, power4, pwr4, power5, pwr5, power5x, pwr5x, power6, pwr6, power6x, pwr6x, power7, pwr7, power8, pwr8, power9, pwr9, power10, pwr10, powerpc, ppc, ppc32, powerpc64, ppc64, powerpc64le, ppc64le, future ----->8----------8<-----
error: unknown target CPU '860'
note: valid target CPU values are: generic, 440, 450, 601, 602, 603, 603e, 603ev, 604, 604e, 620, 630, g3, 7400, g4, 7450, g4+, 750, 8548, 970, g5, a2, e500, e500mc, e5500, power3, pwr3, power4, pwr4, power5, pwr5, power5x, pwr5x, power6, pwr6, power6x, pwr6x, power7, pwr7, power8, pwr8, power9, pwr9, power10, pwr10, powerpc, ppc, ppc32, powerpc64, ppc64, powerpc64le, ppc64le, future ----->8-----
Quoted 7 lines
The bisection pointed to this commit,
45f7091aac35("powerpc/64: Set default CPU inKconfig")Follow up fix patch is here as per Christophe Leroy comments,
powerpc: Disable CPU unknown by CLANG whenCC_IS_CLANG
Should now be fixed, I'll push out a -rc2.
greg k-h
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.21 release. There are 198 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 22 Mar 2023 14:54:29 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.21-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
greg k-h
On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels, build tested on BMIPS_GENERIC:
Signature · 1 line
Florian
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.21 release. There are 198 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 22 Mar 2023 14:54:29 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.21-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Hi,
Quoted 5 lines
This is the start of the stable review cycle for the 6.1.21 release. There are 198 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 8 lines
Responses should be made by Wed, 22 Mar 2023 14:54:29 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.21-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.
fstests btrfs/056 triggered a panic for 6.1.21-rc1, but the panic does not happen on 6.1.20.
the patch *1 dropped in 6.1.9-rc is added to 6.1.21-rc1 again. *1 Subject: blk-mq: move the srcu_struct used for quiescing to the tagset
we need to drop it again, or need more patches.
dmesg output:
[ 144.826161] run fstests btrfs/056 at 2023-03-21 07:38:22 [ 145.218508] BTRFS: device fsid f51b57f4-387d-4cad-9abb-7d564b046644 devid 1 transid 26305 /dev/nvme0n1p1 scanned by mount (2411) [ 145.232873] BTRFS info (device nvme0n1p1): using crc32c (crc32c-intel) checksum algorithm [ 145.242079] BTRFS info (device nvme0n1p1): using free space tree [ 145.254748] BTRFS info (device nvme0n1p1): enabling ssd optimizations [ 145.767372] BTRFS: device fsid 6c57e1ae-86b5-416b-9583-ced6f290ee2c devid 1 transid 6 /dev/nvme0n1p2 scanned by systemd-udevd (2087) [ 145.863002] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm [ 145.871720] BTRFS info (device dm-0): using free space tree [ 145.881697] BTRFS info (device dm-0): enabling ssd optimizations [ 145.889144] BTRFS info (device dm-0): checking UUID tree [ 145.986698] BTRFS info: devid 1 device path /dev/mapper/flakey-test changed to /dev/dm-0 scanned by systemd-udevd (2087) [ 146.000451] BTRFS info: devid 1 device path /dev/dm-0 changed to /dev/mapper/flakey-test scanned by systemd-udevd (2087) [ 146.079464] BTRFS: device fsid 6c57e1ae-86b5-416b-9583-ced6f290ee2c devid 1 transid 6 /dev/dm-0 scanned by systemd-udevd (2087) [ 146.109496] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm [ 146.118224] BTRFS info (device dm-0): using free space tree [ 146.127288] BTRFS info (device dm-0): enabling ssd optimizations [ 146.134034] BTRFS info (device dm-0): start tree-log replay [ 146.142813] BTRFS info (device dm-0): checking UUID tree [ 146.228077] BUG: kernel NULL pointer dereference, address: 0000000000000058 [ 146.235907] #PF: supervisor read access in kernel mode [ 146.241662] #PF: error_code(0x0000) - not-present page [ 146.247420] PGD 0 P4D 0 [ 146.251227] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 146.257016] CPU: 35 PID: 2661 Comm: dmsetup Not tainted 6.1.21-0.1.el7.x86_64 #1 [ 146.266227] Hardware name: Dell Inc. PowerEdge T620/02CD1V, BIOS 2.9.0 12/06/2019 [ 146.275524] RIP: 0010:blk_mq_wait_quiesce_done+0xc/0x30 [ 146.282294] Code: 00 00 00 e8 66 48 ff ff 4c 89 e6 5b 48 89 ef 5d 41 5c e9 a7 7c 65 00 0f 1f 80 00 00 00 00 0f 1f 44 00 00 48 8b 87 50 03 00 00 <f6> 40 58 20 74 0c 48 8b b8 a8 00 00 00 e9 e2 69 c4 ff e9 dd e4 c4 [ 146.305208] RSP: 0018:ffffb03ecea6bbd0 EFLAGS: 00010286 [ 146.312029] RAX: 0000000000000000 RBX: ffffa086c7523800 RCX: 0000000000000000 [ 146.320997] RDX: 0000000000000000 RSI: 0000000000000246 RDI: ffffa086f1c27500 [ 146.329955] RBP: ffffa086f1c27500 R08: ffffa0a64dd9b300 R09: ffffa0a64d9ae800 [ 146.338913] R10: 0000000000000001 R11: ffffa086c7527400 R12: 0000000000000000 [ 146.347884] R13: ffffa086f5403e80 R14: ffffa086cd0dee00 R15: ffffffffc188a5d0 [ 146.356836] FS: 00007f7636967840(0000) GS:ffffa0b5ffc40000(0000) knlGS:0000000000000000 [ 146.366839] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 146.374211] CR2: 0000000000000058 CR3: 000000209451a001 CR4: 00000000001706e0 [ 146.383146] Call Trace: [ 146.386841] <TASK> [ 146.390144] del_gendisk+0x1ec/0x2c0 [ 146.395096] cleanup_mapped_device+0x130/0x140 [dm_mod] [ 146.401893] __dm_destroy+0x13d/0x1e0 [dm_mod] [ 146.407796] ? remove_all+0x30/0x30 [dm_mod] [ 146.413505] dev_remove+0x119/0x1a0 [dm_mod] [ 146.419199] ctl_ioctl+0x1ee/0x520 [dm_mod] [ 146.424802] dm_ctl_ioctl+0xa/0x20 [dm_mod] [ 146.430378] __x64_sys_ioctl+0x89/0xc0 [ 146.435433] do_syscall_64+0x58/0x80 [ 146.440272] ? ksys_semctl.constprop.21+0x13e/0x170 [ 146.446568] ? syscall_exit_to_user_mode+0x12/0x30 [ 146.452760] ? do_syscall_64+0x67/0x80 [ 146.457766] ? do_syscall_64+0x67/0x80 [ 146.462740] ? syscall_exit_to_user_mode+0x12/0x30 [ 146.468866] ? do_syscall_64+0x67/0x80 [ 146.473827] ? exc_page_fault+0x64/0x140 [ 146.478985] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 146.485414] RIP: 0033:0x7f7634af54a7 [ 146.490172] Code: 44 00 00 48 8b 05 c9 19 2d 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 99 19 2d 00 f7 d8 64 89 01 48 [ 146.512729] RSP: 002b:00007ffd0354ac08 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 146.521970] RAX: ffffffffffffffda RBX: 00007f763620d0a0 RCX: 00007f7634af54a7 [ 146.530718] RDX: 0000555d423aa110 RSI: 00000000c138fd04 RDI: 0000000000000003 [ 146.539465] RBP: 00007f76362482c3 R08: 00007f7636248e68 R09: 00007ffd0354ab30 [ 146.548212] R10: 0000000000000006 R11: 0000000000000246 R12: 0000555d423aa110 [ 146.556971] R13: 00007f76362482c3 R14: 0000555d423aa030 R15: 00007f76362482c3 [ 146.565738] </TASK> [ 146.568961] Modules linked in: dm_flakey rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache netfs rfkill ib_core dm_multipath intel_rapl_msr intel_rapl_common sb_edac x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel btrfs kvm acpi_power_meter acpi_ipmi nfsd irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel blake2b_generic xor rapl auth_rpcgss raid6_pq intel_cstate iTCO_wdt nfs_acl dm_mod iTCO_vendor_support dcdbas zstd_compress intel_uncore lockd mei_me ipmi_si pcspkr mei grace joydev lpc_ich sg ipmi_devintf wmi ipmi_msghandler sunrpc ip_tables x_tables xfs sd_mod ahci nvme libahci mpt3sas nvme_core igb libata megaraid_sas raid_class nvme_common crc32c_intel mgag200 dca scsi_transport_sas t10_pi [ 146.644444] CR2: 0000000000000058 [ 146.649073] ---[ end trace 0000000000000000 ]--- [ 146.662547] RIP: 0010:blk_mq_wait_quiesce_done+0xc/0x30 [ 146.669275] Code: 00 00 00 e8 66 48 ff ff 4c 89 e6 5b 48 89 ef 5d 41 5c e9 a7 7c 65 00 0f 1f 80 00 00 00 00 0f 1f 44 00 00 48 8b 87 50 03 00 00 <f6> 40 58 20 74 0c 48 8b b8 a8 00 00 00 e9 e2 69 c4 ff e9 dd e4 c4 [ 146.691900] RSP: 0018:ffffb03ecea6bbd0 EFLAGS: 00010286 [ 146.698578] RAX: 0000000000000000 RBX: ffffa086c7523800 RCX: 0000000000000000 [ 146.707395] RDX: 0000000000000000 RSI: 0000000000000246 RDI: ffffa086f1c27500 [ 146.716212] RBP: ffffa086f1c27500 R08: ffffa0a64dd9b300 R09: ffffa0a64d9ae800 [ 146.725028] R10: 0000000000000001 R11: ffffa086c7527400 R12: 0000000000000000 [ 146.733834] R13: ffffa086f5403e80 R14: ffffa086cd0dee00 R15: ffffffffc188a5d0 [ 146.742637] FS: 00007f7636967840(0000) GS:ffffa0b5ffc40000(0000) knlGS:0000000000000000 [ 146.752516] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 146.759773] CR2: 0000000000000058 CR3: 000000209451a001 CR4: 00000000001706e0 [ 146.768597] Kernel panic - not syncing: Fatal exception [ 147.210009] Kernel Offset: 0x16200000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff) [ 147.225480] ---[ end Kernel panic - not syncing: Fatal exception ]---
Best Regards
Wang Yugui ([email protected])
2023/03/21
Greg Kroah-Hartman
maintainerQuoted 17 lines · Wang Yugui
Hi,
Quoted 5 lines
This is the start of the stable review cycle for the 6.1.21 release. There are 198 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 8 lines
Responses should be made by Wed, 22 Mar 2023 14:54:29 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.21-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.
Quoted 7 lines
fstests btrfs/056 triggered a panic for 6.1.21-rc1, but the panic does not happen on 6.1.20.
the patch *1 dropped in 6.1.9-rc is added to 6.1.21-rc1 again. *1 Subject: blk-mq: move the
srcu_structused for quiescing to the tagsetwe need to drop it again, or need more patches.
Wow, I think this holds the record for the "patch that keeps getting applied" :(
Sasha, can you add this one to your "never apply it" list for 6.1.y?
thanks,
greg k-h
Hi Greg
6.1.21-rc1 tested.
x86_64
Build successfully completed.
Boot successfully completed.
No dmesg regressions.
Video output normal.
Sound output normal.
Lenovo ThinkPad X1 Carbon Gen10(Intel i7-1260P, arch linux)
Thanks
Quoted 837 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.21 release. There are 198 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 22 Mar 2023 14:54:29 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.21-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:Greg Kroah-Hartman <[email protected]>
Linux 6.1.21-rc1Pavel Begunkov <[email protected]>
io_uring/msg_ring: let target know allocated indexDionna Glaze <[email protected]>
virt/coco/sev-guest: Add throttling awarenessBorislav Petkov (AMD) <[email protected]>
virt/coco/sev-guest: Convert thesw_exit_info_2checking to a switch-caseBorislav Petkov (AMD) <[email protected]>
virt/coco/sev-guest: Do some code style cleanupsBorislav Petkov (AMD) <[email protected]>
virt/coco/sev-guest: Carve out the request issuing logic into a helperBorislav Petkov (AMD) <[email protected]>
virt/coco/sev-guest: Remove thedisable_vmpcklabel inhandle_guest_request()Borislav Petkov (AMD) <[email protected]>
virt/coco/sev-guest: Simplify extended guest request handlingBorislav Petkov (AMD) <[email protected]>
virt/coco/sev-guest: CheckSEV_SNPattribute at probe timeChristophe Leroy <[email protected]>
powerpc: Pass correct CPU reference to assemblerShawn Wang <[email protected]>
x86/resctrl: Clear staged_config[] before and after it is usedNikita Zhandarovich <[email protected]>
x86/mm: Fix use of uninitialized buffer insme_enable()Yazen Ghannam <[email protected]>
x86/mce: Make sure logged MCEs are processed after sysfs updateKrzysztof Kozlowski <[email protected]>
ASoC: qcom: q6prm: fix incorrectclk_rootpassed to ADSPPierre-Louis Bossart <[email protected]>
ASoC: Intel: soc-acpi: fix copy-paste issue in topology namesShawn Guo <[email protected]>
cpuidle: psci: Iterate backwards over list inpsci_pd_remove()Takashi Iwai <[email protected]>
fbdev: Fix incorrect page mapping clearance atfb_deferred_io_release()Radu Pirea (OSS) <[email protected]>
net: phy: nxp-c45-tja11xx: fixMII_BASIC_CONFIG_REVbitSudeep Holla <[email protected]>
ACPI: PPTT: Fix to avoid sleep in the atomic context when PPTT is absentTero Kristo <[email protected]>
trace/hwlat: Do not start per-cpu thread if it is already runningTero Kristo <[email protected]>
trace/hwlat: Do not wipe the contents of per-cpu thread dataHelge Deller <[email protected]>
fbdev: stifb: Provide valid pixelclock and addfb_check_var()checksFrancesco Dolcini <[email protected]>
mmc:sdhci_am654: lower power-on failed message severityPali Rohár <[email protected]>
powerpc/boot: Don't always pass -mcpu=powerpc when building 32-bit uImageChristophe Leroy <[email protected]>
powerpc/64: Set default CPU inKconfigJames Houghton <[email protected]>
mm: teachmincore_hugetlbabout pte markersDavid Hildenbrand <[email protected]>
mm/userfaultfd: propagate uffd-wp bit when PTE-mapping the huge zeropageCindy Lu <[email protected]>
vp_vdpa: fix the crash in hot unplug withvp_vdpaDave Ertman <[email protected]>
ice: avoid bonding causing auxiliary plug/unplug under RTNL lockElmer Miroslav Mosher Golovin <[email protected]>
nvme-pci: addNVME_QUIRK_BOGUS_NIDfor Netac NV3000Jan Kara via Ocfs2-devel <[email protected]>
ocfs2: fix data corruption after failed writeChen Zhongjin <[email protected]>
ftrace: Fix invalid address access inlookup_rec()when index is 0Paolo Abeni <[email protected]>
mptcp: fix lockdep false positive inmptcp_pm_nl_create_listen_socket()Matthieu Baerts <[email protected]>
mptcp: avoid settingTCP_CLOSEstate twiceGeliang Tang <[email protected]>
mptcp: addro_after_initfor tcp{,v6}_prot_overridePaolo Abeni <[email protected]>
mptcp: fix possible deadlock insubflow_error_reportAyush Gupta <[email protected]>
drm/amd/display: disconnect MPCC only on OTG changeWesley Chalmers <[email protected]>
drm/amd/display: Do not set DRR on pipe CommitTim Huang <[email protected]>
drm/amd/pm: bump SMU 13.0.4driver_ifheader versionBłażej Szczygieł <[email protected]>
drm/amd/pm: Fix sienna cichlid incorrect OD volage after resumeFelix Kuehling <[email protected]>
drm/amdgpu: Don't resume IOMMU after incomplete initAnkit Nautiyal <[email protected]>
drm/i915/dg2: Add HDMI pixel clock frequencies 267.30 and 319.89 MHzJanusz Krzysztofik <[email protected]>
drm/i915/active: Fix misuse of non-idle barriers as fence trackersJohan Hovold <[email protected]>
drm/sun4i: fix missing component unbind on bind errorsDmitry Osipenko <[email protected]>
drm/shmem-helper: Remove another errant put in error pathGuo Ren <[email protected]>
riscv: asid: Fixup stale TLB entry cause application crashSergey Matyukevich <[email protected]>
Revert "riscv: mm: notify remote harts about mmu cache updates"Jeremy Szu <[email protected]>
ALSA: hda/realtek: fix speaker, mute/micmute LEDs not work on a HP platformHamidreza H. Fard <[email protected]>
ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book2 ProBard Liao <[email protected]>
ALSA: hda: intel-dsp-config: add MTL PCI idPaolo Bonzini <[email protected]>
KVM: nVMX: add missing consistency checks for CR0 and CR4Suravee Suthikulpanit <[email protected]>
KVM: SVM: Modify AVIC GATag to support max number of 512 vCPUsSean Christopherson <[email protected]>
KVM: SVM: Fix a benign off-by-one bug in AVIC physical table maskVolker Lendecke <[email protected]>
cifs: Fixsmb2_set_path_size()Steven Rostedt (Google) <[email protected]>
tracing: Make tracepoint lockdep check actually test somethingSteven Rostedt (Google) <[email protected]>
tracing: Check field value inhist_field_name()Sung-hun Kim <[email protected]>
tracing: Makesplice_readavailable againShyam Prasad N <[email protected]>
cifs: generate signkey for the channel that's reconnectingNeilBrown <[email protected]>
md: selectBLOCK_LEGACY_AUTOLOADJohan Hovold <[email protected]>
interconnect: exynos: fix registration raceJohan Hovold <[email protected]>
interconnect: exynos: fix node leak in probe PM QoS error pathJohan Hovold <[email protected]>
interconnect: qcom: msm8974: fix registration raceJohan Hovold <[email protected]>
interconnect: qcom: rpmh: fix registration raceJohan Hovold <[email protected]>
interconnect: qcom: rpmh: fix probe child-node error handlingJohan Hovold <[email protected]>
interconnect: qcom: rpm: fix registration raceJohan Hovold <[email protected]>
interconnect: qcom: rpm: fix probe child-node error handlingJohan Hovold <[email protected]>
interconnect: qcom: osm-l3: fix registration raceJohan Hovold <[email protected]>
interconnect: fix mem leak when freeing nodesJohan Hovold <[email protected]>
interconnect: imx: fix registration raceJohan Hovold <[email protected]>
interconnect: fix provider registration APIJohan Hovold <[email protected]>
interconnect: fixicc_provider_del()error handlingSven Schnelle <[email protected]>
s390/ipl: add missing intersection check toipl_reporthandlingThomas Hellström <[email protected]>
drm/ttm: Fix a NULL pointer dereferenceJohan Hovold <[email protected]>
memory: tegra30-emc: fix interconnect registration raceJohan Hovold <[email protected]>
memory: tegra124-emc: fix interconnect registration raceJohan Hovold <[email protected]>
memory: tegra20-emc: fix interconnect registration raceJohan Hovold <[email protected]>
memory: tegra: fix interconnect registration raceRoman Gushchin <[email protected]>
firmware: xilinx: don't make a sleepable memory allocation from an atomic contextRandy Dunlap <[email protected]>
serial: 8250:ASPEED_VUART: select REGMAP instead of depending on itJohan Hovold <[email protected]>
serial: 8250_fsl: fixhandle_irqlockingBiju Das <[email protected]>
serial: 8250_em: Fix UART port typeSherry Sun <[email protected]>
tty: serial:fsl_lpuart: skip waiting for transmission complete whenUARTCTRL_SBKis assertedTom Rix <[email protected]>
Revert "tty: serial:fsl_lpuart: adjustSERIAL_FSL_LPUART_CONSOLEconfig dependency"Theodore Ts'o <[email protected]>
ext4: fix possible double unlock when moving a directoryAlex Hung <[email protected]>
drm/amd/display: fix shift-out-of-bounds in CalculateVMAndRowBytesHoratio Zhang <[email protected]>
drm/amdgpu: fixttm_bocalltrace warning inpsp_hw_finiMichael Karcher <[email protected]>
sh: intc: Avoid spurious sizeof-pointer-div warningTiezhu Yang <[email protected]>
LoongArch: Only callget_timer_irq()once inconstant_clockevent_init()Eric Van Hensbergen <[email protected]>
net/9p: fix bug in client create for .LQu Huang <[email protected]>
drm/amdkfd: Fix an illegal memory accessBaokun Li <[email protected]>
ext4: fix task hung inext4_xattr_delete_inodeBaokun Li <[email protected]>
ext4: updates_journal_inumif it changes after journal replayBaokun Li <[email protected]>
ext4: failext4_igetif special inode unallocatedDavid Gow <[email protected]>
rust:arch/um: Disable FP/SIMD instruction to match x86Yifei Liu <[email protected]>
jffs2: correct logic when creating a hole injffs2_write_beginRoger Lu <[email protected]>
soc: mediatek: mtk-svs: keep svs alive ifCONFIG_DEBUG_FSnot supportedTobias Schramm <[email protected]>
mmc: atmel-mci: fix race between stop command and start of next commandLinus Torvalds <[email protected]>
media: m5mols: fix off-by-one loop termination errorLars-Peter Clausen <[email protected]>
hwmon: (ltc2992) Setcan_sleepflag for GPIO chipLars-Peter Clausen <[email protected]>
hwmon: (adm1266) Setcan_sleepflag for GPIO chipJurica Vukadin <[email protected]>
kconfig: Update config changed flag before calling callbackKrzysztof Kozlowski <[email protected]>
hwmon: tmp512: dropof_match_ptrfor ID tableLars-Peter Clausen <[email protected]>
hwmon: (ucd90320) Add minimum delay between bus accessesMarcus Folkesson <[email protected]>
hwmon: (ina3221) return prober error codeZheng Wang <[email protected]>
hwmon: (xgene) Fix use after free bug inxgene_hwmon_removedue to race conditionTony O'Brien <[email protected]>
hwmon: (adt7475) Fix masking of hysteresis registersTony O'Brien <[email protected]>
hwmon: (adt7475) Display smoothing attributes in correct orderNikolay Aleksandrov <[email protected]>
bonding: restore bond'sIFF_SLAVEflag if a non-eth dev enslave failsNikolay Aleksandrov <[email protected]>
bonding: restore IFF_MASTER/SLAVE flags on bond enslave ether type changeLiang He <[email protected]>
ethernet: sun: add check for themdesc_grab()Marek Vasut <[email protected]>
net: dsa: microchip: fix RGMII delay configuration on KSZ8765/KSZ8794/KSZ8795Daniil Tatianin <[email protected]>
qed/qed_mng_tlv: correctly zero out ->min instead of ->hourPo-Hsu Lin <[email protected]>
selftests: net:devlink_port_split.py: skip test if no suitable device availableThomas Bogendoerfer <[email protected]>
i825xx: sni_82596: use eth_hw_addr_set()Alexandra Winter <[email protected]>
net/iucv: Fix size of interrupt dataToke Høiland-Jørgensen <[email protected]>
net: atlantic: Fix crash when XDP is enabled but no program is loadedSzymon Heidrich <[email protected]>
net: usb: smsc75xx: Move packet length check to prevent kernel panic inskb_pullIdo Schimmel <[email protected]>
ipv4: Fix incorrect table ID in IOCTL pathWolfram Sang <[email protected]>
sh_eth: avoid PHY being resumed when interface is not upWolfram Sang <[email protected]>
ravb: avoid PHY being resumed when interface is not upVladimir Oltean <[email protected]>
net: dsa: mv88e6xxx: fix max_mtu of 1492 on 6165, 6191, 6220, 6250, 6290Vladimir Oltean <[email protected]>
net: dsa: don't error out when drivers returnETH_DATA_LENin .port_max_mtu()Maciej Fijalkowski <[email protected]>
ice: xsk: disable txq irq before flushing hwShawn Bohrer <[email protected]>
veth: Fix use after free inXDP_REDIRECTShay Drory <[email protected]>
net/mlx5: SetBREAK_FW_WAITflag first when removing driverPaul Blakey <[email protected]>
net/mlx5e: Fix cleanup null-ptr deref on encap lockMaor Dickman <[email protected]>
net/mlx5: E-switch, Fix missing set ofsplit_countwhen forward to ovs internal portMaor Dickman <[email protected]>
net/mlx5: E-switch, Fix wrong usage of source port rewrite in split rulesMaor Dickman <[email protected]>
net/mlx5e: Support Geneve and GRE with VF tunnel offloadDaniel Jurgens <[email protected]>
net/mlx5: Disable eswitch before waiting for VF pagesParav Pandit <[email protected]>
net/mlx5: Fix settingec_functionbit inMANAGE_PAGESParav Pandit <[email protected]>
net/mlx5e: Don't cache tunnel offloads capabilityEmeel Hakim <[email protected]>
net/mlx5e: Fix macsec ASO context alignmentLiang He <[email protected]>
block: sunvdc: add check formdesc_grab()returning NULLDamien Le Moal <[email protected]>
nvmet: avoid potential UAF innvmet_req_complete()Ming Lei <[email protected]>
nvme: fix handling single range discard requestDamien Le Moal <[email protected]>
block:null_blk: Fix handling of fake timeout requestRussell Currey <[email protected]>
powerpc/mm: Fix false detection of read faultsLiu Ying <[email protected]>
drm/bridge: Fix returned array size name foratomic_get_input_bus_fmtskdocSzymon Heidrich <[email protected]>
net: usb: smsc75xx: Limit packet length to skb->lenWenjia Zhang <[email protected]>
net/smc: fix deadlock triggered bycancel_delayed_work_syn()Ido Schimmel <[email protected]>
mlxsw: spectrum: Fix incorrect parsing depth after reloadZheng Wang <[email protected]>
nfc: st-nci: Fix use after free bug inndlc_removedue to race conditionKuniyuki Iwashima <[email protected]>
tcp: Fixbind()conflict check for dual-stack wildcard address.Heiner Kallweit <[email protected]>
net: phy: smsc: bail out inlan87xx_read_statusifgenphy_read_statusfailsEric Dumazet <[email protected]>
net: tunnels: annotate lockless accesses to dev->needed_headroomChris Leech <[email protected]>
blk-mq: fix "bad unlock balance detected" on q->srcu in __blk_mq_run_dispatch_opsChristoph Hellwig <[email protected]>
blk-mq: move thesrcu_structused for quiescing to the tagsetBart Van Assche <[email protected]>
loop: Fix use-after-free issuesJan Kara <[email protected]>
block: do not reverse request order when flushing plug listArınç ÜNAL <[email protected]>
net: dsa: mt7530: set PLL frequency and trgmii only when trgmii is usedArınç ÜNAL <[email protected]>
net: dsa: mt7530: remove now incorrect comment regarding port 5Daniil Tatianin <[email protected]>
qed/qed_dev: guard against a possible division by zeroD. Wythe <[email protected]>
net/smc: fix NULLsndbuf_descinsmc_cdc_tx_handler()Andrea Righi <[email protected]>
drm/i915/sseu: fixmax_subslicesarray-index-out-of-bounds accessJouni Högander <[email protected]>
drm/i915/psr: Use calculated io and fast wake linesNiklas Schnelle <[email protected]>
PCI: s390: Fix use-after-free of PCI resources with per-function hotplugEugenio Pérez <[email protected]>
vdpa_sim: setlast_used_idxaslast_avail_idxinvdpasim_queue_readyEugenio Pérez <[email protected]>
vdpa_sim: not reset state invdpasim_queue_readyGautam Dawar <[email protected]>
vhost-vdpa: free iommu domain after last use during cleanupIvan Vecera <[email protected]>
i40e: Fix kernel crash during reboot when adapter is in recovery modeJianguo Wu <[email protected]>
ipvlan: Make skb->skb_iif track skb->dev for l3s modeFedor Pchelkin <[email protected]>
nfc: pn533: initialize structpn533_out_argproperlyGuillaume Tucker <[email protected]>
selftests: fix LLVM build for i386 andx86_64Johannes Berg <[email protected]>
wifi: cfg80211: fix MLO connection ownershipJohannes Berg <[email protected]>
wifi: nl80211: fix NULL-ptr deref in offchan checkSi-Wei Liu <[email protected]>
vdpa/mlx5: should not activate virtq object when suspendedBreno Leitao <[email protected]>
tcp:tcp_make_synack()can be called from process contextArnd Bergmann <[email protected]>
ftrace,kcfi: Defineftrace_stub_graphconditionallyBart Van Assche <[email protected]>
scsi: core: Fix a procfs host directory removal regressionLee Duncan <[email protected]>
scsi: core: AddBLIST_NO_VPD_SIZEfor some VDASDJeremy Sowden <[email protected]>
netfilter:nft_redir: correct value of inet type.maxattrsJeremy Sowden <[email protected]>
netfilter:nft_redir: correct length for loading protocol registersJeremy Sowden <[email protected]>
netfilter:nft_masq: correct length for loading protocol registersJeremy Sowden <[email protected]>
netfilter:nft_nat: correct length for loading protocol registersBjorn Helgaas <[email protected]>
ALSA: hda: Match only Intel devices withCONTROLLER_IN_GPU()Tomas Henzl <[email protected]>
scsi: mpi3mr: Fix expander node leak inmpi3mr_remove()Ranjan Kumar <[email protected]>
scsi: mpi3mr: ioctl timeout when disabling/enabling interruptTomas Henzl <[email protected]>
scsi: mpi3mr: Fix memory leaks inmpi3mr_init_ioc()Ranjan Kumar <[email protected]>
scsi: mpi3mr: Return proper values for failures in firmware init pathTomas Henzl <[email protected]>
scsi: mpi3mr: Fix sas_hba.phy memory leak inmpi3mr_remove()Tomas Henzl <[email protected]>
scsi: mpi3mr: Fixmpi3mr_hba_portmemory leak inmpi3mr_remove()Tomas Henzl <[email protected]>
scsi: mpi3mr: Fix config page DMA memory leakTomas Henzl <[email protected]>
scsi: mpi3mr: Fixthrottle_groupsmemory leakWenchao Hao <[email protected]>
scsi: mpt3sas: Fix NULL pointer access inmpt3sas_transport_port_add()Glenn Washburn <[email protected]>
docs: Correct missing "d_" prefix fordentry_operationsmemberd_weak_revalidateJaska Uimonen <[email protected]>
ASoC: SOF: ipc4-topology: set dmic dai index from copierRanjani Sridharan <[email protected]>
ASOC: SOF: Intel: pci-tgl: Fix device descriptionRanjani Sridharan <[email protected]>
ASoC: SOF: Intel: SKL: Fix device descriptionRanjani Sridharan <[email protected]>
ASoC: SOF: Intel: HDA: Fix device descriptionRanjani Sridharan <[email protected]>
ASoC: SOF: Intel: MTL: Fix the device descriptionRandy Dunlap <[email protected]>
clk: HI655X: select REGMAP instead of depending on itChristian Hewitt <[email protected]>
drm/meson: fix 1px pink line on GXM when scaling video overlayZhang Xiaoxu <[email protected]>
cifs: Move thein_sendstatistic to__smb_send_rqst()Dan Carpenter <[email protected]>
fbdev: chipsfb: Fix error codes inchipsfb_pci_init()Dmitry Osipenko <[email protected]>
drm/panfrost: Don't sync rpm suspension after mmu flushingDmitry Osipenko <[email protected]>
drm/msm/gem: Prevent blocking within shrinker loopOleksandr Tyshchenko <[email protected]>
drm/virtio: Pass correct device todma_sync_sgtable_for_device()Herbert Xu <[email protected]>
xfrm: Allow transport-mode states withAF_UNSPECselector-------------
Diffstat:
Documentation/filesystems/vfs.rst | 2 +- Makefile | 4 +- arch/loongarch/kernel/time.c | 11 +- arch/powerpc/Makefile | 26 +-- arch/powerpc/boot/Makefile | 14 +- arch/powerpc/mm/fault.c | 11 +- arch/powerpc/platforms/Kconfig.cputype | 12 +- arch/riscv/include/asm/mmu.h | 2 - arch/riscv/include/asm/tlbflush.h | 18 -- arch/riscv/mm/context.c | 40 ++-- arch/riscv/mm/tlbflush.c | 28 +-- arch/s390/boot/ipl_report.c | 8 + arch/s390/pci/pci.c | 16 +- arch/s390/pci/pci_bus.c | 12 +- arch/s390/pci/pci_bus.h | 3 +- arch/x86/Makefile.um | 6 + arch/x86/include/asm/sev-common.h | 3 +- arch/x86/include/asm/svm.h | 12 +- arch/x86/kernel/cpu/mce/core.c | 1 + arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 7 +- arch/x86/kernel/cpu/resctrl/internal.h | 1 + arch/x86/kernel/cpu/resctrl/rdtgroup.c | 25 ++- arch/x86/kernel/ftrace_64.S | 2 + arch/x86/kernel/sev.c | 26 ++- arch/x86/kvm/svm/avic.c | 26 ++- arch/x86/kvm/vmx/nested.c | 10 +- arch/x86/mm/mem_encrypt_identity.c | 3 +- block/blk-core.c | 27 +-- block/blk-mq.c | 38 +++- block/blk-mq.h | 15 +- block/blk-sysfs.c | 9 +- block/blk.h | 9 +- block/genhd.c | 2 +- drivers/acpi/pptt.c | 5 +- drivers/block/loop.c | 25 ++- drivers/block/null_blk/main.c | 6 +- drivers/block/sunvdc.c | 2 + drivers/clk/Kconfig | 2 +- drivers/cpuidle/cpuidle-psci-domain.c | 3 +- drivers/firmware/xilinx/zynqmp.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 +- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 11 +- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 9 +- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c | 3 - .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 6 +- .../amd/display/dc/dml/dcn30/display_mode_vba_30.c | 5 +- .../pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_4.h | 4 +- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 2 +- .../drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 43 ++++- drivers/gpu/drm/drm_gem.c | 9 +- drivers/gpu/drm/drm_gem_shmem_helper.c | 9 +- drivers/gpu/drm/i915/display/intel_display_types.h | 2 + drivers/gpu/drm/i915/display/intel_psr.c | 78 ++++++-- drivers/gpu/drm/i915/display/intel_snps_phy.c | 62 +++++++ drivers/gpu/drm/i915/gt/intel_sseu.h | 2 +- drivers/gpu/drm/i915/i915_active.c | 25 +-- drivers/gpu/drm/meson/meson_vpp.c | 2 + drivers/gpu/drm/msm/msm_gem_shrinker.c | 11 +- drivers/gpu/drm/panfrost/panfrost_mmu.c | 2 +- drivers/gpu/drm/sun4i/sun4i_drv.c | 6 +- drivers/gpu/drm/ttm/ttm_device.c | 2 +- drivers/gpu/drm/virtio/virtgpu_vq.c | 4 +- drivers/hwmon/adt7475.c | 8 +- drivers/hwmon/ina3221.c | 2 +- drivers/hwmon/ltc2992.c | 1 + drivers/hwmon/pmbus/adm1266.c | 1 + drivers/hwmon/pmbus/ucd9000.c | 75 ++++++++ drivers/hwmon/tmp513.c | 2 +- drivers/hwmon/xgene-hwmon.c | 1 + drivers/interconnect/core.c | 68 ++++--- drivers/interconnect/imx/imx.c | 20 +- drivers/interconnect/qcom/icc-rpm.c | 29 +-- drivers/interconnect/qcom/icc-rpmh.c | 30 +-- drivers/interconnect/qcom/msm8974.c | 20 +- drivers/interconnect/qcom/osm-l3.c | 14 +- drivers/interconnect/samsung/exynos.c | 26 +-- drivers/md/Kconfig | 4 + drivers/media/i2c/m5mols/m5mols_core.c | 2 +- drivers/memory/tegra/mc.c | 16 +- drivers/memory/tegra/tegra124-emc.c | 12 +- drivers/memory/tegra/tegra20-emc.c | 12 +- drivers/memory/tegra/tegra30-emc.c | 12 +- drivers/mmc/host/atmel-mci.c | 3 - drivers/mmc/host/sdhci_am654.c | 2 +- drivers/net/bonding/bond_main.c | 23 ++- drivers/net/dsa/microchip/ksz_common.c | 2 +- drivers/net/dsa/mt7530.c | 64 +++---- drivers/net/dsa/mv88e6xxx/chip.c | 16 +- drivers/net/ethernet/aquantia/atlantic/aq_ring.c | 28 ++- drivers/net/ethernet/i825xx/sni_82596.c | 14 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 1 + drivers/net/ethernet/intel/ice/ice.h | 14 +- drivers/net/ethernet/intel/ice/ice_main.c | 19 +- drivers/net/ethernet/intel/ice/ice_xsk.c | 5 +- drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 - .../net/ethernet/mellanox/mlx5/core/en/tc_tun.c | 2 - .../ethernet/mellanox/mlx5/core/en_accel/macsec.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 +- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 1 - drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 20 +- drivers/net/ethernet/mellanox/mlx5/core/en_tc.h | 2 - .../ethernet/mellanox/mlx5/core/esw/indir_table.c | 203 ++++----------------- .../ethernet/mellanox/mlx5/core/esw/indir_table.h | 4 - .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 31 ++-- .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 1 - drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 +- .../net/ethernet/mellanox/mlx5/core/pagealloc.c | 22 ++- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 + .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 14 ++ drivers/net/ethernet/qlogic/qed/qed_dev.c | 5 + drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c | 2 +- drivers/net/ethernet/renesas/ravb_main.c | 12 +- drivers/net/ethernet/renesas/sh_eth.c | 12 +- drivers/net/ethernet/sun/ldmvsw.c | 3 + drivers/net/ethernet/sun/sunvnet.c | 3 + drivers/net/ipvlan/ipvlan_l3s.c | 1 + drivers/net/phy/nxp-c45-tja11xx.c | 2 +- drivers/net/phy/smsc.c | 5 +- drivers/net/usb/smsc75xx.c | 7 + drivers/net/veth.c | 6 +- drivers/nfc/pn533/usb.c | 1 + drivers/nfc/st-nci/ndlc.c | 6 +- drivers/nvme/host/core.c | 28 ++- drivers/nvme/host/pci.c | 2 + drivers/nvme/target/core.c | 4 +- drivers/pci/bus.c | 21 +++ drivers/scsi/hosts.c | 3 - drivers/scsi/mpi3mr/mpi3mr.h | 5 + drivers/scsi/mpi3mr/mpi3mr_fw.c | 71 ++++--- drivers/scsi/mpi3mr/mpi3mr_os.c | 25 +++ drivers/scsi/mpi3mr/mpi3mr_transport.c | 5 +- drivers/scsi/mpt3sas/mpt3sas_transport.c | 14 +- drivers/scsi/scsi.c | 3 + drivers/scsi/scsi_devinfo.c | 3 +- drivers/scsi/scsi_scan.c | 3 + drivers/soc/mediatek/mtk-svs.c | 6 + drivers/tty/serial/8250/8250_em.c | 4 +- drivers/tty/serial/8250/8250_fsl.c | 4 +- drivers/tty/serial/8250/Kconfig | 3 +- drivers/tty/serial/Kconfig | 2 +- drivers/tty/serial/fsl_lpuart.c | 12 +- drivers/vdpa/mlx5/core/mlx5_vdpa.h | 1 + drivers/vdpa/mlx5/net/mlx5_vnet.c | 6 +- drivers/vdpa/vdpa_sim/vdpa_sim.c | 13 ++ drivers/vdpa/virtio_pci/vp_vdpa.c | 2 +- drivers/vhost/vdpa.c | 3 +- drivers/video/fbdev/chipsfb.c | 14 +- drivers/video/fbdev/core/fb_defio.c | 17 +- drivers/video/fbdev/stifb.c | 27 +++ drivers/virt/coco/sev-guest/sev-guest.c | 128 ++++++++----- fs/cifs/smb2inode.c | 31 +++- fs/cifs/smb2transport.c | 2 +- fs/cifs/transport.c | 21 +-- fs/ext4/inode.c | 18 +- fs/ext4/namei.c | 4 +- fs/ext4/super.c | 7 +- fs/ext4/xattr.c | 11 ++ fs/jffs2/file.c | 15 +- fs/ocfs2/aops.c | 19 +- include/drm/drm_bridge.h | 4 +- include/drm/drm_gem.h | 4 +- include/linux/blk-mq.h | 10 + include/linux/blkdev.h | 9 - include/linux/fb.h | 1 + include/linux/interconnect-provider.h | 12 ++ include/linux/netdevice.h | 6 +- include/linux/pci.h | 1 + include/linux/sh_intc.h | 5 +- include/linux/tracepoint.h | 15 +- include/scsi/scsi_device.h | 2 + include/scsi/scsi_devinfo.h | 6 +- io_uring/msg_ring.c | 4 +- kernel/trace/ftrace.c | 3 +- kernel/trace/trace.c | 2 + kernel/trace/trace_events_hist.c | 3 + kernel/trace/trace_hwlat.c | 7 +- mm/huge_memory.c | 6 +- mm/mincore.c | 2 +- net/9p/client.c | 2 +- net/dsa/slave.c | 9 +- net/ipv4/fib_frontend.c | 3 + net/ipv4/inet_hashtables.c | 8 +- net/ipv4/ip_tunnel.c | 12 +- net/ipv4/tcp_output.c | 2 +- net/ipv6/ip6_tunnel.c | 4 +- net/iucv/iucv.c | 2 +- net/mptcp/pm_netlink.c | 16 ++ net/mptcp/subflow.c | 12 +- net/netfilter/nft_masq.c | 2 +- net/netfilter/nft_nat.c | 2 +- net/netfilter/nft_redir.c | 4 +- net/smc/smc_cdc.c | 3 + net/smc/smc_core.c | 2 +- net/wireless/nl80211.c | 18 +- net/xfrm/xfrm_state.c | 5 - scripts/kconfig/confdata.c | 6 +- sound/hda/intel-dsp-config.c | 9 + sound/pci/hda/hda_intel.c | 5 +- sound/pci/hda/patch_realtek.c | 2 + sound/soc/intel/common/soc-acpi-intel-adl-match.c | 2 +- sound/soc/qcom/qdsp6/q6prm.c | 4 +- sound/soc/sof/intel/pci-apl.c | 1 + sound/soc/sof/intel/pci-cnl.c | 2 + sound/soc/sof/intel/pci-icl.c | 1 + sound/soc/sof/intel/pci-mtl.c | 1 + sound/soc/sof/intel/pci-skl.c | 2 + sound/soc/sof/intel/pci-tgl.c | 7 + sound/soc/sof/ipc4-topology.h | 2 +- tools/testing/selftests/lib.mk | 2 + tools/testing/selftests/net/devlink_port_split.py | 36 +++- 210 files changed, 1586 insertions(+), 962 deletions(-)
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.21 release. There are 198 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Successfully cross-compiled for arm64 (bcm2711_defconfig, GCC 10.2.0) and powerpc (ps3_defconfig, GCC 12.2.0).
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.21 release. There are 198 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Thanks,
Conor.
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.21 release. There are 198 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 22 Mar 2023 14:54:29 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.21-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra.
Due to infrastructure issues, no test report available, but all tests are passing.
Jon
Signature · 1 line
nvpublic