]> git.ipfire.org Git - thirdparty/linux.git/log
thirdparty/linux.git
12 days agokconfig: add a function to dump all menu entries in a tree-like format
Masahiro Yamada [Sun, 29 Jun 2025 18:48:31 +0000 (03:48 +0900)] 
kconfig: add a function to dump all menu entries in a tree-like format

This is useful for debugging purposes. menu_finalize() re-parents menu
entries, and this function can be used to dump the final structure of
the menu tree.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
12 days agokconfig: gconf: show GTK version in About dialog
Masahiro Yamada [Sun, 29 Jun 2025 18:43:35 +0000 (03:43 +0900)] 
kconfig: gconf: show GTK version in About dialog

Likewise xconfig, it is useful to display the GTK version in the About
dialog.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
12 days agokconfig: gconf: replace GtkHPaned and GtkVPaned with GtkPaned
Masahiro Yamada [Sun, 29 Jun 2025 18:43:34 +0000 (03:43 +0900)] 
kconfig: gconf: replace GtkHPaned and GtkVPaned with GtkPaned

GtkHPaned and GtkVPaned are deprecated with GTK 3.2. [1] [2]

Use GtkPaned instead.

[1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/3.2.0/gtk/gtkhpaned.c#L44
[2]: https://gitlab.gnome.org/GNOME/gtk/-/blob/3.2.0/gtk/gtkvpaned.c#L44

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
12 days agokconfig: gconf: replace GdkColor with GdkRGBA
Masahiro Yamada [Sun, 29 Jun 2025 18:43:33 +0000 (03:43 +0900)] 
kconfig: gconf: replace GdkColor with GdkRGBA

GdkColor is deprecated with GTK 3.14. [1]

Use GdkRGBA instead.

This fixes warnings such as:

scripts/kconfig/gconf.c: In function ‘set_node’:
scripts/kconfig/gconf.c:138:9: warning: ‘gdk_color_parse’ is deprecated: Use 'gdk_rgba_parse' instead [-Wdeprecated-declarations]
  138 |         gdk_color_parse(menu_is_visible(menu) ? "Black" : "DarkGray", &color);
      |         ^~~~~~~~~~~~~~~

[1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/3.14.0/gdk/deprecated/gdkcolor.h#L52

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
12 days agokconfig: gconf: replace GtkVbox with GtkBox
Masahiro Yamada [Sun, 29 Jun 2025 18:43:32 +0000 (03:43 +0900)] 
kconfig: gconf: replace GtkVbox with GtkBox

GtkVBox is deprecated with GTK 3.2. [1]

Use GtkBox instead.

[1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/3.2.0/gtk/gtkvbox.c#L47

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
12 days agokconfig: gconf: migrate to GTK 3
Masahiro Yamada [Sun, 29 Jun 2025 18:43:31 +0000 (03:43 +0900)] 
kconfig: gconf: migrate to GTK 3

This commit switches from GTK 2.x to GTK 3, applying the following
necessary changes:

 - Do not include individual headers
 - GtkObject is gone
 - Convert Glade to GtkBuilder

Link: https://docs.gtk.org/gtk3/migrating-2to3.html
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
12 days agokconfig: gconf: rename gconf.glade to gconf.ui
Masahiro Yamada [Sun, 29 Jun 2025 18:43:30 +0000 (03:43 +0900)] 
kconfig: gconf: rename gconf.glade to gconf.ui

The next commit will convert this file to GtkBuilder format. Rename
it in advance to reflect the intended format.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
12 days agokconfig: gconf: rename display_tree_part()
Masahiro Yamada [Sun, 29 Jun 2025 18:43:29 +0000 (03:43 +0900)] 
kconfig: gconf: rename display_tree_part()

This function recreates the tree store to update the menu content.
Rename it to recreate_tree() to better reflect its purpose.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
12 days agokconfig: gconf: use configure-event handler to adjust pane separator
Masahiro Yamada [Sun, 29 Jun 2025 18:43:28 +0000 (03:43 +0900)] 
kconfig: gconf: use configure-event handler to adjust pane separator

The size-request event handler is currently used to adjust the position
of the horizontal separator in the right pane.

However, the size-request signal is not available in GTK 3. Use the
configure-event signal instead.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
12 days agokconfig: gconf: fix behavior of a menu under a symbol in split view
Masahiro Yamada [Sun, 29 Jun 2025 18:43:27 +0000 (03:43 +0900)] 
kconfig: gconf: fix behavior of a menu under a symbol in split view

A menu can be created under a symbol.

[Example]

  menu "outer menu"

  config A
          bool "A"

  menu "inner menu"
          depends on A

  config B
          bool "B"

  endmenu

  endmenu

After being re-parented by menu_finalize(), the menu tree is structured
like follows:

  menu "outer menu"
  \-- A
      \-- menu "inner menu"
          \-- B

In split view, the symbol A is shown in the right pane, so all of its
descendants must also be shown there. This has never worked correctly.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
12 days agodocs: kconfig: add alldefconfig to the all*configs
Randy Dunlap [Fri, 27 Jun 2025 03:06:12 +0000 (20:06 -0700)] 
docs: kconfig: add alldefconfig to the all*configs

Add "alldefconfig" to the explanation of the KCONFIG_ALLCONFIG
environment variable usage so that all targets that use KCONFIG_ALLCONFIG
are listed.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
12 days agokconfig: nconf: Ensure null termination where strncpy is used
Shankari Anand [Wed, 25 Jun 2025 19:06:54 +0000 (00:36 +0530)] 
kconfig: nconf: Ensure null termination where strncpy is used

strncpy() does not guarantee null-termination if the source string is
longer than the destination buffer.

Ensure the buffer is explicitly null-terminated to prevent potential
string overflows or undefined behavior.

Signed-off-by: Shankari Anand <shankari.ak0208@gmail.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Nicolas Schier <n.schier@avm.de>
Acked-by: Nicolas Schier <n.schier@avm.de>
5 weeks agokconfig: gconf: remove GtkHandleBox from glade
Masahiro Yamada [Tue, 24 Jun 2025 15:05:49 +0000 (00:05 +0900)] 
kconfig: gconf: remove GtkHandleBox from glade

GtkHandleBox is deprecated with GTK 3.4. [1]

[1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/3.4.0/gtk/deprecated/gtkhandlebox.c#L426

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: use gtk_dialog_get_content_area() accessor
Masahiro Yamada [Tue, 24 Jun 2025 15:05:48 +0000 (00:05 +0900)] 
kconfig: gconf: use gtk_dialog_get_content_area() accessor

GTK 3 removes many implementation details and struct members from its
public headers.

Use the gtk_check_menu_item_get_active() accessor.

[1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/2.24.33/docs/reference/gtk/compiling.sgml#L85

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: use gtk_check_menu_item_get_active() accessor
Masahiro Yamada [Tue, 24 Jun 2025 15:05:47 +0000 (00:05 +0900)] 
kconfig: gconf: use gtk_check_menu_item_get_active() accessor

GTK 3 removes many implementation details and struct members from its
public headers.

Use the gtk_check_menu_item_get_active() accessor.

[1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/2.24.33/docs/reference/gtk/compiling.sgml#L85

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: remove unnecessary default message in text view
Masahiro Yamada [Tue, 24 Jun 2025 15:05:46 +0000 (00:05 +0900)] 
kconfig: gconf: remove unnecessary default message in text view

This message looks odd because it is displayed when nothing is selected.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: replace "tooltip" property with "tooltip-text"
Masahiro Yamada [Tue, 24 Jun 2025 15:05:45 +0000 (00:05 +0900)] 
kconfig: gconf: replace "tooltip" property with "tooltip-text"

This is no longer available in GTK 3. Use "tooltip-text" instead.

Also reword "Goes up of one level" to "Goes up one level" while I am
here.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: remove "tooltips" property from glade
Masahiro Yamada [Tue, 24 Jun 2025 15:05:44 +0000 (00:05 +0900)] 
kconfig: gconf: remove "tooltips" property from glade

The tips are still displayed without this.

This property does not exist in GtkBuilder with GTK 3.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: replace GTK_STOCK_{OK,NO,CANCEL}
Masahiro Yamada [Tue, 24 Jun 2025 15:05:43 +0000 (00:05 +0900)] 
kconfig: gconf: replace GTK_STOCK_{OK,NO,CANCEL}

These are deprecated with GTK 3.10. [1]

Use "_OK", "_no", "_Cancel".

[1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/3.10.0/gtk/deprecated/gtkstock.h#L827

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: replace GDK_space with GDK_KEY_space
Masahiro Yamada [Tue, 24 Jun 2025 15:05:42 +0000 (00:05 +0900)] 
kconfig: gconf: replace GDK_space with GDK_KEY_space

In GTK3, keysyms changed to have a KEY_ prefix.

[1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/2.24.33/gdk/gdkkeysyms-compat.h#L24

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: remove dead code in display_tree_part()
Masahiro Yamada [Tue, 24 Jun 2025 15:05:38 +0000 (00:05 +0900)] 
kconfig: gconf: remove dead code in display_tree_part()

This function is no longer called in the FULL_VIEW mode, so remove the
dead code.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: inline display_list() into set_view_mode()
Masahiro Yamada [Tue, 24 Jun 2025 15:05:37 +0000 (00:05 +0900)] 
kconfig: gconf: inline display_list() into set_view_mode()

This function is now only called by set_view_mode(), so inline it
for simplicity.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: do not reconstruct tree store when a symbol is changed
Masahiro Yamada [Tue, 24 Jun 2025 15:05:36 +0000 (00:05 +0900)] 
kconfig: gconf: do not reconstruct tree store when a symbol is changed

There is no need to reconstruct the entire tree store when a symbol's
value changes. Simply call gtk_tree_store_set() to update the row data.

Introduce update_trees() to factor out the common update logic.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: inline fill_row() into set_node()
Masahiro Yamada [Tue, 24 Jun 2025 15:05:35 +0000 (00:05 +0900)] 
kconfig: gconf: inline fill_row() into set_node()

The row[] array is used to prepare data passed to set_node(), but this
indirection is unnecessary. Squash fill_row() into set_node() and call
gtk_tree_store_set() directly.

Also, calling gdk_pixbuf_new_from_xpm_data() for every row is
inefficient. Call it once and store the resulting pixbuf in a global
variable.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: remove init_tree_model()
Masahiro Yamada [Tue, 24 Jun 2025 15:05:34 +0000 (00:05 +0900)] 
kconfig: gconf: remove init_tree_model()

Move the relevant code into init_left_tree() or init_right_tree().

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: remove global 'model1' and 'model2' variables
Masahiro Yamada [Tue, 24 Jun 2025 15:05:33 +0000 (00:05 +0900)] 
kconfig: gconf: remove global 'model1' and 'model2' variables

These variables are unnecessary because the current model can be
retrieved using gtk_tree_view_get_model().

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
5 weeks agokconfig: gconf: use GtkTreeModelFilter to control row visibility
Masahiro Yamada [Tue, 24 Jun 2025 15:05:32 +0000 (00:05 +0900)] 
kconfig: gconf: use GtkTreeModelFilter to control row visibility

Currently, update_tree() adds/removes entries to show/hide rows.
This approach is extremely complicated.

Use the tree model filter to control row visibility instead.

Do not toggle the MENU_CHANGED flag, as it is hard to control this
correctly.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: preserve menu selection when switching view mode
Masahiro Yamada [Tue, 24 Jun 2025 15:05:31 +0000 (00:05 +0900)] 
kconfig: gconf: preserve menu selection when switching view mode

Preserve the current menu selection when switching to a different view
mode, as it improves usability.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: merge 'current' and 'browsed' global variables
Masahiro Yamada [Tue, 24 Jun 2025 15:05:30 +0000 (00:05 +0900)] 
kconfig: gconf: merge 'current' and 'browsed' global variables

The 'current' (SINGLE view) and 'browsed' (SPLIT_VIEW) variables serve
similar purposes and are not needed at the same time. Merge them.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: remove global 'tree' variable
Masahiro Yamada [Tue, 24 Jun 2025 15:05:29 +0000 (00:05 +0900)] 
kconfig: gconf: remove global 'tree' variable

Pass the tree store as a function parameter to make it clearer which
tree is being updated.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: make introduction, about, license dialogs modal
Masahiro Yamada [Tue, 24 Jun 2025 15:05:28 +0000 (00:05 +0900)] 
kconfig: gconf: make introduction, about, license dialogs modal

These are modal dialogs in xconfig. Make them modal in gconfig as well.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
5 weeks agokconfig: gconf: refactor replace_button_icon()
Masahiro Yamada [Tue, 24 Jun 2025 15:05:27 +0000 (00:05 +0900)] 
kconfig: gconf: refactor replace_button_icon()

The "window" and "style" arguments for replace_button_icon() are
now unused. Remove them and refactor the function accordingly.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: use GdkPixbuf in replace_button_icon()
Masahiro Yamada [Tue, 24 Jun 2025 15:05:26 +0000 (00:05 +0900)] 
kconfig: gconf: use GdkPixbuf in replace_button_icon()

gdk_pixmap_create_from_xpm_d has been deprecated since version 2.22.
Use a GdkPixbuf instead. You can use gdk_pixbuf_new_from_xpm_data() to
create it. [1]

[1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/2.24.33/gdk/gdkpixmap.c#L742

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: use GtkFileChooser in on_save_as1_activate()
Masahiro Yamada [Tue, 24 Jun 2025 15:05:25 +0000 (00:05 +0900)] 
kconfig: gconf: use GtkFileChooser in on_save_as1_activate()

gtk_file_selection_new() is deprecated, and gtk_file_chooser_dialog_new()
should be used instead. [1]

[1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/2.24.33/docs/reference/gtk/tmpl/gtkfilesel.sgml?ref_type=tags#L156

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
5 weeks agokconfig: gconf: use GtkFileChooser in on_load1_activate()
Masahiro Yamada [Tue, 24 Jun 2025 15:05:24 +0000 (00:05 +0900)] 
kconfig: gconf: use GtkFileChooser in on_load1_activate()

gtk_file_selection_new() is deprecated, and gtk_file_chooser_dialog_new()
should be used instead. [1]

[1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/2.24.33/docs/reference/gtk/tmpl/gtkfilesel.sgml?ref_type=tags#L156

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
5 weeks agokconfig: gconf: add on_save_clicked() event handler
Masahiro Yamada [Tue, 24 Jun 2025 15:05:23 +0000 (00:05 +0900)] 
kconfig: gconf: add on_save_clicked() event handler

The "clicked" event handler for GtkToolButton takes the GtkToolButton*
as the first parameter.

This is different from the existing on_save_activate() handler.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: avoid hardcoding model* in on_treeview*_button_press_event()
Masahiro Yamada [Tue, 24 Jun 2025 15:05:22 +0000 (00:05 +0900)] 
kconfig: gconf: avoid hardcoding model* in on_treeview*_button_press_event()

It is better not to hardcode model1 or model2 for consistency.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: avoid hardcoding model2 in renderer_edited()
Masahiro Yamada [Tue, 24 Jun 2025 15:05:21 +0000 (00:05 +0900)] 
kconfig: gconf: avoid hardcoding model2 in renderer_edited()

Although this is only used in the right tree view, it is better not to
hardcode model2 for consistency.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: avoid hardcoding model2 in on_treeview2_cursor_changed()
Masahiro Yamada [Tue, 24 Jun 2025 15:05:20 +0000 (00:05 +0900)] 
kconfig: gconf: avoid hardcoding model2 in on_treeview2_cursor_changed()

The on_treeview2_cursor_changed() handler is connected to both the left
and right tree views, but it hardcodes model2 (the GtkTreeModel of the
right tree view). This is incorrect. Get the associated model from the
view.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: make key_press_event work in left pane too
Masahiro Yamada [Tue, 24 Jun 2025 15:05:19 +0000 (00:05 +0900)] 
kconfig: gconf: make key_press_event work in left pane too

Currently, on_treeview2_key_press_event() returns early for the tree1
widget. We can make it work on the left pane as well by avoiding the
hardcoded use of model2.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: remove glade_xml_signal_autoconnect() call
Masahiro Yamada [Tue, 24 Jun 2025 15:05:18 +0000 (00:05 +0900)] 
kconfig: gconf: remove glade_xml_signal_autoconnect() call

Now that all signals are connected manually, this is no longer
necessary.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: add static qualifiers to event handlers
Masahiro Yamada [Tue, 24 Jun 2025 15:05:17 +0000 (00:05 +0900)] 
kconfig: gconf: add static qualifiers to event handlers

This fixes several -Wmissing-prototypes warnings.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
5 weeks agokconfig: gconf: move button1 and save1 initialization code
Masahiro Yamada [Tue, 24 Jun 2025 15:05:16 +0000 (00:05 +0900)] 
kconfig: gconf: move button1 and save1 initialization code

Move the relevant initialization code closer together.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: move the main window event handlers below
Masahiro Yamada [Tue, 24 Jun 2025 15:05:15 +0000 (00:05 +0900)] 
kconfig: gconf: move the main window event handlers below

This allows removal of the forward delcaration of on_save_activate().

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: grey out button for current view
Masahiro Yamada [Tue, 24 Jun 2025 15:05:14 +0000 (00:05 +0900)] 
kconfig: gconf: grey out button for current view

This clarifies which view is currently selected.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
5 weeks agokconfig: gconf: refactor view setting code
Masahiro Yamada [Tue, 24 Jun 2025 15:05:13 +0000 (00:05 +0900)] 
kconfig: gconf: refactor view setting code

Factor out common code for setting the view into a new function,
set_view_mode().

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
5 weeks agokconfig: gconf: move init_*() functions below
Masahiro Yamada [Tue, 24 Jun 2025 15:05:12 +0000 (00:05 +0900)] 
kconfig: gconf: move init_*() functions below

This allows removal of the forward declaration of renderer_edited().

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: add static qualifiers to variables
Masahiro Yamada [Tue, 24 Jun 2025 15:05:11 +0000 (00:05 +0900)] 
kconfig: gconf: add static qualifiers to variables

I also removed unnecessary initializers.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: remove unused 'color' variable
Masahiro Yamada [Tue, 24 Jun 2025 15:05:10 +0000 (00:05 +0900)] 
kconfig: gconf: remove unused 'color' variable

This is not used at all.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: remove unneeded variables in on_treeview*_button_press_event()
Masahiro Yamada [Tue, 24 Jun 2025 15:05:09 +0000 (00:05 +0900)] 
kconfig: gconf: remove unneeded variables in on_treeview*_button_press_event()

Not all position parameters are used here. Passing NULL to
gtk_tree_view_get_cursor() or gtk_tree_view_get_path_at_pos() is
allowed. [1] [2]

[1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/2.24.33/gtk/gtktreeview.c#L12638
[1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/2.24.33/gtk/gtktreeview.c#L12795

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: remove unneeded variable in on_split_clicked()
Masahiro Yamada [Tue, 24 Jun 2025 15:05:08 +0000 (00:05 +0900)] 
kconfig: gconf: remove unneeded variable in on_split_clicked()

The height of the window is not used here. Passing NULL to
gtk_window_get_default_size() is allowed. [1]

[1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/2.24.33/gtk/gtkwindow.c#L3974

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: remove unnecessary NULL checks for tree1 and tree2
Masahiro Yamada [Tue, 24 Jun 2025 15:05:07 +0000 (00:05 +0900)] 
kconfig: gconf: remove unnecessary NULL checks for tree1 and tree2

The tree1 and tree2 variables are initialized earlier in
init_tree_model(), so the NULL checks are redundant.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: remove parents[] array and indent variable
Masahiro Yamada [Tue, 24 Jun 2025 15:05:06 +0000 (00:05 +0900)] 
kconfig: gconf: remove parents[] array and indent variable

The parents[] array is used to store the GtkTreeIter of parent nodes,
but this can be simplified: we can pass a GtkTreeIter pointer down
when _display_tree() recurses.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: remove internal-child="image" nodes from glade
Masahiro Yamada [Tue, 24 Jun 2025 15:05:05 +0000 (00:05 +0900)] 
kconfig: gconf: remove internal-child="image" nodes from glade

These nodes do not appear to serve anything useful.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: remove unnecessary gtk_set_locale() call
Masahiro Yamada [Tue, 24 Jun 2025 15:05:04 +0000 (00:05 +0900)] 
kconfig: gconf: remove unnecessary gtk_set_locale() call

gtk_set_locale() has been deprecated since version 2.24, and setlocale()
should be used directly. [1]

However, gtk_init() automatically does this, so there is typically no
point in calling this function.

[1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/2.24.33/gtk/gtkmain.c#L1152

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: remove gtk_tree_view_set_rules_hint() calls
Masahiro Yamada [Tue, 24 Jun 2025 15:05:03 +0000 (00:05 +0900)] 
kconfig: gconf: remove gtk_tree_view_set_rules_hint() calls

The use of the this function is not recommended, and it has been
deprecated since GTK 3.14.

[1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/3.14.0/gtk/gtktreeview.c#L11891

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: remove gtk_widget_realize() calls
Masahiro Yamada [Tue, 24 Jun 2025 15:05:02 +0000 (00:05 +0900)] 
kconfig: gconf: remove gtk_widget_realize() calls

This function is primarily used in widget implementations, and isn't
very useful otherwise.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: remove gtk_tree_view_column_set_visible() calls
Masahiro Yamada [Tue, 24 Jun 2025 15:05:01 +0000 (00:05 +0900)] 
kconfig: gconf: remove gtk_tree_view_column_set_visible() calls

The columns are visible by default.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: remove unneeded gtk_tree_view_set_headers_visible() calls
Masahiro Yamada [Tue, 24 Jun 2025 15:05:00 +0000 (00:05 +0900)] 
kconfig: gconf: remove unneeded gtk_tree_view_set_headers_visible() calls

The headers are visible by default.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: remove meaningless code in init_main_window()
Masahiro Yamada [Tue, 24 Jun 2025 15:04:59 +0000 (00:04 +0900)] 
kconfig: gconf: remove meaningless code in init_main_window()

The 'widget' variable is set, but not used in later code.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
5 weeks agokconfig: gconf: remove empty if-block
Masahiro Yamada [Tue, 24 Jun 2025 15:04:58 +0000 (00:04 +0900)] 
kconfig: gconf: remove empty if-block

This if-block is empty.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
5 weeks agokconfig: gconf: remove old #ifdef GTK_CHECK_VERSION
Masahiro Yamada [Tue, 24 Jun 2025 15:04:57 +0000 (00:04 +0900)] 
kconfig: gconf: remove old #ifdef GTK_CHECK_VERSION

Remove old code.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
5 weeks agokconfig: gconf: always destroy dialog in on_window1_delete_event()
Masahiro Yamada [Tue, 24 Jun 2025 15:04:56 +0000 (00:04 +0900)] 
kconfig: gconf: always destroy dialog in on_window1_delete_event()

When gtk_dialog_run() returns GTK_RESPONSE_YES or GTK_RESPONSE_NO,
gtk_widget_destroy() is not called, resulting in a memory leak.

It is better to always destroy the dialog, even if the application
is about to exit.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
5 weeks agokconfig: gconf: fix potential memory leak in renderer_edited()
Masahiro Yamada [Tue, 24 Jun 2025 15:04:55 +0000 (00:04 +0900)] 
kconfig: gconf: fix potential memory leak in renderer_edited()

If gtk_tree_model_get_iter() fails, gtk_tree_path_free() is not called.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
5 weeks agokconfig: gconf: make columns resizable
Masahiro Yamada [Tue, 24 Jun 2025 15:04:54 +0000 (00:04 +0900)] 
kconfig: gconf: make columns resizable

The variable "resizeable" is a typo and always set to FALSE, resulting
in dead code in init_right_tree(). It is unclear column resizing should
be disabled. Enable it.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
5 weeks agokconfig: re-add menu_get_parent_menu() that returns parent menu
Masahiro Yamada [Tue, 24 Jun 2025 15:04:53 +0000 (00:04 +0900)] 
kconfig: re-add menu_get_parent_menu() that returns parent menu

This helper returns the parent menu, or NULL if there is no parent.
The main difference from the previous version is that it always returns
the parent menu even when the given argument is itself a menu.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
5 weeks agokconfig: rename menu_get_parent_menu() to menu_get_menu_or_parent_menu()
Masahiro Yamada [Tue, 24 Jun 2025 15:04:52 +0000 (00:04 +0900)] 
kconfig: rename menu_get_parent_menu() to menu_get_menu_or_parent_menu()

The current menu_get_parent_menu() does not always return the parent
menu; if the given argument is itself a menu, it returns that menu.

Rename this function to better reflect this behavior.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
5 weeks agokconfig: qconf: show selected choice in the Value column
Masahiro Yamada [Tue, 24 Jun 2025 15:04:51 +0000 (00:04 +0900)] 
kconfig: qconf: show selected choice in the Value column

It is useful to display the selected choice's value in the Value column.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
5 weeks agokconfig: qconf: do not show checkbox icon for choice
Masahiro Yamada [Tue, 24 Jun 2025 15:04:50 +0000 (00:04 +0900)] 
kconfig: qconf: do not show checkbox icon for choice

When you select "Show All Options" or "Show Prompt Options", choice
entries display a check box icon, but this has no point because
choice is always y since commit fde192511bdb ("kconfig: remove tristate
choice support").

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
5 weeks agokconfig: set MENU_CHANGED to choice when the selected member is changed
Masahiro Yamada [Tue, 24 Jun 2025 15:04:49 +0000 (00:04 +0900)] 
kconfig: set MENU_CHANGED to choice when the selected member is changed

In gconf, choice entries display the selected symbol in the 'Value'
column, but it is not updated when the selected symbol is changed.

Set the MENU_CHANGED flag, so it is updated.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
6 weeks agomodule: remove meaningless 'name' parameter from __MODULE_INFO()
Masahiro Yamada [Fri, 6 Jun 2025 04:10:23 +0000 (13:10 +0900)] 
module: remove meaningless 'name' parameter from __MODULE_INFO()

The symbol names in the .modinfo section are never used and already
randomized by the __UNIQUE_ID() macro.

Therefore, the second parameter of  __MODULE_INFO() is meaningless
and can be removed to simplify the code.

With this change, the symbol names in the .modinfo section will be
prefixed with __UNIQUE_ID_modinfo, making it clearer that they
originate from MODULE_INFO().

[Before]

  $ objcopy  -j .modinfo vmlinux.o modinfo.o
  $ nm -n modinfo.o | head -n10
  0000000000000000 r __UNIQUE_ID_license560
  0000000000000011 r __UNIQUE_ID_file559
  0000000000000030 r __UNIQUE_ID_description558
  0000000000000074 r __UNIQUE_ID_license580
  000000000000008e r __UNIQUE_ID_file579
  00000000000000bd r __UNIQUE_ID_description578
  00000000000000e6 r __UNIQUE_ID_license581
  00000000000000ff r __UNIQUE_ID_file580
  0000000000000134 r __UNIQUE_ID_description579
  0000000000000179 r __UNIQUE_ID_uncore_no_discover578

[After]

  $ objcopy  -j .modinfo vmlinux.o modinfo.o
  $ nm -n modinfo.o | head -n10
  0000000000000000 r __UNIQUE_ID_modinfo560
  0000000000000011 r __UNIQUE_ID_modinfo559
  0000000000000030 r __UNIQUE_ID_modinfo558
  0000000000000074 r __UNIQUE_ID_modinfo580
  000000000000008e r __UNIQUE_ID_modinfo579
  00000000000000bd r __UNIQUE_ID_modinfo578
  00000000000000e6 r __UNIQUE_ID_modinfo581
  00000000000000ff r __UNIQUE_ID_modinfo580
  0000000000000134 r __UNIQUE_ID_modinfo579
  0000000000000179 r __UNIQUE_ID_modinfo578

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Petr Pavlu <petr.pavlu@suse.com>
6 weeks agokheaders: double-quote variables to satisfy shellcheck
Masahiro Yamada [Sun, 8 Jun 2025 16:59:57 +0000 (01:59 +0900)] 
kheaders: double-quote variables to satisfy shellcheck

Fix the following:

In kernel/gen_kheaders.sh line 48:
    -I $XZ -cf $tarfile -C "${tmpdir}/" . > /dev/null
       ^-^ SC2086 (info): Double quote to prevent globbing and word splitting.
               ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
6 weeks agokheaders: rebuild kheaders_data.tar.xz when KBUILD_BUILD_TIMESTAMP is changed
Masahiro Yamada [Sun, 8 Jun 2025 16:59:56 +0000 (01:59 +0900)] 
kheaders: rebuild kheaders_data.tar.xz when KBUILD_BUILD_TIMESTAMP is changed

This problem is similar to commit 7f8256ae0efb ("initramfs: Encode
dependency on KBUILD_BUILD_TIMESTAMP"): kernel/gen_kheaders.sh has an
internal dependency on KBUILD_BUILD_TIMESTAMP that is not exposed to
make, so changing KBUILD_BUILD_TIMESTAMP will not trigger a rebuild
of the archive.

Move $(KBUILD_BUILD_TIMESTAMP) to the Makefile so that is is recorded
in the *.cmd file.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
6 weeks agokheaders: rebuild kheaders_data.tar.xz when a file is modified within a minute
Masahiro Yamada [Sun, 8 Jun 2025 16:59:55 +0000 (01:59 +0900)] 
kheaders: rebuild kheaders_data.tar.xz when a file is modified within a minute

When a header file is changed, kernel/gen_kheaders.sh may fail to update
kernel/kheaders_data.tar.xz.

[steps to reproduce]

[1] Build kernel/kheaders_data.tar.xz

  $ make -j$(nproc) kernel/kheaders.o
    DESCEND objtool
    INSTALL libsubcmd_headers
    CALL    scripts/checksyscalls.sh
    CHK     kernel/kheaders_data.tar.xz
    GEN     kernel/kheaders_data.tar.xz
    CC      kernel/kheaders.o

[2] Modify a header without changing the file size

  $ sed -i s/0xdeadbeef/0xfeedbeef/ include/linux/elfnote.h

[3] Rebuild kernel/kheaders_data.tar.xz

  $ make -j$(nproc) kernel/kheaders.o
    DESCEND objtool
    INSTALL libsubcmd_headers
    CALL    scripts/checksyscalls.sh
    CHK     kernel/kheaders_data.tar.xz

kernel/kheaders_data.tar.xz is not updated if steps [1] - [3] are run
within the same minute.

The headers_md5 variable stores the MD5 hash of the 'ls -l' output
for all header files. This hash value is used to determine whether
kheaders_data.tar.xz needs to be rebuilt. However, 'ls -l' prints the
modification times with minute-level granularity. If a file is modified
within the same minute and its size remains the same, the MD5 hash does
not change.

To reliably detect file modifications, this commit rewrites
kernel/gen_kheaders.sh to output header dependencies to
kernel/.kheaders_data.tar.xz.cmd. Then, Make compares the timestamps
and reruns kernel/gen_kheaders.sh when necessary. This is the standard
mechanism used by Make and Kbuild.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
6 weeks agokconfig: lxdialog: fix 'space' to (de)select options
Yann E. MORIN [Wed, 13 Nov 2013 23:53:32 +0000 (00:53 +0100)] 
kconfig: lxdialog: fix 'space' to (de)select options

In case a menu has comment without letters/numbers (eg. characters
matching the regexp '^[^[:alpha:][:digit:]]+$', for example - or *),
hitting space will cycle through those comments, rather than
selecting/deselecting the currently-highlighted option.

This is the behaviour of hitting any letter/digit: jump to the next
option which prompt starts with that letter. The only letters that
do not behave as such are 'y' 'm' and 'n'. Prompts that start with
one of those three letters are instead matched on the first letter
that is not 'y', 'm' or 'n'.

Fix that by treating 'space' as we treat y/m/n, ie. as an action key,
not as shortcut to jump to  prompt.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Cherniaev Andrei <dungeonlords789@naver.com>
[masahiro: took from Buildroot, adjusted the commit subject]
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
7 weeks agokconfig: use memcmp instead of deprecated bcmp
Thomas Meyer [Tue, 24 Sep 2024 18:47:22 +0000 (20:47 +0200)] 
kconfig: use memcmp instead of deprecated bcmp

bcmp() was removed in POSIX.1-2008.

This commit replaces bcmp() with memcmp(). This allows Kconfig to link
with C libraries that do not provide bcmp(), such as Android bionic
libc.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Reviewed-by: Miguel Ojeda <ojeda@kernel.org>
Reported-by: Abhigyan Ghosh <zscript.team.zs@gmail.com>
[masahiro: update commit description]
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
7 weeks agoLinux 6.16-rc2 v6.16-rc2
Linus Torvalds [Sun, 15 Jun 2025 20:49:41 +0000 (13:49 -0700)] 
Linux 6.16-rc2

7 weeks agoMerge tag 'kbuild-fixes-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/masah...
Linus Torvalds [Sun, 15 Jun 2025 16:14:27 +0000 (09:14 -0700)] 
Merge tag 'kbuild-fixes-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

 - Move warnings about linux/export.h from W=1 to W=2

 - Fix structure type overrides in gendwarfksyms

* tag 'kbuild-fixes-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  gendwarfksyms: Fix structure type overrides
  kbuild: move warnings about linux/export.h from W=1 to W=2

7 weeks agogendwarfksyms: Fix structure type overrides
Sami Tolvanen [Sat, 14 Jun 2025 00:55:33 +0000 (00:55 +0000)] 
gendwarfksyms: Fix structure type overrides

As we always iterate through the entire die_map when expanding
type strings, recursively processing referenced types in
type_expand_child() is not actually necessary. Furthermore,
the type_string kABI rule added in commit c9083467f7b9
("gendwarfksyms: Add a kABI rule to override type strings") can
fail to override type strings for structures due to a missing
kabi_get_type_string() check in this function.

Fix the issue by dropping the unnecessary recursion and moving
the override check to type_expand(). Note that symbol versions
are otherwise unchanged with this patch.

Fixes: c9083467f7b9 ("gendwarfksyms: Add a kABI rule to override type strings")
Reported-by: Giuliano Procida <gprocida@google.com>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Petr Pavlu <petr.pavlu@suse.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
7 weeks agokbuild: move warnings about linux/export.h from W=1 to W=2
Masahiro Yamada [Thu, 12 Jun 2025 16:08:48 +0000 (01:08 +0900)] 
kbuild: move warnings about linux/export.h from W=1 to W=2

This hides excessive warnings, as nobody builds with W=2.

Fixes: a934a57a42f6 ("scripts/misc-check: check missing #include <linux/export.h> when W=1")
Fixes: 7d95680d64ac ("scripts/misc-check: check unnecessary #include <linux/export.h> when W=1")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
7 weeks agoMerge tag 'v6.16-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Sat, 14 Jun 2025 17:13:32 +0000 (10:13 -0700)] 
Merge tag 'v6.16-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:

 - SMB3.1.1 POSIX extensions fix for char remapping

 - Fix for repeated directory listings when directory leases enabled

 - deferred close handle reuse fix

* tag 'v6.16-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  smb: improve directory cache reuse for readdir operations
  smb: client: fix perf regression with deferred closes
  smb: client: disable path remapping with POSIX extensions

7 weeks agoMerge tag 'iommu-fixes-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 14 Jun 2025 17:01:47 +0000 (10:01 -0700)] 
Merge tag 'iommu-fixes-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux

Pull iommu fix from Joerg Roedel:

 - Fix PTE size calculation for NVidia Tegra

* tag 'iommu-fixes-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux:
  iommu/tegra: Fix incorrect size calculation

7 weeks agoMerge tag 'block-6.16-20250614' of git://git.kernel.dk/linux
Linus Torvalds [Sat, 14 Jun 2025 16:25:22 +0000 (09:25 -0700)] 
Merge tag 'block-6.16-20250614' of git://git.kernel.dk/linux

Pull block fixes from Jens Axboe:

 - Fix for a deadlock on queue freeze with zoned writes

 - Fix for zoned append emulation

 - Two bio folio fixes, for sparsemem and for very large folios

 - Fix for a performance regression introduced in 6.13 when plug
   insertion was changed

 - Fix for NVMe passthrough handling for polled IO

 - Document the ublk auto registration feature

 - loop lockdep warning fix

* tag 'block-6.16-20250614' of git://git.kernel.dk/linux:
  nvme: always punt polled uring_cmd end_io work to task_work
  Documentation: ublk: Separate UBLK_F_AUTO_BUF_REG fallback behavior sublists
  block: Fix bvec_set_folio() for very large folios
  bio: Fix bio_first_folio() for SPARSEMEM without VMEMMAP
  block: use plug request list tail for one-shot backmerge attempt
  block: don't use submit_bio_noacct_nocheck in blk_zone_wplug_bio_work
  block: Clear BIO_EMULATES_ZONE_APPEND flag on BIO completion
  ublk: document auto buffer registration(UBLK_F_AUTO_BUF_REG)
  loop: move lo_set_size() out of queue freeze

7 weeks agoMerge tag 'io_uring-6.16-20250614' of git://git.kernel.dk/linux
Linus Torvalds [Sat, 14 Jun 2025 15:44:54 +0000 (08:44 -0700)] 
Merge tag 'io_uring-6.16-20250614' of git://git.kernel.dk/linux

Pull io_uring fixes from Jens Axboe:

 - Fix for a race between SQPOLL exit and fdinfo reading.

   It's slim and I was only able to reproduce this with an artificial
   delay in the kernel. Followup sparse fix as well to unify the access
   to ->thread.

 - Fix for multiple buffer peeking, avoiding truncation if possible.

 - Run local task_work for IOPOLL reaping when the ring is exiting.

   This currently isn't done due to an assumption that polled IO will
   never need task_work, but a fix on the block side is going to change
   that.

* tag 'io_uring-6.16-20250614' of git://git.kernel.dk/linux:
  io_uring: run local task_work from ring exit IOPOLL reaping
  io_uring/kbuf: don't truncate end buffer for multiple buffer peeks
  io_uring: consistently use rcu semantics with sqpoll thread
  io_uring: fix use-after-free of sq->thread in __io_uring_show_fdinfo()

7 weeks agoMerge tag 'rust-fixes-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda...
Linus Torvalds [Sat, 14 Jun 2025 15:38:34 +0000 (08:38 -0700)] 
Merge tag 'rust-fixes-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux

Pull Rust fix from Miguel Ojeda:

  - 'hrtimer': fix future compile error when the 'impl_has_hr_timer!'
    macro starts to get called

* tag 'rust-fixes-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux:
  rust: time: Fix compile error in impl_has_hr_timer macro

7 weeks agoMerge tag 'mm-hotfixes-stable-2025-06-13-21-56' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Sat, 14 Jun 2025 15:18:09 +0000 (08:18 -0700)] 
Merge tag 'mm-hotfixes-stable-2025-06-13-21-56' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Pull misc fixes from Andrew Morton:
 "9 hotfixes. 3 are cc:stable and the remainder address post-6.15 issues
  or aren't considered necessary for -stable kernels. Only 4 are for MM"

* tag 'mm-hotfixes-stable-2025-06-13-21-56' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
  mm: add mmap_prepare() compatibility layer for nested file systems
  init: fix build warnings about export.h
  MAINTAINERS: add Barry as a THP reviewer
  drivers/rapidio/rio_cm.c: prevent possible heap overwrite
  mm: close theoretical race where stale TLB entries could linger
  mm/vma: reset VMA iterator on commit_merge() OOM failure
  docs: proc: update VmFlags documentation in smaps
  scatterlist: fix extraneous '@'-sign kernel-doc notation
  selftests/mm: skip failed memfd setups in gup_longterm

7 weeks agoMerge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Fri, 13 Jun 2025 23:49:39 +0000 (16:49 -0700)] 
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "All fixes for drivers.

  The core change in the error handler is simply to translate an ALUA
  specific sense code into a retry the ALUA components can handle and
  won't impact any other devices"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: error: alua: I/O errors for ALUA state transitions
  scsi: storvsc: Increase the timeouts to storvsc_timeout
  scsi: s390: zfcp: Ensure synchronous unit_add
  scsi: iscsi: Fix incorrect error path labels for flashnode operations
  scsi: mvsas: Fix typos in per-phy comments and SAS cmd port registers
  scsi: core: ufs: Fix a hang in the error handler

7 weeks agoMerge tag 'drm-fixes-2025-06-14' of https://gitlab.freedesktop.org/drm/kernel
Linus Torvalds [Fri, 13 Jun 2025 23:27:27 +0000 (16:27 -0700)] 
Merge tag 'drm-fixes-2025-06-14' of https://gitlab.freedesktop.org/drm/kernel

Pull drm fixes from Dave Airlie:
 "Quiet week, only two pull requests came my way, xe has a couple of
  fixes and then a bunch of fixes across the board, vc4 probably fixes
  the biggest problem:

  vc4:
   - Fix infinite EPROBE_DEFER loop in vc4 probing

  amdxdna:
   - Fix amdxdna firmware size

  meson:
   - modesetting fixes

  sitronix:
   - Kconfig fix for st7171-i2c

  dma-buf:
   - Fix -EBUSY WARN_ON_ONCE in dma-buf

  udmabuf:
   - Use dma_sync_sgtable_for_cpu in udmabuf

  xe:
   - Fix regression disallowing 64K SVM migration
   - Use a bounce buffer for WA BB"

* tag 'drm-fixes-2025-06-14' of https://gitlab.freedesktop.org/drm/kernel:
  drm/xe/lrc: Use a temporary buffer for WA BB
  udmabuf: use sgtable-based scatterlist wrappers
  dma-buf: fix compare in WARN_ON_ONCE
  drm/sitronix: st7571-i2c: Select VIDEOMODE_HELPERS
  drm/meson: fix more rounding issues with 59.94Hz modes
  drm/meson: use vclk_freq instead of pixel_freq in debug print
  drm/meson: fix debug log statement when setting the HDMI clocks
  drm/vc4: fix infinite EPROBE_DEFER loop
  drm/xe/svm: Fix regression disallowing 64K SVM migration
  accel/amdxdna: Fix incorrect PSP firmware size

7 weeks agoio_uring: run local task_work from ring exit IOPOLL reaping
Jens Axboe [Fri, 13 Jun 2025 21:24:53 +0000 (15:24 -0600)] 
io_uring: run local task_work from ring exit IOPOLL reaping

In preparation for needing to shift NVMe passthrough to always use
task_work for polled IO completions, ensure that those are suitably
run at exit time. See commit:

9ce6c9875f3e ("nvme: always punt polled uring_cmd end_io work to task_work")

for details on why that is necessary.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 weeks agonvme: always punt polled uring_cmd end_io work to task_work
Jens Axboe [Fri, 13 Jun 2025 19:37:41 +0000 (13:37 -0600)] 
nvme: always punt polled uring_cmd end_io work to task_work

Currently NVMe uring_cmd completions will complete locally, if they are
polled. This is done because those completions are always invoked from
task context. And while that is true, there's no guarantee that it's
invoked under the right ring context, or even task. If someone does
NVMe passthrough via multiple threads and with a limited number of
poll queues, then ringA may find completions from ringB. For that case,
completing the request may not be sound.

Always just punt the passthrough completions via task_work, which will
redirect the completion, if needed.

Cc: stable@vger.kernel.org
Fixes: 585079b6e425 ("nvme: wire up async polling for io passthrough commands")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 weeks agoMerge tag 'acpi-6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Fri, 13 Jun 2025 20:39:15 +0000 (13:39 -0700)] 
Merge tag 'acpi-6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fixes from Rafael Wysocki:
 "These fix an ACPI APEI error injection driver failure that started to
  occur after switching it over to using a faux device, address an EC
  driver issue related to invalid ECDT tables, clean up the usage of
  mwait_idle_with_hints() in the ACPI PAD driver, add a new IRQ override
  quirk, and fix a NULL pointer dereference related to nosmp:

   - Update the faux device handling code in the driver core and address
     an ACPI APEI error injection driver failure that started to occur
     after switching it over to using a faux device on top of that (Dan
     Williams)

   - Update data types of variables passed as arguments to
     mwait_idle_with_hints() in the ACPI PAD (processor aggregator
     device) driver to match the function definition after recent
     changes (Uros Bizjak)

   - Fix a NULL pointer dereference in the ACPI CPPC library that occurs
     when nosmp is passed to the kernel in the command line (Yunhui Cui)

   - Ignore ECDT tables with an invalid ID string to prevent using an
     incorrect GPE for signaling events on some systems (Armin Wolf)

   - Add a new IRQ override quirk for MACHENIKE 16P (Wentao Guan)"

* tag 'acpi-6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: resource: Use IRQ override on MACHENIKE 16P
  ACPI: EC: Ignore ECDT tables with an invalid ID string
  ACPI: CPPC: Fix NULL pointer dereference when nosmp is used
  ACPI: PAD: Update arguments of mwait_idle_with_hints()
  ACPI: APEI: EINJ: Do not fail einj_init() on faux_device_create() failure
  driver core: faux: Quiet probe failures
  driver core: faux: Suppress bind attributes

7 weeks agoMerge tag 'pm-6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Linus Torvalds [Fri, 13 Jun 2025 20:27:41 +0000 (13:27 -0700)] 
Merge tag 'pm-6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fixes from Rafael Wysocki:
 "These fix the cpupower utility installation, fix up the recently added
  Rust abstractions for cpufreq and OPP, restore the x86 update
  eliminating mwait_play_dead_cpuid_hint() that has been reverted during
  the 6.16 merge window along with preventing the failure caused by it
  from happening, and clean up mwait_idle_with_hints() usage in
  intel_idle:

   - Implement CpuId Rust abstraction and use it to fix doctest failure
     related to the recently introduced cpumask abstraction (Viresh
     Kumar)

   - Do minor cleanups in the `# Safety` sections for cpufreq
     abstractions added recently (Viresh Kumar)

   - Unbreak cpupower systemd service units installation on some systems
     by adding a unitdir variable for specifying the location to install
     them (Francesco Poli)

   - Eliminate mwait_play_dead_cpuid_hint() again after reverting its
     elimination during the 6.16 merge window due to a problem with
     handling "dead" SMT siblings, but this time prevent leaving them in
     C1 after initialization by taking them online and back offline when
     a proper cpuidle driver for the platform has been registered
     (Rafael Wysocki)

   - Update data types of variables passed as arguments to
     mwait_idle_with_hints() to match the function definition after
     recent changes (Uros Bizjak)"

* tag 'pm-6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  rust: cpu: Add CpuId::current() to retrieve current CPU ID
  rust: Use CpuId in place of raw CPU numbers
  rust: cpu: Introduce CpuId abstraction
  intel_idle: Update arguments of mwait_idle_with_hints()
  cpufreq: Convert `/// SAFETY` lines to `# Safety` sections
  cpupower: split unitdir from libdir in Makefile
  Reapply "x86/smp: Eliminate mwait_play_dead_cpuid_hint()"
  ACPI: processor: Rescan "dead" SMT siblings during initialization
  intel_idle: Rescan "dead" SMT siblings during initialization
  x86/smp: PM/hibernate: Split arch_resume_nosmt()
  intel_idle: Use subsys_initcall_sync() for initialization

7 weeks agoMerge branches 'acpi-pad', 'acpi-cppc', 'acpi-ec' and 'acpi-resource'
Rafael J. Wysocki [Fri, 13 Jun 2025 19:55:30 +0000 (21:55 +0200)] 
Merge branches 'acpi-pad', 'acpi-cppc', 'acpi-ec' and 'acpi-resource'

Merge assorted ACPI updates for 6.16-rc2:

 - Update data types of variables passed as arguments to
   mwait_idle_with_hints() in the ACPI PAD (processor aggregator device)
   driver to match the function definition after recent changes (Uros
   Bizjak).

 - Fix a NULL pointer dereference in the ACPI CPPC library that occurs
   when nosmp is passed to the kernel in the command line (Yunhui Cui).

 - Ignore ECDT tables with an invalid ID string to prevent using an
   incorrect GPE for signaling events on some systems (Armin Wolf).

 - Add a new IRQ override quirk for MACHENIKE 16P (Wentao Guan).

* acpi-pad:
  ACPI: PAD: Update arguments of mwait_idle_with_hints()

* acpi-cppc:
  ACPI: CPPC: Fix NULL pointer dereference when nosmp is used

* acpi-ec:
  ACPI: EC: Ignore ECDT tables with an invalid ID string

* acpi-resource:
  ACPI: resource: Use IRQ override on MACHENIKE 16P

7 weeks agoMerge branch 'pm-cpuidle'
Rafael J. Wysocki [Fri, 13 Jun 2025 19:28:07 +0000 (21:28 +0200)] 
Merge branch 'pm-cpuidle'

Merge cpuidle updates for 6.16-rc2:

 - Update data types of variables passed as arguments to
   mwait_idle_with_hints() to match the function definition
   after recent changes (Uros Bizjak).

 - Eliminate mwait_play_dead_cpuid_hint() again after reverting its
   elimination during the merge window due to a problem with handling
   "dead" SMT siblings, but this time prevent leaving them in C1 after
   initialization by taking them online and back offline when a proper
   cpuidle driver for the platform has been registered (Rafael Wysocki).

* pm-cpuidle:
  intel_idle: Update arguments of mwait_idle_with_hints()
  Reapply "x86/smp: Eliminate mwait_play_dead_cpuid_hint()"
  ACPI: processor: Rescan "dead" SMT siblings during initialization
  intel_idle: Rescan "dead" SMT siblings during initialization
  x86/smp: PM/hibernate: Split arch_resume_nosmt()
  intel_idle: Use subsys_initcall_sync() for initialization

7 weeks agoMerge branch 'pm-tools'
Rafael J. Wysocki [Fri, 13 Jun 2025 19:25:38 +0000 (21:25 +0200)] 
Merge branch 'pm-tools'

Merge a cpupower utility fix for 6.16-rc2 that unbreaks systemd service
units installation on some sysems (Francesco Poli).

* pm-tools:
  cpupower: split unitdir from libdir in Makefile

7 weeks agoMerge tag 'spi-fix-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brooni...
Linus Torvalds [Fri, 13 Jun 2025 18:01:44 +0000 (11:01 -0700)] 
Merge tag 'spi-fix-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi fixes from Mark Brown:
 "A collection of driver specific fixes, most minor apart from the OMAP
  ones which disable some recent performance optimisations in some
  non-standard cases where we could start driving the bus incorrectly.

  The change to the stm32-ospi driver to use the newer reset APIs is a
  fix for interactions with other IP sharing the same reset line in some
  SoCs"

* tag 'spi-fix-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: spi-pci1xxxx: Drop MSI-X usage as unsupported by DMA engine
  spi: stm32-ospi: clean up on error in probe()
  spi: stm32-ospi: Make usage of reset_control_acquire/release() API
  spi: offload: check offload ops existence before disabling the trigger
  spi: spi-pci1xxxx: Fix error code in probe
  spi: loongson: Fix build warnings about export.h
  spi: omap2-mcspi: Disable multi-mode when the previous message kept CS asserted
  spi: omap2-mcspi: Disable multi mode when CS should be kept asserted after message

7 weeks agoMerge tag 'regulator-fix-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 13 Jun 2025 18:00:19 +0000 (11:00 -0700)] 
Merge tag 'regulator-fix-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fix from Mark Brown:
 "One minor fix for a leak in the DT parsing code in the max20086 driver"

* tag 'regulator-fix-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: max20086: Fix refcount leak in max20086_parse_regulators_dt()

7 weeks agoposix-cpu-timers: fix race between handle_posix_cpu_timers() and posix_cpu_timer_del()
Oleg Nesterov [Fri, 13 Jun 2025 17:26:50 +0000 (19:26 +0200)] 
posix-cpu-timers: fix race between handle_posix_cpu_timers() and posix_cpu_timer_del()

If an exiting non-autoreaping task has already passed exit_notify() and
calls handle_posix_cpu_timers() from IRQ, it can be reaped by its parent
or debugger right after unlock_task_sighand().

If a concurrent posix_cpu_timer_del() runs at that moment, it won't be
able to detect timer->it.cpu.firing != 0: cpu_timer_task_rcu() and/or
lock_task_sighand() will fail.

Add the tsk->exit_state check into run_posix_cpu_timers() to fix this.

This fix is not needed if CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y, because
exit_task_work() is called before exit_notify(). But the check still
makes sense, task_work_add(&tsk->posix_cputimers_work.work) will fail
anyway in this case.

Cc: stable@vger.kernel.org
Reported-by: Benoît Sevens <bsevens@google.com>
Fixes: 0bdd2ed4138e ("sched: run_posix_cpu_timers: Don't check ->exit_state, use lock_task_sighand()")
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
7 weeks agoMerge tag 'trace-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
Linus Torvalds [Fri, 13 Jun 2025 17:51:11 +0000 (10:51 -0700)] 
Merge tag 'trace-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull tracing fix from Steven Rostedt:

 - Do not free "head" variable in filter_free_subsystem_filters()

   The first error path jumps to "free_now" label but first frees the
   newly allocated "head" variable. But the "free_now" code checks this
   variable, and if it is not NULL, it will iterate the list. As this
   list variable was already initialized, the "free_now" code will not
   do anything as it is empty. But freeing it will cause a UAF bug.

   The error path should simply jump to the "free_now" label and leave
   the "head" variable alone.

* tag 'trace-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  tracing: Do not free "head" on error path of filter_free_subsystem_filters()

7 weeks agoMerge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Fri, 13 Jun 2025 17:05:31 +0000 (10:05 -0700)] 
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull kvm fixes from Paolo Bonzini:
 "ARM:

   - Rework of system register accessors for system registers that are
     directly writen to memory, so that sanitisation of the in-memory
     value happens at the correct time (after the read, or before the
     write). For convenience, RMW-style accessors are also provided.

   - Multiple fixes for the so-called "arch-timer-edge-cases' selftest,
     which was always broken.

  x86:

   - Make KVM_PRE_FAULT_MEMORY stricter for TDX, allowing userspace to
     pass only the "untouched" addresses and flipping the shared/private
     bit in the implementation.

   - Disable SEV-SNP support on initialization failure

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: x86/mmu: Reject direct bits in gpa passed to KVM_PRE_FAULT_MEMORY
  KVM: x86/mmu: Embed direct bits into gpa for KVM_PRE_FAULT_MEMORY
  KVM: SEV: Disable SEV-SNP support on initialization failure
  KVM: arm64: selftests: Determine effective counter width in arch_timer_edge_cases
  KVM: arm64: selftests: Fix xVAL init in arch_timer_edge_cases
  KVM: arm64: selftests: Fix thread migration in arch_timer_edge_cases
  KVM: arm64: selftests: Fix help text for arch_timer_edge_cases
  KVM: arm64: Make __vcpu_sys_reg() a pure rvalue operand
  KVM: arm64: Don't use __vcpu_sys_reg() to get the address of a sysreg
  KVM: arm64: Add RMW specific sysreg accessor
  KVM: arm64: Add assignment-specific sysreg accessor