lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 09 Nov 2007 16:27:32 -0800 From: Jeremy Fitzhardinge <jeremy@...p.org> To: Arjan van de Ven <arjan@...radead.org>, Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...e.hu> CC: Linux Kernel Mailing List <linux-kernel@...r.kernel.org> Subject: problem with x86-prepare-kprobes-code-for-unification.patch Hi, This code in kprobes_64.c from x86-prepare-kprobes-code-for-unification.patch is problematic: +static __always_inline int is_IF_modifier(kprobe_opcode_t *insn) +{ + switch (*insn) { + case 0xfa: /* cli */ + case 0xfb: /* sti */ + case 0xcf: /* iret/iretd */ + case 0x9d: /* popf/popfd */ + return 1; + } + + /* + * on 64 bit x86, 0x40-0x4f are prefixes so we need to look + * at the next byte instead.. but of course not recurse infinitely + */ + if (*insn >= 0x40 && *insn <= 0x4f && *insn > 0x4f) + return is_IF_modifier(++insn); + return 0; +} Firstly, the conditional in the if() doesn't seem to make much sense. It appears to be miscopied from: - if (*insn >= 0x40 && *insn <= 0x4f && *++insn == 0xcf) - return 1; Secondly, the recursive inlining is making 4.0.2 complain: /home/jeremy/hg/xen/paravirt/linux/arch/x86/kernel/kprobes_64.c: In function 'set_current_kprobe': /home/jeremy/hg/xen/paravirt/linux/arch/x86/kernel/kprobes_64.c:152: sorry, unimplemented: inlining failed in call to 'is_IF_modifier': recursive inlining /home/jeremy/hg/xen/paravirt/linux/arch/x86/kernel/kprobes_64.c:166: sorry, unimplemented: called from here J - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists