6.6.36-rc1 review
Subsystems (3)
Greg Kroah-Hartman
maintainerPATCH 145/192 RDMA/rxe: Fix data copy for IB_SEND_INLINE
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Honggang LI <[email protected]>
commit 03fa18a992d5626fd7bf3557a52e826bf8b326b3 upstream.
For RDMA Send and Write with IB_SEND_INLINE, the memory buffers specified in sge list will be placed inline in the Send Request.
The data should be copied by CPU from the virtual addresses of corresponding sge list DMA addresses.
--- drivers/infiniband/sw/rxe/rxe_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/sw/rxe/rxe_verbs.c +1 -1
@@ -812,7 +812,7 @@ static void copy_inline_data_to_wqe(struct rxe_send_wqe *wqe,int i;for (i =0 ; i < ibwr->num_sge; i++, sge++) { -memcpy (p,ib_virt_dma_to_page (sge->addr), sge->length); +memcpy (p,ib_virt_dma_to_ptr (sge->addr), sge->length); p += sge->length; } }
Signature · 1 line
2.45.2
Greg Kroah-Hartman
maintainerPATCH 146/192 RDMA/mlx5: Remove extra unlock on error path
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jason Gunthorpe <[email protected]>
commit c1eb2512596fb3542357bb6c34c286f5e0374538 upstream.
The below commit lifted the locking out of this function but left this error path unlock behind resulting in unbalanced locking. Remove the missed unlock too.
--- drivers/infiniband/hw/mlx5/mr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/infiniband/hw/mlx5/mr.c +1 -3
@@ -697,10 +697,8 @@ static int mlx5_cache_ent_insert(struct new = &((*new)->rb_left);if (cmp <0 ) new = &((*new)->rb_right); -if (cmp ==0 ) { -mutex_unlock (&cache->rb_lock); +if (cmp ==0 )return -EEXIST ; - } }/* Add new node and rebalance tree. */
Greg Kroah-Hartman
maintainerPATCH 147/192 RDMA/mlx5: Follow rb_key.ats when creating new mkeys
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jason Gunthorpe <[email protected]>
commit f637040c3339a2ed8c12d65ad03f9552386e2fe7 upstream.
When a cache ent already exists but doesn't have any mkeys in it the cache will automatically create a new one based on the specification in the ent->rb_key.
ent->ats was missed when creating the new key and so ma_translation_mode was not being set even though the ent requires it.
--- drivers/infiniband/hw/mlx5/mr.c | 1 + 1 file changed, 1 insertion(+)
drivers/infiniband/hw/mlx5/mr.c +1 -0
@@ -308,6 +308,7 @@ static void set_cache_mkc(struct mlx5_caMLX5_SET (mkc, mkc, access_mode_1_0, ent->rb_key.access_mode &0x3 );MLX5_SET (mkc, mkc, access_mode_4_2, (ent->rb_key.access_mode >>2 ) &0x7 ); +MLX5_SET (mkc, mkc, ma_translation_mode, !!ent->rb_key.ats); MLX5_SET(mkc, mkc, translations_octword_size, get_mkc_octo_size(ent->rb_key.access_mode,
Greg Kroah-Hartman
maintainerPATCH 148/192 ovl: fix encoding fid for lower only root
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Miklos Szeredi <[email protected]>
commit 004b8d1491b4bcbb7da1a3206d1e7e66822d47c6 upstream.
ovl_check_encode_origin() should return a positive number if the lower dentry is to be encoded, zero otherwise. If there's no upper layer at all (read-only overlay), then it obviously needs to return positive.
This was broken by commit 16aac5ad1fa9 ("ovl: support encoding non-decodable file handles"), which didn't take the lower-only configuration into account.
Fix by checking the no-upper-layer case up-front.
--- fs/overlayfs/export.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
fs/overlayfs/export.c +5 -1
@@ -186,6 +186,10 @@ static int ovl_check_encode_origin(strucstruct ovl_fs *ofs =OVL_FS (dentry->d_sb);bool decodable = ofs->config.nfs_export; +/* No upper layer? */ +if (!ovl_upper_mnt (ofs)) +return 1 ; +/* Lower file handle for non-upper non-decodable */ if (!ovl_dentry_upper (dentry) && !decodable)return 1 ;
@@ -214,7 +218,7 @@ static int ovl_check_encode_origin(struc* ovl_connect_layer() will try to make origin's layer "connected" by * copying up a "connectable" ancestor. */ -if (d_is_dir (dentry) &&ovl_upper_mnt (ofs) && decodable) +if (d_is_dir (dentry) && decodable)return ovl_connect_layer (dentry);/* Lower file handle for indexed and non-upper dir/non-dir */
Greg Kroah-Hartman
maintainerPATCH 149/192 ALSA: hda/realtek: fix mute/micmute LEDs dont work for ProBook 445/465 G11.
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andy Chi <[email protected]>
commit ea5f8c4cffcd8a6b62b3a3bd5008275218c9d02a upstream.
HP ProBook 445/465 G11 needs ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF quirk to make mic-mute/audio-mute working.
--- sound/pci/hda/patch_realtek.c | 4 ++++ 1 file changed, 4 insertions(+)
sound/pci/hda/patch_realtek.c +4 -0
@@ -9959,6 +9959,10 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x103c ,0x8c70 ,"HP EliteBook 835 G11" ,ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED ),SND_PCI_QUIRK (0x103c ,0x8c71 ,"HP EliteBook 845 G11" ,ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED ),SND_PCI_QUIRK (0x103c ,0x8c72 ,"HP EliteBook 865 G11" ,ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED ), +SND_PCI_QUIRK (0x103c ,0x8c7b ,"HP ProBook 445 G11" ,ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF ), +SND_PCI_QUIRK (0x103c ,0x8c7c ,"HP ProBook 445 G11" ,ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF ), +SND_PCI_QUIRK (0x103c ,0x8c7d ,"HP ProBook 465 G11" ,ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF ), +SND_PCI_QUIRK (0x103c ,0x8c7e ,"HP ProBook 465 G11" ,ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF ),SND_PCI_QUIRK (0x103c ,0x8c89 ,"HP ProBook 460 G11" ,ALC236_FIXUP_HP_GPIO_LED ),SND_PCI_QUIRK (0x103c ,0x8c8a ,"HP EliteBook 630" ,ALC236_FIXUP_HP_GPIO_LED ), SND_PCI_QUIRK(0x103c, 0x8c8c, "HP EliteBook 660", ALC236_FIXUP_HP_GPIO_LED),
Greg Kroah-Hartman
maintainerPATCH 150/192 ALSA: hda/realtek: Limit mic boost on N14AP7
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Edson Juliano Drosdeck <[email protected]>
commit 86a433862912f52597263aa224a9ed82bcd533bf upstream.
The internal mic boost on the N14AP7 is too high. Fix this by applying the ALC269_FIXUP_LIMIT_INT_MIC_BOOST fixup to the machine to limit the gain.
--- sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+)
sound/pci/hda/patch_realtek.c +1 -0
@@ -10316,6 +10316,7 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x1b7d ,0xa831 ,"Ordissimo EVE2 " ,ALC269VB_FIXUP_ORDISSIMO_EVE2 ),/* Also known as Malata PC-B1303 */ SND_PCI_QUIRK (0x1c06 ,0x2013 ,"Lemote A1802" ,ALC269_FIXUP_LEMOTE_A1802 ),SND_PCI_QUIRK (0x1c06 ,0x2015 ,"Lemote A190X" ,ALC269_FIXUP_LEMOTE_A190X ), +SND_PCI_QUIRK (0x1c6c ,0x122a ,"Positivo N14AP7" ,ALC269_FIXUP_LIMIT_INT_MIC_BOOST ),SND_PCI_QUIRK (0x1c6c ,0x1251 ,"Positivo N14KP6-TG" ,ALC288_FIXUP_DELL1_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1d05 ,0x1132 ,"TongFang PHxTxX1" ,ALC256_FIXUP_SET_COEF_DEFAULTS ), SND_PCI_QUIRK(0x1d05, 0x1096, "TongFang GMxMRxx", ALC269_FIXUP_NO_SHUTUP),
Greg Kroah-Hartman
maintainerPATCH 151/192 ALSA: hda/realtek: Add quirk for Lenovo Yoga Pro 7 14AHP9
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pablo Caño <[email protected]>
commit ad22051afdad962b6012f3823d0ed1a735935386 upstream.
Lenovo Yoga Pro 7 14AHP9 (PCI SSID 17aa:3891) seems requiring a similar workaround like Yoga 9 model and Yoga 7 Pro 14APH8 for the bass speaker.
--- sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+)
sound/pci/hda/patch_realtek.c +1 -0
@@ -10270,6 +10270,7 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x17aa ,0x3882 ,"Lenovo Yoga Pro 7 14APH8" ,ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN ),SND_PCI_QUIRK (0x17aa ,0x3884 ,"Y780 YG DUAL" ,ALC287_FIXUP_TAS2781_I2C ),SND_PCI_QUIRK (0x17aa ,0x3886 ,"Y780 VECO DUAL" ,ALC287_FIXUP_TAS2781_I2C ), +SND_PCI_QUIRK (0x17aa ,0x3891 ,"Lenovo Yoga Pro 7 14AHP9" ,ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN ),SND_PCI_QUIRK (0x17aa ,0x38a7 ,"Y780P AMD YG dual" ,ALC287_FIXUP_TAS2781_I2C ),SND_PCI_QUIRK (0x17aa ,0x38a8 ,"Y780P AMD VECO dual" ,ALC287_FIXUP_TAS2781_I2C ), SND_PCI_QUIRK(0x17aa, 0x38ba, "Yoga S780-14.5 Air AMD quad YC", ALC287_FIXUP_TAS2781_I2C),
Greg Kroah-Hartman
maintainerPATCH 152/192 drm/i915/mso: using joiner is not possible with eDP MSO
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jani Nikula <[email protected]>
commit 49cc17967be95d64606d5684416ee51eec35e84a upstream.
It's not possible to use the joiner at the same time with eDP MSO. When a panel needs MSO, it's not optional, so MSO trumps joiner.
v3: Only change intel_dp_has_joiner(), leave debugfs alone (Ville)
--- drivers/gpu/drm/i915/display/intel_dp.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/i915/display/intel_dp.c +4 -0
@@ -393,6 +393,10 @@ bool intel_dp_can_bigjoiner(struct intelstruct intel_encoder *encoder = &intel_dig_port->base;struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); +/* eDP MSO is not compatible with joiner */ +if (intel_dp->mso_link_count) +return false; +return DISPLAY_VER (dev_priv) >=12 || (DISPLAY_VER (dev_priv) ==11 && encoder->port !=PORT_A );
Greg Kroah-Hartman
maintainerPATCH 153/192 drm/radeon: fix UBSAN warning in kv_dpm.c
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <[email protected]>
commit a498df5421fd737d11bfd152428ba6b1c8538321 upstream.
Adds bounds check for sumo_vid_mapping_entry.
--- drivers/gpu/drm/radeon/sumo_dpm.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/radeon/sumo_dpm.c +2 -0
@@ -1621,6 +1621,8 @@ void sumo_construct_vid_mapping_table(stfor (i =0 ; i <SUMO_MAX_HARDWARE_POWERLEVELS ; i++) {if (table[i].ulSupportedSCLK !=0 ) { +if (table[i].usVoltageIndex >=SUMO_MAX_NUMBER_VOLTAGES ) +continue ; vid_mapping_table->entries[table[i].usVoltageIndex].vid_7bit = table[i].usVoltageID; vid_mapping_table->entries[table[i].usVoltageIndex].vid_2bit =
Greg Kroah-Hartman
maintainerPATCH 154/192 drm/amdgpu: fix UBSAN warning in kv_dpm.c
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <[email protected]>
commit f0d576f840153392d04b2d52cf3adab8f62e8cb6 upstream.
Adds bounds check for sumo_vid_mapping_entry.
--- drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c +2 -0
@@ -164,6 +164,8 @@ static void sumo_construct_vid_mapping_tfor (i =0 ; i <SUMO_MAX_HARDWARE_POWERLEVELS ; i++) {if (table[i].ulSupportedSCLK !=0 ) { +if (table[i].usVoltageIndex >=SUMO_MAX_NUMBER_VOLTAGES ) +continue ; vid_mapping_table->entries[table[i].usVoltageIndex].vid_7bit = table[i].usVoltageID; vid_mapping_table->entries[table[i].usVoltageIndex].vid_2bit =
Greg Kroah-Hartman
maintainerPATCH 155/192 dt-bindings: dma: fsl-edma: fix dma-channels constraints
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krzysztof Kozlowski <[email protected]>
commit 1345a13f18370ad9e5bc98995959a27f9bd71464 upstream.
dma-channels is a number, not a list. Apply proper constraints on the actual number.
--- Documentation/devicetree/bindings/dma/fsl,edma.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/dma/fsl,edma.yaml +2 -2
@@ -47,8 +47,8 @@ properties: - 3 dma-channels: - minItems: 1 - maxItems: 64 + minimum: 1 + maximum: 64 clocks: minItems: 1
Greg Kroah-Hartman
maintainerPATCH 156/192 ocfs2: fix NULL pointer dereference in ocfs2_journal_dirty()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Joseph Qi <[email protected]>
commit 58f7e1e2c9e72c7974054c64c3abeac81c11f822 upstream.
bdev->bd_super has been removed and commit 8887b94d9322 change the usage from bdev->bd_super to b_assoc_map->host->i_sb. This introduces the following NULL pointer dereference in ocfs2_journal_dirty() since b_assoc_map is still not initialized. This can be easily reproduced by running xfstests generic/186, which simulate no more credits.
[ 134.351592] BUG: kernel NULL pointer dereference, address: 0000000000000000 ... [ 134.355341] RIP: 0010:ocfs2_journal_dirty+0x14f/0x160 [ocfs2] ... [ 134.365071] Call Trace: [ 134.365312] <TASK> [ 134.365524] ? __die_body+0x1e/0x60 [ 134.365868] ? page_fault_oops+0x13d/0x4f0 [ 134.366265] ? __pfx_bit_wait_io+0x10/0x10 [ 134.366659] ? schedule+0x27/0xb0 [ 134.366981] ? exc_page_fault+0x6a/0x140 [ 134.367356] ? asm_exc_page_fault+0x26/0x30 [ 134.367762] ? ocfs2_journal_dirty+0x14f/0x160 [ocfs2] [ 134.368305] ? ocfs2_journal_dirty+0x13d/0x160 [ocfs2] [ 134.368837] ocfs2_create_new_meta_bhs.isra.51+0x139/0x2e0 [ocfs2] [ 134.369454] ocfs2_grow_tree+0x688/0x8a0 [ocfs2] [ 134.369927] ocfs2_split_and_insert.isra.67+0x35c/0x4a0 [ocfs2] [ 134.370521] ocfs2_split_extent+0x314/0x4d0 [ocfs2] [ 134.371019] ocfs2_change_extent_flag+0x174/0x410 [ocfs2] [ 134.371566] ocfs2_add_refcount_flag+0x3fa/0x630 [ocfs2] [ 134.372117] ocfs2_reflink_remap_extent+0x21b/0x4c0 [ocfs2] [ 134.372994] ? inode_update_timestamps+0x4a/0x120 [ 134.373692] ? __pfx_ocfs2_journal_access_di+0x10/0x10 [ocfs2] [ 134.374545] ? __pfx_ocfs2_journal_access_di+0x10/0x10 [ocfs2] [ 134.375393] ocfs2_reflink_remap_blocks+0xe4/0x4e0 [ocfs2] [ 134.376197] ocfs2_remap_file_range+0x1de/0x390 [ocfs2] [ 134.376971] ? security_file_permission+0x29/0x50 [ 134.377644] vfs_clone_file_range+0xfe/0x320 [ 134.378268] ioctl_file_clone+0x45/0xa0 [ 134.378853] do_vfs_ioctl+0x457/0x990 [ 134.379422] __x64_sys_ioctl+0x6e/0xd0 [ 134.379987] do_syscall_64+0x5d/0x170 [ 134.380550] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 134.381231] RIP: 0033:0x7fa4926397cb [ 134.381786] Code: 73 01 c3 48 8b 0d bd 56 38 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 8d 56 38 00 f7 d8 64 89 01 48 [ 134.383930] RSP: 002b:00007ffc2b39f7b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 134.384854] RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007fa4926397cb [ 134.385734] RDX: 00007ffc2b39f7f0 RSI: 000000004020940d RDI: 0000000000000003 [ 134.386606] RBP: 0000000000000000 R08: 00111a82a4f015bb R09: 00007fa494221000 [ 134.387476] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 134.388342] R13: 0000000000f10000 R14: 0000558e844e2ac8 R15: 0000000000f10000 [ 134.389207] </TASK>
Fix it by only aborting transaction and journal in ocfs2_journal_dirty() now, and leave ocfs2_abort() later when detecting an aborted handle, e.g. start next transaction. Also log the handle details in this case.
--- fs/ocfs2/journal.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
fs/ocfs2/journal.c +6 -4
@@ -778,13 +778,15 @@ void ocfs2_journal_dirty(handle_t *handle, struct buffer_head *bh)if (!is_handle_aborted (handle)) {journal_t *journal = handle->h_transaction->t_journal; -mlog (ML_ERROR ,"jbd2_journal_dirty_metadata failed. " -"Aborting transaction and journal.\n" ); +mlog (ML_ERROR ,"jbd2_journal_dirty_metadata failed: " +"handle type %u started at line %u, credits %u/%u " +"errcode %d. Aborting transaction and journal.\n" , + handle->h_type, handle->h_line_no, + handle->h_requested_credits, +jbd2_handle_buffer_credits (handle), status); handle->h_err = status;jbd2_journal_abort_handle (handle);jbd2_journal_abort (journal, status); -ocfs2_abort (bh->b_assoc_map->host->i_sb, -"Journal already aborted.\n" ); } } }
Signature · 1 line
2.45.2
Greg Kroah-Hartman
maintainerPATCH 157/192 ocfs2: fix NULL pointer dereference in ocfs2_abort_trigger()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Joseph Qi <[email protected]>
commit 685d03c3795378fca6a1b3d43581f7f1a3fc095f upstream.
bdev->bd_super has been removed and commit 8887b94d9322 change the usage from bdev->bd_super to b_assoc_map->host->i_sb. Since ocfs2 hasn't set bh->b_assoc_map, it will trigger NULL pointer dereference when calling into ocfs2_abort_trigger().
Actually this was pointed out in history, see commit 74e364ad1b13. But I've made a mistake when reviewing commit 8887b94d9322 and then re-introduce this regression.
Since we cannot revive bdev in buffer head, so fix this issue by initializing all types of ocfs2 triggers when fill super, and then get the specific ocfs2 trigger from ocfs2_caching_info when access journal.
--- fs/ocfs2/journal.c | 182 +++++++++++++++++++++++++-------------------- fs/ocfs2/ocfs2.h | 27 +++++++ fs/ocfs2/super.c | 4 +- 3 files changed, 131 insertions(+), 82 deletions(-)
fs/ocfs2/journal.c +101 -81
@@ -479,12 +479,6 @@ int ocfs2_allocate_extend_trans(handle_t *handle, int thresh)return status; } - -struct ocfs2_triggers { -struct jbd2_buffer_trigger_type ot_triggers; -int ot_offset; -}; -static inline struct ocfs2_triggers *to_ocfs2_trigger (struct jbd2_buffer_trigger_type *triggers) { return container_of(triggers, struct ocfs2_triggers, ot_triggers);
@@ -548,85 +542,76 @@ static void ocfs2_db_frozen_trigger(struct jbd2_buffer_trigger_type *triggers,static void ocfs2_abort_trigger (struct jbd2_buffer_trigger_type *triggers,struct buffer_head *bh) { +struct ocfs2_triggers *ot =to_ocfs2_trigger (triggers); +mlog (ML_ERROR ,"ocfs2_abort_trigger called by JBD2. bh = 0x%lx, " "bh->b_blocknr = %llu\n" , (unsigned long )bh, (unsigned long long )bh->b_blocknr); -ocfs2_error (bh->b_assoc_map->host->i_sb, +ocfs2_error (ot->sb,"JBD2 has aborted our journal, ocfs2 cannot continue\n" ); } -static struct ocfs2_triggers di_triggers = { - .ot_triggers = { - .t_frozen = ocfs2_frozen_trigger, - .t_abort = ocfs2_abort_trigger, - }, - .ot_offset = offsetof(struct ocfs2_dinode , i_check), -}; +static void ocfs2_setup_csum_triggers (struct super_block *sb, +enum ocfs2_journal_trigger_type type, +struct ocfs2_triggers *ot) +{ +BUG_ON (type >=OCFS2_JOURNAL_TRIGGER_COUNT ); -static struct ocfs2_triggers eb_triggers = { - .ot_triggers = { - .t_frozen = ocfs2_frozen_trigger, - .t_abort = ocfs2_abort_trigger, - }, - .ot_offset = offsetof(struct ocfs2_extent_block , h_check), -}; +switch (type) { +case OCFS2_JTR_DI : + ot->ot_triggers.t_frozen = ocfs2_frozen_trigger; + ot->ot_offset = offsetof(struct ocfs2_dinode , i_check); +break ; +case OCFS2_JTR_EB : + ot->ot_triggers.t_frozen = ocfs2_frozen_trigger; + ot->ot_offset = offsetof(struct ocfs2_extent_block , h_check); +break ; +case OCFS2_JTR_RB : + ot->ot_triggers.t_frozen = ocfs2_frozen_trigger; + ot->ot_offset = offsetof(struct ocfs2_refcount_block , rf_check); +break ; +case OCFS2_JTR_GD : + ot->ot_triggers.t_frozen = ocfs2_frozen_trigger; + ot->ot_offset = offsetof(struct ocfs2_group_desc , bg_check); +break ; +case OCFS2_JTR_DB : + ot->ot_triggers.t_frozen = ocfs2_db_frozen_trigger; +break ; +case OCFS2_JTR_XB : + ot->ot_triggers.t_frozen = ocfs2_frozen_trigger; + ot->ot_offset = offsetof(struct ocfs2_xattr_block , xb_check); +break ; +case OCFS2_JTR_DQ : + ot->ot_triggers.t_frozen = ocfs2_dq_frozen_trigger; +break ; +case OCFS2_JTR_DR : + ot->ot_triggers.t_frozen = ocfs2_frozen_trigger; + ot->ot_offset = offsetof(struct ocfs2_dx_root_block , dr_check); +break ; +case OCFS2_JTR_DL : + ot->ot_triggers.t_frozen = ocfs2_frozen_trigger; + ot->ot_offset = offsetof(struct ocfs2_dx_leaf , dl_check); +break ; +case OCFS2_JTR_NONE : +/* To make compiler happy... */ +return ; + } -static struct ocfs2_triggers rb_triggers = { - .ot_triggers = { - .t_frozen = ocfs2_frozen_trigger, - .t_abort = ocfs2_abort_trigger, - }, - .ot_offset = offsetof(struct ocfs2_refcount_block , rf_check), -}; + ot->ot_triggers.t_abort = ocfs2_abort_trigger; + ot->sb = sb; +} -static struct ocfs2_triggers gd_triggers = { - .ot_triggers = { - .t_frozen = ocfs2_frozen_trigger, - .t_abort = ocfs2_abort_trigger, - }, - .ot_offset = offsetof(struct ocfs2_group_desc , bg_check), -}; +void ocfs2_initialize_journal_triggers (struct super_block *sb, +struct ocfs2_triggers triggers[]) +{ +enum ocfs2_journal_trigger_type type; -static struct ocfs2_triggers db_triggers = { - .ot_triggers = { - .t_frozen = ocfs2_db_frozen_trigger, - .t_abort = ocfs2_abort_trigger, - }, -}; - -static struct ocfs2_triggers xb_triggers = { - .ot_triggers = { - .t_frozen = ocfs2_frozen_trigger, - .t_abort = ocfs2_abort_trigger, - }, - .ot_offset = offsetof(struct ocfs2_xattr_block , xb_check), -}; - -static struct ocfs2_triggers dq_triggers = { - .ot_triggers = { - .t_frozen = ocfs2_dq_frozen_trigger, - .t_abort = ocfs2_abort_trigger, - }, -}; - -static struct ocfs2_triggers dr_triggers = { - .ot_triggers = { - .t_frozen = ocfs2_frozen_trigger, - .t_abort = ocfs2_abort_trigger, - }, - .ot_offset = offsetof(struct ocfs2_dx_root_block , dr_check), -}; - -static struct ocfs2_triggers dl_triggers = { - .ot_triggers = { - .t_frozen = ocfs2_frozen_trigger, - .t_abort = ocfs2_abort_trigger, - }, - .ot_offset = offsetof(struct ocfs2_dx_leaf , dl_check), -}; +for (type =OCFS2_JTR_DI ; type <OCFS2_JOURNAL_TRIGGER_COUNT ; type++) +ocfs2_setup_csum_triggers (sb, type, &triggers[type]); +} static int __ocfs2_journal_access(handle_t *handle, struct ocfs2_caching_info *ci,
@@ -708,56 +693,91 @@ static int __ocfs2_journal_access(handle_t *handle,int ocfs2_journal_access_di (handle_t *handle,struct ocfs2_caching_info *ci,struct buffer_head *bh,int type) { -return __ocfs2_journal_access (handle, ci, bh, &di_triggers, type); +struct ocfs2_super *osb =OCFS2_SB (ocfs2_metadata_cache_get_super (ci)); + +return __ocfs2_journal_access (handle, ci, bh, + &osb->s_journal_triggers[OCFS2_JTR_DI ], + type); }int ocfs2_journal_access_eb (handle_t *handle,struct ocfs2_caching_info *ci,struct buffer_head *bh,int type) { -return __ocfs2_journal_access (handle, ci, bh, &eb_triggers, type); +struct ocfs2_super *osb =OCFS2_SB (ocfs2_metadata_cache_get_super (ci)); + +return __ocfs2_journal_access (handle, ci, bh, + &osb->s_journal_triggers[OCFS2_JTR_EB ], + type); }int ocfs2_journal_access_rb (handle_t *handle,struct ocfs2_caching_info *ci,struct buffer_head *bh,int type) { -return __ocfs2_journal_access (handle, ci, bh, &rb_triggers, +struct ocfs2_super *osb =OCFS2_SB (ocfs2_metadata_cache_get_super (ci)); + +return __ocfs2_journal_access (handle, ci, bh, + &osb->s_journal_triggers[OCFS2_JTR_RB ], type); }int ocfs2_journal_access_gd (handle_t *handle,struct ocfs2_caching_info *ci,struct buffer_head *bh,int type) { -return __ocfs2_journal_access (handle, ci, bh, &gd_triggers, type); +struct ocfs2_super *osb =OCFS2_SB (ocfs2_metadata_cache_get_super (ci)); + +return __ocfs2_journal_access (handle, ci, bh, + &osb->s_journal_triggers[OCFS2_JTR_GD ], + type); }int ocfs2_journal_access_db (handle_t *handle,struct ocfs2_caching_info *ci,struct buffer_head *bh,int type) { -return __ocfs2_journal_access (handle, ci, bh, &db_triggers, type); +struct ocfs2_super *osb =OCFS2_SB (ocfs2_metadata_cache_get_super (ci)); + +return __ocfs2_journal_access (handle, ci, bh, + &osb->s_journal_triggers[OCFS2_JTR_DB ], + type); }int ocfs2_journal_access_xb (handle_t *handle,struct ocfs2_caching_info *ci,struct buffer_head *bh,int type) { -return __ocfs2_journal_access (handle, ci, bh, &xb_triggers, type); +struct ocfs2_super *osb =OCFS2_SB (ocfs2_metadata_cache_get_super (ci)); + +return __ocfs2_journal_access (handle, ci, bh, + &osb->s_journal_triggers[OCFS2_JTR_XB ], + type); }int ocfs2_journal_access_dq (handle_t *handle,struct ocfs2_caching_info *ci,struct buffer_head *bh,int type) { -return __ocfs2_journal_access (handle, ci, bh, &dq_triggers, type); +struct ocfs2_super *osb =OCFS2_SB (ocfs2_metadata_cache_get_super (ci)); + +return __ocfs2_journal_access (handle, ci, bh, + &osb->s_journal_triggers[OCFS2_JTR_DQ ], + type); }int ocfs2_journal_access_dr (handle_t *handle,struct ocfs2_caching_info *ci,struct buffer_head *bh,int type) { -return __ocfs2_journal_access (handle, ci, bh, &dr_triggers, type); +struct ocfs2_super *osb =OCFS2_SB (ocfs2_metadata_cache_get_super (ci)); + +return __ocfs2_journal_access (handle, ci, bh, + &osb->s_journal_triggers[OCFS2_JTR_DR ], + type); }int ocfs2_journal_access_dl (handle_t *handle,struct ocfs2_caching_info *ci,struct buffer_head *bh,int type) { -return __ocfs2_journal_access (handle, ci, bh, &dl_triggers, type); +struct ocfs2_super *osb =OCFS2_SB (ocfs2_metadata_cache_get_super (ci)); + +return __ocfs2_journal_access (handle, ci, bh, + &osb->s_journal_triggers[OCFS2_JTR_DL ], + type); } int ocfs2_journal_access(handle_t *handle, struct ocfs2_caching_info *ci,
fs/ocfs2/ocfs2.h +27 -0
@@ -284,6 +284,30 @@ enum ocfs2_mount_options#define OCFS2_OSB_ERROR_FS 0x0004#define OCFS2_DEFAULT_ATIME_QUANTUM 60 +struct ocfs2_triggers { +struct jbd2_buffer_trigger_type ot_triggers; +int ot_offset; +struct super_block *sb; +}; + +enum ocfs2_journal_trigger_type { +OCFS2_JTR_DI , +OCFS2_JTR_EB , +OCFS2_JTR_RB , +OCFS2_JTR_GD , +OCFS2_JTR_DB , +OCFS2_JTR_XB , +OCFS2_JTR_DQ , +OCFS2_JTR_DR , +OCFS2_JTR_DL , +OCFS2_JTR_NONE /* This must be the last entry */ +}; + +#define OCFS2_JOURNAL_TRIGGER_COUNT OCFS2_JTR_NONE + +void ocfs2_initialize_journal_triggers (struct super_block *sb, +struct ocfs2_triggers triggers[]); +struct ocfs2_journal ;struct ocfs2_slot_info ;struct ocfs2_recovery_map ;
@@ -351,6 +375,9 @@ struct ocfs2_superstruct ocfs2_journal *journal;unsigned long osb_commit_interval; +/* Journal triggers for checksum */ +struct ocfs2_triggers s_journal_triggers[OCFS2_JOURNAL_TRIGGER_COUNT ]; +struct delayed_work la_enable_wq;/*
fs/ocfs2/super.c +3 -1
@@ -1075,9 +1075,11 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)debugfs_create_file ("fs_state" ,S_IFREG |S_IRUSR , osb->osb_debug_root, osb, &ocfs2_osb_debug_fops); -if (ocfs2_meta_ecc (osb)) +if (ocfs2_meta_ecc (osb)) { +ocfs2_initialize_journal_triggers (sb, osb->s_journal_triggers);ocfs2_blockcheck_stats_debugfs_install ( &osb->osb_ecc_stats, osb->osb_debug_root); + } status =ocfs2_mount_volume (sb);if (status <0 )
Signature · 1 line
2.45.2
Greg Kroah-Hartman
maintainerPATCH 158/192 gcov: add support for GCC 14
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Oberparleiter <[email protected]>
commit c1558bc57b8e5b4da5d821537cd30e2e660861d8 upstream.
Using gcov on kernels compiled with GCC 14 results in truncated 16-byte long .gcda files with no usable data. To fix this, update GCOV_COUNTERS to match the value defined by GCC 14.
Tested with GCC versions 14.1.0 and 13.2.0.
--- kernel/gcov/gcc_4_7.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
kernel/gcov/gcc_4_7.c +3 -1
@@ -18,7 +18,9 @@#include <linux/mm.h> #include "gcov.h" -#if (__GNUC__ >=10 ) +#if (__GNUC__ >=14 ) +#define GCOV_COUNTERS 9 +#elif (__GNUC__ >=10 )#define GCOV_COUNTERS 8#elif (__GNUC__ >=7 )#define GCOV_COUNTERS 9
Greg Kroah-Hartman
maintainerPATCH 159/192 kcov: dont lose track of remote references during softirqs
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aleksandr Nogikh <[email protected]>
commit 01c8f9806bde438ca1c8cbbc439f0a14a6694f6c upstream.
In kcov_remote_start()/kcov_remote_stop(), we swap the previous KCOV metadata of the current task into a per-CPU variable. However, the kcov_mode_enabled(mode) check is not sufficient in the case of remote KCOV
coverage: current->kcov_mode always remains KCOV_MODE_DISABLED for remote KCOV objects.
If the original task that has invoked the KCOV_REMOTE_ENABLE ioctl happens to get interrupted and kcov_remote_start() is called, it ultimately leads to kcov_remote_stop() NOT restoring the original KCOV reference. So when the task exits, all registered remote KCOV handles remain active forever.
The most uncomfortable effect (at least for syzkaller) is that the bug prevents the reuse of the same /sys/kernel/debug/kcov descriptor. If we obtain it in the parent process and then e.g. drop some capabilities and continuously fork to execute individual programs, at some point current->kcov of the forked process is lost, kcov_task_exit() takes no action, and all KCOV_REMOTE_ENABLE ioctls calls from subsequent forks fail.
And, yes, the efficiency is also affected if we keep on losing remote kcov objects.
a) kcov_remote_map keeps on growing forever.
b) (If I'm not mistaken), we're also not freeing the memory referenced by kcov->area.
Fix it by introducing a special kcov_mode that is assigned to the task that owns a KCOV remote object. It makes kcov_mode_enabled() return true and yet does not trigger coverage collection in __sanitizer_cov_trace_pc() and write_comp_data().
--- include/linux/kcov.h | 2 ++ kernel/kcov.c | 1 + 2 files changed, 3 insertions(+)
include/linux/kcov.h +2 -0
@@ -21,6 +21,8 @@ enum kcov_mode {KCOV_MODE_TRACE_PC =2 ,/* Collecting comparison operands mode. */ KCOV_MODE_TRACE_CMP =3 , +/* The process owns a KCOV remote reference. */ + KCOV_MODE_REMOTE = 4, };#define KCOV_IN_CTXSW (1 << 30)
kernel/kcov.c +1 -0
@@ -631,6 +631,7 @@ static int kcov_ioctl_locked(struct kcovreturn -EINVAL ; kcov->mode = mode; t->kcov = kcov; + t->kcov_mode =KCOV_MODE_REMOTE ; kcov->t = t; kcov->remote = true; kcov->remote_size = remote_arg->area_size;
Greg Kroah-Hartman
maintainerPATCH 160/192 efi/x86: Free EFI memory map only when installing a new one.
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ard Biesheuvel <[email protected]>
commit 75dde792d6f6c2d0af50278bd374bf0c512fe196 upstream.
The logic in __efi_memmap_init() is shared between two different execution flows:
- mapping the EFI memory map early or late into the kernel VA space, so that its entries can be accessed;
- the x86 specific cloning of the EFI memory map in order to insert new entries that are created as a result of making a memory reservation via a call to efi_mem_reserve().
In the former case, the underlying memory containing the kernel's view of the EFI memory map (which may be heavily modified by the kernel itself on x86) is not modified at all, and the only thing that changes is the virtual mapping of this memory, which is different between early and late boot.
In the latter case, an entirely new allocation is created that carries a new, updated version of the kernel's view of the EFI memory map. When installing this new version, the old version will no longer be referenced, and if the memory was allocated by the kernel, it will leak unless it gets freed.
The logic that implements this freeing currently lives on the code path that is shared between these two use cases, but it should only apply to the latter. So move it to the correct spot.
While at it, drop the dummy definition for non-x86 architectures, as that is no longer needed.
--- arch/x86/include/asm/efi.h | 1 - arch/x86/platform/efi/memmap.c | 12 +++++++++++- drivers/firmware/efi/memmap.c | 9 --------- 3 files changed, 11 insertions(+), 11 deletions(-)
arch/x86/include/asm/efi.h +0 -1
@@ -410,7 +410,6 @@ extern int __init efi_memmap_alloc(unsig struct efi_memory_map_data *data);extern void __efi_memmap_free (u64 phys,unsigned long size,unsigned long flags); -#define __efi_memmap_free __efi_memmap_freeextern int __init efi_memmap_install (struct efi_memory_map_data *data); extern int __init efi_memmap_split_count(efi_memory_desc_t *md,
arch/x86/platform/efi/memmap.c +11 -1
@@ -92,12 +92,22 @@ int __init efi_memmap_alloc(unsigned int*/ int __init efi_memmap_install (struct efi_memory_map_data *data) { +unsigned long size = efi.memmap.desc_size * efi.memmap.nr_map; +unsigned long flags = efi.memmap.flags; +u64 phys = efi.memmap.phys_map; +int ret; +efi_memmap_unmap ();if (efi_enabled (EFI_PARAVIRT ))return 0 ; -return __efi_memmap_init (data); + ret =__efi_memmap_init (data); +if (ret) +return ret; + +__efi_memmap_free (phys, size, flags); +return 0 ; }/**
drivers/firmware/efi/memmap.c +0 -9
@@ -15,10 +15,6 @@#include <asm/early_ioremap.h> #include <asm/efi.h> -#ifndef __efi_memmap_free -#define __efi_memmap_free (phys, size, flags) do { } while (0) -#endif -/** * __efi_memmap_init - Common code for mapping the EFI memory map * @data: EFI memory map data
@@ -51,11 +47,6 @@ int __init __efi_memmap_init(struct efi_return -ENOMEM ; } -if (efi.memmap.flags & (EFI_MEMMAP_MEMBLOCK |EFI_MEMMAP_SLAB )) -__efi_memmap_free (efi.memmap.phys_map, - efi.memmap.desc_size * efi.memmap.nr_map, - efi.memmap.flags); - map.phys_map = data->phys_map; map.nr_map = data->size / data->desc_size; map.map_end = map.map + data->size;
Greg Kroah-Hartman
maintainerPATCH 161/192 serial: 8250_dw: Revert "Move definitions to the shared header"
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andy Shevchenko <[email protected]>
commit 2c94512055f362dd789e0f87b8566feeddec83c9 upstream.
This reverts commit d9666dfb314e1ffd6eb9c3c4243fe3e094c047a7.
The container of the struct dw8250_port_data is private to the actual driver. In particular, 8250_lpss and 8250_dw use different data types that are assigned to the UART port private_data. Hence, it must not be used outside the specific driver.
Fix the mistake made in the past by moving the respective definitions to the specific driver.
--- drivers/tty/serial/8250/8250_dw.c | 27 +++++++++++++++++++++++++++ drivers/tty/serial/8250/8250_dwlib.h | 32 -------------------------------- 2 files changed, 27 insertions(+), 32 deletions(-)
drivers/tty/serial/8250/8250_dw.c +27 -0
@@ -57,6 +57,33 @@#define DW_UART_QUIRK_APMC0D08 BIT(4)#define DW_UART_QUIRK_CPR_VALUE BIT(5) +struct dw8250_platform_data { +u8 usr_reg; +u32 cpr_value; +unsigned int quirks; +}; + +struct dw8250_data { +struct dw8250_port_data data; +const struct dw8250_platform_data *pdata; + +int msr_mask_on; +int msr_mask_off; +struct clk *clk; +struct clk *pclk; +struct notifier_block clk_notifier; +struct work_struct clk_work; +struct reset_control *rst; + +unsigned int skip_autocfg:1 ; +unsigned int uart_16550_compatible:1 ; +}; + +static inline struct dw8250_data *to_dw8250_data (struct dw8250_port_data *data) +{ + return container_of(data, struct dw8250_data, data); +} +static inline struct dw8250_data *clk_to_dw8250_data (struct notifier_block *nb) { return container_of(nb, struct dw8250_data, clk_notifier);
drivers/tty/serial/8250/8250_dwlib.h +0 -32
@@ -2,15 +2,10 @@/* Synopsys DesignWare 8250 library header file. */ #include <linux/io.h> -#include <linux/notifier.h> #include <linux/types.h> -#include <linux/workqueue.h> #include "8250.h" -struct clk ; -struct reset_control ; -struct dw8250_port_data {/* Port properties */ int line;
@@ -26,36 +21,9 @@ struct dw8250_port_data {bool hw_rs485_support; }; -struct dw8250_platform_data { -u8 usr_reg; -u32 cpr_value; -unsigned int quirks; -}; - -struct dw8250_data { -struct dw8250_port_data data; -const struct dw8250_platform_data *pdata; - -int msr_mask_on; -int msr_mask_off; -struct clk *clk; -struct clk *pclk; -struct notifier_block clk_notifier; -struct work_struct clk_work; -struct reset_control *rst; - -unsigned int skip_autocfg:1 ; -unsigned int uart_16550_compatible:1 ; -}; -void dw8250_do_set_termios (struct uart_port *p,struct ktermios *termios,const struct ktermios *old);void dw8250_setup_port (struct uart_port *p); -static inline struct dw8250_data *to_dw8250_data (struct dw8250_port_data *data) -{ - return container_of(data, struct dw8250_data, data); -} -static inline u32 dw8250_readl_ext (struct uart_port *p,int offset) {if (p->iotype ==UPIO_MEM32BE )
Greg Kroah-Hartman
maintainerPATCH 162/192 mm: mmap: allow for the maximum number of bits for randomizing mmap_base by default
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rafael Aquini <[email protected]>
commit 3afb76a66b5559a7b595155803ce23801558a7a9 upstream.
An ASLR regression was noticed [1] and tracked down to file-mapped areas being backed by THP in recent kernels. The 21-bit alignment constraint for such mappings reduces the entropy for randomizing the placement of 64-bit library mappings and breaks ASLR completely for 32-bit libraries.
The reported issue is easily addressed by increasing vm.mmap_rnd_bits and vm.mmap_rnd_compat_bits. This patch just provides a simple way to set ARCH_MMAP_RND_BITS and ARCH_MMAP_RND_COMPAT_BITS to their maximum values allowed by the architecture at build time.
[1] https://zolutal.github.io/aslrnt/
--- arch/Kconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/Kconfig +12 -0
@@ -1037,10 +1037,21 @@ config ARCH_MMAP_RND_BITS_MAX config ARCH_MMAP_RND_BITS_DEFAULT int +config FORCE_MAX_MMAP_RND_BITS + bool "Force maximum number of bits to use for ASLR of mmap base address" + default y if !64BIT + help + ARCH_MMAP_RND_BITS and ARCH_MMAP_RND_COMPAT_BITS represent the number + of bits to use for ASLR and if no custom value is assigned (EXPERT) + then the architecture's lower bound (minimum) value is assumed. + This toggle changes that default assumption to assume the arch upper + bound (maximum) value instead. + config ARCH_MMAP_RND_BITS int "Number of bits to use for ASLR of mmap base address" if EXPERT range ARCH_MMAP_RND_BITS_MIN ARCH_MMAP_RND_BITS_MAX default ARCH_MMAP_RND_BITS_DEFAULT if ARCH_MMAP_RND_BITS_DEFAULT + default ARCH_MMAP_RND_BITS_MAX if FORCE_MAX_MMAP_RND_BITS default ARCH_MMAP_RND_BITS_MIN depends on HAVE_ARCH_MMAP_RND_BITS help
@@ -1075,6 +1086,7 @@ config ARCH_MMAP_RND_COMPAT_BITS int "Number of bits to use for ASLR of mmap base address for compatible applications" if EXPERT range ARCH_MMAP_RND_COMPAT_BITS_MIN ARCH_MMAP_RND_COMPAT_BITS_MAX default ARCH_MMAP_RND_COMPAT_BITS_DEFAULT if ARCH_MMAP_RND_COMPAT_BITS_DEFAULT + default ARCH_MMAP_RND_COMPAT_BITS_MAX if FORCE_MAX_MMAP_RND_BITS default ARCH_MMAP_RND_COMPAT_BITS_MIN depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS help
Greg Kroah-Hartman
maintainerPATCH 163/192 tcp: clear tp->retrans_stamp in tcp_rcv_fastopen_synack()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
commit 9e046bb111f13461d3f9331e24e974324245140e upstream.
Some applications were reporting ETIMEDOUT errors on apparently good looking flows, according to packet dumps.
We were able to root cause the issue to an accidental setting of tp->retrans_stamp in the following scenario:
- client sends TFO SYN with data.
- server has TFO disabled, ACKs only SYN but not payload.
- client receives SYNACK covering only SYN.
- tcp_ack() eats SYN and sets tp->retrans_stamp to 0.
- tcp_rcv_fastopen_synack() calls tcp_xmit_retransmit_queue() to retransmit TFO payload w/o SYN, sets tp->retrans_stamp to "now", but we are not in any loss recovery state.
- TFO payload is ACKed.
- we are not in any loss recovery state, and don't see any dupacks, so we don't get to any code path that clears tp->retrans_stamp.
- tp->retrans_stamp stays non-zero for the lifetime of the connection.
- after first RTO, tcp_clamp_rto_to_user_timeout() clamps second RTO to 1 jiffy due to bogus tp->retrans_stamp.
- on clamped RTO with non-zero icsk_retransmits, retransmits_timed_out() sets start_ts from tp->retrans_stamp from TFO payload retransmit hours/days ago, and computes bogus long elapsed time for loss recovery, and suffers ETIMEDOUT early.
--- net/ipv4/tcp_input.c | 1 + 1 file changed, 1 insertion(+)
net/ipv4/tcp_input.c +1 -0
@@ -6176,6 +6176,7 @@ static bool tcp_rcv_fastopen_synack(struskb_rbtree_walk_from (data)tcp_mark_skb_lost (sk, data);tcp_xmit_retransmit_queue (sk); + tp->retrans_stamp =0 ;NET_INC_STATS (sock_net (sk),LINUX_MIB_TCPFASTOPENACTIVEFAIL );return true;
Greg Kroah-Hartman
maintainerPATCH 164/192 mm/page_table_check: fix crash on ZONE_DEVICE
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Xu <[email protected]>
commit 8bb592c2eca8fd2bc06db7d80b38da18da4a2f43 upstream.
Not all pages may apply to pgtable check. One example is ZONE_DEVICE
pages: they map PFNs directly, and they don't allocate page_ext at all even if there's struct page around. One may reference devm_memremap_pages().
When both ZONE_DEVICE and page-table-check enabled, then try to map some dax memories, one can trigger kernel bug constantly now when the kernel was trying to inject some pfn maps on the dax device:
kernel BUG at mm/page_table_check.c:55!
While it's pretty legal to use set_pxx_at() for ZONE_DEVICE pages for page fault resolutions, skip all the checks if page_ext doesn't even exist in pgtable checker, which applies to ZONE_DEVICE but maybe more.
--- mm/page_table_check.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
mm/page_table_check.c +10 -1
@@ -71,6 +71,9 @@ static void page_table_check_clear(unsig page =pfn_to_page (pfn); page_ext =page_ext_get (page); +if (!page_ext) +return ; +BUG_ON (PageSlab (page)); anon =PageAnon (page);
@@ -108,6 +111,9 @@ static void page_table_check_set(unsigne page =pfn_to_page (pfn); page_ext =page_ext_get (page); +if (!page_ext) +return ; +BUG_ON (PageSlab (page)); anon =PageAnon (page);
@@ -138,7 +144,10 @@ void __page_table_check_zero(struct pageBUG_ON (PageSlab (page)); page_ext =page_ext_get (page); -BUG_ON (!page_ext); + +if (!page_ext) +return ; +for (i =0 ; i < (1ul << order); i++) {struct page_table_check *ptc =get_page_table_check (page_ext);
Greg Kroah-Hartman
maintainerPATCH 165/192 i2c: ocores: set IACK bit after core is enabled
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Grygorii Tertychnyi <[email protected]>
commit 5a72477273066b5b357801ab2d315ef14949d402 upstream.
Setting IACK bit when core is disabled does not clear the "Interrupt Flag" bit in the status register, and the interrupt remains pending.
Sometimes it causes failure for the very first message transfer, that is usually a device probe.
Hence, set IACK bit after core is enabled to clear pending interrupt.
--- drivers/i2c/busses/i2c-ocores.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-ocores.c +1 -1
@@ -442,8 +442,8 @@ static int ocores_init(struct device *deoc_setreg (i2c,OCI2C_PREHIGH , prescale >>8 );/* Init the device */ -oc_setreg (i2c,OCI2C_CMD ,OCI2C_CMD_IACK );oc_setreg (i2c,OCI2C_CONTROL , ctrl |OCI2C_CTRL_EN ); +oc_setreg (i2c,OCI2C_CMD ,OCI2C_CMD_IACK );return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 166/192 dt-bindings: i2c: atmel,at91sam: correct path to i2c-controller schema
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krzysztof Kozlowski <[email protected]>
commit d4e001ffeccfc128c715057e866f301ac9b95728 upstream.
The referenced i2c-controller.yaml schema is provided by dtschema package (outside of Linux kernel), so use full path to reference it.
--- Documentation/devicetree/bindings/i2c/atmel,at91sam-i2c.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/i2c/atmel,at91sam-i2c.yaml +1 -1
@@ -75,7 +75,7 @@ required: - clocks allOf: - - $ref: i2c-controller.yaml + - $ref: /schemas/i2c/i2c-controller.yaml# - if: properties: compatible:
Greg Kroah-Hartman
maintainerPATCH 167/192 dt-bindings: i2c: google,cros-ec-i2c-tunnel: correct path to i2c-controller schema
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krzysztof Kozlowski <[email protected]>
commit 5c8cfd592bb7632200b4edac8f2c7ec892ed9d81 upstream.
The referenced i2c-controller.yaml schema is provided by dtschema package (outside of Linux kernel), so use full path to reference it.
--- Documentation/devicetree/bindings/i2c/google,cros-ec-i2c-tunnel.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/i2c/google,cros-ec-i2c-tunnel.yaml +1 -1
@@ -21,7 +21,7 @@ description: | google,cros-ec-spi or google,cros-ec-i2c. allOf: - - $ref: i2c-controller.yaml# + - $ref: /schemas/i2c/i2c-controller.yaml# properties: compatible:
Greg Kroah-Hartman
maintainerPATCH 168/192 spi: stm32: qspi: Fix dual flash mode sanity test in stm32_qspi_setup()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Patrice Chotard <[email protected]>
commit c2bd0791c5f02e964402624dfff45ca8995f5397 upstream.
Misplaced parenthesis make test of mode wrong in case mode is equal to SPI_TX_OCTAL or SPI_RX_OCTAL.
Simplify this sanity test, if one of this bit is set, property cs-gpio must be present in DT.
--- drivers/spi/spi-stm32-qspi.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/spi/spi-stm32-qspi.c +4 -6
@@ -653,9 +653,7 @@ static int stm32_qspi_setup(struct spi_dreturn -EINVAL ; mode = spi->mode & (SPI_TX_OCTAL |SPI_RX_OCTAL ); -if ((mode ==SPI_TX_OCTAL || mode ==SPI_RX_OCTAL ) || - ((mode == (SPI_TX_OCTAL |SPI_RX_OCTAL )) && -gpiod_count (qspi->dev,"cs" ) == -ENOENT )) { +if (mode &&gpiod_count (qspi->dev,"cs" ) == -ENOENT ) {dev_err (qspi->dev,"spi-rx-bus-width\\/spi-tx-bus-width\\/cs-gpios\n" );dev_err (qspi->dev,"configuration not supported\n" );
@@ -676,10 +674,10 @@ static int stm32_qspi_setup(struct spi_d qspi->cr_reg =CR_APMS |3 <<CR_FTHRES_SHIFT |CR_SSHIFT |CR_EN ;/* -* Dual flash mode is only enable in case SPI_TX_OCTAL and SPI_TX_OCTAL -* are both set in spi->mode and "cs-gpios" properties is found in DT +* Dual flash mode is only enable in case SPI_TX_OCTAL or SPI_RX_OCTAL +* is set in spi->mode and "cs-gpios" properties is found in DT */ -if (mode == (SPI_TX_OCTAL |SPI_RX_OCTAL )) { +if (mode) { qspi->cr_reg |=CR_DFM ;dev_dbg (qspi->dev,"Dual flash mode enable" ); }
Greg Kroah-Hartman
maintainerPATCH 169/192 arm64: dts: imx8qm-mek: fix gpio number for reg_usdhc2_vmmc
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Frank Li <[email protected]>
commit dfd239a039b3581ca25f932e66b6e2c2bf77c798 upstream.
The gpio in "reg_usdhc2_vmmc" should be 7 instead of 19.
--- arch/arm64/boot/dts/freescale/imx8qm-mek.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/freescale/imx8qm-mek.dts +1 -1
@@ -36,7 +36,7 @@ regulator-name = "SD1_SPWR"; regulator-min-microvolt = <3000000>; regulator-max-microvolt = <3000000>; - gpio = <&lsio_gpio4 19 GPIO_ACTIVE_HIGH>; + gpio = <&lsio_gpio4 7 GPIO_ACTIVE_HIGH>; enable-active-high; }; };
Greg Kroah-Hartman
maintainerPATCH 170/192 spi: stm32: qspi: Clamp stm32_qspi_get_mode() output to CCR_BUSWIDTH_4
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Patrice Chotard <[email protected]>
commit 63deee52811b2f84ed2da55ad47252f0e8145d62 upstream.
In case usage of OCTAL mode, buswidth parameter can take the value 8. As return value of stm32_qspi_get_mode() is used to configure fields of CCR registers that are 2 bits only (fields IMODE, ADMODE, ADSIZE,
DMODE), clamp return value of stm32_qspi_get_mode() to 4.
--- drivers/spi/spi-stm32-qspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-stm32-qspi.c +1 -1
@@ -349,7 +349,7 @@ static int stm32_qspi_wait_poll_status(sstatic int stm32_qspi_get_mode (u8 buswidth) { -if (buswidth ==4 ) +if (buswidth >=4 )return CCR_BUSWIDTH_4 ;return buswidth;
Greg Kroah-Hartman
maintainerPATCH 171/192 perf: script: add raw|disasm arguments to --insn-trace option
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Changbin Du <[email protected]>
[ Upstream commit 6750ba4b6442fa5ea4bf5c0e4b4ff8b0249ef71d ]
Now '--insn-trace' accept a argument to specify the output format:
- raw: display raw instructions.
- disasm: display mnemonic instructions (if capstone is installed).
$ sudo perf script --insn-trace=raw
ls 1443864 [006] 2275506.209908875: 7f216b426100 _start+0x0 (/usr/lib/x86_64-linux-gnu/ld-2.31.so) insn: 48 89 e7
ls 1443864 [006] 2275506.209908875: 7f216b426103 _start+0x3 (/usr/lib/x86_64-linux-gnu/ld-2.31.so) insn: e8 e8 0c 00 00
ls 1443864 [006] 2275506.209908875: 7f216b426df0 _dl_start+0x0 (/usr/lib/x86_64-linux-gnu/ld-2.31.so) insn: f3 0f 1e fa$ sudo perf script --insn-trace=disasm
ls 1443864 [006] 2275506.209908875: 7f216b426100 _start+0x0 (/usr/lib/x86_64-linux-gnu/ld-2.31.so) movq %rsp, %rdi
ls 1443864 [006] 2275506.209908875: 7f216b426103 _start+0x3 (/usr/lib/x86_64-linux-gnu/ld-2.31.so) callq _dl_start+0x0
ls 1443864 [006] 2275506.209908875: 7f216b426df0 _dl_start+0x0 (/usr/lib/x86_64-linux-gnu/ld-2.31.so) illegal instruction
ls 1443864 [006] 2275506.209908875: 7f216b426df4 _dl_start+0x4 (/usr/lib/x86_64-linux-gnu/ld-2.31.so) pushq %rbp
ls 1443864 [006] 2275506.209908875: 7f216b426df5 _dl_start+0x5 (/usr/lib/x86_64-linux-gnu/ld-2.31.so) movq %rsp, %rbp
ls 1443864 [006] 2275506.209908875: 7f216b426df8 _dl_start+0x8 (/usr/lib/x86_64-linux-gnu/ld-2.31.so) pushq %r15Stable-dep-of: d4a98b45fbe6 ("perf script: Show also errors for --insn-trace option")
--- tools/perf/Documentation/perf-script.txt | 7 ++++--- tools/perf/builtin-script.c | 22 ++++++++++++++++++---- 2 files changed, 22 insertions(+), 7 deletions(-)
tools/perf/Documentation/perf-script.txt +4 -3
@@ -441,9 +441,10 @@ include::itrace.txt[] will be printed. Each entry has function name and file/line. Enabled by default, disable with --no-inline. ---insn-trace:: - Show instruction stream for intel_pt traces. Combine with --xed to - show disassembly. +--insn-trace[=<raw|disasm>]:: + Show instruction stream in bytes (raw) or disassembled (disasm) + for intel_pt traces. The default is 'raw'. To use xed, combine + 'raw' with --xed to show disassembly done by xed. --xed:: Run xed disassembler on output. Requires installing the xed disassembler.
tools/perf/builtin-script.c +18 -4
@@ -3765,10 +3765,24 @@ static int perf_script__process_auxtrace_info(struct perf_session *session,#endif static int parse_insn_trace (const struct option *opt__maybe_unused , -const char *str__maybe_unused , -int unset__maybe_unused ) +const char *str,int unset__maybe_unused ) { -parse_output_fields (NULL ,"+insn,-event,-period" ,0 ); +const char *fields ="+insn,-event,-period" ; +int ret; + +if (str) { +if (strcmp (str,"disasm" ) ==0 ) + fields ="+disasm,-event,-period" ; +else if (strlen (str) !=0 &&strcmp (str,"raw" ) !=0 ) { +fprintf (stderr,"Only accept raw|disasm\n" ); +return -EINVAL ; + } + } + + ret =parse_output_fields (NULL , fields,0 ); +if (ret <0 ) +return ret; +itrace_parse_synth_opts (opt,"i0ns" ,0 ); symbol_conf.nanosecs = true;return 0 ;
@@ -3914,7 +3928,7 @@ int cmd_script(int argc, const char **argv) "only consider these symbols"),OPT_INTEGER (0 ,"addr-range" , &symbol_conf.addr_range,"Use with -S to list traced records within address range" ), -OPT_CALLBACK_OPTARG (0 ,"insn-trace" , &itrace_synth_opts,NULL ,NULL , +OPT_CALLBACK_OPTARG (0 ,"insn-trace" , &itrace_synth_opts,NULL ,"raw|disasm" ,"Decode instructions from itrace" , parse_insn_trace),OPT_CALLBACK_OPTARG (0 ,"xed" ,NULL ,NULL ,NULL , "Run xed disassembler on output", parse_xed),
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 172/192 perf script: Show also errors for --insn-trace option
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Adrian Hunter <[email protected]>
[ Upstream commit d4a98b45fbe6d06f4b79ed90d0bb05ced8674c23 ]
The trace could be misleading if trace errors are not taken into account, so display them also by adding the itrace "e" option.
Note --call-trace and --call-ret-trace already add the itrace "e" option.
--- tools/perf/builtin-script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-script.c +1 -1
@@ -3783,7 +3783,7 @@ static int parse_insn_trace(const struct option *opt __maybe_unused,if (ret <0 )return ret; -itrace_parse_synth_opts (opt,"i0ns" ,0 ); +itrace_parse_synth_opts (opt,"i0nse" ,0 ); symbol_conf.nanosecs = true;return 0 ; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 173/192 wifi: rtl8xxxu: enable MFP support with security flag of RX descriptor
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Martin Kaistra <[email protected]>
[ Upstream commit cbfbb4ddbc8503478e0a138f9a31f61686cc5f11 ]
In order to connect to networks which require 802.11w, add the MFP_CAPABLE flag and let mac80211 do the actual crypto in software.
When a robust management frame is received, rx_dec->swdec is not set, even though the HW did not decrypt it. Extend the check and don't set RX_FLAG_DECRYPTED for these frames in order to use SW decryption.
Use the security flag in the RX descriptor for this purpose, like it is done in the rtw88 driver.
--- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 9 +++++++++ drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 7 +++++-- 2 files changed, 14 insertions(+), 2 deletions(-)
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h +9 -0
@@ -121,6 +121,15 @@ enum rtl8xxxu_rx_type {RX_TYPE_ERROR =-1 }; +enum rtl8xxxu_rx_desc_enc { +RX_DESC_ENC_NONE =0 , +RX_DESC_ENC_WEP40 =1 , +RX_DESC_ENC_TKIP_WO_MIC =2 , +RX_DESC_ENC_TKIP_MIC =3 , +RX_DESC_ENC_AES =4 , +RX_DESC_ENC_WEP104 =5 , +}; +struct rtl8xxxu_rxdesc16 {#ifdef __LITTLE_ENDIANu32 pktlen:14 ;
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +5 -2
@@ -6319,7 +6319,8 @@ int rtl8xxxu_parse_rxdesc16(struct rtl8xxxu_priv *priv, struct sk_buff *skb) rx_status->mactime = rx_desc->tsfl; rx_status->flag |=RX_FLAG_MACTIME_START ; -if (!rx_desc->swdec) +if (!rx_desc->swdec && + rx_desc->security !=RX_DESC_ENC_NONE ) rx_status->flag |=RX_FLAG_DECRYPTED ;if (rx_desc->crc32) rx_status->flag |=RX_FLAG_FAILED_FCS_CRC ;
@@ -6419,7 +6420,8 @@ int rtl8xxxu_parse_rxdesc24(struct rtl8xxxu_priv *priv, struct sk_buff *skb) rx_status->mactime = rx_desc->tsfl; rx_status->flag |=RX_FLAG_MACTIME_START ; -if (!rx_desc->swdec) +if (!rx_desc->swdec && + rx_desc->security !=RX_DESC_ENC_NONE ) rx_status->flag |=RX_FLAG_DECRYPTED ;if (rx_desc->crc32) rx_status->flag |=RX_FLAG_FAILED_FCS_CRC ;
@@ -7654,6 +7656,7 @@ static int rtl8xxxu_probe(struct usb_interface *interface,ieee80211_hw_set (hw,HAS_RATE_CONTROL );ieee80211_hw_set (hw,SUPPORT_FAST_XMIT );ieee80211_hw_set (hw,AMPDU_AGGREGATION ); +ieee80211_hw_set (hw,MFP_CAPABLE );wiphy_ext_feature_set (hw->wiphy,NL80211_EXT_FEATURE_CQM_RSSI_LIST );
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 174/192 ocfs2: convert to new timestamp accessors
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeff Layton <[email protected]>
[ Upstream commit fd6acbbc4d1edb218ade7ac0ab1839f9e4fcd094 ]
Convert to using the new inode timestamp accessor functions.
Stable-dep-of: 8c40984eeb88 ("ocfs2: update inode fsync transaction id in ocfs2_unlink and ocfs2_link")
--- fs/ocfs2/acl.c | 4 ++-- fs/ocfs2/alloc.c | 6 +++--- fs/ocfs2/aops.c | 6 +++--- fs/ocfs2/dir.c | 9 +++++---- fs/ocfs2/dlmfs/dlmfs.c | 4 ++-- fs/ocfs2/dlmglue.c | 29 ++++++++++++++--------------- fs/ocfs2/file.c | 30 ++++++++++++++++-------------- fs/ocfs2/inode.c | 28 ++++++++++++++-------------- fs/ocfs2/move_extents.c | 4 ++-- fs/ocfs2/namei.c | 16 ++++++++-------- fs/ocfs2/refcounttree.c | 12 ++++++------ fs/ocfs2/xattr.c | 4 ++-- 12 files changed, 77 insertions(+), 75 deletions(-)
fs/ocfs2/acl.c +2 -2
@@ -193,8 +193,8 @@ static int ocfs2_acl_set_mode(struct inode *inode, struct buffer_head *di_bh, inode->i_mode = new_mode;inode_set_ctime_current (inode); di->i_mode =cpu_to_le16 (inode->i_mode); - di->i_ctime =cpu_to_le64 (inode_get_ctime (inode).tv_sec); - di->i_ctime_nsec =cpu_to_le32 (inode_get_ctime (inode).tv_nsec); + di->i_ctime =cpu_to_le64 (inode_get_ctime_sec (inode)); + di->i_ctime_nsec =cpu_to_le32 (inode_get_ctime_nsec (inode));ocfs2_update_inode_fsync_trans (handle, inode,0 );ocfs2_journal_dirty (handle, di_bh);
fs/ocfs2/alloc.c +3 -3
@@ -7436,10 +7436,10 @@ int ocfs2_truncate_inline(struct inode *inode, struct buffer_head *di_bh, } inode->i_blocks =ocfs2_inode_sector_count (inode); - inode->i_mtime =inode_set_ctime_current (inode); +inode_set_mtime_to_ts (inode,inode_set_ctime_current (inode)); - di->i_ctime = di->i_mtime =cpu_to_le64 (inode_get_ctime (inode).tv_sec); - di->i_ctime_nsec = di->i_mtime_nsec =cpu_to_le32 (inode_get_ctime (inode).tv_nsec); + di->i_ctime = di->i_mtime =cpu_to_le64 (inode_get_ctime_sec (inode)); + di->i_ctime_nsec = di->i_mtime_nsec =cpu_to_le32 (inode_get_ctime_nsec (inode));ocfs2_update_inode_fsync_trans (handle, inode,1 );ocfs2_journal_dirty (handle, di_bh);
fs/ocfs2/aops.c +3 -3
@@ -2048,9 +2048,9 @@ int ocfs2_write_end_nolock(struct address_space *mapping, } inode->i_blocks =ocfs2_inode_sector_count (inode); di->i_size =cpu_to_le64 ((u64 )i_size_read (inode)); - inode->i_mtime =inode_set_ctime_current (inode); - di->i_mtime = di->i_ctime =cpu_to_le64 (inode->i_mtime.tv_sec); - di->i_mtime_nsec = di->i_ctime_nsec =cpu_to_le32 (inode->i_mtime.tv_nsec); +inode_set_mtime_to_ts (inode,inode_set_ctime_current (inode)); + di->i_mtime = di->i_ctime =cpu_to_le64 (inode_get_mtime_sec (inode)); + di->i_mtime_nsec = di->i_ctime_nsec =cpu_to_le32 (inode_get_mtime_nsec (inode));if (handle)ocfs2_update_inode_fsync_trans (handle, inode,1 ); }
fs/ocfs2/dir.c +5 -4
@@ -1658,7 +1658,8 @@ int __ocfs2_add_entry(handle_t *handle, offset, ocfs2_dir_trailer_blk_off(dir->i_sb));if (ocfs2_dirent_would_fit (de, rec_len)) { - dir->i_mtime =inode_set_ctime_current (dir); +inode_set_mtime_to_ts (dir, +inode_set_ctime_current (dir)); retval =ocfs2_mark_inode_dirty (handle, dir, parent_fe_bh);if (retval <0 ) {mlog_errno (retval);
@@ -2962,11 +2963,11 @@ static int ocfs2_expand_inline_dir(struct inode *dir, struct buffer_head *di_bh,ocfs2_dinode_new_extent_list (dir, di);i_size_write (dir, sb->s_blocksize); - dir->i_mtime =inode_set_ctime_current (dir); +inode_set_mtime_to_ts (dir,inode_set_ctime_current (dir)); di->i_size =cpu_to_le64 (sb->s_blocksize); - di->i_ctime = di->i_mtime =cpu_to_le64 (inode_get_ctime (dir).tv_sec); - di->i_ctime_nsec = di->i_mtime_nsec =cpu_to_le32 (inode_get_ctime (dir).tv_nsec); + di->i_ctime = di->i_mtime =cpu_to_le64 (inode_get_ctime_sec (dir)); + di->i_ctime_nsec = di->i_mtime_nsec =cpu_to_le32 (inode_get_ctime_nsec (dir));ocfs2_update_inode_fsync_trans (handle, dir,1 );/*
fs/ocfs2/dlmfs/dlmfs.c +2 -2
@@ -337,7 +337,7 @@ static struct inode *dlmfs_get_root_inode(struct super_block *sb)if (inode) { inode->i_ino =get_next_ino ();inode_init_owner (&nop_mnt_idmap, inode,NULL , mode); - inode->i_atime = inode->i_mtime =inode_set_ctime_current (inode); +simple_inode_init_ts (inode);inc_nlink (inode); inode->i_fop = &simple_dir_operations;
@@ -360,7 +360,7 @@ static struct inode *dlmfs_get_inode(struct inode *parent, inode->i_ino =get_next_ino ();inode_init_owner (&nop_mnt_idmap, inode, parent, mode); - inode->i_atime = inode->i_mtime =inode_set_ctime_current (inode); +simple_inode_init_ts (inode); ip =DLMFS_I (inode); ip->ip_conn =DLMFS_I (parent)->ip_conn;
fs/ocfs2/dlmglue.c +14 -15
@@ -2162,7 +2162,7 @@ static void __ocfs2_stuff_meta_lvb(struct inode *inode)struct ocfs2_inode_info *oi =OCFS2_I (inode);struct ocfs2_lock_res *lockres = &oi->ip_inode_lockres;struct ocfs2_meta_lvb *lvb; -struct timespec64 ctime =inode_get_ctime (inode); +struct timespec64 ts; lvb =ocfs2_dlm_lvb (&lockres->l_lksb);
@@ -2183,12 +2183,12 @@ static void __ocfs2_stuff_meta_lvb(struct inode *inode) lvb->lvb_igid =cpu_to_be32 (i_gid_read (inode)); lvb->lvb_imode =cpu_to_be16 (inode->i_mode); lvb->lvb_inlink =cpu_to_be16 (inode->i_nlink); - lvb->lvb_iatime_packed = -cpu_to_be64 (ocfs2_pack_timespec (&inode->i_atime)); - lvb->lvb_ictime_packed = -cpu_to_be64 (ocfs2_pack_timespec (&ctime)); - lvb->lvb_imtime_packed = -cpu_to_be64 (ocfs2_pack_timespec (&inode->i_mtime)); + ts =inode_get_atime (inode); + lvb->lvb_iatime_packed =cpu_to_be64 (ocfs2_pack_timespec (&ts)); + ts =inode_get_ctime (inode); + lvb->lvb_ictime_packed =cpu_to_be64 (ocfs2_pack_timespec (&ts)); + ts =inode_get_mtime (inode); + lvb->lvb_imtime_packed =cpu_to_be64 (ocfs2_pack_timespec (&ts)); lvb->lvb_iattr =cpu_to_be32 (oi->ip_attr); lvb->lvb_idynfeatures =cpu_to_be16 (oi->ip_dyn_features); lvb->lvb_igeneration =cpu_to_be32 (inode->i_generation);
@@ -2209,7 +2209,7 @@ static int ocfs2_refresh_inode_from_lvb(struct inode *inode)struct ocfs2_inode_info *oi =OCFS2_I (inode);struct ocfs2_lock_res *lockres = &oi->ip_inode_lockres;struct ocfs2_meta_lvb *lvb; -struct timespec64 ctime; +struct timespec64 ts;mlog_meta_lvb (0 , lockres);
@@ -2236,13 +2236,12 @@ static int ocfs2_refresh_inode_from_lvb(struct inode *inode)i_gid_write (inode,be32_to_cpu (lvb->lvb_igid)); inode->i_mode =be16_to_cpu (lvb->lvb_imode);set_nlink (inode,be16_to_cpu (lvb->lvb_inlink)); -ocfs2_unpack_timespec (&inode->i_atime, -be64_to_cpu (lvb->lvb_iatime_packed)); -ocfs2_unpack_timespec (&inode->i_mtime, -be64_to_cpu (lvb->lvb_imtime_packed)); -ocfs2_unpack_timespec (&ctime, -be64_to_cpu (lvb->lvb_ictime_packed)); -inode_set_ctime_to_ts (inode, ctime); +ocfs2_unpack_timespec (&ts,be64_to_cpu (lvb->lvb_iatime_packed)); +inode_set_atime_to_ts (inode, ts); +ocfs2_unpack_timespec (&ts,be64_to_cpu (lvb->lvb_imtime_packed)); +inode_set_mtime_to_ts (inode, ts); +ocfs2_unpack_timespec (&ts,be64_to_cpu (lvb->lvb_ictime_packed)); +inode_set_ctime_to_ts (inode, ts);spin_unlock (&oi->ip_lock);return 0 ; }
fs/ocfs2/file.c +16 -14
@@ -233,16 +233,18 @@ int ocfs2_should_update_atime(struct inode *inode,if (vfsmnt->mnt_flags &MNT_RELATIME ) {struct timespec64 ctime =inode_get_ctime (inode); +struct timespec64 atime =inode_get_atime (inode); +struct timespec64 mtime =inode_get_mtime (inode); -if ((timespec64_compare (&inode->i_atime, &inode->i_mtime) <=0 ) || - (timespec64_compare (&inode->i_atime, &ctime) <=0 )) +if ((timespec64_compare (&atime, &mtime) <=0 ) || + (timespec64_compare (&atime, &ctime) <=0 ))return 1 ;return 0 ; } now =current_time (inode); -if ((now.tv_sec - inode->i_atime.tv_sec <= osb->s_atime_quantum)) +if ((now.tv_sec -inode_get_atime_sec (inode) <= osb->s_atime_quantum))return 0 ;else return 1 ;
@@ -275,9 +277,9 @@ int ocfs2_update_inode_atime(struct inode *inode,* have i_rwsem to guard against concurrent changes to other * inode fields. */ - inode->i_atime =current_time (inode); - di->i_atime =cpu_to_le64 (inode->i_atime.tv_sec); - di->i_atime_nsec =cpu_to_le32 (inode->i_atime.tv_nsec); +inode_set_atime_to_ts (inode,current_time (inode)); + di->i_atime =cpu_to_le64 (inode_get_atime_sec (inode)); + di->i_atime_nsec =cpu_to_le32 (inode_get_atime_nsec (inode));ocfs2_update_inode_fsync_trans (handle, inode,0 );ocfs2_journal_dirty (handle, bh);
@@ -296,7 +298,7 @@ int ocfs2_set_inode_size(handle_t *handle,i_size_write (inode, new_i_size); inode->i_blocks =ocfs2_inode_sector_count (inode); - inode->i_mtime =inode_set_ctime_current (inode); +inode_set_mtime_to_ts (inode,inode_set_ctime_current (inode)); status =ocfs2_mark_inode_dirty (handle, inode, fe_bh);if (status <0 ) {
@@ -417,12 +419,12 @@ static int ocfs2_orphan_for_truncate(struct ocfs2_super *osb, }i_size_write (inode, new_i_size); - inode->i_mtime =inode_set_ctime_current (inode); +inode_set_mtime_to_ts (inode,inode_set_ctime_current (inode)); di = (struct ocfs2_dinode *) fe_bh->b_data; di->i_size =cpu_to_le64 (new_i_size); - di->i_ctime = di->i_mtime =cpu_to_le64 (inode_get_ctime (inode).tv_sec); - di->i_ctime_nsec = di->i_mtime_nsec =cpu_to_le32 (inode_get_ctime (inode).tv_nsec); + di->i_ctime = di->i_mtime =cpu_to_le64 (inode_get_ctime_sec (inode)); + di->i_ctime_nsec = di->i_mtime_nsec =cpu_to_le32 (inode_get_ctime_nsec (inode));ocfs2_update_inode_fsync_trans (handle, inode,0 );ocfs2_journal_dirty (handle, fe_bh);
@@ -821,9 +823,9 @@ static int ocfs2_write_zero_page(struct inode *inode, u64 abs_from,i_size_write (inode, abs_to); inode->i_blocks =ocfs2_inode_sector_count (inode); di->i_size =cpu_to_le64 ((u64 )i_size_read (inode)); - inode->i_mtime =inode_set_ctime_current (inode); - di->i_mtime = di->i_ctime =cpu_to_le64 (inode->i_mtime.tv_sec); - di->i_ctime_nsec =cpu_to_le32 (inode->i_mtime.tv_nsec); +inode_set_mtime_to_ts (inode,inode_set_ctime_current (inode)); + di->i_mtime = di->i_ctime =cpu_to_le64 (inode_get_mtime_sec (inode)); + di->i_ctime_nsec =cpu_to_le32 (inode_get_mtime_nsec (inode)); di->i_mtime_nsec = di->i_ctime_nsec;if (handle) {ocfs2_journal_dirty (handle, di_bh);
@@ -2042,7 +2044,7 @@ static int __ocfs2_change_file_space(struct file *file, struct inode *inode, goto out_inode_unlock; } - inode->i_mtime =inode_set_ctime_current (inode); +inode_set_mtime_to_ts (inode,inode_set_ctime_current (inode)); ret =ocfs2_mark_inode_dirty (handle, inode, di_bh);if (ret <0 )mlog_errno (ret);
fs/ocfs2/inode.c +14 -14
@@ -302,10 +302,10 @@ void ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe, inode->i_blocks =ocfs2_inode_sector_count (inode); inode->i_mapping->a_ops = &ocfs2_aops; } - inode->i_atime.tv_sec =le64_to_cpu (fe->i_atime); - inode->i_atime.tv_nsec =le32_to_cpu (fe->i_atime_nsec); - inode->i_mtime.tv_sec =le64_to_cpu (fe->i_mtime); - inode->i_mtime.tv_nsec =le32_to_cpu (fe->i_mtime_nsec); +inode_set_atime (inode,le64_to_cpu (fe->i_atime), +le32_to_cpu (fe->i_atime_nsec)); +inode_set_mtime (inode,le64_to_cpu (fe->i_mtime), +le32_to_cpu (fe->i_mtime_nsec));inode_set_ctime (inode,le64_to_cpu (fe->i_ctime),le32_to_cpu (fe->i_ctime_nsec));
@@ -1312,12 +1312,12 @@ int ocfs2_mark_inode_dirty(handle_t *handle, fe->i_uid =cpu_to_le32 (i_uid_read (inode)); fe->i_gid =cpu_to_le32 (i_gid_read (inode)); fe->i_mode =cpu_to_le16 (inode->i_mode); - fe->i_atime =cpu_to_le64 (inode->i_atime.tv_sec); - fe->i_atime_nsec =cpu_to_le32 (inode->i_atime.tv_nsec); - fe->i_ctime =cpu_to_le64 (inode_get_ctime (inode).tv_sec); - fe->i_ctime_nsec =cpu_to_le32 (inode_get_ctime (inode).tv_nsec); - fe->i_mtime =cpu_to_le64 (inode->i_mtime.tv_sec); - fe->i_mtime_nsec =cpu_to_le32 (inode->i_mtime.tv_nsec); + fe->i_atime =cpu_to_le64 (inode_get_atime_sec (inode)); + fe->i_atime_nsec =cpu_to_le32 (inode_get_atime_nsec (inode)); + fe->i_ctime =cpu_to_le64 (inode_get_ctime_sec (inode)); + fe->i_ctime_nsec =cpu_to_le32 (inode_get_ctime_nsec (inode)); + fe->i_mtime =cpu_to_le64 (inode_get_mtime_sec (inode)); + fe->i_mtime_nsec =cpu_to_le32 (inode_get_mtime_nsec (inode));ocfs2_journal_dirty (handle, bh);ocfs2_update_inode_fsync_trans (handle, inode,1 );
@@ -1348,10 +1348,10 @@ void ocfs2_refresh_inode(struct inode *inode, inode->i_blocks =0 ; else inode->i_blocks = ocfs2_inode_sector_count(inode); - inode->i_atime.tv_sec =le64_to_cpu (fe->i_atime); - inode->i_atime.tv_nsec =le32_to_cpu (fe->i_atime_nsec); - inode->i_mtime.tv_sec =le64_to_cpu (fe->i_mtime); - inode->i_mtime.tv_nsec =le32_to_cpu (fe->i_mtime_nsec); +inode_set_atime (inode,le64_to_cpu (fe->i_atime), +le32_to_cpu (fe->i_atime_nsec)); +inode_set_mtime (inode,le64_to_cpu (fe->i_mtime), +le32_to_cpu (fe->i_mtime_nsec));inode_set_ctime (inode,le64_to_cpu (fe->i_ctime),le32_to_cpu (fe->i_ctime_nsec));
fs/ocfs2/move_extents.c +2 -2
@@ -951,8 +951,8 @@ static int ocfs2_move_extents(struct ocfs2_move_extents_context *context) di = (struct ocfs2_dinode *)di_bh->b_data;inode_set_ctime_current (inode); - di->i_ctime =cpu_to_le64 (inode_get_ctime (inode).tv_sec); - di->i_ctime_nsec =cpu_to_le32 (inode_get_ctime (inode).tv_nsec); + di->i_ctime =cpu_to_le64 (inode_get_ctime_sec (inode)); + di->i_ctime_nsec =cpu_to_le32 (inode_get_ctime_nsec (inode));ocfs2_update_inode_fsync_trans (handle, inode,0 );ocfs2_journal_dirty (handle, di_bh);
fs/ocfs2/namei.c +8 -8
@@ -795,8 +795,8 @@ static int ocfs2_link(struct dentry *old_dentry,inc_nlink (inode);inode_set_ctime_current (inode);ocfs2_set_links_count (fe, inode->i_nlink); - fe->i_ctime =cpu_to_le64 (inode_get_ctime (inode).tv_sec); - fe->i_ctime_nsec =cpu_to_le32 (inode_get_ctime (inode).tv_nsec); + fe->i_ctime =cpu_to_le64 (inode_get_ctime_sec (inode)); + fe->i_ctime_nsec =cpu_to_le32 (inode_get_ctime_nsec (inode));ocfs2_journal_dirty (handle, fe_bh); err = ocfs2_add_entry(handle, dentry, inode,
@@ -995,7 +995,7 @@ static int ocfs2_unlink(struct inode *dir,ocfs2_set_links_count (fe, inode->i_nlink);ocfs2_journal_dirty (handle, fe_bh); - dir->i_mtime =inode_set_ctime_current (dir); +inode_set_mtime_to_ts (dir,inode_set_ctime_current (dir));if (S_ISDIR (inode->i_mode))drop_nlink (dir);
@@ -1550,8 +1550,8 @@ static int ocfs2_rename(struct mnt_idmap *idmap,if (status >=0 ) { old_di = (struct ocfs2_dinode *) old_inode_bh->b_data; - old_di->i_ctime =cpu_to_le64 (inode_get_ctime (old_inode).tv_sec); - old_di->i_ctime_nsec =cpu_to_le32 (inode_get_ctime (old_inode).tv_nsec); + old_di->i_ctime =cpu_to_le64 (inode_get_ctime_sec (old_inode)); + old_di->i_ctime_nsec =cpu_to_le32 (inode_get_ctime_nsec (old_inode));ocfs2_journal_dirty (handle, old_inode_bh); }else mlog_errno (status);
@@ -1592,7 +1592,7 @@ static int ocfs2_rename(struct mnt_idmap *idmap,drop_nlink (new_inode);inode_set_ctime_current (new_inode); } - old_dir->i_mtime =inode_set_ctime_current (old_dir); +inode_set_mtime_to_ts (old_dir,inode_set_ctime_current (old_dir));if (update_dot_dot) { status = ocfs2_update_entry(old_inode, handle,
@@ -1614,8 +1614,8 @@ static int ocfs2_rename(struct mnt_idmap *idmap,if (old_dir != new_dir) {/* Keep the same times on both directories.*/ - new_dir->i_mtime =inode_set_ctime_to_ts (new_dir, -inode_get_ctime (old_dir)); +inode_set_mtime_to_ts (new_dir, +inode_set_ctime_to_ts (new_dir,inode_get_ctime (old_dir)));/* * This will also pick up the i_nlink change from the
fs/ocfs2/refcounttree.c +6 -6
@@ -3751,8 +3751,8 @@ static int ocfs2_change_ctime(struct inode *inode, }inode_set_ctime_current (inode); - di->i_ctime =cpu_to_le64 (inode_get_ctime (inode).tv_sec); - di->i_ctime_nsec =cpu_to_le32 (inode_get_ctime (inode).tv_nsec); + di->i_ctime =cpu_to_le64 (inode_get_ctime_sec (inode)); + di->i_ctime_nsec =cpu_to_le32 (inode_get_ctime_nsec (inode));ocfs2_journal_dirty (handle, di_bh);
@@ -4075,10 +4075,10 @@ static int ocfs2_complete_reflink(struct inode *s_inode,*/ inode_set_ctime_current (t_inode); - di->i_ctime =cpu_to_le64 (inode_get_ctime (t_inode).tv_sec); - di->i_ctime_nsec =cpu_to_le32 (inode_get_ctime (t_inode).tv_nsec); + di->i_ctime =cpu_to_le64 (inode_get_ctime_sec (t_inode)); + di->i_ctime_nsec =cpu_to_le32 (inode_get_ctime_nsec (t_inode)); - t_inode->i_mtime = s_inode->i_mtime; +inode_set_mtime_to_ts (t_inode,inode_get_mtime (s_inode)); di->i_mtime = s_di->i_mtime; di->i_mtime_nsec = s_di->i_mtime_nsec; }
@@ -4456,7 +4456,7 @@ int ocfs2_reflink_update_dest(struct inode *dest,if (newlen >i_size_read (dest))i_size_write (dest, newlen);spin_unlock (&OCFS2_I (dest)->ip_lock); - dest->i_mtime =inode_set_ctime_current (dest); +inode_set_mtime_to_ts (dest,inode_set_ctime_current (dest)); ret =ocfs2_mark_inode_dirty (handle, dest, d_bh);if (ret) {
fs/ocfs2/xattr.c +2 -2
@@ -3422,8 +3422,8 @@ static int __ocfs2_xattr_set_handle(struct inode *inode, }inode_set_ctime_current (inode); - di->i_ctime =cpu_to_le64 (inode_get_ctime (inode).tv_sec); - di->i_ctime_nsec =cpu_to_le32 (inode_get_ctime (inode).tv_nsec); + di->i_ctime =cpu_to_le64 (inode_get_ctime_sec (inode)); + di->i_ctime_nsec =cpu_to_le32 (inode_get_ctime_nsec (inode));ocfs2_journal_dirty (ctxt->handle, xis->inode_bh); } out:
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 175/192 ocfs2: update inode fsync transaction id in ocfs2_unlink and ocfs2_link
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Su Yue <[email protected]>
[ Upstream commit 8c40984eeb8804cffcd28640f427f4fe829243fc ]
transaction id should be updated in ocfs2_unlink and ocfs2_link. Otherwise, inode link will be wrong after journal replay even fsync was called before power failure:
=======================================================================
$ touch testdir/bar $ ln testdir/bar testdir/bar_link $ fsync testdir/bar $ stat -c %h $SCRATCH_MNT/testdir/bar 1 $ stat -c %h $SCRATCH_MNT/testdir/bar 1 =======================================================================
--- fs/ocfs2/namei.c | 2 ++ 1 file changed, 2 insertions(+)
fs/ocfs2/namei.c +2 -0
@@ -797,6 +797,7 @@ static int ocfs2_link(struct dentry *old_dentry,ocfs2_set_links_count (fe, inode->i_nlink); fe->i_ctime =cpu_to_le64 (inode_get_ctime_sec (inode)); fe->i_ctime_nsec =cpu_to_le32 (inode_get_ctime_nsec (inode)); +ocfs2_update_inode_fsync_trans (handle, inode,0 );ocfs2_journal_dirty (handle, fe_bh); err = ocfs2_add_entry(handle, dentry, inode,
@@ -993,6 +994,7 @@ static int ocfs2_unlink(struct inode *dir,drop_nlink (inode);drop_nlink (inode);ocfs2_set_links_count (fe, inode->i_nlink); +ocfs2_update_inode_fsync_trans (handle, inode,0 );ocfs2_journal_dirty (handle, fe_bh);inode_set_mtime_to_ts (dir,inode_set_ctime_current (dir));
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 176/192 nbd: Improve the documentation of the locking assumptions
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bart Van Assche <[email protected]>
[ Upstream commit 2a6751e052ab4789630bc889c814037068723bc1 ]
Document locking assumptions with lockdep_assert_held() instead of source code comments. The advantage of lockdep_assert_held() is that it is verified at runtime if lockdep is enabled in the kernel config.
Stable-dep-of: e56d4b633fff ("nbd: Fix signal handling")
--- drivers/block/nbd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/block/nbd.c +5 -1
@@ -569,7 +569,6 @@ static inline int was_interrupted(int result)return result == -ERESTARTSYS || result == -EINTR ; } -/* always call with the tx_lock held */ static int nbd_send_cmd (struct nbd_device *nbd,struct nbd_cmd *cmd,int index) {struct request *req =blk_mq_rq_from_pdu (cmd);
@@ -586,6 +585,9 @@ static int nbd_send_cmd(struct nbd_device *nbd, struct nbd_cmd *cmd, int index)u32 nbd_cmd_flags =0 ;int sent = nsock->sent, skip =0 ; +lockdep_assert_held (&cmd->lock); +lockdep_assert_held (&nsock->tx_lock); +iov_iter_kvec (&from,ITER_SOURCE , &iov,1 ,sizeof (request)); type =req_to_nbd_cmd_type (req);
@@ -996,6 +998,8 @@ static int nbd_handle_cmd(struct nbd_cmd *cmd, int index)struct nbd_sock *nsock;int ret; +lockdep_assert_held (&cmd->lock); + config =nbd_get_config_unlocked (nbd);if (!config) { dev_err_ratelimited(disk_to_dev(nbd->disk),
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 177/192 nbd: Fix signal handling
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bart Van Assche <[email protected]>
[ Upstream commit e56d4b633fffea9510db468085bed0799cba4ecd ]
Both nbd_send_cmd() and nbd_handle_cmd() return either a negative error number or a positive blk_status_t value. nbd_queue_rq() converts these return values into a blk_status_t value. There is a bug in the conversion
code: if nbd_send_cmd() returns BLK_STS_RESOURCE, nbd_queue_rq() should return BLK_STS_RESOURCE instead of BLK_STS_OK. Fix this, move the conversion code into nbd_handle_cmd() and fix the remaining sparse warnings.
This patch fixes the following sparse warnings:
drivers/block/nbd.c:673:32: warning: incorrect type in return expression (different base types)drivers/block/nbd.c:673:32: expected intdrivers/block/nbd.c:673:32: got restricted blk_status_t [usertype]drivers/block/nbd.c:714:48: warning: incorrect type in return expression (different base types)drivers/block/nbd.c:714:48: expected intdrivers/block/nbd.c:714:48: got restricted blk_status_t [usertype]drivers/block/nbd.c:1120:21: warning: incorrect type in assignment (different base types)drivers/block/nbd.c:1120:21: expected int [assigned] retdrivers/block/nbd.c:1120:21: got restricted blk_status_t [usertype]drivers/block/nbd.c:1125:16: warning: incorrect type in return expression (different base types)drivers/block/nbd.c:1125:16: expected restricted blk_status_tdrivers/block/nbd.c:1125:16: got int [assigned] ret
--- drivers/block/nbd.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)
drivers/block/nbd.c +14 -14
@@ -569,6 +569,10 @@ static inline int was_interrupted(int result)return result == -ERESTARTSYS || result == -EINTR ; } +/* +* Returns BLK_STS_RESOURCE if the caller should retry after a delay. Returns +* -EAGAIN if the caller should requeue @cmd. Returns -EIO if sending failed. +*/ static int nbd_send_cmd (struct nbd_device *nbd,struct nbd_cmd *cmd,int index) {struct request *req =blk_mq_rq_from_pdu (cmd);
@@ -652,7 +656,7 @@ static int nbd_send_cmd(struct nbd_device *nbd, struct nbd_cmd *cmd, int index) nsock->sent = sent; }set_bit (NBD_CMD_REQUEUED , &cmd->flags); -return BLK_STS_RESOURCE ; +return (__force int )BLK_STS_RESOURCE ; }dev_err_ratelimited (disk_to_dev (nbd->disk),"Send control failed (result %d)\n" , result);
@@ -693,7 +697,7 @@ static int nbd_send_cmd(struct nbd_device *nbd, struct nbd_cmd *cmd, int index) nsock->pending = req; nsock->sent = sent;set_bit (NBD_CMD_REQUEUED , &cmd->flags); -return BLK_STS_RESOURCE ; +return (__force int )BLK_STS_RESOURCE ; } dev_err(disk_to_dev(nbd->disk), "Send data failed (result %d)\n",
@@ -990,7 +994,7 @@ static int wait_for_reconnect(struct nbd_device *nbd)return !test_bit (NBD_RT_DISCONNECTED , &config->runtime_flags); } -static int nbd_handle_cmd (struct nbd_cmd *cmd,int index) +static blk_status_t nbd_handle_cmd (struct nbd_cmd *cmd,int index) {struct request *req =blk_mq_rq_from_pdu (cmd);struct nbd_device *nbd = cmd->nbd;
@@ -1004,14 +1008,14 @@ static int nbd_handle_cmd(struct nbd_cmd *cmd, int index)if (!config) {dev_err_ratelimited (disk_to_dev (nbd->disk),"Socks array is empty\n" ); -return -EINVAL ; +return BLK_STS_IOERR ; }if (index >= config->num_connections) {dev_err_ratelimited (disk_to_dev (nbd->disk),"Attempted send on invalid socket\n" );nbd_config_put (nbd); -return -EINVAL ; +return BLK_STS_IOERR ; } cmd->status =BLK_STS_OK ; again:
@@ -1034,7 +1038,7 @@ static int nbd_handle_cmd(struct nbd_cmd *cmd, int index)*/ sock_shutdown (nbd);nbd_config_put (nbd); -return -EIO ; +return BLK_STS_IOERR ; } goto again; }
@@ -1047,7 +1051,7 @@ static int nbd_handle_cmd(struct nbd_cmd *cmd, int index)blk_mq_start_request (req);if (unlikely (nsock->pending && nsock->pending != req)) {nbd_requeue_cmd (cmd); - ret =0 ; + ret =BLK_STS_OK ; goto out; }/*
@@ -1066,19 +1070,19 @@ static int nbd_handle_cmd(struct nbd_cmd *cmd, int index) "Request send failed, requeueing\n");nbd_mark_nsock_dead (nbd, nsock,1 );nbd_requeue_cmd (cmd); - ret =0 ; + ret =BLK_STS_OK ; } out:mutex_unlock (&nsock->tx_lock);nbd_config_put (nbd); -return ret; +return ret <0 ?BLK_STS_IOERR : (__force blk_status_t )ret; }static blk_status_t nbd_queue_rq (struct blk_mq_hw_ctx *hctx,const struct blk_mq_queue_data *bd) {struct nbd_cmd *cmd =blk_mq_rq_to_pdu (bd->rq); -int ret; +blk_status_t ret;/* * Since we look at the bio's to send the request over the network we
@@ -1098,10 +1102,6 @@ static blk_status_t nbd_queue_rq(struct blk_mq_hw_ctx *hctx,* appropriate. */ ret =nbd_handle_cmd (cmd, hctx->queue_num); -if (ret <0 ) - ret =BLK_STS_IOERR ; -else if (!ret) - ret =BLK_STS_OK ;mutex_unlock (&cmd->lock);return ret;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 178/192 tracing: Add MODULE_DESCRIPTION() to preemptirq_delay_test
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeff Johnson <[email protected]>
[ Upstream commit 23748e3e0fbfe471eff5ce439921629f6a427828 ]
Fix the 'make W=1' warning:
WARNING: modpost: missing MODULE_DESCRIPTION() in kernel/trace/preemptirq_delay_test.o
--- kernel/trace/preemptirq_delay_test.c | 1 + 1 file changed, 1 insertion(+)
kernel/trace/preemptirq_delay_test.c +1 -0
@@ -215,4 +215,5 @@ static void __exit preemptirq_delay_exit(void) module_init(preemptirq_delay_init) module_exit(preemptirq_delay_exit) +MODULE_DESCRIPTION("Preempt / IRQ disable delay thread to test latency tracers");MODULE_LICENSE ("GPL v2" );
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 179/192 x86/cpu/vfm: Add new macros to work with (vendor/family/model) values
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tony Luck <[email protected]>
[ Upstream commit e6dfdc2e89a0adedf455814c91b977d6a584cc88 ]
To avoid adding a slew of new macros for each new Intel CPU family switch over from providing CPU model number #defines to a new scheme that encodes vendor, family, and model in a single number.
[ bp: s/casted/cast/g ]
Stable-dep-of: 93022482b294 ("x86/cpu: Fix x86_match_cpu() to match just X86_VENDOR_INTEL")
--- arch/x86/include/asm/cpu_device_id.h | 93 ++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+)
arch/x86/include/asm/cpu_device_id.h +93 -0
@@ -2,6 +2,39 @@#ifndef _ASM_X86_CPU_DEVICE_ID#define _ASM_X86_CPU_DEVICE_ID +/* +* Can't use <linux/bitfield.h> because it generates expressions that +* cannot be used in structure initializers. Bitfield construction +* here must match the union in struct cpuinfo_86: +* union { +* struct { +* __u8 x86_model; +* __u8 x86; +* __u8 x86_vendor; +* __u8 x86_reserved; +* }; +* __u32 x86_vfm; +* }; +*/ +#define VFM_MODEL_BIT 0 +#define VFM_FAMILY_BIT 8 +#define VFM_VENDOR_BIT 16 +#define VFM_RSVD_BIT 24 + +#define VFM_MODEL_MASK GENMASK(VFM_FAMILY_BIT - 1, VFM_MODEL_BIT) +#define VFM_FAMILY_MASK GENMASK(VFM_VENDOR_BIT - 1, VFM_FAMILY_BIT) +#define VFM_VENDOR_MASK GENMASK(VFM_RSVD_BIT - 1, VFM_VENDOR_BIT) + +#define VFM_MODEL (vfm) (((vfm) & VFM_MODEL_MASK) >> VFM_MODEL_BIT) +#define VFM_FAMILY (vfm) (((vfm) & VFM_FAMILY_MASK) >> VFM_FAMILY_BIT) +#define VFM_VENDOR (vfm) (((vfm) & VFM_VENDOR_MASK) >> VFM_VENDOR_BIT) + +#define VFM_MAKE (_vendor, _family, _model) ( \ + ((_model) << VFM_MODEL_BIT) | \ + ((_family) << VFM_FAMILY_BIT) | \ + ((_vendor) << VFM_VENDOR_BIT) \ +) +/* * Declare drivers belonging to specific x86 CPUs * Similar in spirit to pci_device_id and related PCI functions
@@ -49,6 +82,16 @@ .driver_data = (unsigned long) _data \ } +#define X86_MATCH_VENDORID_FAM_MODEL_STEPPINGS_FEATURE (_vendor, _family, _model, \ + _steppings, _feature, _data) { \ + .vendor = _vendor, \ + .family = _family, \ + .model = _model, \ + .steppings = _steppings, \ + .feature = _feature, \ + .driver_data = (unsigned long) _data \ +} +/** * X86_MATCH_VENDOR_FAM_MODEL_FEATURE - Macro for CPU matching * @_vendor: The vendor name, e.g. INTEL, AMD, HYGON, ..., ANY
@@ -164,6 +207,56 @@ X86_MATCH_VENDOR_FAM_MODEL_STEPPINGS_FEATURE(INTEL, 6, INTEL_FAM6_##model, \ steppings,X86_FEATURE_ANY , data) +/** +* X86_MATCH_VFM - Match encoded vendor/family/model +* @vfm: Encoded 8-bits each for vendor, family, model +* @data: Driver specific data or NULL. The internal storage +* format is unsigned long. The supplied value, pointer +* etc. is cast to unsigned long internally. +* +* Stepping and feature are set to wildcards + */ +#define X86_MATCH_VFM (vfm, data) \ + X86_MATCH_VENDORID_FAM_MODEL_STEPPINGS_FEATURE( \ + VFM_VENDOR(vfm), \ + VFM_FAMILY(vfm), \ + VFM_MODEL(vfm), \ + X86_STEPPING_ANY, X86_FEATURE_ANY, data) + +/** +* X86_MATCH_VFM_STEPPINGS - Match encoded vendor/family/model/stepping +* @vfm: Encoded 8-bits each for vendor, family, model +* @steppings: Bitmask of steppings to match +* @data: Driver specific data or NULL. The internal storage +* format is unsigned long. The supplied value, pointer +* etc. is cast to unsigned long internally. +* +* feature is set to wildcard +*/ +#define X86_MATCH_VFM_STEPPINGS (vfm, steppings, data) \ + X86_MATCH_VENDORID_FAM_MODEL_STEPPINGS_FEATURE( \ + VFM_VENDOR(vfm), \ + VFM_FAMILY(vfm), \ + VFM_MODEL(vfm), \ + steppings, X86_FEATURE_ANY, data) + +/** +* X86_MATCH_VFM_FEATURE - Match encoded vendor/family/model/feature +* @vfm: Encoded 8-bits each for vendor, family, model +* @feature: A X86_FEATURE bit +* @data: Driver specific data or NULL. The internal storage +* format is unsigned long. The supplied value, pointer +* etc. is cast to unsigned long internally. +* +* Steppings is set to wildcard +*/ +#define X86_MATCH_VFM_FEATURE (vfm, feature, data) \ + X86_MATCH_VENDORID_FAM_MODEL_STEPPINGS_FEATURE( \ + VFM_VENDOR(vfm), \ + VFM_FAMILY(vfm), \ + VFM_MODEL(vfm), \ + X86_STEPPING_ANY, feature, data) +/* * Match specific microcode revisions. *
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 180/192 x86/cpu: Fix x86_match_cpu() to match just X86_VENDOR_INTEL
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tony Luck <[email protected]>
[ Upstream commit 93022482b2948a9a7e9b5a2bb685f2e1cb4c3348 ]
Code in v6.9 arch/x86/kernel/smpboot.c was changed by commit
4db64279bc2b ("x86/cpu: Switch to new Intel CPU model defines") from:
static const struct x86_cpu_id intel_cod_cpu[] = {
X86_MATCH_INTEL_FAM6_MODEL(HASWELL_X, 0), /* COD */
X86_MATCH_INTEL_FAM6_MODEL(BROADWELL_X, 0), /* COD */
X86_MATCH_INTEL_FAM6_MODEL(ANY, 1), /* SNC */ <--- 443
{}
};
static bool match_llc(struct cpuinfo_x86 *c, struct cpuinfo_x86 *o)
{
const struct x86_cpu_id *id = x86_match_cpu(intel_cod_cpu);to:
static const struct x86_cpu_id intel_cod_cpu[] = {
X86_MATCH_VFM(INTEL_HASWELL_X, 0), /* COD */
X86_MATCH_VFM(INTEL_BROADWELL_X, 0), /* COD */
X86_MATCH_VFM(INTEL_ANY, 1), /* SNC */
{}
};
static bool match_llc(struct cpuinfo_x86 *c, struct cpuinfo_x86 *o)
{
const struct x86_cpu_id *id = x86_match_cpu(intel_cod_cpu);On an Intel CPU with SNC enabled this code previously matched the rule on line 443 to avoid printing messages about insane cache configuration. The new code did not match any rules.
Expanding the macros for the intel_cod_cpu[] array shows that the old is equivalent to:
static const struct x86_cpu_id intel_cod_cpu[] = {
[0] = { .vendor = 0, .family = 6, .model = 0x3F, .steppings = 0, .feature = 0, .driver_data = 0 },
[1] = { .vendor = 0, .family = 6, .model = 0x4F, .steppings = 0, .feature = 0, .driver_data = 0 },
[2] = { .vendor = 0, .family = 6, .model = 0x00, .steppings = 0, .feature = 0, .driver_data = 1 },
[3] = { .vendor = 0, .family = 0, .model = 0x00, .steppings = 0, .feature = 0, .driver_data = 0 } }
while the new code expands to:
static const struct x86_cpu_id intel_cod_cpu[] = {
[0] = { .vendor = 0, .family = 6, .model = 0x3F, .steppings = 0, .feature = 0, .driver_data = 0 },
[1] = { .vendor = 0, .family = 6, .model = 0x4F, .steppings = 0, .feature = 0, .driver_data = 0 },
[2] = { .vendor = 0, .family = 0, .model = 0x00, .steppings = 0, .feature = 0, .driver_data = 1 },
[3] = { .vendor = 0, .family = 0, .model = 0x00, .steppings = 0, .feature = 0, .driver_data = 0 } }
Looking at the code for x86_match_cpu():
const struct x86_cpu_id *x86_match_cpu(const struct x86_cpu_id *match)
{
const struct x86_cpu_id *m;
struct cpuinfo_x86 *c = &boot_cpu_data; for (m = match;
m->vendor | m->family | m->model | m->steppings | m->feature;
m++) {
...
}
return NULL;it is clear that there was no match because the ANY entry in the table (array index 2) is now the loop termination condition (all of vendor, family, model, steppings, and feature are zero).
So this code was working before because the "ANY" check was looking for any Intel CPU in family 6. But fails now because the family is a wild card. So the root cause is that x86_match_cpu() has never been able to match on a rule with just X86_VENDOR_INTEL and all other fields set to wildcards.
Add a new flags field to struct x86_cpu_id that has a bit set to indicate that this entry in the array is valid. Update X86_MATCH*() macros to set that bit. Change the end-marker check in x86_match_cpu() to just check the flags field for this bit.
Backporter notes: The commit in Fixes is really the one that is broken:
you can't have m->vendor as part of the loop termination conditional in x86_match_cpu() because it can happen - as it has happened above
- that that whole conditional is 0 albeit vendor == 0 is a valid case
- X86_VENDOR_INTEL is 0.
However, the only case where the above happens is the SNC check added by 4db64279bc2b1 so you only need this fix if you have backported that other commit
4db64279bc2b ("x86/cpu: Switch to new Intel CPU model defines")
--- arch/x86/include/asm/cpu_device_id.h | 5 +++++ arch/x86/kernel/cpu/match.c | 4 +--- include/linux/mod_devicetable.h | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-)
arch/x86/include/asm/cpu_device_id.h +5 -0
@@ -53,6 +53,9 @@#define X86_CENTAUR_FAM6_C7_D 0xd#define X86_CENTAUR_FAM6_NANO 0xf +/* x86_cpu_id::flags */ +#define X86_CPU_ID_FLAG_ENTRY_VALID BIT(0) +#define X86_STEPPINGS (mins, maxs) GENMASK(maxs, mins)/** * X86_MATCH_VENDOR_FAM_MODEL_STEPPINGS_FEATURE - Base macro for CPU matching
@@ -79,6 +82,7 @@ .model = _model, \ .steppings = _steppings, \ .feature = _feature, \ + .flags = X86_CPU_ID_FLAG_ENTRY_VALID, \ .driver_data = (unsigned long) _data \ }
@@ -89,6 +93,7 @@ .model = _model, \ .steppings = _steppings, \ .feature = _feature, \ + .flags = X86_CPU_ID_FLAG_ENTRY_VALID, \ .driver_data = (unsigned long) _data \ }
arch/x86/kernel/cpu/match.c +1 -3
@@ -39,9 +39,7 @@ const struct x86_cpu_id *x86_match_cpu(const struct x86_cpu_id *match)const struct x86_cpu_id *m;struct cpuinfo_x86 *c = &boot_cpu_data; -for (m = match; - m->vendor | m->family | m->model | m->steppings | m->feature; - m++) { +for (m = match; m->flags &X86_CPU_ID_FLAG_ENTRY_VALID ; m++) {if (m->vendor !=X86_VENDOR_ANY && c->x86_vendor != m->vendor)continue ;if (m->family !=X86_FAMILY_ANY && c->x86 != m->family)
include/linux/mod_devicetable.h +2 -0
@@ -690,6 +690,8 @@ struct x86_cpu_id {__u16 model;__u16 steppings;__u16 feature;/* bit index */ +/* Solely for kernel-internal use: DO NOT EXPORT to userspace! */ +__u16 flags;kernel_ulong_t driver_data; };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 181/192 riscv: Dont use PGD entries for the linear mapping
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexandre Ghiti <[email protected]>
[ Upstream commit 629db01c64ff6cea08fc61b52426362689ef8618 ]
Propagating changes at this level is cumbersome as we need to go through all the page tables when that happens (either when changing the permissions or when splitting the mapping).
Note that this prevents the use of 4MB mapping for sv32 and 1GB mapping for sv39 in the linear mapping.
Stable-dep-of: c67ddf59ac44 ("riscv: force PAGE_SIZE linear mapping if debug_pagealloc is enabled")
--- arch/riscv/mm/init.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
arch/riscv/mm/init.c +6 -6
@@ -668,16 +668,16 @@ void __init create_pgd_mapping(pgd_t *pgdp,static uintptr_t __init best_map_size (phys_addr_t pa,uintptr_t va,phys_addr_t size) { -if (!(pa & (PGDIR_SIZE -1 )) && !(va & (PGDIR_SIZE -1 )) && size >=PGDIR_SIZE ) -return PGDIR_SIZE ; - -if (!(pa & (P4D_SIZE -1 )) && !(va & (P4D_SIZE -1 )) && size >=P4D_SIZE ) +if (pgtable_l5_enabled && + !(pa & (P4D_SIZE -1 )) && !(va & (P4D_SIZE -1 )) && size >=P4D_SIZE )return P4D_SIZE ; -if (!(pa & (PUD_SIZE -1 )) && !(va & (PUD_SIZE -1 )) && size >=PUD_SIZE ) +if (pgtable_l4_enabled && + !(pa & (PUD_SIZE -1 )) && !(va & (PUD_SIZE -1 )) && size >=PUD_SIZE )return PUD_SIZE ; -if (!(pa & (PMD_SIZE -1 )) && !(va & (PMD_SIZE -1 )) && size >=PMD_SIZE ) +if (IS_ENABLED (CONFIG_64BIT ) && + !(pa & (PMD_SIZE -1 )) && !(va & (PMD_SIZE -1 )) && size >=PMD_SIZE )return PMD_SIZE ;return PAGE_SIZE ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 182/192 riscv: force PAGE_SIZE linear mapping if debug_pagealloc is enabled
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nam Cao <[email protected]>
[ Upstream commit c67ddf59ac44adc60649730bf8347e37c516b001 ]
debug_pagealloc is a debug feature which clears the valid bit in page table entry for freed pages to detect illegal accesses to freed memory.
For this feature to work, virtual mapping must have PAGE_SIZE resolution. (No, we cannot map with huge pages and split them only when needed; because pages can be allocated/freed in atomic context and page splitting cannot be done in atomic context)
Force linear mapping to use small pages if debug_pagealloc is enabled.
Note that it is not necessary to force the entire linear mapping, but only those that are given to memory allocator. Some parts of memory can keep using huge page mapping (for example, kernel's executable code). But these parts are minority, so keep it simple. This is just a debug feature, some extra overhead should be acceptable.
--- arch/riscv/mm/init.c | 3 +++ 1 file changed, 3 insertions(+)
arch/riscv/mm/init.c +3 -0
@@ -668,6 +668,9 @@ void __init create_pgd_mapping(pgd_t *pgdp,static uintptr_t __init best_map_size (phys_addr_t pa,uintptr_t va,phys_addr_t size) { +if (debug_pagealloc_enabled ()) +return PAGE_SIZE ; +if (pgtable_l5_enabled && !(pa & (P4D_SIZE -1 )) && !(va & (P4D_SIZE -1 )) && size >=P4D_SIZE )return P4D_SIZE ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 183/192 vgacon: rework screen_info #ifdef checks
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <[email protected]>
[ Upstream commit 8a736ddfc861b2a217c935c2f461a8004add8247 ]
On non-x86 architectures, the screen_info variable is generally only used for the VGA console where supported, and in some cases the EFI framebuffer or vga16fb.
Now that we have a definite list of which architectures actually use it for what, use consistent #ifdef checks so the global variable is only defined when it is actually used on those architectures.
Loongarch and riscv have no support for vgacon or vga16fb, but they support EFI firmware, so only that needs to be checked, and the initialization can be removed because that is handled by EFI. IA64 has both vgacon and EFI, though EFI apparently never uses a framebuffer here.
Stable-dep-of: beb2800074c1 ("LoongArch: Fix entry point in kernel image header")
--- arch/alpha/kernel/setup.c | 2 ++ arch/alpha/kernel/sys_sio.c | 2 ++ arch/ia64/kernel/setup.c | 6 ++++++ arch/loongarch/kernel/setup.c | 2 ++ arch/mips/kernel/setup.c | 2 +- arch/mips/sibyte/swarm/setup.c | 2 +- arch/mips/sni/setup.c | 2 +- arch/riscv/kernel/setup.c | 11 ++--------- 8 files changed, 17 insertions(+), 12 deletions(-)
arch/alpha/kernel/setup.c +2 -0
@@ -131,6 +131,7 @@ static void determine_cpu_caches (unsigned int);static char __initdata command_line[COMMAND_LINE_SIZE ]; +#ifdef CONFIG_VGA_CONSOLE /* * The format of "screen_info" is strange, and due to early * i386-setup code. This is just enough to make the console
@@ -147,6 +148,7 @@ struct screen_info screen_info = { };EXPORT_SYMBOL (screen_info); +#endif /* * The direct map I/O window, if any. This should be the same
arch/alpha/kernel/sys_sio.c +2 -0
@@ -57,11 +57,13 @@ sio_init_irq(void)static inline void __init alphabook1_init_arch (void ) { +#ifdef CONFIG_VGA_CONSOLE /* The AlphaBook1 has LCD video fixed at 800x600, 37 rows and 100 cols. */ screen_info.orig_y =37 ; screen_info.orig_video_cols =100 ; screen_info.orig_video_lines =37 ; +#endif lca_init_arch (); }
arch/ia64/kernel/setup.c +6 -0
@@ -86,9 +86,13 @@ EXPORT_SYMBOL(local_per_cpu_offset);#endif unsigned long ia64_cycles_per_usec;struct ia64_boot_param *ia64_boot_param; +#if defined(CONFIG_VGA_CONSOLE ) || defined(CONFIG_EFI )struct screen_info screen_info; +#endif +#ifdef CONFIG_VGA_CONSOLE unsigned long vga_console_iobase;unsigned long vga_console_membase; +#endif static struct resource data_resource = { .name ="Kernel data" ,
@@ -497,6 +501,7 @@ early_console_setup (char *cmdline)static void __init screen_info_setup (void ) { +#ifdef CONFIG_VGA_CONSOLE unsigned int orig_x, orig_y, num_cols, num_rows, font_height;memset (&screen_info,0 ,sizeof (screen_info));
@@ -525,6 +530,7 @@ screen_info_setup(void) screen_info.orig_video_mode =3 ;/* XXX fake */ screen_info.orig_video_isVGA =1 ;/* XXX fake */ screen_info.orig_video_ega_bx =3 ;/* XXX fake */ +#endif } static inline void
arch/loongarch/kernel/setup.c +2 -0
@@ -57,7 +57,9 @@#define SMBIOS_CORE_PACKAGE_OFFSET 0x23#define LOONGSON_EFI_ENABLE (1 << 3) +#ifdef CONFIG_EFI struct screen_info screen_info __section(".data"); +#endif unsigned long fw_arg0, fw_arg1, fw_arg2; DEFINE_PER_CPU(unsigned long, kernelsp);
arch/mips/kernel/setup.c +1 -1
@@ -54,7 +54,7 @@ struct cpuinfo_mips cpu_data[NR_CPUS] __read_mostly;EXPORT_SYMBOL (cpu_data); -#ifdef CONFIG_VT +#ifdef CONFIG_VGA_CONSOLE struct screen_info screen_info;#endif
arch/mips/sibyte/swarm/setup.c +1 -1
@@ -129,7 +129,7 @@ void __init plat_mem_setup(void)if (m41t81_probe ()) swarm_rtc_type =RTC_M41T81 ; -#ifdef CONFIG_VT +#ifdef CONFIG_VGA_CONSOLE screen_info = (struct screen_info ) { .orig_video_page =52 , .orig_video_mode = 3,
arch/mips/sni/setup.c +1 -1
@@ -38,7 +38,7 @@ extern void sni_machine_power_off(void);static void __init sni_display_setup (void ) { -#if defined(CONFIG_VT ) && defined(CONFIG_VGA_CONSOLE ) && defined(CONFIG_FW_ARC ) +#if defined(CONFIG_VGA_CONSOLE ) && defined(CONFIG_FW_ARC )struct screen_info *si = &screen_info;DISPLAY_STATUS *di;
arch/riscv/kernel/setup.c +2 -9
@@ -40,15 +40,8 @@#include "head.h" -#if defined(CONFIG_DUMMY_CONSOLE ) || defined(CONFIG_EFI ) -struct screen_info screen_info __section(".data") = { - .orig_video_lines = 30, - .orig_video_cols = 80, - .orig_video_mode = 0, - .orig_video_ega_bx = 0, - .orig_video_isVGA = 1, - .orig_video_points =8 -}; +#if defined(CONFIG_EFI ) +struct screen_info screen_info __section(".data");#endif /*
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 184/192 efi: move screen_info into efi init code
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <[email protected]>
[ Upstream commit b8466fe82b79215b9ae28623a87c9a937ebd4f80 ]
After the vga console no longer relies on global screen_info, there are only two remaining use cases:
- on the x86 architecture, it is used for multiple boot methods (bzImage, EFI, Xen, kexec) to commucate the initial VGA or framebuffer settings to a number of device drivers.
- on other architectures, it is only used as part of the EFI stub, and only for the three sysfb framebuffers (simpledrm, simplefb, efifb).
Remove the duplicate data structure definitions by moving it into the efi-init.c file that sets it up initially for the EFI case, leaving x86 as an exception that retains its own definition for non-EFI boots.
The added #ifdefs here are optional, I added them to further limit the reach of screen_info to configurations that have at least one of the users enabled.
Stable-dep-of: beb2800074c1 ("LoongArch: Fix entry point in kernel image header")
--- arch/arm64/kernel/efi.c | 4 ---- arch/arm64/kernel/image-vars.h | 2 ++ arch/loongarch/kernel/efi.c | 8 +++++++- arch/loongarch/kernel/image-vars.h | 2 ++ arch/loongarch/kernel/setup.c | 5 ----- arch/riscv/kernel/image-vars.h | 2 ++ arch/riscv/kernel/setup.c | 5 ----- drivers/firmware/efi/efi-init.c | 14 +++++++++++++- drivers/firmware/efi/libstub/efi-stub-entry.c | 8 +++++++- 9 files changed, 33 insertions(+), 17 deletions(-)
arch/arm64/kernel/efi.c +0 -4
@@ -71,10 +71,6 @@ static __init pteval_t create_mapping_protection(efi_memory_desc_t *md)return pgprot_val (PAGE_KERNEL_EXEC ); } -/* we will fill this structure from the stub, so don't put it in .bss */ -struct screen_info screen_info __section(".data"); -EXPORT_SYMBOL (screen_info); -int __init efi_create_mapping (struct mm_struct *mm,efi_memory_desc_t *md) {pteval_t prot_val =create_mapping_protection (md);
arch/arm64/kernel/image-vars.h +2 -0
@@ -27,7 +27,9 @@ PROVIDE(__efistub__text = _text);PROVIDE (__efistub__end = _end);PROVIDE (__efistub___inittext_end = __inittext_end);PROVIDE (__efistub__edata = _edata); +#if defined(CONFIG_EFI_EARLYCON ) || defined(CONFIG_SYSFB )PROVIDE (__efistub_screen_info = screen_info); +#endif PROVIDE (__efistub__ctype = _ctype);PROVIDE (__pi___memcpy = __pi_memcpy);
arch/loongarch/kernel/efi.c +7 -1
@@ -68,6 +68,11 @@ void __init efi_runtime_init(void)unsigned long __initdata screen_info_table =EFI_INVALID_TABLE_ADDR ; +#if defined(CONFIG_SYSFB ) || defined(CONFIG_EFI_EARLYCON ) +struct screen_info screen_info __section(".data"); +EXPORT_SYMBOL_GPL (screen_info); +#endif +static void __init init_screen_info (void ) {struct screen_info *si;
@@ -115,7 +120,8 @@ void __init efi_init(void)set_bit (EFI_CONFIG_TABLES , &efi.flags); -init_screen_info (); +if (IS_ENABLED (CONFIG_EFI_EARLYCON ) ||IS_ENABLED (CONFIG_SYSFB )) +init_screen_info ();if (boot_memmap ==EFI_INVALID_TABLE_ADDR )return ;
arch/loongarch/kernel/image-vars.h +2 -0
@@ -12,7 +12,9 @@ __efistub_kernel_entry = kernel_entry; __efistub_kernel_asize = kernel_asize; __efistub_kernel_fsize = kernel_fsize; __efistub_kernel_offset = kernel_offset; +#if defined(CONFIG_EFI_EARLYCON ) || defined(CONFIG_SYSFB ) __efistub_screen_info = screen_info; +#endif #endif
arch/loongarch/kernel/setup.c +0 -5
@@ -16,7 +16,6 @@#include <linux/dmi.h> #include <linux/efi.h> #include <linux/export.h> -#include <linux/screen_info.h> #include <linux/memblock.h> #include <linux/initrd.h> #include <linux/ioport.h>
@@ -57,10 +56,6 @@#define SMBIOS_CORE_PACKAGE_OFFSET 0x23#define LOONGSON_EFI_ENABLE (1 << 3) -#ifdef CONFIG_EFI -struct screen_info screen_info __section(".data"); -#endif -unsigned long fw_arg0, fw_arg1, fw_arg2; DEFINE_PER_CPU(unsigned long, kernelsp);struct cpuinfo_loongarch cpu_data[NR_CPUS ]__read_mostly ;
arch/riscv/kernel/image-vars.h +2 -0
@@ -28,7 +28,9 @@ __efistub__start_kernel = _start_kernel; __efistub__end = _end; __efistub__edata = _edata; __efistub___init_text_end = __init_text_end; +#if defined(CONFIG_EFI_EARLYCON ) || defined(CONFIG_SYSFB ) __efistub_screen_info = screen_info; +#endif #endif
arch/riscv/kernel/setup.c +0 -5
@@ -15,7 +15,6 @@#include <linux/memblock.h> #include <linux/sched.h> #include <linux/console.h> -#include <linux/screen_info.h> #include <linux/of_fdt.h> #include <linux/sched/task.h> #include <linux/smp.h>
@@ -40,10 +39,6 @@#include "head.h" -#if defined(CONFIG_EFI ) -struct screen_info screen_info __section(".data"); -#endif -/* * The lucky hart to first increment this variable will boot the other cores. * This is used before the kernel initializes the BSS so it can't be in the
drivers/firmware/efi/efi-init.c +13 -1
@@ -55,6 +55,15 @@ static phys_addr_t __init efi_to_phys(unsigned long addr)extern __weak const efi_config_table_type_t efi_arch_tables[]; +/* +* x86 defines its own screen_info and uses it even without EFI, +* everything else can get it from here. +*/ +#if !defined(CONFIG_X86 ) && (defined(CONFIG_SYSFB ) || defined(CONFIG_EFI_EARLYCON )) +struct screen_info screen_info __section(".data"); +EXPORT_SYMBOL_GPL (screen_info); +#endif +static void __init init_screen_info (void ) {struct screen_info *si;
@@ -241,5 +250,8 @@ void __init efi_init(void)memblock_reserve (data.phys_map &PAGE_MASK ,PAGE_ALIGN (data.size + (data.phys_map & ~PAGE_MASK ))); -init_screen_info (); +if (IS_ENABLED (CONFIG_X86 ) || +IS_ENABLED (CONFIG_SYSFB ) || +IS_ENABLED (CONFIG_EFI_EARLYCON )) +init_screen_info (); }
drivers/firmware/efi/libstub/efi-stub-entry.c +7 -1
@@ -13,7 +13,13 @@ struct screen_info *alloc_screen_info(void) {if (IS_ENABLED (CONFIG_ARM ))return __alloc_screen_info (); -return (void *)&screen_info + screen_info_offset; + +if (IS_ENABLED (CONFIG_X86 ) || +IS_ENABLED (CONFIG_EFI_EARLYCON ) || +IS_ENABLED (CONFIG_SYSFB )) +return (void *)&screen_info + screen_info_offset; + +return NULL ; }/*
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 185/192 efi/loongarch: Directly position the loaded image file
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wang Yao <[email protected]>
[ Upstream commit 174a0c565cea74a7811ff79fbee1b70247570ade ]
The use of the 'kernel_offset' variable to position the image file that has been loaded by UEFI or GRUB is unnecessary, because we can directly position the loaded image file through using the image_base field of the efi_loaded_image struct provided by UEFI.
Replace kernel_offset with image_base to position the image file that has been loaded by UEFI or GRUB.
Stable-dep-of: beb2800074c1 ("LoongArch: Fix entry point in kernel image header")
--- arch/loongarch/include/asm/efi.h | 2 -- arch/loongarch/kernel/head.S | 1 - arch/loongarch/kernel/image-vars.h | 1 - arch/loongarch/kernel/vmlinux.lds.S | 1 - drivers/firmware/efi/libstub/loongarch-stub.c | 9 +++++---- drivers/firmware/efi/libstub/loongarch-stub.h | 4 ++++ drivers/firmware/efi/libstub/loongarch.c | 6 ++++-- 7 files changed, 13 insertions(+), 11 deletions(-) create mode 100644 drivers/firmware/efi/libstub/loongarch-stub.h
arch/loongarch/include/asm/efi.h +0 -2
@@ -32,6 +32,4 @@ static inline unsigned long efi_get_kimg_min_align(void)#define EFI_KIMG_PREFERRED_ADDRESS PHYSADDR(VMLINUX_LOAD_ADDRESS) -unsigned long kernel_entry_address (unsigned long kernel_addr); -#endif /* _ASM_LOONGARCH_EFI_H */
arch/loongarch/kernel/head.S +0 -1
@@ -34,7 +34,6 @@ pe_header: SYM_DATA(kernel_asize, .long _kernel_asize); SYM_DATA(kernel_fsize, .long _kernel_fsize); -SYM_DATA(kernel_offset, .long _kernel_offset); #endif
arch/loongarch/kernel/image-vars.h +0 -1
@@ -11,7 +11,6 @@ __efistub_strcmp = strcmp; __efistub_kernel_entry = kernel_entry; __efistub_kernel_asize = kernel_asize; __efistub_kernel_fsize = kernel_fsize; -__efistub_kernel_offset = kernel_offset;#if defined(CONFIG_EFI_EARLYCON ) || defined(CONFIG_SYSFB ) __efistub_screen_info = screen_info;#endif
arch/loongarch/kernel/vmlinux.lds.S +0 -1
@@ -143,7 +143,6 @@ SECTIONS _kernel_fsize = _edata - _text; _kernel_vsize = _end - __initdata_begin; _kernel_rsize = _edata - __initdata_begin; - _kernel_offset = kernel_offset - _text; #endif .gptab.sdata : {
drivers/firmware/efi/libstub/loongarch-stub.c +5 -4
@@ -8,10 +8,10 @@#include <asm/efi.h> #include <asm/addrspace.h> #include "efistub.h" +#include "loongarch-stub.h" extern int kernel_asize;extern int kernel_fsize; -extern int kernel_offset;extern int kernel_entry; efi_status_t handle_kernel_image(unsigned long *image_addr,
@@ -24,7 +24,7 @@ efi_status_t handle_kernel_image(unsigned long *image_addr,efi_status_t status;unsigned long kernel_addr =0 ; - kernel_addr = (unsigned long )&kernel_offset - kernel_offset; + kernel_addr = (unsigned long )image->image_base; status =efi_relocate_kernel (&kernel_addr, kernel_fsize, kernel_asize,EFI_KIMG_PREFERRED_ADDRESS ,efi_get_kimg_min_align (),0x0 );
@@ -35,9 +35,10 @@ efi_status_t handle_kernel_image(unsigned long *image_addr,return status; } -unsigned long kernel_entry_address (unsigned long kernel_addr) +unsigned long kernel_entry_address (unsigned long kernel_addr, +efi_loaded_image_t *image) { -unsigned long base = (unsigned long )&kernel_offset - kernel_offset; +unsigned long base = (unsigned long )image->image_base;return (unsigned long )&kernel_entry - base + kernel_addr; }
drivers/firmware/efi/libstub/loongarch-stub.h new file +4 -0
@@ -0,0 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +unsigned long kernel_entry_address (unsigned long kernel_addr, +efi_loaded_image_t *image);
drivers/firmware/efi/libstub/loongarch.c +4 -2
@@ -8,6 +8,7 @@#include <asm/efi.h> #include <asm/addrspace.h> #include "efistub.h" +#include "loongarch-stub.h" typedef void __noreturn (*kernel_entry_t )(bool efi,unsigned long cmdline,unsigned long systab);
@@ -37,7 +38,8 @@ static efi_status_t exit_boot_func(struct efi_boot_memmap *map, void *priv)return EFI_SUCCESS ; } -unsigned long __weak kernel_entry_address (unsigned long kernel_addr) +unsigned long __weak kernel_entry_address (unsigned long kernel_addr, +efi_loaded_image_t *image) {return *(unsigned long *)(kernel_addr +8 ) -VMLINUX_LOAD_ADDRESS + kernel_addr; }
@@ -73,7 +75,7 @@ efi_status_t efi_boot_kernel(void *handle, efi_loaded_image_t *image,csr_write64 (CSR_DMW0_INIT ,LOONGARCH_CSR_DMWIN0 );csr_write64 (CSR_DMW1_INIT ,LOONGARCH_CSR_DMWIN1 ); - real_kernel_entry = (void *)kernel_entry_address (kernel_addr); + real_kernel_entry = (void *)kernel_entry_address (kernel_addr, image);real_kernel_entry (true, (unsigned long )cmdline_ptr, (unsigned long )efi_system_table);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 186/192 LoongArch: Fix entry point in kernel image header
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiaxun Yang <[email protected]>
[ Upstream commit beb2800074c15362cf9f6c7301120910046d6556 ]
Currently kernel entry in head.S is in DMW address range, firmware is instructed to jump to this address after loading the kernel image.
However kernel should not make any assumption on firmware's DMW setting, thus the entry point should be a physical address falls into direct translation region.
Fix by converting entry address to physical and amend entry calculation logic in libstub accordingly.
BTW, use ABSOLUTE() to calculate variables to make Clang/LLVM happy.
--- arch/loongarch/kernel/head.S | 2 +- arch/loongarch/kernel/vmlinux.lds.S | 10 ++++++---- drivers/firmware/efi/libstub/loongarch.c | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-)
arch/loongarch/kernel/head.S +1 -1
@@ -22,7 +22,7 @@ _head: .word MZ_MAGIC /* "MZ", MS-DOS header */ .org 0x8 - .dword kernel_entry /* Kernel entry point */ + .dword _kernel_entry /* Kernel entry point (physical address) */ .dword _kernel_asize /* Kernel image effective size */ .quad PHYS_LINK_KADDR /* Kernel image load offset from start of RAM */ .org 0x38 /* 0x20 ~ 0x37 reserved */
arch/loongarch/kernel/vmlinux.lds.S +6 -4
@@ -5,6 +5,7 @@ #define PAGE_SIZE _PAGE_SIZE #define RO_EXCEPTION_TABLE_ALIGN 4 +#define PHYSADDR_MASK 0xffffffffffff /* 48-bit */ /* * Put .bss..swapper_pg_dir as the first thing in .bss. This will
@@ -139,10 +140,11 @@ SECTIONS #ifdef CONFIG_EFI_STUB /* header symbols */ - _kernel_asize = _end - _text; - _kernel_fsize = _edata - _text; - _kernel_vsize = _end - __initdata_begin; - _kernel_rsize = _edata - __initdata_begin; + _kernel_entry = ABSOLUTE(kernel_entry & PHYSADDR_MASK); + _kernel_asize = ABSOLUTE(_end - _text); + _kernel_fsize = ABSOLUTE(_edata - _text); + _kernel_vsize = ABSOLUTE(_end - __initdata_begin); + _kernel_rsize = ABSOLUTE(_edata - __initdata_begin); #endif .gptab.sdata : {
drivers/firmware/efi/libstub/loongarch.c +1 -1
@@ -41,7 +41,7 @@ static efi_status_t exit_boot_func(struct efi_boot_memmap *map, void *priv)unsigned long __weak kernel_entry_address (unsigned long kernel_addr,efi_loaded_image_t *image) { -return *(unsigned long *)(kernel_addr +8 ) -VMLINUX_LOAD_ADDRESS + kernel_addr; +return *(unsigned long *)(kernel_addr +8 ) -PHYSADDR (VMLINUX_LOAD_ADDRESS ) + kernel_addr; } efi_status_t efi_boot_kernel(void *handle, efi_loaded_image_t *image,
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 187/192 drm/amd/display: revert Exit idle optimizations before HDCP execution
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Martin Leung <[email protected]>
commit f2703a3596a279b0be6eeed4c500bdbaa8dc3ce4 upstream.
why and how:
causes black screen on PNP on DCN 3.5
This reverts commit f30a3bea92bd ("drm/amd/display: Exit idle optimizations before HDCP execution")
--- drivers/gpu/drm/amd/display/modules/hdcp/hdcp.c | 10 ---------- drivers/gpu/drm/amd/display/modules/inc/mod_hdcp.h | 8 -------- 2 files changed, 18 deletions(-)
drivers/gpu/drm/amd/display/modules/hdcp/hdcp.c +0 -10
@@ -88,14 +88,6 @@ static uint8_t is_cp_desired_hdcp2(struc !hdcp->connection.is_hdcp2_revoked; } -static void exit_idle_optimizations (struct mod_hdcp *hdcp) -{ -struct mod_hdcp_dm *dm = &hdcp->config.dm; - -if (dm->funcs.exit_idle_optimizations) - dm->funcs.exit_idle_optimizations (dm->handle); -} -static enum mod_hdcp_status execution (struct mod_hdcp *hdcp,struct mod_hdcp_event_context *event_ctx,union mod_hdcp_transition_input *input)
@@ -551,8 +543,6 @@ enum mod_hdcp_status mod_hdcp_process_evmemset (&event_ctx,0 ,sizeof (struct mod_hdcp_event_context )); event_ctx.event = event; -exit_idle_optimizations (hdcp); -/* execute and transition */ exec_status =execution (hdcp, &event_ctx, &hdcp->auth.trans_input); trans_status = transition(
drivers/gpu/drm/amd/display/modules/inc/mod_hdcp.h +0 -8
@@ -156,13 +156,6 @@ struct mod_hdcp_ddc { } funcs; }; -struct mod_hdcp_dm { -void *handle; -struct { -void (*exit_idle_optimizations)(void *handle); - } funcs; -}; -struct mod_hdcp_psp {void *handle;void *funcs;
@@ -279,7 +272,6 @@ struct mod_hdcp_display_query {struct mod_hdcp_config {struct mod_hdcp_psp psp;struct mod_hdcp_ddc ddc; -struct mod_hdcp_dm dm;uint8_t index; };
Greg Kroah-Hartman
maintainerPATCH 188/192 ASoC: Intel: sof-sdw: really remove FOUR_SPEAKER quirk
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pierre-Louis Bossart <[email protected]>
commit 0bab4cfd7c1560095e29919e2ebe01783b9096dc upstream.
Two independent GitHub PRs let to the addition of one quirk after it was removed..
--- sound/soc/intel/boards/sof_sdw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/intel/boards/sof_sdw.c +1 -2
@@ -443,8 +443,7 @@ static const struct dmi_system_id sof_sdDMI_EXACT_MATCH (DMI_PRODUCT_SKU ,"0C0F" ) }, .driver_data = (void *)(SOF_SDW_TGL_HDMI | -RT711_JD2 | - SOF_SDW_FOUR_SPK), + RT711_JD2), }, { .callback = sof_sdw_quirk_cb,
Greg Kroah-Hartman
maintainerPATCH 189/192 net/sched: unregister lockdep keys in qdisc_create/qdisc_alloc error path
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Davide Caratti <[email protected]>
commit 86735b57c905e775f05de995df35379366b72168 upstream.
Naresh and Eric report several errors (corrupted elements in the dynamic key hash list), when running tdc.py or syzbot. The error path of qdisc_alloc() and qdisc_create() frees the qdisc memory, but it forgets to unregister the lockdep key, thus causing use-after-free like the following one:
==================================================================
BUG: KASAN: slab-use-after-free in lockdep_register_key+0x5f2/0x700 Read of size 8 at addr ffff88811236f2a8 by task ip/7925 CPU: 26 PID: 7925 Comm: ip Kdump: loaded Not tainted 6.9.0-rc2+ #648 Hardware name: Supermicro SYS-6027R-72RF/X9DRH-7TF/7F/iTF/iF, BIOS 3.0 07/26/2013 Call Trace: <TASK> dump_stack_lvl+0x7c/0xc0 print_report+0xc9/0x610 kasan_report+0x89/0xc0 lockdep_register_key+0x5f2/0x700 qdisc_alloc+0x21d/0xb60 qdisc_create_dflt+0x63/0x3c0 attach_one_default_qdisc.constprop.37+0x8e/0x170 dev_activate+0x4bd/0xc30 __dev_open+0x275/0x380 __dev_change_flags+0x3f1/0x570 dev_change_flags+0x7c/0x160 do_setlink+0x1ea1/0x34b0 __rtnl_newlink+0x8c9/0x1510 rtnl_newlink+0x61/0x90 rtnetlink_rcv_msg+0x2f0/0xbc0 netlink_rcv_skb+0x120/0x380 netlink_unicast+0x420/0x630 netlink_sendmsg+0x732/0xbc0 __sock_sendmsg+0x1ea/0x280 ____sys_sendmsg+0x5a9/0x990 ___sys_sendmsg+0xf1/0x180 __sys_sendmsg+0xd3/0x180 do_syscall_64+0x96/0x180 entry_SYSCALL_64_after_hwframe+0x71/0x79 RIP: 0033:0x7f9503f4fa07 Code: 0a 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b9 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 89 54 24 1c 48 89 74 24 10 RSP: 002b:00007fff6c729068 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000006630c681 RCX: 00007f9503f4fa07 RDX: 0000000000000000 RSI: 00007fff6c7290d0 RDI: 0000000000000003 RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000078 R10: 000000000000009b R11: 0000000000000246 R12: 0000000000000001 R13: 00007fff6c729180 R14: 0000000000000000 R15: 000055bf67dd9040 </TASK> Allocated by task 7745: kasan_save_stack+0x1c/0x40 kasan_save_track+0x10/0x30 __kasan_kmalloc+0x7b/0x90 __kmalloc_node+0x1ff/0x460 qdisc_alloc+0xae/0xb60 qdisc_create+0xdd/0xfb0 tc_modify_qdisc+0x37e/0x1960 rtnetlink_rcv_msg+0x2f0/0xbc0 netlink_rcv_skb+0x120/0x380 netlink_unicast+0x420/0x630 netlink_sendmsg+0x732/0xbc0 __sock_sendmsg+0x1ea/0x280 ____sys_sendmsg+0x5a9/0x990 ___sys_sendmsg+0xf1/0x180 __sys_sendmsg+0xd3/0x180 do_syscall_64+0x96/0x180 entry_SYSCALL_64_after_hwframe+0x71/0x79 Freed by task 7745: kasan_save_stack+0x1c/0x40 kasan_save_track+0x10/0x30 kasan_save_free_info+0x36/0x60 __kasan_slab_free+0xfe/0x180 kfree+0x113/0x380 qdisc_create+0xafb/0xfb0 tc_modify_qdisc+0x37e/0x1960 rtnetlink_rcv_msg+0x2f0/0xbc0 netlink_rcv_skb+0x120/0x380 netlink_unicast+0x420/0x630 netlink_sendmsg+0x732/0xbc0 __sock_sendmsg+0x1ea/0x280 ____sys_sendmsg+0x5a9/0x990 ___sys_sendmsg+0xf1/0x180 __sys_sendmsg+0xd3/0x180 do_syscall_64+0x96/0x180 entry_SYSCALL_64_after_hwframe+0x71/0x79
Fix this ensuring that lockdep_unregister_key() is called before the qdisc struct is freed, also in the error path of qdisc_create() and qdisc_alloc().
--- net/sched/sch_api.c | 1 + net/sched/sch_generic.c | 1 + 2 files changed, 2 insertions(+)
net/sched/sch_api.c +1 -0
@@ -1360,6 +1360,7 @@ err_out4: ops->destroy (sch);qdisc_put_stab (rtnl_dereference (sch->stab)); err_out3: +lockdep_unregister_key (&sch->root_lock_key);netdev_put (dev, &sch->dev_tracker);qdisc_free (sch); err_out2:
net/sched/sch_generic.c +1 -0
@@ -978,6 +978,7 @@ struct Qdisc *qdisc_alloc(struct netdev_return sch; errout1: +lockdep_unregister_key (&sch->root_lock_key);kfree (sch); errout:return ERR_PTR (err);
Greg Kroah-Hartman
maintainerPATCH 190/192 kprobe/ftrace: fix build error due to bad function definition
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Torvalds <[email protected]>
commit 4b377b4868ef17b040065bd468668c707d2477a5 upstream.
Commit 1a7d0890dd4a ("kprobe/ftrace: bail out if ftrace was killed") introduced a bad K&R function definition, which we haven't accepted in a long long time.
Gcc seems to let it slide, but clang notices with the appropriate error:
kernel/kprobes.c:1140:24: error: a function declaration without a prototype is deprecated in all >
1140 | void kprobe_ftrace_kill()
| ^
| voidbut this commit was apparently never in linux-next before it was sent upstream, so it didn't get the appropriate build test coverage.
--- kernel/kprobes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/kprobes.c +1 -1
@@ -1138,7 +1138,7 @@ static int disarm_kprobe_ftrace(struct k ipmodify ? &kprobe_ipmodify_enabled : &kprobe_ftrace_enabled); } -void kprobe_ftrace_kill () +void kprobe_ftrace_kill (void ) { kprobe_ftrace_disabled = true; }
Greg Kroah-Hartman
maintainerPATCH 191/192 hid: asus: asus_report_fixup: fix potential read out of bounds
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrew Ballance <[email protected]>
commit 89e1ee118d6f0ee6bd6e80d8fe08839875daa241 upstream.
syzbot reported a potential read out of bounds in asus_report_fixup.
this patch adds checks so that a read out of bounds will not occur
--- drivers/hid/hid-asus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/hid/hid-asus.c +2 -2
@@ -1235,8 +1235,8 @@ static __u8 *asus_report_fixup(struct hi }/* match many more n-key devices */ -if (drvdata->quirks &QUIRK_ROG_NKEY_KEYBOARD ) { -for (int i =0 ; i < *rsize +1 ; i++) { +if (drvdata->quirks &QUIRK_ROG_NKEY_KEYBOARD && *rsize >15 ) { +for (int i =0 ; i < *rsize -15 ; i++) {/* offset to the count from 0x5a report part always 14 */ if (rdesc[i] ==0x85 && rdesc[i +1 ] ==0x5a && rdesc[i +14 ] ==0x95 && rdesc[i +15 ] ==0x05 ) {
Greg Kroah-Hartman
maintainerPATCH 192/192 Revert "mm: mmap: allow for the maximum number of bits for randomizing mmap_base by default"
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Torvalds <[email protected]>
commit 14d7c92f8df9c0964ae6f8b813c1b3ac38120825 upstream.
This reverts commit 3afb76a66b5559a7b595155803ce23801558a7a9.
This was a wrongheaded workaround for an issue that had already been fixed much better by commit 4ef9ad19e176 ("mm: huge_memory: don't force huge page alignment on 32 bit").
Asking users questions at kernel compile time that they can't make sense of is not a viable strategy. And the fact that even the kernel VM maintainers apparently didn't catch that this "fix" is not a fix any more pretty much proves the point that people can't be expected to understand the implications of the question.
It may well be the case that we could improve things further, and that __thp_get_unmapped_area() should take the mapping randomization into account even for 64-bit kernels. Maybe we should not be so eager to use THP mappings.
But in no case should this be a kernel config option.
--- arch/Kconfig | 12 ------------ 1 file changed, 12 deletions(-)
arch/Kconfig +0 -12
@@ -1037,21 +1037,10 @@ config ARCH_MMAP_RND_BITS_MAX config ARCH_MMAP_RND_BITS_DEFAULT int -config FORCE_MAX_MMAP_RND_BITS - bool "Force maximum number of bits to use for ASLR of mmap base address" - default y if !64BIT - help - ARCH_MMAP_RND_BITS and ARCH_MMAP_RND_COMPAT_BITS represent the number - of bits to use for ASLR and if no custom value is assigned (EXPERT) - then the architecture's lower bound (minimum) value is assumed. - This toggle changes that default assumption to assume the arch upper - bound (maximum) value instead. - config ARCH_MMAP_RND_BITS int "Number of bits to use for ASLR of mmap base address" if EXPERT range ARCH_MMAP_RND_BITS_MIN ARCH_MMAP_RND_BITS_MAX default ARCH_MMAP_RND_BITS_DEFAULT if ARCH_MMAP_RND_BITS_DEFAULT - default ARCH_MMAP_RND_BITS_MAX if FORCE_MAX_MMAP_RND_BITS default ARCH_MMAP_RND_BITS_MIN depends on HAVE_ARCH_MMAP_RND_BITS help
@@ -1086,7 +1075,6 @@ config ARCH_MMAP_RND_COMPAT_BITS int "Number of bits to use for ASLR of mmap base address for compatible applications" if EXPERT range ARCH_MMAP_RND_COMPAT_BITS_MIN ARCH_MMAP_RND_COMPAT_BITS_MAX default ARCH_MMAP_RND_COMPAT_BITS_DEFAULT if ARCH_MMAP_RND_COMPAT_BITS_DEFAULT - default ARCH_MMAP_RND_COMPAT_BITS_MAX if FORCE_MAX_MMAP_RND_BITS default ARCH_MMAP_RND_COMPAT_BITS_MIN depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS help
A message that is not in the archive (sent off-list or not yet received): 2935400.2255.1719311647175.JavaMail.root@jt-retransmission-dep-5ccd6997dd-985ss
Re: [PATCH 6.6 100/192] netfilter: move the sysctl nf_hooks_lwtunnel into the netfilter core
Hi Greg,
This commit causes a compilation error when CONFIG_SYSFS is not enabled in config
I have sent a fix patch: https://lkml.org/lkml/2024/6/21/123
Quoted 202 lines · Greg Kroah-Hartman
6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jianguo Wu <[email protected]>
[ Upstream commit
a2225e0250c5fa397dcebf6ce65a9f05a114e0cf]Currently, the sysctl net.netfilter.nf_hooks_lwtunnel depends on the
nf_conntrackmodule, but thenf_conntrackmodule is not always loaded. Therefore, accessing net.netfilter.nf_hooks_lwtunnel may have an error.Move sysctl
nf_hooks_lwtunnelinto the netfilter core.Fixes 7a3f5b0de364 ("netfilter: add netfilter hooks to SRv6 data plane")Suggested-by Pablo Neira Ayuso <[email protected]>Signed-off-by Jianguo Wu <[email protected]>Signed-off-by Pablo Neira Ayuso <[email protected]>Signed-off-by Sasha Levin <[email protected]>--- include/net/netns/netfilter.h | 3 + net/netfilter/core.c | 13 +++++- net/netfilter/nf_conntrack_standalone.c | 15 ------- net/netfilter/nf_hooks_lwtunnel.c | 67 ++++++++++++++++++++++++++++++++ net/netfilter/nf_internals.h | 6 ++ 5 files changed, 87 insertions(+), 17 deletions(-)include/net/netns/netfilter.h +3
-0@@ -15,6 +15,9 @@ struct netns_nf {const struct nf_logger __rcu *nf_loggers[NFPROTO_NUMPROTO ];#ifdef CONFIG_SYSCTL struct ctl_table_header *nf_log_dir_header; +#ifdef CONFIG_LWTUNNEL +struct ctl_table_header *nf_lwtnl_dir_header; +#endif #endif struct nf_hook_entries __rcu *hooks_ipv4[NF_INET_NUMHOOKS ];struct nf_hook_entries __rcu *hooks_ipv6[NF_INET_NUMHOOKS ];net/netfilter/core.c +11
-2@@ -815,12 +815,21 @@ int __init netfilter_init(void)if (ret <0 ) goto err; +#ifdef CONFIG_LWTUNNEL + ret =netfilter_lwtunnel_init (); +if (ret <0 ) + goto err_lwtunnel_pernet; +#endif ret =netfilter_log_init ();if (ret <0 ) - goto err_pernet; + goto err_log_pernet;return 0 ; -err_pernet: +err_log_pernet: +#ifdef CONFIG_LWTUNNEL +netfilter_lwtunnel_fini (); +err_lwtunnel_pernet: +#endifunregister_pernet_subsys (&netfilter_net_ops); err:return ret;net/netfilter/nf_conntrack_standalone.c +0
-15@@ -22,9 +22,6 @@#include <net/netfilter/nf_conntrack_acct.h> #include <net/netfilter/nf_conntrack_zones.h> #include <net/netfilter/nf_conntrack_timestamp.h> -#ifdef CONFIG_LWTUNNEL -#include <net/netfilter/nf_hooks_lwtunnel.h> -#endif #include <linux/rculist_nulls.h> static bool enable_hooks__read_mostly ;@@ -612,9 +609,6 @@ enum nf_ct_sysctl_index {NF_SYSCTL_CT_PROTO_TIMEOUT_GRE ,NF_SYSCTL_CT_PROTO_TIMEOUT_GRE_STREAM , #endif -#ifdef CONFIG_LWTUNNEL -NF_SYSCTL_CT_LWTUNNEL , -#endif __NF_SYSCTL_CT_LAST_SYSCTL, };@@ -948,15 +942,6 @@ static struct ctl_table nf_ct_sysctl_tab .proc_handler = proc_dointvec_jiffies, },#endif -#ifdef CONFIG_LWTUNNEL - [NF_SYSCTL_CT_LWTUNNEL] = { - .procname = "nf_hooks_lwtunnel", - .data = NULL, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = nf_hooks_lwtunnel_sysctl_handler, - }, -#endif {} };net/netfilter/nf_hooks_lwtunnel.c +67
-0@@ -3,6 +3,9 @@#include <linux/sysctl.h> #include <net/lwtunnel.h> #include <net/netfilter/nf_hooks_lwtunnel.h> +#include <linux/netfilter.h> + +#include "nf_internals.h" static inline int nf_hooks_lwtunnel_get (void ) {@@ -50,4 +53,68 @@ int nf_hooks_lwtunnel_sysctl_handler(strreturn ret; }EXPORT_SYMBOL_GPL (nf_hooks_lwtunnel_sysctl_handler); + +static struct ctl_table nf_lwtunnel_sysctl_table[] = { + { + .procname ="nf_hooks_lwtunnel" , + .data =NULL , + .maxlen =sizeof (int ), + .mode =0644 , + .proc_handler = nf_hooks_lwtunnel_sysctl_handler, + }, +}; + +static int __net_init nf_lwtunnel_net_init (struct net *net) +{ +struct ctl_table_header *hdr; +struct ctl_table *table; + + table = nf_lwtunnel_sysctl_table; +if (!net_eq (net, &init_net)) { + table =kmemdup (nf_lwtunnel_sysctl_table, +sizeof (nf_lwtunnel_sysctl_table), +GFP_KERNEL ); +if (!table) + goto err_alloc; + } + + hdr =register_net_sysctl_sz (net,"net/netfilter" , table, +ARRAY_SIZE (nf_lwtunnel_sysctl_table)); +if (!hdr) + goto err_reg; + + net->nf.nf_lwtnl_dir_header = hdr; + +return 0 ; +err_reg: +if (!net_eq (net, &init_net)) +kfree (table); +err_alloc: +return -ENOMEM ; +} + +static void __net_exit nf_lwtunnel_net_exit(struct net *net) +{ +const struct ctl_table *table; + + table = net->nf.nf_lwtnl_dir_header->ctl_table_arg; +unregister_net_sysctl_table (net->nf.nf_lwtnl_dir_header); +if (!net_eq (net, &init_net)) +kfree (table); +} + +static struct pernet_operations nf_lwtunnel_net_ops = { + .init = nf_lwtunnel_net_init, + .exit = nf_lwtunnel_net_exit, +}; + +int __init netfilter_lwtunnel_init (void ) +{ +return register_pernet_subsys (&nf_lwtunnel_net_ops); +} + +void netfilter_lwtunnel_fini (void ) +{ +unregister_pernet_subsys (&nf_lwtunnel_net_ops); +}#endif /* CONFIG_SYSCTL */ net/netfilter/nf_internals.h +6
-0@@ -29,6 +29,12 @@ void nf_queue_nf_hook_drop(struct net *n/* nf_log.c */ int __init netfilter_log_init (void ); +#ifdef CONFIG_LWTUNNEL +/* nf_hooks_lwtunnel.c */ +int __init netfilter_lwtunnel_init (void ); +void netfilter_lwtunnel_fini (void ); +#endif +/* core.c */ void nf_hook_entries_delete_raw (struct nf_hook_entries __rcu **pp,const struct nf_hook_ops *reg);
Greg Kroah-Hartman
maintainerRe: [PATCH 6.6 100/192] netfilter: move the sysctl nf_hooks_lwtunnel into the netfilter core
Quoted 7 lines · wujianguo
Hi Greg,
This commit causes a compilation error when
CONFIG_SYSFSis not enabled in configI have sent a fix patch: https://lkml.org/lkml/2024/6/21/123
Please use lore.kernel.org for links.
Is this in Linus's tree yet?
thanks,
greg k-h
Re: [PATCH 6.6 100/192] netfilter: move the sysctl nf_hooks_lwtunnel into the netfilter core
Quoted 9 lines · Greg Kroah-Hartman
Quoted 7 lines · wujianguo
Hi Greg,
This commit causes a compilation error when
CONFIG_SYSFSis not enabled in configI have sent a fix patch: https://lkml.org/lkml/2024/6/21/123
Please use lore.kernel.org for links.
https://lore.kernel.org/lkml/[email protected]/
Quoted 2 lines
Is this in Linus's tree yet?
Not yet.
Quoted 5 lines
thanks,
greg k-h
Re: [PATCH 6.6 100/192] netfilter: move the sysctl nf_hooks_lwtunnel into the netfilter core
In reply to Greg Kroah-HartmanQuoted 4 lines · Greg Kroah-Hartman
Quoted 3 lines · wujianguo
Hi Greg,
Quoted 8 lines
Quoted 4 lines
This commit causes a compilation error when
CONFIG_SYSFSis not enabled in configI have sent a fix patch: https://lkml.org/lkml/2024/6/21/123
Please use lore.kernel.org for links.
Is this in Linus's tree yet?
Not yet. Estimation is that this incremental fix will be there by end of this week.
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.36 release. There are 192 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 Thu, 27 Jun 2024 08:54:55 +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.6.36-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
The arm builds are failing on stable-rc 6.6 branch due to following errors.
Build log:
--------
arm-linux-gnueabihf-ld: drivers/firmware/efi/efi-init.o: in function `.LANCHOR1':
efi-init.c:(.data+0x0): multiple definition of `screen_info'; arch/arm/kernel/setup.o:setup.c:(.data+0x12c): first defined here make[3]: *** [scripts/Makefile.vmlinux_o:62: vmlinux.o] Error 1
metadata:git_repo:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitgit_sha:580e509ea1348fc97897cf4052be03c248be6ab6git_short_log:580e509ea134 ("Linux 6.6.36-rc1")
Links:
- https://storage.tuxsuite.com/public/linaro/lkft/builds/2iMq0CHppQGxkVSsEPFtnw08bc6/
- https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.6.y/build/v6.6.35-193-g580e509ea134/testrun/24441308/suite/build/test/gcc-13-lkftconfig-debug/log
- https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.6.y/build/v6.6.35-193-g580e509ea134/testrun/24441308/suite/build/test/gcc-13-lkftconfig-debug/details/
--
Linaro LKFT
https://lkft.linaro.org
Quoted 26 lines · Naresh Kamboju
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.36 release. There are 192 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 Thu, 27 Jun 2024 08:54:55 +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.6.36-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
The arm builds are failing on stable-rc 6.6 branch due to following errors.
Quoted 7 lines
Build log:
--------
arm-linux-gnueabihf-ld:drivers/firmware/efi/efi-init.o: in function `.LANCHOR1':
efi-init.c:(.data+0x0): multiple definition of `screen_info'; arch/arm/kernel/setup.o:setup.c:(.data+0x12c): first defined here make[3]: *** [scripts/Makefile.vmlinux_o:62: vmlinux.o] Error 1
git bisect is pointing to this commit, [13cfc04b25c30b9fea2c953b7ed1c61de4c56c1f] efi: move screen_info into efi init code
Quoted 8 lines
metadata:
git_repo:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitgit_sha:580e509ea1348fc97897cf4052be03c248be6ab6git_short_log:580e509ea134("Linux 6.6.36-rc1")
Quoted 8 lines
Links:
- https://storage.tuxsuite.com/public/linaro/lkft/builds/2iMq0CHppQGxkVSsEPFtnw08bc6/
- https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.6.y/build/v6.6.35-193-g580e509ea134/testrun/24441308/suite/build/test/gcc-13-lkftconfig-debug/log
- https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.6.y/build/v6.6.35-193-g580e509ea134/testrun/24441308/suite/build/test/gcc-13-lkftconfig-debug/details/--
Linaro LKFT
https://lkft.linaro.org
- Naresh
Quoted 9 lines · Naresh Kamboju
Quoted 7 lines · Naresh Kamboju
On Tue, 25 Jun 2024 at 15:18, Greg Kroah-Hartman <[email protected]> wrote:
arm-linux-gnueabihf-ld:drivers/firmware/efi/efi-init.o: in function `.LANCHOR1':
efi-init.c:(.data+0x0): multiple definition of `screen_info'; arch/arm/kernel/setup.o:setup.c:(.data+0x12c): first defined here make[3]: *** [scripts/Makefile.vmlinux_o:62: vmlinux.o] Error 1
Quoted 3 lines
git bisect is pointing to this commit, [
13cfc04b25c30b9fea2c953b7ed1c61de4c56c1f] efi: movescreen_infointo efi init code
I think we should drop this patch: it's not a bugfix but was only pulled in as a dependency for another patch. The series was rather complicated to stage correctly, so keeping my screen_info patch would require pulling in more stuff.
Arnd
Greg Kroah-Hartman
maintainerQuoted 10 lines · Arnd Bergmann
Quoted 9 lines · Naresh Kamboju
Quoted 7 lines · Naresh Kamboju
On Tue, 25 Jun 2024 at 15:18, Greg Kroah-Hartman <[email protected]> wrote:
arm-linux-gnueabihf-ld:drivers/firmware/efi/efi-init.o: in function `.LANCHOR1':
efi-init.c:(.data+0x0): multiple definition of `screen_info'; arch/arm/kernel/setup.o:setup.c:(.data+0x12c): first defined here make[3]: *** [scripts/Makefile.vmlinux_o:62: vmlinux.o] Error 1
Quoted 8 lines
Quoted 3 lines
git bisect is pointing to this commit, [
13cfc04b25c30b9fea2c953b7ed1c61de4c56c1f] efi: movescreen_infointo efi init codeI think we should drop this patch: it's not a bugfix but was only pulled in as a dependency for another patch. The series was rather complicated to stage correctly, so keeping my
screen_infopatch would require pulling in more stuff.
Now dropped. I've fixed up the other patches that was pulled in here to not need this one, it was a simple one-line loongarch-only fix that should be fine now.
thanks,
greg k-h
Jon Hunter
maintainerQuoted 25 lines · Naresh Kamboju
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.36 release. There are 192 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 Thu, 27 Jun 2024 08:54:55 +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.6.36-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
The arm builds are failing on stable-rc 6.6 branch due to following errors.
Quoted 7 lines
Build log:
--------
arm-linux-gnueabihf-ld:drivers/firmware/efi/efi-init.o: in function `.LANCHOR1':
efi-init.c:(.data+0x0): multiple definition of `screen_info'; arch/arm/kernel/setup.o:setup.c:(.data+0x12c): first defined here make[3]: *** [scripts/Makefile.vmlinux_o:62: vmlinux.o] Error 1
I am seeing the same build issue for Linux 6.6.y.
Jon
Signature · 1 line
nvpublic
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.36 release. There are 192 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 Thu, 27 Jun 2024 08:54:55 +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.6.36-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.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
Am 25.06.2024 um 11:31 schrieb Greg Kroah-Hartman:
Quoted 4 lines
This is the start of the stable review cycle for the 6.6.36 release. There are 192 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.
Builds, boots and works fine w/o regressions on my 2-socket Ivy Bridge Xeon E5-2697 v2 server. Nothing unusual in dmesg output. Running 16 VMs in parallel for an hour now, and am starting to compile 6.9.7-rc1 which I will boot-test too. Everything works as smoothly as it gets with all CPUs at ~100%...
Beste Grüße,
Peter Schneider
Signature · 8 lines
Climb the mountain not to plant your flag, but to embrace the challenge, enjoy the air and behold the view. Climb it so you can see the world, not so the world can see you. -- David McCullough Jr. OpenPGP: 0xA3828BD796CCE11A8CADE8866E3A92C92C3FF244 Download: https://www.peters-netzplatz.de/download/pschneider1968_pub.asc https://keys.mailvelope.com/pks/lookup?op=get&[email protected] https://keys.mailvelope.com/pks/lookup?op=get&[email protected]
Hi Greg
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.36 release. There are 192 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 Thu, 27 Jun 2024 08:54:55 +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.6.36-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
6.6.36-rc1 tested.
Build successfully completed.
Boot successfully completed.
No dmesg regressions.
Video output normal.
Sound output normal.
Lenovo ThinkPad X1 Carbon Gen10(Intel i7-1260P(x86_64) arch linux)
[ 0.000000] Linux version 6.6.36-rc1rv
(takeshi@ThinkPadX1Gen10J0764) (gcc (GCC) 14.1.1 20240522, GNU ld (GNU Binutils) 2.42.0) #1 SMP PREEMPT_DYNAMIC Tue Jun 25 22:19:34 JST 2024
Thanks
Hello,
Quoted 5 lines · On Tue, 25 Jun 2024 11:31:12 +0200 Greg Kroah-Hartman…
This is the start of the stable review cycle for the 6.6.36 release. There are 192 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 Thu, 27 Jun 2024 08:54:55 +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.6.36-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.
This rc kernel passes DAMON functionality test[1] on my test machine. Attaching the test results summary below. Please note that I retrieved the kernel from linux-stable-rc tree[2].
[1] https://github.com/awslabs/damon-tests/tree/next/corr
[2] 580e509ea134 ("Linux 6.6.36-rc1")
Thanks,
SJ
[...]
---
ok 1 selftests: damon: debugfs_attrs.sh
ok 2 selftests: damon: debugfs_schemes.sh
ok 3 selftests: damon: debugfs_target_ids.sh
ok 4 selftests: damon: debugfs_empty_targets.sh
ok 5 selftests: damon: debugfs_huge_count_read_write.sh
ok 6 selftests: damon: debugfs_duplicate_context_creation.sh
ok 7 selftests: damon: debugfs_rm_non_contexts.sh
ok 8 selftests: damon: sysfs.sh
ok 9 selftests: damon: sysfs_update_removed_scheme_dir.sh
ok 10 selftests: damon: reclaim.sh
ok 11 selftests: damon: lru_sort.sh
ok 1 selftests: damon-tests: kunit.sh
ok 2 selftests: damon-tests: huge_count_read_write.sh
ok 3 selftests: damon-tests: buffer_overflow.sh
ok 4 selftests: damon-tests: rm_contexts.sh
ok 5 selftests: damon-tests: record_null_deref.sh
ok 6 selftests: damon-tests: dbgfs_target_ids_read_before_terminate_race.sh ok 7 selftests: damon-tests: dbgfs_target_ids_pid_leak.sh
ok 8 selftests: damon-tests: damo_tests.sh
ok 9 selftests: damon-tests: masim-record.sh
ok 10 selftests: damon-tests: build_i386.sh
ok 11 selftests: damon-tests: build_arm64.sh
ok 12 selftests: damon-tests: build_m68k.sh
ok 13 selftests: damon-tests: build_i386_idle_flag.sh
ok 14 selftests: damon-tests: build_i386_highpte.sh
ok 15 selftests: damon-tests: build_nomemcg.sh
[33m
[92mPASS [39m
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.36 release. There are 192 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 Thu, 27 Jun 2024 08:54:55 +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.6.36-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.36 release. There are 192 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 9 lines
Responses should be made by Thu, 27 Jun 2024 08:54:55 +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.6.36-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.
KernelCI report for stable-rc/linux-6.6.y for this week :-
Date: 2024-06-25
## Build failures:
arm:
- multi_v7_defconfig (gcc-10)
- Build details :-
http://localhost:3000/goto/RvP98cQIg?orgId=1
- Errors :-
arm-linux-gnueabihf-ld: drivers/firmware/efi/efi-init.o: in function `.LANCHOR1':
efi-init.c:(.data+0x0): multiple definition of `screen_info'; arch/arm/kernel/setup.o:setup.c:(.data+0x12c): first defined here
Thanks,
Shreeya Patel
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.36 release. There are 192 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 Thu, 27 Jun 2024 08:54:55 +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.6.36-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
Built and booted successfully on RISC-V RV64 (HiFive Unmatched).
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.36 release. There are 192 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 Thu, 27 Jun 2024 08:54:55 +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.6.36-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
The arm build regressions reported as described in the previous emails.
## Build
* kernel: 6.6.36-rc1
* git: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
* git commit: 580e509ea1348fc97897cf4052be03c248be6ab6
* git describe: v6.6.35-193-g580e509ea134
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.6.y/build/v6.6.35-193-g580e509ea134
## Test Regressions (compared to v6.6.34-268-g0db1e58b51e3)
* arm, build
- clang-18-defconfig
- clang-18-lkftconfig
- gcc-13-defconfig
- gcc-13-lkftconfig
- gcc-8-defconfig
## Metric Regressions (compared to v6.6.34-268-g0db1e58b51e3)
## Test Fixes (compared to v6.6.34-268-g0db1e58b51e3)
## Metric Fixes (compared to v6.6.34-268-g0db1e58b51e3)
## Test result summary
total: 234233, pass: 204427, fail: 3373, skip: 26007, xfail: 426
## Build Summary
* arc: 5 total, 5 passed, 0 failed
* arm: 127 total, 109 passed, 18 failed
* arm64: 37 total, 37 passed, 0 failed
* i386: 27 total, 27 passed, 0 failed
* mips: 24 total, 24 passed, 0 failed
* parisc: 3 total, 3 passed, 0 failed
* powerpc: 34 total, 34 passed, 0 failed
* riscv: 17 total, 17 passed, 0 failed
* s390: 12 total, 12 passed, 0 failed
* sh: 10 total, 10 passed, 0 failed
* sparc: 6 total, 6 passed, 0 failed
* x86_64: 31 total, 31 passed, 0 failed
## Test suites summary
* boot
* kselftest-arm64
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-efivarfs
* kselftest-exec
* kselftest-filesystems
* kselftest-filesystems-binderfs
* kselftest-filesystems-epoll
* kselftest-firmware
* kselftest-fpu
* kselftest-ftrace
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-kcmp
* kselftest-kvm
* kselftest-livepatch
* kselftest-membarrier
* kselftest-memfd
* kselftest-mincore
* kselftest-mqueue
* kselftest-net
* kselftest-net-mptcp
* kselftest-openat2
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-seccomp
* kselftest-sigaltstack
* kselftest-size
* kselftest-tc-testing
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user_events
* kselftest-vDSO
* kselftest-watchdog
* kselftest-x86
* kunit
* kvm-unit-tests
* libgpiod
* libhugetlbfs
* log-parser-boot
* log-parser-test
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-cpuhotplug
* ltp-crypto
* ltp-cve
* ltp-dio
* ltp-fcntl-locktests
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-hugetlb
* ltp-ipc
* ltp-ma[
* ltp-math
* ltp-mm
* ltp-nptl
* ltp-pty
* ltp-sched
* ltp-smoke
* ltp-smoketest
* ltp-syscalls
* ltp-tracing
* perf
* rcutorture
--
Linaro LKFT
https://lkft.linaro.org
Quoted 7 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.36 release. There are 192 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 Thu, 27 Jun 2024 08:54:55 +0000. Anything received after that time might be too late.
No regressions found on WSL (x86 and arm64).
Built, booted, and reviewed dmesg.
Thank you. :)