Skip to content

Commit

Permalink
Merge tag 'objtool_urgent_for_v5.16_rc7' of git://git.kernel.org/pub/…
Browse files Browse the repository at this point in the history
…scm/linux/kernel/git/tip/tip

Pull objtool fixes from Borislav Petkov:

 - Prevent clang from reordering the reachable annotation in
   an inline asm statement without inputs

 - Fix objtool builds on non-glibc systems due to undefined
   __always_inline

* tag 'objtool_urgent_for_v5.16_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  compiler.h: Fix annotation macro misplacement with Clang
  uapi: Fix undefined __always_inline on non-glibc systems
  • Loading branch information
torvalds committed Dec 26, 2021
2 parents 4386451 + dcce50e commit 2afa90b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions include/linux/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,
asm volatile(__stringify_label(c) ":\n\t" \
".pushsection .discard.reachable\n\t" \
".long " __stringify_label(c) "b - .\n\t" \
".popsection\n\t"); \
".popsection\n\t" : : "i" (c)); \
})
#define annotate_reachable() __annotate_reachable(__COUNTER__)

#define __annotate_unreachable(c) ({ \
asm volatile(__stringify_label(c) ":\n\t" \
".pushsection .discard.unreachable\n\t" \
".long " __stringify_label(c) "b - .\n\t" \
".popsection\n\t"); \
".popsection\n\t" : : "i" (c)); \
})
#define annotate_unreachable() __annotate_unreachable(__COUNTER__)

Expand Down
4 changes: 2 additions & 2 deletions include/linux/instrumentation.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
asm volatile(__stringify(c) ": nop\n\t" \
".pushsection .discard.instr_begin\n\t" \
".long " __stringify(c) "b - .\n\t" \
".popsection\n\t"); \
".popsection\n\t" : : "i" (c)); \
})
#define instrumentation_begin() __instrumentation_begin(__COUNTER__)

Expand Down Expand Up @@ -50,7 +50,7 @@
asm volatile(__stringify(c) ": nop\n\t" \
".pushsection .discard.instr_end\n\t" \
".long " __stringify(c) "b - .\n\t" \
".popsection\n\t"); \
".popsection\n\t" : : "i" (c)); \
})
#define instrumentation_end() __instrumentation_end(__COUNTER__)
#else
Expand Down
1 change: 1 addition & 0 deletions include/uapi/linux/byteorder/big_endian.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#define __BIG_ENDIAN_BITFIELD
#endif

#include <linux/stddef.h>
#include <linux/types.h>
#include <linux/swab.h>

Expand Down
1 change: 1 addition & 0 deletions include/uapi/linux/byteorder/little_endian.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#define __LITTLE_ENDIAN_BITFIELD
#endif

#include <linux/stddef.h>
#include <linux/types.h>
#include <linux/swab.h>

Expand Down

0 comments on commit 2afa90b

Please sign in to comment.