1. 23 Feb, 2023 9 commits
    • Peter Zijlstra's avatar
      x86: Fix FILL_RETURN_BUFFER · 6ea17e84
      Peter Zijlstra authored
      With overlapping alternative validation fixed, objtool promptly
      complains:
      
      vmlinux.o: warning: objtool: __switch_to_asm+0x2c: stack layout conflict in alternatives: .altinstr_replacement+0x47
      
      .rela.altinstructions:
      
      000000000000009c  0000000200000002 R_X86_64_PC32          0000000000000000 .text + 16dc
      00000000000000a0  0000000600000002 R_X86_64_PC32          0000000000000000 .altinstr_replacement + 3a
      00000000000000a8  0000000200000002 R_X86_64_PC32          0000000000000000 .text + 16dc
      00000000000000ac  0000000600000002 R_X86_64_PC32          0000000000000000 .altinstr_replacement + 66
      
      .text:
      
      00000000000016b0 <__switch_to_asm>:
          16b0:       f3 0f 1e fa             endbr64
          16b4:       55                      push   %rbp
          16b5:       53                      push   %rbx
          16b6:       41 54                   push   %r12
          16b8:       41 55                   push   %r13
          16ba:       41 56                   push   %r14
          16bc:       41 57                   push   %r15
          16be:       48 89 a7 18 0b 00 00    mov    %rsp,0xb18(%rdi)
          16c5:       48 8b a6 18 0b 00 00    mov    0xb18(%rsi),%rsp
          16cc:       48 8b 9e 28 05 00 00    mov    0x528(%rsi),%rbx
          16d3:       65 48 89 1c 25 00 00 00 00      mov    %rbx,%gs:0x0     16d8: R_X86_64_32S      fixed_percpu_data+0x28
          16dc:       eb 2a                   jmp    1708 <__switch_to_asm+0x58>
          16de:       90                      nop
          16df:       90                      nop
          16e0:       90                      nop
          16e1:       90                      nop
          16e2:       90                      nop
          16e3:       90                      nop
          16e4:       90                      nop
          16e5:       90                      nop
          16e6:       90                      nop
          16e7:       90                      nop
          16e8:       90                      nop
          16e9:       90                      nop
          16ea:       90                      nop
          16eb:       90                      nop
          16ec:       90                      nop
          16ed:       90                      nop
          16ee:       90                      nop
          16ef:       90                      nop
          16f0:       90                      nop
          16f1:       90                      nop
          16f2:       90                      nop
          16f3:       90                      nop
          16f4:       90                      nop
          16f5:       90                      nop
          16f6:       90                      nop
          16f7:       90                      nop
          16f8:       90                      nop
          16f9:       90                      nop
          16fa:       90                      nop
          16fb:       90                      nop
          16fc:       90                      nop
          16fd:       90                      nop
          16fe:       90                      nop
          16ff:       90                      nop
          1700:       90                      nop
          1701:       90                      nop
          1702:       90                      nop
          1703:       90                      nop
          1704:       90                      nop
          1705:       90                      nop
          1706:       90                      nop
          1707:       90                      nop
          1708:       41 5f                   pop    %r15
          170a:       41 5e                   pop    %r14
          170c:       41 5d                   pop    %r13
          170e:       41 5c                   pop    %r12
          1710:       5b                      pop    %rbx
          1711:       5d                      pop    %rbp
          1712:       e9 00 00 00 00          jmp    1717 <__switch_to_asm+0x67>      1713: R_X86_64_PLT32    __switch_to-0x4
      
      .altinstr_replacement:
      
            3a:       49 c7 c4 10 00 00 00    mov    $0x10,%r12
            41:       e8 01 00 00 00          call   47 <.altinstr_replacement+0x47>
            46:       cc                      int3
            47:       e8 01 00 00 00          call   4d <.altinstr_replacement+0x4d>
            4c:       cc                      int3
            4d:       48 83 c4 10             add    $0x10,%rsp
            51:       49 ff cc                dec    %r12
            54:       75 eb                   jne    41 <.altinstr_replacement+0x41>
            56:       0f ae e8                lfence
            59:       65 48 c7 04 25 00 00 00 00 ff ff ff ff  movq   $0xffffffffffffffff,%gs:0x0      5e: R_X86_64_32S        pcpu_hot+0x10
      
            66:       e8 01 00 00 00          call   6c <.altinstr_replacement+0x6c>
            6b:       cc                      int3
            6c:       48 83 c4 08             add    $0x8,%rsp
            70:       0f ae e8                lfence
      
      As can be seen from the two alternatives, when overlaid, the NOP after
      the shorter (starting at 66) coinsides with the call at 47, leading to
      conflicting CFI state for that instruction.
      
      By offsetting the shorter alternative by 2 bytes, this alignment is
      undone.
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Acked-by: default avatarJosh Poimboeuf <jpoimboe@kernel.org>
      Tested-by: Nathan Chancellor <nathan@kernel.org> # build only
      Tested-by: Thomas Weißschuh <linux@weissschuh.net> # compile and run
      Link: https://lore.kernel.org/r/20230208172245.783099843@infradead.org
      6ea17e84
    • Peter Zijlstra's avatar
      objtool: Fix overlapping alternatives · a706bb08
      Peter Zijlstra authored
      Things like ALTERNATIVE_{2,3}() generate multiple alternatives on the
      same place, objtool would override the first orig_alt_group with the
      second (or third), failing to check the CFI among all the different
      variants.
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Acked-by: default avatarJosh Poimboeuf <jpoimboe@kernel.org>
      Tested-by: Nathan Chancellor <nathan@kernel.org> # build only
      Tested-by: Thomas Weißschuh <linux@weissschuh.net> # compile and run
      Link: https://lore.kernel.org/r/20230208172245.711471461@infradead.org
      a706bb08
    • Peter Zijlstra's avatar
      objtool: Union instruction::{call_dest,jump_table} · c6f5dc28
      Peter Zijlstra authored
      The instruction call_dest and jump_table members can never be used at
      the same time, their usage depends on type.
      
       struct instruction {
       	struct list_head           list;                 /*     0    16 */
       	struct hlist_node          hash;                 /*    16    16 */
       	struct list_head           call_node;            /*    32    16 */
       	struct section *           sec;                  /*    48     8 */
       	long unsigned int          offset;               /*    56     8 */
       	/* --- cacheline 1 boundary (64 bytes) --- */
       	long unsigned int          immediate;            /*    64     8 */
       	unsigned int               len;                  /*    72     4 */
       	u8                         type;                 /*    76     1 */
      
       	/* Bitfield combined with previous fields */
      
       	u16                        dead_end:1;           /*    76: 8  2 */
       	u16                        ignore:1;             /*    76: 9  2 */
       	u16                        ignore_alts:1;        /*    76:10  2 */
       	u16                        hint:1;               /*    76:11  2 */
       	u16                        save:1;               /*    76:12  2 */
       	u16                        restore:1;            /*    76:13  2 */
       	u16                        retpoline_safe:1;     /*    76:14  2 */
       	u16                        noendbr:1;            /*    76:15  2 */
       	u16                        entry:1;              /*    78: 0  2 */
       	u16                        visited:4;            /*    78: 1  2 */
       	u16                        no_reloc:1;           /*    78: 5  2 */
      
       	/* XXX 2 bits hole, try to pack */
       	/* Bitfield combined with next fields */
      
       	s8                         instr;                /*    79     1 */
       	struct alt_group *         alt_group;            /*    80     8 */
      -	struct symbol *            call_dest;            /*    88     8 */
      -	struct instruction *       jump_dest;            /*    96     8 */
      -	struct instruction *       first_jump_src;       /*   104     8 */
      -	struct reloc *             jump_table;           /*   112     8 */
      -	struct alternative *       alts;                 /*   120     8 */
      +	struct instruction *       jump_dest;            /*    88     8 */
      +	struct instruction *       first_jump_src;       /*    96     8 */
      +	union {
      +		struct symbol *    _call_dest;           /*   104     8 */
      +		struct reloc *     _jump_table;          /*   104     8 */
      +	};                                               /*   104     8 */
      +	struct alternative *       alts;                 /*   112     8 */
      +	struct symbol *            sym;                  /*   120     8 */
       	/* --- cacheline 2 boundary (128 bytes) --- */
      -	struct symbol *            sym;                  /*   128     8 */
      -	struct stack_op *          stack_ops;            /*   136     8 */
      -	struct cfi_state *         cfi;                  /*   144     8 */
      +	struct stack_op *          stack_ops;            /*   128     8 */
      +	struct cfi_state *         cfi;                  /*   136     8 */
      
      -	/* size: 152, cachelines: 3, members: 29 */
      -	/* sum members: 150 */
      +	/* size: 144, cachelines: 3, members: 28 */
      +	/* sum members: 142 */
       	/* sum bitfield members: 14 bits, bit holes: 1, sum bit holes: 2 bits */
      -	/* last cacheline: 24 bytes */
      +	/* last cacheline: 16 bytes */
       };
      
      pre:	5:39.35 real,   215.58 user,    123.69 sys,     23448736 mem
      post:	5:38.18 real,   213.25 user,    124.90 sys,     23449040 mem
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Acked-by: default avatarJosh Poimboeuf <jpoimboe@kernel.org>
      Tested-by: Nathan Chancellor <nathan@kernel.org> # build only
      Tested-by: Thomas Weißschuh <linux@weissschuh.net> # compile and run
      Link: https://lore.kernel.org/r/20230208172245.640914454@infradead.org
      c6f5dc28
    • Peter Zijlstra's avatar
      objtool: Remove instruction::reloc · 0932dbe1
      Peter Zijlstra authored
      Instead of caching the reloc for each instruction, only keep a
      negative cache of not having a reloc (by far the most common case).
      
       struct instruction {
       	struct list_head           list;                 /*     0    16 */
       	struct hlist_node          hash;                 /*    16    16 */
       	struct list_head           call_node;            /*    32    16 */
       	struct section *           sec;                  /*    48     8 */
       	long unsigned int          offset;               /*    56     8 */
       	/* --- cacheline 1 boundary (64 bytes) --- */
       	long unsigned int          immediate;            /*    64     8 */
       	unsigned int               len;                  /*    72     4 */
       	u8                         type;                 /*    76     1 */
      
       	/* Bitfield combined with previous fields */
      
       	u16                        dead_end:1;           /*    76: 8  2 */
       	u16                        ignore:1;             /*    76: 9  2 */
       	u16                        ignore_alts:1;        /*    76:10  2 */
       	u16                        hint:1;               /*    76:11  2 */
       	u16                        save:1;               /*    76:12  2 */
       	u16                        restore:1;            /*    76:13  2 */
       	u16                        retpoline_safe:1;     /*    76:14  2 */
       	u16                        noendbr:1;            /*    76:15  2 */
       	u16                        entry:1;              /*    78: 0  2 */
       	u16                        visited:4;            /*    78: 1  2 */
      +	u16                        no_reloc:1;           /*    78: 5  2 */
      
      -	/* XXX 3 bits hole, try to pack */
      +	/* XXX 2 bits hole, try to pack */
       	/* Bitfield combined with next fields */
      
       	s8                         instr;                /*    79     1 */
       	struct alt_group *         alt_group;            /*    80     8 */
       	struct symbol *            call_dest;            /*    88     8 */
       	struct instruction *       jump_dest;            /*    96     8 */
       	struct instruction *       first_jump_src;       /*   104     8 */
       	struct reloc *             jump_table;           /*   112     8 */
      -	struct reloc *             reloc;                /*   120     8 */
      +	struct alternative *       alts;                 /*   120     8 */
       	/* --- cacheline 2 boundary (128 bytes) --- */
      -	struct alternative *       alts;                 /*   128     8 */
      -	struct symbol *            sym;                  /*   136     8 */
      -	struct stack_op *          stack_ops;            /*   144     8 */
      -	struct cfi_state *         cfi;                  /*   152     8 */
      +	struct symbol *            sym;                  /*   128     8 */
      +	struct stack_op *          stack_ops;            /*   136     8 */
      +	struct cfi_state *         cfi;                  /*   144     8 */
      
      -	/* size: 160, cachelines: 3, members: 29 */
      -	/* sum members: 158 */
      -	/* sum bitfield members: 13 bits, bit holes: 1, sum bit holes: 3 bits */
      -	/* last cacheline: 32 bytes */
      +	/* size: 152, cachelines: 3, members: 29 */
      +	/* sum members: 150 */
      +	/* sum bitfield members: 14 bits, bit holes: 1, sum bit holes: 2 bits */
      +	/* last cacheline: 24 bytes */
       };
      
      pre:	5:48.89 real,   220.96 user,    127.55 sys,     24834672 mem
      post:	5:39.35 real,   215.58 user,    123.69 sys,     23448736 mem
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Acked-by: default avatarJosh Poimboeuf <jpoimboe@kernel.org>
      Tested-by: Nathan Chancellor <nathan@kernel.org> # build only
      Tested-by: Thomas Weißschuh <linux@weissschuh.net> # compile and run
      Link: https://lore.kernel.org/r/20230208172245.572145269@infradead.org
      0932dbe1
    • Peter Zijlstra's avatar
      objtool: Shrink instruction::{type,visited} · 8b2de412
      Peter Zijlstra authored
      Since we don't have that many types in enum insn_type, force it into a
      u8 and re-arrange member to get rid of the holes, saves another 8
      bytes.
      
       struct instruction {
       	struct list_head           list;                 /*     0    16 */
       	struct hlist_node          hash;                 /*    16    16 */
       	struct list_head           call_node;            /*    32    16 */
       	struct section *           sec;                  /*    48     8 */
       	long unsigned int          offset;               /*    56     8 */
       	/* --- cacheline 1 boundary (64 bytes) --- */
      -	unsigned int               len;                  /*    64     4 */
      -	enum insn_type             type;                 /*    68     4 */
      -	long unsigned int          immediate;            /*    72     8 */
      -	u16                        dead_end:1;           /*    80: 0  2 */
      -	u16                        ignore:1;             /*    80: 1  2 */
      -	u16                        ignore_alts:1;        /*    80: 2  2 */
      -	u16                        hint:1;               /*    80: 3  2 */
      -	u16                        save:1;               /*    80: 4  2 */
      -	u16                        restore:1;            /*    80: 5  2 */
      -	u16                        retpoline_safe:1;     /*    80: 6  2 */
      -	u16                        noendbr:1;            /*    80: 7  2 */
      -	u16                        entry:1;              /*    80: 8  2 */
      +	long unsigned int          immediate;            /*    64     8 */
      +	unsigned int               len;                  /*    72     4 */
      +	u8                         type;                 /*    76     1 */
      
      -	/* XXX 7 bits hole, try to pack */
      +	/* Bitfield combined with previous fields */
      
      -	s8                         instr;                /*    82     1 */
      -	u8                         visited;              /*    83     1 */
      +	u16                        dead_end:1;           /*    76: 8  2 */
      +	u16                        ignore:1;             /*    76: 9  2 */
      +	u16                        ignore_alts:1;        /*    76:10  2 */
      +	u16                        hint:1;               /*    76:11  2 */
      +	u16                        save:1;               /*    76:12  2 */
      +	u16                        restore:1;            /*    76:13  2 */
      +	u16                        retpoline_safe:1;     /*    76:14  2 */
      +	u16                        noendbr:1;            /*    76:15  2 */
      +	u16                        entry:1;              /*    78: 0  2 */
      +	u16                        visited:4;            /*    78: 1  2 */
      
      -	/* XXX 4 bytes hole, try to pack */
      +	/* XXX 3 bits hole, try to pack */
      +	/* Bitfield combined with next fields */
      
      -	struct alt_group *         alt_group;            /*    88     8 */
      -	struct symbol *            call_dest;            /*    96     8 */
      -	struct instruction *       jump_dest;            /*   104     8 */
      -	struct instruction *       first_jump_src;       /*   112     8 */
      -	struct reloc *             jump_table;           /*   120     8 */
      +	s8                         instr;                /*    79     1 */
      +	struct alt_group *         alt_group;            /*    80     8 */
      +	struct symbol *            call_dest;            /*    88     8 */
      +	struct instruction *       jump_dest;            /*    96     8 */
      +	struct instruction *       first_jump_src;       /*   104     8 */
      +	struct reloc *             jump_table;           /*   112     8 */
      +	struct reloc *             reloc;                /*   120     8 */
       	/* --- cacheline 2 boundary (128 bytes) --- */
      -	struct reloc *             reloc;                /*   128     8 */
      -	struct alternative *       alts;                 /*   136     8 */
      -	struct symbol *            sym;                  /*   144     8 */
      -	struct stack_op *          stack_ops;            /*   152     8 */
      -	struct cfi_state *         cfi;                  /*   160     8 */
      +	struct alternative *       alts;                 /*   128     8 */
      +	struct symbol *            sym;                  /*   136     8 */
      +	struct stack_op *          stack_ops;            /*   144     8 */
      +	struct cfi_state *         cfi;                  /*   152     8 */
      
      -	/* size: 168, cachelines: 3, members: 29 */
      -	/* sum members: 162, holes: 1, sum holes: 4 */
      -	/* sum bitfield members: 9 bits, bit holes: 1, sum bit holes: 7 bits */
      -	/* last cacheline: 40 bytes */
      +	/* size: 160, cachelines: 3, members: 29 */
      +	/* sum members: 158 */
      +	/* sum bitfield members: 13 bits, bit holes: 1, sum bit holes: 3 bits */
      +	/* last cacheline: 32 bytes */
       };
      
      pre:	5:48.86 real,   220.30 user,    128.34 sys,     24834672 mem
      post:	5:48.89 real,   220.96 user,    127.55 sys,     24834672 mem
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Acked-by: default avatarJosh Poimboeuf <jpoimboe@kernel.org>
      Tested-by: Nathan Chancellor <nathan@kernel.org> # build only
      Tested-by: Thomas Weißschuh <linux@weissschuh.net> # compile and run
      Link: https://lore.kernel.org/r/20230208172245.501847188@infradead.org
      8b2de412
    • Peter Zijlstra's avatar
      objtool: Make instruction::alts a single-linked list · d5406654
      Peter Zijlstra authored
       struct instruction {
       	struct list_head           list;                 /*     0    16 */
       	struct hlist_node          hash;                 /*    16    16 */
       	struct list_head           call_node;            /*    32    16 */
       	struct section *           sec;                  /*    48     8 */
       	long unsigned int          offset;               /*    56     8 */
       	/* --- cacheline 1 boundary (64 bytes) --- */
       	unsigned int               len;                  /*    64     4 */
       	enum insn_type             type;                 /*    68     4 */
       	long unsigned int          immediate;            /*    72     8 */
       	u16                        dead_end:1;           /*    80: 0  2 */
       	u16                        ignore:1;             /*    80: 1  2 */
       	u16                        ignore_alts:1;        /*    80: 2  2 */
       	u16                        hint:1;               /*    80: 3  2 */
       	u16                        save:1;               /*    80: 4  2 */
       	u16                        restore:1;            /*    80: 5  2 */
       	u16                        retpoline_safe:1;     /*    80: 6  2 */
       	u16                        noendbr:1;            /*    80: 7  2 */
       	u16                        entry:1;              /*    80: 8  2 */
      
       	/* XXX 7 bits hole, try to pack */
      
       	s8                         instr;                /*    82     1 */
       	u8                         visited;              /*    83     1 */
      
       	/* XXX 4 bytes hole, try to pack */
      
       	struct alt_group *         alt_group;            /*    88     8 */
       	struct symbol *            call_dest;            /*    96     8 */
       	struct instruction *       jump_dest;            /*   104     8 */
       	struct instruction *       first_jump_src;       /*   112     8 */
       	struct reloc *             jump_table;           /*   120     8 */
       	/* --- cacheline 2 boundary (128 bytes) --- */
       	struct reloc *             reloc;                /*   128     8 */
      -	struct list_head           alts;                 /*   136    16 */
      -	struct symbol *            sym;                  /*   152     8 */
      -	struct stack_op *          stack_ops;            /*   160     8 */
      -	struct cfi_state *         cfi;                  /*   168     8 */
      +	struct alternative *       alts;                 /*   136     8 */
      +	struct symbol *            sym;                  /*   144     8 */
      +	struct stack_op *          stack_ops;            /*   152     8 */
      +	struct cfi_state *         cfi;                  /*   160     8 */
      
      -	/* size: 176, cachelines: 3, members: 29 */
      -	/* sum members: 170, holes: 1, sum holes: 4 */
      +	/* size: 168, cachelines: 3, members: 29 */
      +	/* sum members: 162, holes: 1, sum holes: 4 */
       	/* sum bitfield members: 9 bits, bit holes: 1, sum bit holes: 7 bits */
      -	/* last cacheline: 48 bytes */
      +	/* last cacheline: 40 bytes */
       };
      
      pre:	5:58.50 real,   229.64 user,    128.65 sys,     26221520 mem
      post:	5:48.86 real,   220.30 user,    128.34 sys,     24834672 mem
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Acked-by: default avatarJosh Poimboeuf <jpoimboe@kernel.org>
      Tested-by: Nathan Chancellor <nathan@kernel.org> # build only
      Tested-by: Thomas Weißschuh <linux@weissschuh.net> # compile and run
      Link: https://lore.kernel.org/r/20230208172245.430556498@infradead.org
      d5406654
    • Peter Zijlstra's avatar
      objtool: Make instruction::stack_ops a single-linked list · 3ee88df1
      Peter Zijlstra authored
       struct instruction {
       	struct list_head           list;                 /*     0    16 */
       	struct hlist_node          hash;                 /*    16    16 */
       	struct list_head           call_node;            /*    32    16 */
       	struct section *           sec;                  /*    48     8 */
       	long unsigned int          offset;               /*    56     8 */
       	/* --- cacheline 1 boundary (64 bytes) --- */
       	unsigned int               len;                  /*    64     4 */
       	enum insn_type             type;                 /*    68     4 */
       	long unsigned int          immediate;            /*    72     8 */
       	u16                        dead_end:1;           /*    80: 0  2 */
       	u16                        ignore:1;             /*    80: 1  2 */
       	u16                        ignore_alts:1;        /*    80: 2  2 */
       	u16                        hint:1;               /*    80: 3  2 */
       	u16                        save:1;               /*    80: 4  2 */
       	u16                        restore:1;            /*    80: 5  2 */
       	u16                        retpoline_safe:1;     /*    80: 6  2 */
       	u16                        noendbr:1;            /*    80: 7  2 */
       	u16                        entry:1;              /*    80: 8  2 */
      
       	/* XXX 7 bits hole, try to pack */
      
       	s8                         instr;                /*    82     1 */
       	u8                         visited;              /*    83     1 */
      
       	/* XXX 4 bytes hole, try to pack */
      
       	struct alt_group *         alt_group;            /*    88     8 */
       	struct symbol *            call_dest;            /*    96     8 */
       	struct instruction *       jump_dest;            /*   104     8 */
       	struct instruction *       first_jump_src;       /*   112     8 */
       	struct reloc *             jump_table;           /*   120     8 */
       	/* --- cacheline 2 boundary (128 bytes) --- */
       	struct reloc *             reloc;                /*   128     8 */
       	struct list_head           alts;                 /*   136    16 */
       	struct symbol *            sym;                  /*   152     8 */
      -	struct list_head           stack_ops;            /*   160    16 */
      -	struct cfi_state *         cfi;                  /*   176     8 */
      +	struct stack_op *          stack_ops;            /*   160     8 */
      +	struct cfi_state *         cfi;                  /*   168     8 */
      
      -	/* size: 184, cachelines: 3, members: 29 */
      -	/* sum members: 178, holes: 1, sum holes: 4 */
      +	/* size: 176, cachelines: 3, members: 29 */
      +	/* sum members: 170, holes: 1, sum holes: 4 */
       	/* sum bitfield members: 9 bits, bit holes: 1, sum bit holes: 7 bits */
      -	/* last cacheline: 56 bytes */
      +	/* last cacheline: 48 bytes */
       };
      
      pre:	5:58.22 real,   226.69 user,    131.22 sys,     26221520 mem
      post:	5:58.50 real,   229.64 user,    128.65 sys,     26221520 mem
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Acked-by: default avatarJosh Poimboeuf <jpoimboe@kernel.org>
      Tested-by: Nathan Chancellor <nathan@kernel.org> # build only
      Tested-by: Thomas Weißschuh <linux@weissschuh.net> # compile and run
      Link: https://lore.kernel.org/r/20230208172245.362196959@infradead.org
      3ee88df1
    • Peter Zijlstra's avatar
      objtool: Change arch_decode_instruction() signature · 20a55463
      Peter Zijlstra authored
      In preparation to changing struct instruction around a bit, avoid
      passing it's members by pointer and instead pass the whole thing.
      
      A cleanup in it's own right too.
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Acked-by: default avatarJosh Poimboeuf <jpoimboe@kernel.org>
      Tested-by: Nathan Chancellor <nathan@kernel.org> # build only
      Tested-by: Thomas Weißschuh <linux@weissschuh.net> # compile and run
      Link: https://lore.kernel.org/r/20230208172245.291087549@infradead.org
      20a55463
    • Ingo Molnar's avatar
      Merge branch 'linus' into objtool/core, to pick up Xen dependencies · 585a78c1
      Ingo Molnar authored
      Pick up dependencies - freshly merged upstream via xen-next - before applying
      dependent objtool changes.
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      585a78c1
  2. 22 Feb, 2023 4 commits
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v6.3-1' of... · 69308402
      Linus Torvalds authored
      Merge tag 'platform-drivers-x86-v6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
      
      Pull x86 platform driver updates from Hans de Goede:
      
       - AMD PMC: Improvements to aid s2idle debugging
      
       - Dell WMI-DDV: hwmon support
      
       - INT3472 camera sensor power-management: Improve privacy LED support
      
       - Intel VSEC: Base TPMI (Topology Aware Register and PM Capsule
         Interface) support
      
       - Mellanox: SN5600 and Nvidia L1 switch support
      
       - Microsoft Surface Support: Various cleanups + code improvements
      
       - tools/intel-speed-select: Various improvements
      
       - Miscellaneous other cleanups / fixes
      
      * tag 'platform-drivers-x86-v6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (80 commits)
        platform/x86: nvidia-wmi-ec-backlight: Add force module parameter
        platform/x86/amd/pmf: Add depends on CONFIG_POWER_SUPPLY
        platform/x86: dell-ddv: Prefer asynchronous probing
        platform/x86: dell-ddv: Add hwmon support
        Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces
        platform: mellanox: mlx-platform: Move bus shift assignment out of the loop
        platform: mellanox: mlx-platform: Add mux selection register to regmap
        platform_data/mlxreg: Add field with mapped resource address
        platform/mellanox: mlxreg-hotplug: Allow more flexible hotplug events configuration
        platform: mellanox: Extend all systems with I2C notification callback
        platform: mellanox: Split logic in init and exit flow
        platform: mellanox: Split initialization procedure
        platform: mellanox: Introduce support of new Nvidia L1 switch
        platform: mellanox: Introduce support for next-generation 800GB/s switch
        platform: mellanox: Cosmetic changes - rename to more common name
        platform: mellanox: Change "reset_pwr_converter_fail" attribute
        platform: mellanox: Introduce support for rack manager switch
        MAINTAINERS: dell-wmi-sysman: drop Divya Bharathi
        x86/platform/uv: Make kobj_type structure constant
        platform/x86: think-lmi: Make kobj_type structure constant
        ...
      69308402
    • Linus Torvalds's avatar
      Merge tag 'tag-chrome-platform-for-v6.3' of... · 5f5ce6bc
      Linus Torvalds authored
      Merge tag 'tag-chrome-platform-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux
      
      Pull chrome platform updates from Tzung-Bi Shih:
       "New drivers:
         - cros_ec_uart for ChromeOS EC protocol over UART
         - cros_typec_vdm for USB PD Vendor Defined Message
      
        Improvements:
         - Preserve logs as much as possible when EC panics
         - Shutdown to refrain from potential HW damages when EC panics
      
        Fixes:
         - Fix DP_PORT_VDO to include DP_CAP_RECEPTACLE
         - Fix a lockdep false positive
      
        Cleanups:
         - Use sysfs_emit*() instead of scnprintf()
         - Use asm instead of asm-generic for unaligned.h
      
        Misc:
         - Rename module name from cros_ec_typec to cros-ec-typec
         - Minor fixes"
      
      * tag 'tag-chrome-platform-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: (34 commits)
        platform/chrome: cros_ec_typec: Fix spelling mistake
        platform/chrome: cros_typec_vdm: Add Attention support
        platform/chrome: cros_ec: Add VDM attention headers
        platform/chrome: cros_typec_vdm: Fix VDO copy
        platform/chrome: cros_ec_typec: allow deferred probe of switch handles
        platform/chrome: cros_ec_proto: remove big stub objects from stack
        platform/chrome: cros_ec_uart: fix negative type promoted to high
        platform/chrome: cros_ec: Use per-device lockdep key
        platform/chrome: fix kernel-doc warnings for cros_ec_command
        platform/chrome: fix kernel-doc warning for last_resume_result
        platform/chrome: fix kernel-doc warning for suspend_timeout_ms
        platform/chrome: fix kernel-doc warnings for panic notifier
        platform/chrome: cros_ec_lpc: initialize the buf variable
        platform/chrome: cros_ec: Fix panic notifier registration
        platform/chrome: cros_typec_switch: Check for retimer flag
        platform/chrome: cros_typec_switch: Use fwnode* prop check
        platform/chrome: cros_typec_vdm: Add VDM send support
        platform/chrome: cros_typec_vdm: Add VDM reply support
        platform/chrome: cros_ec_typec: Add initial VDM support
        platform/chrome: cros_ec_typec: Alter module name with hyphens
        ...
      5f5ce6bc
    • Linus Torvalds's avatar
      Merge tag 'for-linus-6.3-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 239451e9
      Linus Torvalds authored
      Pull xen updates from Juergen Gross:
      
       - help deprecate the /proc/xen files by making the related information
         available via sysfs
      
       - mark the Xen variants of play_dead "noreturn"
      
       - support a shared Xen platform interrupt
      
       - several small cleanups and fixes
      
      * tag 'for-linus-6.3-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen: sysfs: make kobj_type structure constant
        x86/Xen: drop leftover VM-assist uses
        xen: Replace one-element array with flexible-array member
        xen/grant-dma-iommu: Implement a dummy probe_device() callback
        xen/pvcalls-back: fix permanently masked event channel
        xen: Allow platform PCI interrupt to be shared
        x86/xen/time: prefer tsc as clocksource when it is invariant
        x86/xen: mark xen_pv_play_dead() as __noreturn
        x86/xen: don't let xen_pv_play_dead() return
        drivers/xen/hypervisor: Expose Xen SIF flags to userspace
      239451e9
    • Linus Torvalds's avatar
      Merge tag 'hyperv-next-signed-20230220' of... · b8878e5a
      Linus Torvalds authored
      Merge tag 'hyperv-next-signed-20230220' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux
      
      Pull hyperv updates from Wei Liu:
      
       - allow Linux to run as the nested root partition for Microsoft
         Hypervisor (Jinank Jain and Nuno Das Neves)
      
       - clean up the return type of callback functions (Dawei Li)
      
      * tag 'hyperv-next-signed-20230220' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux:
        x86/hyperv: Fix hv_get/set_register for nested bringup
        Drivers: hv: Make remove callback of hyperv driver void returned
        Drivers: hv: Enable vmbus driver for nested root partition
        x86/hyperv: Add an interface to do nested hypercalls
        Drivers: hv: Setup synic registers in case of nested root partition
        x86/hyperv: Add support for detecting nested hypervisor
      b8878e5a
  3. 21 Feb, 2023 27 commits
    • Linus Torvalds's avatar
      Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 8bf1a529
      Linus Torvalds authored
      Pull arm64 updates from Catalin Marinas:
      
       - Support for arm64 SME 2 and 2.1. SME2 introduces a new 512-bit
         architectural register (ZT0, for the look-up table feature) that
         Linux needs to save/restore
      
       - Include TPIDR2 in the signal context and add the corresponding
         kselftests
      
       - Perf updates: Arm SPEv1.2 support, HiSilicon uncore PMU updates, ACPI
         support to the Marvell DDR and TAD PMU drivers, reset DTM_PMU_CONFIG
         (ARM CMN) at probe time
      
       - Support for DYNAMIC_FTRACE_WITH_CALL_OPS on arm64
      
       - Permit EFI boot with MMU and caches on. Instead of cleaning the
         entire loaded kernel image to the PoC and disabling the MMU and
         caches before branching to the kernel bare metal entry point, leave
         the MMU and caches enabled and rely on EFI's cacheable 1:1 mapping of
         all of system RAM to populate the initial page tables
      
       - Expose the AArch32 (compat) ELF_HWCAP features to user in an arm64
         kernel (the arm32 kernel only defines the values)
      
       - Harden the arm64 shadow call stack pointer handling: stash the shadow
         stack pointer in the task struct on interrupt, load it directly from
         this structure
      
       - Signal handling cleanups to remove redundant validation of size
         information and avoid reading the same data from userspace twice
      
       - Refactor the hwcap macros to make use of the automatically generated
         ID registers. It should make new hwcaps writing less error prone
      
       - Further arm64 sysreg conversion and some fixes
      
       - arm64 kselftest fixes and improvements
      
       - Pointer authentication cleanups: don't sign leaf functions, unify
         asm-arch manipulation
      
       - Pseudo-NMI code generation optimisations
      
       - Minor fixes for SME and TPIDR2 handling
      
       - Miscellaneous updates: ARCH_FORCE_MAX_ORDER is now selectable,
         replace strtobool() to kstrtobool() in the cpufeature.c code, apply
         dynamic shadow call stack in two passes, intercept pfn changes in
         set_pte_at() without the required break-before-make sequence, attempt
         to dump all instructions on unhandled kernel faults
      
      * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (130 commits)
        arm64: fix .idmap.text assertion for large kernels
        kselftest/arm64: Don't require FA64 for streaming SVE+ZA tests
        kselftest/arm64: Copy whole EXTRA context
        arm64: kprobes: Drop ID map text from kprobes blacklist
        perf: arm_spe: Print the version of SPE detected
        perf: arm_spe: Add support for SPEv1.2 inverted event filtering
        perf: Add perf_event_attr::config3
        arm64/sme: Fix __finalise_el2 SMEver check
        drivers/perf: fsl_imx8_ddr_perf: Remove set-but-not-used variable
        arm64/signal: Only read new data when parsing the ZT context
        arm64/signal: Only read new data when parsing the ZA context
        arm64/signal: Only read new data when parsing the SVE context
        arm64/signal: Avoid rereading context frame sizes
        arm64/signal: Make interface for restore_fpsimd_context() consistent
        arm64/signal: Remove redundant size validation from parse_user_sigframe()
        arm64/signal: Don't redundantly verify FPSIMD magic
        arm64/cpufeature: Use helper macros to specify hwcaps
        arm64/cpufeature: Always use symbolic name for feature value in hwcaps
        arm64/sysreg: Initial unsigned annotations for ID registers
        arm64/sysreg: Initial annotation of signed ID registers
        ...
      8bf1a529
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm · b327dfe0
      Linus Torvalds authored
      Pull ARM udpates from Russell King:
      
       - Improve Kconfig help text for Cortex A8 and Cortex A9 errata
      
       - Kconfig spelling and grammar fixes
      
       - Allow kernel-mode VFP/Neon in softirq context
      
       - Use Neon in softirq context
      
       - Implement AES-CTR/GHASH version of GCM
      
      * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
        ARM: 9289/1: Allow pre-ARMv5 builds with ld.lld 16.0.0 and newer
        ARM: 9288/1: Kconfigs: fix spelling & grammar
        ARM: 9286/1: crypto: Implement fused AES-CTR/GHASH version of GCM
        ARM: 9285/1: remove meaningless arch/arm/mach-rda/Makefile
        ARM: 9283/1: permit non-nested kernel mode NEON in softirq context
        ARM: 9282/1: vfp: Manipulate task VFP state with softirqs disabled
        ARM: 9281/1: improve Cortex A8/A9 errata help text
      b327dfe0
    • Linus Torvalds's avatar
      Merge tag 'm68k-for-v6.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k · eb6d5bbe
      Linus Torvalds authored
      Pull m68k updates from Geert Uytterhoeven:
      
       - Add seccomp support
      
       - defconfig updates
      
       - Miscellaneous fixes and improvements
      
      * tag 'm68k-for-v6.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
        m68k: /proc/hardware should depend on PROC_FS
        selftests/seccomp: Add m68k support
        m68k: Add kernel seccomp support
        m68k: Check syscall_trace_enter() return code
        m68k: defconfig: Update defconfigs for v6.2-rc3
        m68k: q40: Do not initialise statics to 0
      eb6d5bbe
    • Linus Torvalds's avatar
      Merge tag 's390-6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · bcf5470e
      Linus Torvalds authored
      Pull s390 updates from Heiko Carstens:
      
       - Large cleanup of the con3270/tty3270 driver. Among others this fixes:
           - Background Color Support
           - ASCII Line Character Support
           - VT100 Support
           - Geometries other than 80x24
      
       - Cleanup and improve cmpxchg() code. Also add cmpxchg_user_key() to
         uaccess functions, which will be used by KVM to access KVM guest
         memory with a specific storage key
      
       - Add support for user space events counting to CPUMF
      
       - Cleanup the vfio/ccw code, which also allows now to properly support
         2K Format-2 IDALs
      
       - Move kernel page table allocation and initialization to decompressor,
         which finally allows to enter the kernel with dynamic address
         translation enabled. This in turn allows to get rid of code with
         special handling in the kernel, which has to distinguish if DAT is on
         or off
      
       - Replace kretprobe with rethook
      
       - Various improvements to vfio/ap queue resets:
           - Use TAPQ to verify completion of a reset in progress rather than
             multiple invocations of ZAPQ.
           - Check TAPQ response codes when verifying successful completion of
             ZAPQ.
           - Fix erroneous handling of some error response codes.
           - Increase the maximum amount of time to wait for successful
             completion of ZAPQ
      
       - Rework system call wrappers to get rid of alias functions, which were
         only left on s390
      
       - Cleanup diag288_wdt watchdog driver. It has been agreed on with
         Guenter Roeck that this goes upstream via the s390 tree
      
       - Add missing loadparm parameter handling for list-directed ECKD
         ipl/reipl
      
       - Various improvements to memory detection code
      
       - Remove arch_cpu_idle_time() since the current implementation is
         broken, and allows user space observable accounted idle times which
         can temporarily decrease
      
       - Add Reset DAT-Protection support: (only) allow to change PTEs from RO
         to RW with a new RDP instruction. Unlike the currently used IPTE
         instruction, this does not necessarily guarantee that TLBs of all
         CPUs are synchronously flushed; and that remote CPUs can see spurious
         protection faults. The overall improvement for not requiring an all
         CPU synchronization, like it is required with IPTE, should be
         beneficial
      
       - Fix KFENCE page fault reporting
      
       - Smaller cleanups and improvement all over the place
      
      * tag 's390-6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (182 commits)
        s390/irq,idle: simplify idle check
        s390/processor: add test_and_set_cpu_flag() and test_and_clear_cpu_flag()
        s390/processor: let cpu helper functions return boolean values
        s390/kfence: fix page fault reporting
        s390/zcrypt: introduce ctfm field in struct CPRBX
        s390: remove confusing comment from uapi types header file
        vfio/ccw: remove WARN_ON during shutdown
        s390/entry: remove toolchain dependent micro-optimization
        s390/mem_detect: do not truncate online memory ranges info
        s390/vx: remove __uint128_t type from __vector128 struct again
        s390/mm: add support for RDP (Reset DAT-Protection)
        s390/mm: define private VM_FAULT_* reasons from top bits
        Documentation: s390: correct spelling
        s390/ap: fix status returned by ap_qact()
        s390/ap: fix status returned by ap_aqic()
        s390: vfio-ap: tighten the NIB validity check
        Revert "s390/mem_detect: do not update output parameters on failure"
        s390/idle: remove arch_cpu_idle_time() and corresponding code
        s390/vx: use simple assignments to access __vector128 members
        s390/vx: add 64 and 128 bit members to __vector128 struct
        ...
      bcf5470e
    • Linus Torvalds's avatar
      Merge tag 'x86_cpu_for_v6.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 87793476
      Linus Torvalds authored
      Pull x86 cpuid updates from Borislav Petkov:
      
       - Cache the AMD debug registers in per-CPU variables to avoid MSR
         writes where possible, when supporting a debug registers swap feature
         for SEV-ES guests
      
       - Add support for AMD's version of eIBRS called Automatic IBRS which is
         a set-and-forget control of indirect branch restriction speculation
         resources on privilege change
      
       - Add support for a new x86 instruction - LKGS - Load kernel GS which
         is part of the FRED infrastructure
      
       - Reset SPEC_CTRL upon init to accomodate use cases like kexec which
         rediscover
      
       - Other smaller fixes and cleanups
      
      * tag 'x86_cpu_for_v6.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/amd: Cache debug register values in percpu variables
        KVM: x86: Propagate the AMD Automatic IBRS feature to the guest
        x86/cpu: Support AMD Automatic IBRS
        x86/cpu, kvm: Add the SMM_CTL MSR not present feature
        x86/cpu, kvm: Add the Null Selector Clears Base feature
        x86/cpu, kvm: Move X86_FEATURE_LFENCE_RDTSC to its native leaf
        x86/cpu, kvm: Add the NO_NESTED_DATA_BP feature
        KVM: x86: Move open-coded CPUID leaf 0x80000021 EAX bit propagation code
        x86/cpu, kvm: Add support for CPUID_80000021_EAX
        x86/gsseg: Add the new <asm/gsseg.h> header to <asm/asm-prototypes.h>
        x86/gsseg: Use the LKGS instruction if available for load_gs_index()
        x86/gsseg: Move load_gs_index() to its own new header file
        x86/gsseg: Make asm_load_gs_index() take an u16
        x86/opcode: Add the LKGS instruction to x86-opcode-map
        x86/cpufeature: Add the CPU feature bit for LKGS
        x86/bugs: Reset speculation control settings on init
        x86/cpu: Remove redundant extern x86_read_arch_cap_msr()
      87793476
    • Dave Hansen's avatar
      uaccess: Add speculation barrier to copy_from_user() · 74e19ef0
      Dave Hansen authored
      The results of "access_ok()" can be mis-speculated.  The result is that
      you can end speculatively:
      
      	if (access_ok(from, size))
      		// Right here
      
      even for bad from/size combinations.  On first glance, it would be ideal
      to just add a speculation barrier to "access_ok()" so that its results
      can never be mis-speculated.
      
      But there are lots of system calls just doing access_ok() via
      "copy_to_user()" and friends (example: fstat() and friends).  Those are
      generally not problematic because they do not _consume_ data from
      userspace other than the pointer.  They are also very quick and common
      system calls that should not be needlessly slowed down.
      
      "copy_from_user()" on the other hand uses a user-controller pointer and
      is frequently followed up with code that might affect caches.  Take
      something like this:
      
      	if (!copy_from_user(&kernelvar, uptr, size))
      		do_something_with(kernelvar);
      
      If userspace passes in an evil 'uptr' that *actually* points to a kernel
      addresses, and then do_something_with() has cache (or other)
      side-effects, it could allow userspace to infer kernel data values.
      
      Add a barrier to the common copy_from_user() code to prevent
      mis-speculated values which happen after the copy.
      
      Also add a stub for architectures that do not define barrier_nospec().
      This makes the macro usable in generic code.
      
      Since the barrier is now usable in generic code, the x86 #ifdef in the
      BPF code can also go away.
      Reported-by: default avatarJordy Zomer <jordyzomer@google.com>
      Suggested-by: default avatarLinus Torvalds <torvalds@linuxfoundation.org>
      Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Acked-by: Daniel Borkmann <daniel@iogearbox.net>   # BPF bits
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      74e19ef0
    • Linus Torvalds's avatar
      Merge tag 'thermal-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 1b72607d
      Linus Torvalds authored
      Pull thermal control updates from Rafael Wysocki:
       "The majority of changes here are related to the general switch-over to
        using arrays of generic trip point structures registered along with a
        thermal zone instead of trip point callbacks (this has been done
        mostly by Daniel Lezcano with some help from yours truly on the Intel
        drivers front).
      
        Apart from that and the related reorganization of code, there are some
        enhancements of the existing driver and a new Mediatek Low Voltage
        Thermal Sensor (LVTS) driver. The Intel powerclamp undergoes a major
        rework so it will use the generic idle_inject facility for CPU idle
        time injection going forward and it will take additional module
        parameters for specifying the subset of CPUs to be affected by it
        (work done by Srinivas Pandruvada).
      
        Also included are assorted fixes and a whole bunch of cleanups.
      
        Specifics:
      
         - Rework a large bunch of drivers to use the generic thermal trip
           structure and use the opportunity to do more cleanups by removing
           unused functions from the OF code (Daniel Lezcano)
      
         - Remove core header inclusion from drivers (Daniel Lezcano)
      
         - Fix some locking issues related to the generic thermal trip rework
           (Johan Hovold)
      
         - Fix a crash when requesting the critical temperature on tegra,
           which is related to the generic trip point work (Jon Hunter)
      
         - Clean up thermal device unregistration code (Viresh Kumar)
      
         - Fix and clean up thermal control core initialization error code
           paths (Daniel Lezcano)
      
         - Relocate the trip points handling code into a separate file (Daniel
           Lezcano)
      
         - Make the thermal core fail registration of thermal zones and
           cooling devices if the thermal class has not been registered
           (Rafael Wysocki)
      
         - Add trip point initialization helper functions for ACPI-defined
           trip points and modify two thermal drivers to use them (Rafael
           Wysocki, Daniel Lezcano)
      
         - Make the core thermal control code use sysfs_emit_at() instead of
           scnprintf() where applicable (ye xingchen)
      
         - Consolidate code accessing the Intel TCC (Thermal Control
           Circuitry) MSRs by introducing library functions for that and
           making the TCC-related code in thermal drivers use them (Zhang Rui)
      
         - Enhance the x86_pkg_temp_thermal driver to support dynamic tjmax
           changes (Zhang Rui)
      
         - Address an "unsigned expression compared with zero" warning in the
           intel_soc_dts_iosf thermal driver (Yang Li)
      
         - Update comments regarding two functions in the Intel Menlow thermal
           driver (Deming Wang)
      
         - Use sysfs_emit_at() instead of scnprintf() in the int340x thermal
           driver (ye xingchen)
      
         - Make the intel_pch thermal driver support the Wellsburg PCH (Tim
           Zimmermann)
      
         - Modify the intel_pch and processor_thermal_device_pci thermal
           drivers use generic trip point tables instead of thermal zone trip
           point callbacks (Daniel Lezcano)
      
         - Add production mode attribute sysfs attribute to the int340x
           thermal driver (Srinivas Pandruvada)
      
         - Rework dynamic trip point updates handling and locking in the
           int340x thermal driver (Rafael Wysocki)
      
         - Make the int340x thermal driver use a generic trip points table
           instead of thermal zone trip point callbacks (Rafael Wysocki,
           Daniel Lezcano)
      
         - Clean up and improve the int340x thermal driver (Rafael Wysocki)
      
         - Simplify and clean up the intel_pch thermal driver (Rafael Wysocki)
      
         - Fix the Intel powerclamp thermal driver and make it use the common
           idle injection framework (Srinivas Pandruvada)
      
         - Add two module parameters, cpumask and max_idle, to the Intel
           powerclamp thermal driver to allow it to affect only a specific
           subset of CPUs instead of all of them (Srinivas Pandruvada)
      
         - Make the Intel quark_dts thermal driver Use generic trip point
           objects instead of its own trip point representation (Daniel
           Lezcano)
      
         - Add toctree entry for thermal documents and fix two issues in the
           Intel powerclamp driver documentation (Bagas Sanjaya)
      
         - Use strscpy() to instead of strncpy() in the thermal core (Xu
           Panda)
      
         - Fix thermal_sampling_exit() (Vincent Guittot)
      
         - Add Mediatek Low Voltage Thermal Sensor (LVTS) driver (Balsam
           Chihi)
      
         - Add r8a779g0 RCar support to the rcar_gen3 thermal driver (Geert
           Uytterhoeven)
      
         - Fix useless call to set_trips() when resuming in the rcar_gen3
           thermal control driver and add interrupt support detection at init
           time to it (Niklas Söderlund)
      
         - Fix memory corruption in the hi3660 thermal driver (Yongqin Liu)
      
         - Fix include path for libnl3 in pkg-config file for libthermal
           (Vibhav Pant)
      
         - Remove syscfg-based driver for st as the platform is not supported
           any more (Alain Volmat)"
      
      * tag 'thermal-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (135 commits)
        thermal/drivers/st: Remove syscfg based driver
        thermal: Remove core header inclusion from drivers
        tools/lib/thermal: Fix include path for libnl3 in pkg-config file.
        thermal/drivers/hisi: Drop second sensor hi3660
        thermal/drivers/rcar_gen3_thermal: Fix device initialization
        thermal/drivers/rcar_gen3_thermal: Create device local ops struct
        thermal/drivers/rcar_gen3_thermal: Do not call set_trips() when resuming
        thermal/drivers/rcar_gen3: Add support for R-Car V4H
        dt-bindings: thermal: rcar-gen3-thermal: Add r8a779g0 support
        thermal/drivers/mediatek: Add the Low Voltage Thermal Sensor driver
        dt-bindings: thermal: mediatek: Add LVTS thermal controllers
        thermal/drivers/mediatek: Relocate driver to mediatek folder
        tools/lib/thermal: Fix thermal_sampling_exit()
        Documentation: powerclamp: Fix numbered lists formatting
        Documentation: powerclamp: Escape wildcard in cpumask description
        Documentation: admin-guide: Add toctree entry for thermal docs
        thermal: intel: powerclamp: Add two module parameters
        Documentation: admin-guide: Move intel_powerclamp documentation
        thermal: core: Use sysfs_emit_at() instead of scnprintf()
        thermal: intel: powerclamp: Fix duration module parameter
        ...
      1b72607d
    • Linus Torvalds's avatar
      Merge tag 'acpi-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 88af9b16
      Linus Torvalds authored
      Pull ACPI updates from Rafael Wysocki:
       "These fix a frequency limit issue in the ACPI processor performance
        library code, fix a few issues in the ACPICA code, improve Crystal
        Cove support in the ACPI PMIC driver, fix string handling in the ACPI
        battery driver, add IRQ override quirks for a few machines more, fix
        other assorted problems and clean up code and documentation.
      
        Specifics:
      
         - Drop port I/O validation for some regions to avoid AML failures due
           to rejections of legitimate port I/O writes (Mario Limonciello)
      
         - Constify acpi_get_handle() pathname argument to allow its callers
           to pass const pathnames to it (Sakari Ailus)
      
         - Prevent acpi_ns_simple_repair() from crashing in some cases when
           AE_AML_NO_RETURN_VALUE should be returned (Daniil Tatianin)
      
         - Fix typo in CDAT DSMAS struct definition (Lukas Wunner)
      
         - Drop an unnecessary (void *) conversion from the ACPI processor
           driver (Zhou jie)
      
         - Modify the ACPI processor performance library code to use the "no
           limit" frequency QoS as appropriate and adjust the intel_pstate
           driver accordingly (Rafael Wysocki)
      
         - Add support for NBFT to the ACPI table parser (Stuart Hayes)
      
         - Introduce list of known non-PNP devices to avoid enumerating some
           of them as PNP devices (Rafael Wysocki)
      
         - Add x86 ACPI paths to the ACPI entry in MAINTAINERS to allow
           scripts to report the actual maintainers information (Rafael
           Wysocki)
      
         - Add two more entries to the ACPI IRQ override quirk list (Adam
           Niederer, Werner Sembach)
      
         - Add a pmic_i2c_address entry for Intel Bay Trail Crystal Cove to
           allow intel_soc_pmic_exec_mipi_pmic_seq_element() to be used with
           the Bay Trail Crystal Cove PMIC OpRegion driver (Hans de Goede)
      
         - Add comments with DSDT power OpRegion field names to the ACPI PMIC
           driver (Hans de Goede)
      
         - Fix string termination handling in the ACPI battery driver (Armin
           Wolf)
      
         - Limit error type to 32-bit width in the ACPI APEI error injection
           code (Shuai Xue)
      
         - Fix Lenovo Ideapad Z570 DMI match in the ACPI backlight driver
           (Hans de Goede)
      
         - Silence missing prototype warnings in some places in the
           ACPI-related code (Ammar Faizi)
      
         - Make kobj_type structures used in the ACPI code constant (Thomas
           Weißschuh)
      
         - Correct spelling in firmware-guide/ACPI (Randy Dunlap)
      
         - Clarify the meaning of Explicit and Implicit in the _DSD GPIO
           properties documentation (Andy Shevchenko)
      
         - Fix some kernel-doc comments in the ACPI CPPC library code (Yang
           Li)"
      
      * tag 'acpi-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (25 commits)
        ACPI: make kobj_type structures constant
        Documentation: firmware-guide: gpio-properties: Clarify Explicit and Implicit
        ACPICA: Fix typo in CDAT DSMAS struct definition
        ACPI: resource: Do IRQ override on all TongFang GMxRGxx
        ACPI: resource: Add IRQ overrides for MAINGEAR Vector Pro 2 models
        ACPI: CPPC: Fix some kernel-doc comments
        ACPI: video: Fix Lenovo Ideapad Z570 DMI match
        Documentation: firmware-guide/ACPI: correct spelling
        ACPI: PMIC: Add comments with DSDT power opregion field names
        ACPI: battery: Increase maximum string length
        ACPI: battery: Fix buffer overread if not NUL-terminated
        ACPI: APEI: EINJ: Limit error type to 32-bit width
        MAINTAINERS: Add x86 ACPI paths to the ACPI entry
        ACPI: battery: Fix missing NUL-termination with large strings
        ACPI: PNP: Introduce list of known non-PNP devices
        ACPICA: nsrepair: handle cases without a return value correctly
        ACPI: Silence missing prototype warnings
        cpufreq: intel_pstate: Drop ACPI _PSS states table patching
        ACPI: processor: perflib: Avoid updating frequency QoS unnecessarily
        ACPI: processor: perflib: Use the "no limit" frequency QoS
        ...
      88af9b16
    • Linus Torvalds's avatar
      Merge tag 'pm-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 2504ba8b
      Linus Torvalds authored
      Pull power management updates from Rafael Wysocki:
       "These add EPP support to the AMD P-state cpufreq driver, add support
        for new platforms to the Intel RAPL power capping driver, intel_idle
        and the Qualcomm cpufreq driver, enable thermal cooling for Tegra194,
        drop the custom cpufreq driver for loongson1 that is not necessary any
        more (and the corresponding cpufreq platform device), fix assorted
        issues and clean up code.
      
        Specifics:
      
         - Add EPP support to the AMD P-state cpufreq driver (Perry Yuan, Wyes
           Karny, Arnd Bergmann, Bagas Sanjaya)
      
         - Drop the custom cpufreq driver for loongson1 that is not necessary
           any more and the corresponding cpufreq platform device (Keguang
           Zhang)
      
         - Remove "select SRCU" from system sleep, cpufreq and OPP Kconfig
           entries (Paul E. McKenney)
      
         - Enable thermal cooling for Tegra194 (Yi-Wei Wang)
      
         - Register module device table and add missing compatibles for
           cpufreq-qcom-hw (Nícolas F. R. A. Prado, Abel Vesa and Luca Weiss)
      
         - Various dt binding updates for qcom-cpufreq-nvmem and
           opp-v2-kryo-cpu (Christian Marangi)
      
         - Make kobj_type structure in the cpufreq core constant (Thomas
           Weißschuh)
      
         - Make cpufreq_unregister_driver() return void (Uwe Kleine-König)
      
         - Make the TEO cpuidle governor check CPU utilization in order to
           refine idle state selection (Kajetan Puchalski)
      
         - Make Kconfig select the haltpoll cpuidle governor when the haltpoll
           cpuidle driver is selected and replace a default_idle() call in
           that driver with arch_cpu_idle() to allow MWAIT to be used (Li
           RongQing)
      
         - Add Emerald Rapids Xeon support to the intel_idle driver (Artem
           Bityutskiy)
      
         - Add ARCH_SUSPEND_POSSIBLE dependencies for ARMv4 cpuidle drivers to
           avoid randconfig build failures (Arnd Bergmann)
      
         - Make kobj_type structures used in the cpuidle sysfs interface
           constant (Thomas Weißschuh)
      
         - Make the cpuidle driver registration code update microsecond values
           of idle state parameters in accordance with their nanosecond values
           if they are provided (Rafael Wysocki)
      
         - Make the PSCI cpuidle driver prevent topology CPUs from being
           suspended on PREEMPT_RT (Krzysztof Kozlowski)
      
         - Document that pm_runtime_force_suspend() cannot be used with
           DPM_FLAG_SMART_SUSPEND (Richard Fitzgerald)
      
         - Add EXPORT macros for exporting PM functions from drivers (Richard
           Fitzgerald)
      
         - Remove /** from non-kernel-doc comments in hibernation code (Randy
           Dunlap)
      
         - Fix possible name leak in powercap_register_zone() (Yang Yingliang)
      
         - Add Meteor Lake and Emerald Rapids support to the intel_rapl power
           capping driver (Zhang Rui)
      
         - Modify the idle_inject power capping facility to support 100% idle
           injection (Srinivas Pandruvada)
      
         - Fix large time windows handling in the intel_rapl power capping
           driver (Zhang Rui)
      
         - Fix memory leaks with using debugfs_lookup() in the generic PM
           domains and Energy Model code (Greg Kroah-Hartman)
      
         - Add missing 'cache-unified' property in the example for kryo OPP
           bindings (Rob Herring)
      
         - Fix error checking in opp_migrate_dentry() (Qi Zheng)
      
         - Let qcom,opp-fuse-level be a 2-long array for qcom SoCs (Konrad
           Dybcio)
      
         - Modify some power management utilities to use the canonical ftrace
           path (Ross Zwisler)
      
         - Correct spelling problems for Documentation/power/ as reported by
           codespell (Randy Dunlap)"
      
      * tag 'pm-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (53 commits)
        Documentation: amd-pstate: disambiguate user space sections
        cpufreq: amd-pstate: Fix invalid write to MSR_AMD_CPPC_REQ
        dt-bindings: opp: opp-v2-kryo-cpu: enlarge opp-supported-hw maximum
        dt-bindings: cpufreq: qcom-cpufreq-nvmem: make cpr bindings optional
        dt-bindings: cpufreq: qcom-cpufreq-nvmem: specify supported opp tables
        PM: Add EXPORT macros for exporting PM functions
        cpuidle: psci: Do not suspend topology CPUs on PREEMPT_RT
        MIPS: loongson32: Drop obsolete cpufreq platform device
        powercap: intel_rapl: Fix handling for large time window
        cpuidle: driver: Update microsecond values of state parameters as needed
        cpuidle: sysfs: make kobj_type structures constant
        cpuidle: add ARCH_SUSPEND_POSSIBLE dependencies
        PM: EM: fix memory leak with using debugfs_lookup()
        PM: domains: fix memory leak with using debugfs_lookup()
        cpufreq: Make kobj_type structure constant
        cpufreq: davinci: Fix clk use after free
        cpufreq: amd-pstate: avoid uninitialized variable use
        cpufreq: Make cpufreq_unregister_driver() return void
        OPP: fix error checking in opp_migrate_dentry()
        dt-bindings: cpufreq: cpufreq-qcom-hw: Add SM8550 compatible
        ...
      2504ba8b
    • Linus Torvalds's avatar
      Merge tag 'hardening-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · 4a7d37e8
      Linus Torvalds authored
      Pull hardening updates from Kees Cook:
       "Beyond some specific LoadPin, UBSAN, and fortify features, there are
        other fixes scattered around in various subsystems where maintainers
        were okay with me carrying them in my tree or were non-responsive but
        the patches were reviewed by others:
      
         - Replace 0-length and 1-element arrays with flexible arrays in
           various subsystems (Paulo Miguel Almeida, Stephen Rothwell, Kees
           Cook)
      
         - randstruct: Disable Clang 15 support (Eric Biggers)
      
         - GCC plugins: Drop -std=gnu++11 flag (Sam James)
      
         - strpbrk(): Refactor to use strchr() (Andy Shevchenko)
      
         - LoadPin LSM: Allow root filesystem switching when non-enforcing
      
         - fortify: Use dynamic object size hints when available
      
         - ext4: Fix CFI function prototype mismatch
      
         - Nouveau: Fix DP buffer size arguments
      
         - hisilicon: Wipe entire crypto DMA pool on error
      
         - coda: Fully allocate sig_inputArgs
      
         - UBSAN: Improve arm64 trap code reporting
      
         - copy_struct_from_user(): Add minimum bounds check on kernel buffer
           size"
      
      * tag 'hardening-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        randstruct: disable Clang 15 support
        uaccess: Add minimum bounds check on kernel buffer size
        arm64: Support Clang UBSAN trap codes for better reporting
        coda: Avoid partial allocation of sig_inputArgs
        gcc-plugins: drop -std=gnu++11 to fix GCC 13 build
        lib/string: Use strchr() in strpbrk()
        crypto: hisilicon: Wipe entire pool on error
        net/i40e: Replace 0-length array with flexible array
        io_uring: Replace 0-length array with flexible array
        ext4: Fix function prototype mismatch for ext4_feat_ktype
        i915/gvt: Replace one-element array with flexible-array member
        drm/nouveau/disp: Fix nvif_outp_acquire_dp() argument size
        LoadPin: Allow filesystem switch when not enforcing
        LoadPin: Move pin reporting cleanly out of locking
        LoadPin: Refactor sysctl initialization
        LoadPin: Refactor read-only check into a helper
        ARM: ixp4xx: Replace 0-length arrays with flexible arrays
        fortify: Use __builtin_dynamic_object_size() when available
        rxrpc: replace zero-lenth array with DECLARE_FLEX_ARRAY() helper
      4a7d37e8
    • Linus Torvalds's avatar
      Merge tag 'seccomp-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · 902d9fcd
      Linus Torvalds authored
      Pull seccomp update from Kees Cook:
      
       - Fix kernel-doc function name ordering to avoid warning (Randy Dunlap)
      
      * tag 'seccomp-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        seccomp: fix kernel-doc function name warning
      902d9fcd
    • Linus Torvalds's avatar
      Merge tag 'rcu.2023.02.10a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu · 8cc01d43
      Linus Torvalds authored
      Pull RCU updates from Paul McKenney:
      
       - Documentation updates
      
       - Miscellaneous fixes, perhaps most notably:
      
            - Throttling callback invocation based on the number of callbacks
              that are now ready to invoke instead of on the total number of
              callbacks
      
            - Several patches that suppress false-positive boot-time
              diagnostics, for example, due to lockdep not yet being
              initialized
      
            - Make expedited RCU CPU stall warnings dump stacks of any tasks
              that are blocking the stalled grace period. (Normal RCU CPU
              stall warnings have done this for many years)
      
            - Lazy-callback fixes to avoid delays during boot, suspend, and
              resume. (Note that lazy callbacks must be explicitly enabled, so
              this should not (yet) affect production use cases)
      
       - Make kfree_rcu() and friends take advantage of polled grace periods,
         thus reducing memory footprint by almost two orders of magnitude,
         admittedly on a microbenchmark
      
         This also begins the transition from kfree_rcu(p) to
         kfree_rcu_mightsleep(p). This transition was motivated by bugs where
         kfree_rcu(p), which can block, was typed instead of the intended
         kfree_rcu(p, rh)
      
       - SRCU updates, perhaps most notably fixing a bug that causes SRCU to
         fail when booted on a system with a non-zero boot CPU. This
         surprising situation actually happens for kdump kernels on the
         powerpc architecture
      
         This also adds an srcu_down_read() and srcu_up_read(), which act like
         srcu_read_lock() and srcu_read_unlock(), but allow an SRCU read-side
         critical section to be handed off from one task to another
      
       - Clean up the now-useless SRCU Kconfig option
      
         There are a few more commits that are not yet acked or pulled into
         maintainer trees, and these will be in a pull request for a later
         merge window
      
       - RCU-tasks updates, perhaps most notably these fixes:
      
            - A strange interaction between PID-namespace unshare and the
              RCU-tasks grace period that results in a low-probability but
              very real hang
      
            - A race between an RCU tasks rude grace period on a single-CPU
              system and CPU-hotplug addition of the second CPU that can
              result in a too-short grace period
      
            - A race between shrinking RCU tasks down to a single callback
              list and queuing a new callback to some other CPU, but where
              that queuing is delayed for more than an RCU grace period. This
              can result in that callback being stranded on the non-boot CPU
      
       - Torture-test updates and fixes
      
       - Torture-test scripting updates and fixes
      
       - Provide additional RCU CPU stall-warning information in kernels built
         with CONFIG_RCU_CPU_STALL_CPUTIME=y, and restore the full five-minute
         timeout limit for expedited RCU CPU stall warnings
      
      * tag 'rcu.2023.02.10a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: (80 commits)
        rcu/kvfree: Add kvfree_rcu_mightsleep() and kfree_rcu_mightsleep()
        kernel/notifier: Remove CONFIG_SRCU
        init: Remove "select SRCU"
        fs/quota: Remove "select SRCU"
        fs/notify: Remove "select SRCU"
        fs/btrfs: Remove "select SRCU"
        fs: Remove CONFIG_SRCU
        drivers/pci/controller: Remove "select SRCU"
        drivers/net: Remove "select SRCU"
        drivers/md: Remove "select SRCU"
        drivers/hwtracing/stm: Remove "select SRCU"
        drivers/dax: Remove "select SRCU"
        drivers/base: Remove CONFIG_SRCU
        rcu: Disable laziness if lazy-tracking says so
        rcu: Track laziness during boot and suspend
        rcu: Remove redundant call to rcu_boost_kthread_setaffinity()
        rcu: Allow up to five minutes expedited RCU CPU stall-warning timeouts
        rcu: Align the output of RCU CPU stall warning messages
        rcu: Add RCU stall diagnosis information
        sched: Add helper nr_context_switches_cpu()
        ...
      8cc01d43
    • Linus Torvalds's avatar
      Merge tag 'cgroup-for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup · 8ca8d89b
      Linus Torvalds authored
      Pull cgroup updates from Tejun Heo:
       "All the changes are trivial: documentation updates and a trivial code
        cleanup"
      
      * tag 'cgroup-for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
        cgroup/cpuset: fix a few kernel-doc warnings & coding style
        docs: cgroup-v1: use numbered lists for user interface setup
        docs: cgroup-v1: add internal cross-references
        docs: cgroup-v1: make swap extension subsections subsections
        docs: cgroup-v1: use bullet lists for list of stat file tables
        docs: cgroup-v1: move hierarchy of accounting caption
        docs: cgroup-v1: fix footnotes
        docs: cgroup-v1: use code block for locking order schema
        docs: cgroup-v1: wrap remaining admonitions in admonition blocks
        docs: cgroup-v1: replace custom note constructs with appropriate admonition blocks
        cgroup/cpuset: no need to explicitly init a global static variable
      8ca8d89b
    • Linus Torvalds's avatar
      Merge tag 'wq-for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq · 3e82b41e
      Linus Torvalds authored
      Pull workqueue updates from Tejun Heo:
      
       - When per-cpu workqueue workers expire after sitting idle for too
         long, they used to wake up to the CPU that they're bound to in order
         to exit. This unfortunately could cause unwanted disturbances on CPUs
         isolated for e.g. RT applications.
      
         The worker exit path is restructured so that an existing worker is
         unbound from its CPU before being woken up for the last time,
         allowing it to migrate away from an isolated CPU for exiting.
      
       - A couple debug improvements. Watchdog dump is made more compact and
         workqueue now warns if used-after-free during the RCU grace period
         after destroy_workqueue().
      
      * tag 'wq-for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
        workqueue: Fold rebind_worker() within rebind_workers()
        workqueue: Unbind kworkers before sending them to exit()
        workqueue: Don't hold any lock while rcuwait'ing for !POOL_MANAGER_ACTIVE
        workqueue: Convert the idle_timer to a timer + work_struct
        workqueue: Factorize unbind/rebind_workers() logic
        workqueue: Protects wq_unbound_cpumask with wq_pool_attach_mutex
        workqueue: Make show_pwq() use run-length encoding
        workqueue: Add a new flag to spot the potential UAF error
      3e82b41e
    • Linus Torvalds's avatar
      Merge tag 'irq-core-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 9e58df97
      Linus Torvalds authored
      Pull irq updates from Thomas Gleixner:
       "Updates for the interrupt subsystem:
      
        Core:
      
         - Move the interrupt affinity spreading mechanism into lib/group_cpus
           so it can be used for similar spreading requirements, e.g. in the
           block multi-queue code
      
           This also contains a first usecase in the block multi-queue code
           which Jens asked to take along with the librarization
      
         - Improve irqdomain locking to close a number race conditions which
           can be observed with massive parallel device driver probing
      
         - Enforce and document the semantics of disable_irq() which cannot be
           invoked safely from non-sleepable context
      
         - Move the IPI multiplexing code from the Apple AIC driver into the
           core, so it can be reused by RISCV
      
        Drivers:
      
         - Plug OF node refcounting leaks in various drivers
      
         - Correctly mark level triggered interrupts in the Broadcom L2
           drivers
      
         - The usual small fixes and improvements
      
         - No new drivers for the record!"
      
      * tag 'irq-core-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (42 commits)
        irqchip/irq-bcm7120-l2: Set IRQ_LEVEL for level triggered interrupts
        irqchip/irq-brcmstb-l2: Set IRQ_LEVEL for level triggered interrupts
        irqdomain: Switch to per-domain locking
        irqchip/mvebu-odmi: Use irq_domain_create_hierarchy()
        irqchip/loongson-pch-msi: Use irq_domain_create_hierarchy()
        irqchip/gic-v3-mbi: Use irq_domain_create_hierarchy()
        irqchip/gic-v3-its: Use irq_domain_create_hierarchy()
        irqchip/gic-v2m: Use irq_domain_create_hierarchy()
        irqchip/alpine-msi: Use irq_domain_add_hierarchy()
        x86/uv: Use irq_domain_create_hierarchy()
        x86/ioapic: Use irq_domain_create_hierarchy()
        irqdomain: Clean up irq_domain_push/pop_irq()
        irqdomain: Drop leftover brackets
        irqdomain: Drop dead domain-name assignment
        irqdomain: Drop revmap mutex
        irqdomain: Fix domain registration race
        irqdomain: Fix mapping-creation race
        irqdomain: Refactor __irq_domain_alloc_irqs()
        irqdomain: Look for existing mapping only once
        irqdomain: Drop bogus fwspec-mapping error handling
        ...
      9e58df97
    • Linus Torvalds's avatar
      Merge tag 'timers-core-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 560b8030
      Linus Torvalds authored
      Pull timer updates from Thomas Gleixner:
       "Updates for timekeeping, timers and clockevent/source drivers:
      
        Core:
      
         - Yet another round of improvements to make the clocksource watchdog
           more robust:
      
             - Relax the clocksource-watchdog skew criteria to match the NTP
               criteria.
      
             - Temporarily skip the watchdog when high memory latencies are
               detected which can lead to false-positives.
      
             - Provide an option to enable TSC skew detection even on systems
               where TSC is marked as reliable.
      
           Sigh!
      
         - Initialize the restart block in the nanosleep syscalls to be
           directed to the no restart function instead of doing a partial
           setup on entry.
      
           This prevents an erroneous restart_syscall() invocation from
           corrupting user space data. While such a situation is clearly a
           user space bug, preventing this is a correctness issue and caters
           to the least suprise principle.
      
         - Ignore the hrtimer slack for realtime tasks in schedule_hrtimeout()
           to align it with the nanosleep semantics.
      
        Drivers:
      
         - The obligatory new driver bindings for Mediatek, Rockchip and
           RISC-V variants.
      
         - Add support for the C3STOP misfeature to the RISC-V timer to handle
           the case where the timer stops in deeper idle state.
      
         - Set up a static key in the RISC-V timer correctly before first use.
      
         - The usual small improvements and fixes all over the place"
      
      * tag 'timers-core-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (30 commits)
        clocksource/drivers/timer-sun4i: Add CLOCK_EVT_FEAT_DYNIRQ
        clocksource/drivers/em_sti: Mark driver as non-removable
        clocksource/drivers/sh_tmu: Mark driver as non-removable
        clocksource/drivers/riscv: Patch riscv_clock_next_event() jump before first use
        clocksource/drivers/timer-microchip-pit64b: Add delay timer
        clocksource/drivers/timer-microchip-pit64b: Select driver only on ARM
        dt-bindings: timer: sifive,clint: add comaptibles for T-Head's C9xx
        dt-bindings: timer: mediatek,mtk-timer: add MT8365
        clocksource/drivers/riscv: Get rid of clocksource_arch_init() callback
        clocksource/drivers/sh_cmt: Mark driver as non-removable
        clocksource/drivers/timer-microchip-pit64b: Drop obsolete dependency on COMPILE_TEST
        clocksource/drivers/riscv: Increase the clock source rating
        clocksource/drivers/timer-riscv: Set CLOCK_EVT_FEAT_C3STOP based on DT
        dt-bindings: timer: Add bindings for the RISC-V timer device
        RISC-V: time: initialize hrtimer based broadcast clock event device
        dt-bindings: timer: rk-timer: Add rktimer for rv1126
        time/debug: Fix memory leak with using debugfs_lookup()
        clocksource: Enable TSC watchdog checking of HPET and PMTMR only when requested
        posix-timers: Use atomic64_try_cmpxchg() in __update_gt_cputime()
        clocksource: Verify HPET and PMTMR when TSC unverified
        ...
      560b8030
    • Linus Torvalds's avatar
      Merge tag 'x86-cleanups-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 056612fd
      Linus Torvalds authored
      Pull miscellaneous x86 cleanups from Thomas Gleixner:
      
       - Correct the common copy and pasted mishandling of kstrtobool() in the
         strict_sas_size() setup function
      
       - Make recalibrate_cpu_khz() an GPL only export
      
       - Check TSC feature before doing anything else which avoids pointless
         code execution if TSC is not available
      
       - Remove or fixup stale and misleading comments
      
       - Remove unused or pointelessly duplicated variables
      
       - Spelling and typo fixes
      
      * tag 'x86-cleanups-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/hotplug: Remove incorrect comment about mwait_play_dead()
        x86/tsc: Do feature check as the very first thing
        x86/tsc: Make recalibrate_cpu_khz() export GPL only
        x86/cacheinfo: Remove unused trace variable
        x86/Kconfig: Fix spellos & punctuation
        x86/signal: Fix the value returned by strict_sas_size()
        x86/cpu: Remove misleading comment
        x86/setup: Move duplicate boot_cpu_data definition out of the ifdeffery
        x86/boot/e820: Fix typo in e820.c comment
      056612fd
    • Linus Torvalds's avatar
      Merge tag 'x86_vdso_for_v6.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3f0b0903
      Linus Torvalds authored
      Pull x86 vdso updates from Borislav Petkov:
      
       - Add getcpu support for the 32-bit version of the vDSO
      
       - Some smaller fixes
      
      * tag 'x86_vdso_for_v6.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/vdso: Fix -Wmissing-prototypes warnings
        x86/vdso: Fake 32bit VDSO build on 64bit compile for vgetcpu
        selftests: Emit a warning if getcpu() is missing on 32bit
        x86/vdso: Provide getcpu for x86-32.
        x86/cpu: Provide the full setup for getcpu() on x86-32
        x86/vdso: Move VDSO image init to vdso2c generated code
      3f0b0903
    • Linus Torvalds's avatar
      Merge tag 'x86_microcode_for_v6.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · efebca0b
      Linus Torvalds authored
      Pull x86 microcode loader updates from Borislav Petkov:
      
       - Fix mixed steppings support on AMD which got broken somewhere along
         the way
      
       - Improve revision reporting
      
       - Properly check CPUID capabilities after late microcode upgrade to
         avoid false positives
      
       - A garden variety of other small fixes
      
      * tag 'x86_microcode_for_v6.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/microcode/core: Return an error only when necessary
        x86/microcode/AMD: Fix mixed steppings support
        x86/microcode/AMD: Add a @cpu parameter to the reloading functions
        x86/microcode/amd: Remove load_microcode_amd()'s bsp parameter
        x86/microcode: Allow only "1" as a late reload trigger value
        x86/microcode/intel: Print old and new revision during early boot
        x86/microcode/intel: Pass the microcode revision to print_ucode_info() directly
        x86/microcode: Adjust late loading result reporting message
        x86/microcode: Check CPU capabilities after late microcode update correctly
        x86/microcode: Add a parameter to microcode_check() to store CPU capabilities
        x86/microcode: Use the DEVICE_ATTR_RO() macro
        x86/microcode/AMD: Handle multiple glued containers properly
        x86/microcode/AMD: Rename a couple of functions
      efebca0b
    • Linus Torvalds's avatar
      Merge tag 'x86_cache_for_v6.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · aa8c3db4
      Linus Torvalds authored
      Pull x86 resource control updates from Borislav Petkov:
      
       - Add support for a new AMD feature called slow memory bandwidth
         allocation. Its goal is to control resource allocation in external
         slow memory which is connected to the machine like for example
         through CXL devices, accelerators etc
      
      * tag 'x86_cache_for_v6.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/resctrl: Fix a silly -Wunused-but-set-variable warning
        Documentation/x86: Update resctrl.rst for new features
        x86/resctrl: Add interface to write mbm_local_bytes_config
        x86/resctrl: Add interface to write mbm_total_bytes_config
        x86/resctrl: Add interface to read mbm_local_bytes_config
        x86/resctrl: Add interface to read mbm_total_bytes_config
        x86/resctrl: Support monitor configuration
        x86/resctrl: Add __init attribute to rdt_get_mon_l3_config()
        x86/resctrl: Detect and configure Slow Memory Bandwidth Allocation
        x86/resctrl: Include new features in command line options
        x86/cpufeatures: Add Bandwidth Monitoring Event Configuration feature flag
        x86/resctrl: Add a new resource type RDT_RESOURCE_SMBA
        x86/cpufeatures: Add Slow Memory Bandwidth Allocation feature flag
        x86/resctrl: Replace smp_call_function_many() with on_each_cpu_mask()
      aa8c3db4
    • Linus Torvalds's avatar
      Merge tag 'x86_alternatives_for_v6.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 1adce1b9
      Linus Torvalds authored
      Pull x86 asm alternatives updates from Borislav Petkov:
      
       - Teach the static_call patching infrastructure to handle conditional
         tall calls properly which can be static calls too
      
       - Add proper struct alt_instr.flags which controls different aspects of
         insn patching behavior
      
      * tag 'x86_alternatives_for_v6.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/static_call: Add support for Jcc tail-calls
        x86/alternatives: Teach text_poke_bp() to patch Jcc.d32 instructions
        x86/alternatives: Introduce int3_emulate_jcc()
        x86/alternatives: Add alt_instr.flags
      1adce1b9
    • Linus Torvalds's avatar
      Merge tag 'edac_updates_for_v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras · d9de5ce8
      Linus Torvalds authored
      Pull EDAC updates from Borislav Petkov:
      
       - Add a driver for the RAS functionality on Xilinx's on chip memory
         controller
      
       - Add support for decoding errors from the first and second level
         memory on SKL-based hardware
      
       - Add support for the memory controllers in Intel Granite Rapids and
         Emerald Rapids machines
      
       - First round of amd64_edac driver simplification and removal of
         unneeded functionality
      
       - The usual cleanups and fixes
      
      * tag 'edac_updates_for_v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
        EDAC/amd64: Shut up an -Werror,-Wsometimes-uninitialized clang false positive
        EDAC/amd64: Remove early_channel_count()
        EDAC/amd64: Remove PCI Function 0
        EDAC/amd64: Remove PCI Function 6
        EDAC/amd64: Remove scrub rate control for Family 17h and later
        EDAC/amd64: Don't set up EDAC PCI control on Family 17h+
        EDAC/i10nm: Add driver decoder for Sapphire Rapids server
        EDAC/i10nm: Add Intel Granite Rapids server support
        EDAC/i10nm: Make more configurations CPU model specific
        EDAC/i10nm: Add Intel Emerald Rapids server support
        EDAC/skx_common: Delete duplicated and unreachable code
        EDAC/skx_common: Enable EDAC support for the "near" memory
        EDAC/qcom: Add platform_device_id table for module autoloading
        EDAC/zynqmp: Add EDAC support for Xilinx ZynqMP OCM
        dt-bindings: edac: Add bindings for Xilinx ZynqMP OCM
      d9de5ce8
    • Linus Torvalds's avatar
      Merge tag 'ras_core_for_v6.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0246725d
      Linus Torvalds authored
      Pull RAS updates from Borislav Petkov:
      
       - Add support for reporting more bits of the physical address on error,
         on newer AMD CPUs
      
       - Mask out bits which don't belong to the address of the error being
         reported
      
      * tag 'ras_core_for_v6.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mce: Mask out non-address bits from machine check bank
        x86/mce: Add support for Extended Physical Address MCA changes
        x86/mce: Define a function to extract ErrorAddr from MCA_ADDR
      0246725d
    • Linus Torvalds's avatar
      Merge tag 'x86-platform-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 89f5349e
      Linus Torvalds authored
      Pull x86 platform update from Ingo Molnar:
      
       - Simplify add_rtc_cmos()
      
       - Use strscpy() in the mcelog code
      
      * tag 'x86-platform-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mce/dev-mcelog: use strscpy() to instead of strncpy()
        x86/rtc: Simplify PNP ids check
      89f5349e
    • Linus Torvalds's avatar
      Merge tag 'x86-mm-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 238b05ec
      Linus Torvalds authored
      Pull x86 mm update from Ingo Molnar:
       "Micro-optimize __flush_tlb_all()"
      
      * tag 'x86-mm-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/cpu: Use cpu_feature_enabled() when checking global pages support
      238b05ec
    • Linus Torvalds's avatar
      Merge tag 'x86-fpu-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 2e0ddb34
      Linus Torvalds authored
      Pull x86 fpu updates from Ingo Molnar:
      
       - Replace zero-length array in struct xregs_state with flexible-array
         member, to help the enabling of stricter compiler checks.
      
       - Don't set TIF_NEED_FPU_LOAD for PF_IO_WORKER threads.
      
      * tag 'x86-fpu-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/fpu: Don't set TIF_NEED_FPU_LOAD for PF_IO_WORKER threads
        x86/fpu: Replace zero-length array in struct xregs_state with flexible-array member
      2e0ddb34
    • Linus Torvalds's avatar
      Merge tag 'x86-core-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 8a68bd3e
      Linus Torvalds authored
      Pull x86 core updates from Ingo Molnar:
      
       - Clean up the signal frame layout tests
      
       - Suppress KMSAN false positive reports in arch_within_stack_frames()
      
      * tag 'x86-core-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86: Suppress KMSAN reports in arch_within_stack_frames()
        x86/signal/compat: Move sigaction_compat_abi() to signal_64.c
        x86/signal: Move siginfo field tests
      8a68bd3e