|
@@ -88,10 +88,12 @@ unsigned paravirt_patch_call(void *insnbuf,
|
|
|
struct branch *b = insnbuf;
|
|
|
unsigned long delta = (unsigned long)target - (addr+5);
|
|
|
|
|
|
- if (tgt_clobbers & ~site_clobbers)
|
|
|
- return len; /* target would clobber too much for this site */
|
|
|
- if (len < 5)
|
|
|
+ if (len < 5) {
|
|
|
+#ifdef CONFIG_RETPOLINE
|
|
|
+ WARN_ONCE("Failing to patch indirect CALL in %ps\n", (void *)addr);
|
|
|
+#endif
|
|
|
return len; /* call too long for patch site */
|
|
|
+ }
|
|
|
|
|
|
b->opcode = 0xe8; /* call */
|
|
|
b->delta = delta;
|
|
@@ -106,8 +108,12 @@ unsigned paravirt_patch_jmp(void *insnbuf, const void *target,
|
|
|
struct branch *b = insnbuf;
|
|
|
unsigned long delta = (unsigned long)target - (addr+5);
|
|
|
|
|
|
- if (len < 5)
|
|
|
+ if (len < 5) {
|
|
|
+#ifdef CONFIG_RETPOLINE
|
|
|
+ WARN_ONCE("Failing to patch indirect JMP in %ps\n", (void *)addr);
|
|
|
+#endif
|
|
|
return len; /* call too long for patch site */
|
|
|
+ }
|
|
|
|
|
|
b->opcode = 0xe9; /* jmp */
|
|
|
b->delta = delta;
|