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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 19 Mar 2020 21:49:04 +0800
From:   "chengjian (D)" <cj.chengjian@...wei.com>
To:     <andrew.murray@....com>, <bristot@...hat.com>,
        <jakub.kicinski@...ronome.com>, Kees Cook <keescook@...omium.org>
CC:     "x86@...nel.org" <x86@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        "Xiexiuqi (Xie XiuQi)" <xiexiuqi@...wei.com>,
        Li Bin <huawei.libin@...wei.com>, <bobo.shaobowang@...wei.com>,
        "chengjian (D)" <cj.chengjian@...wei.com>
Subject: Why is text_mutex used in jump_label_transform for x86_64

Hi,everyone

I'm sorry to disturb you. I have a problem about jump_label, and a bit 
confused about the code

I noticed that text_mutex is used in this function under x86_64 
architecture,
but other architectures do not.

in arch/x86/kernel/jump_label.c
         static void __ref jump_label_transform(struct jump_entry *entry,
              enum jump_label_type type,
              int init)
         {
          mutex_lock(&text_mutex);
          __jump_label_transform(entry, type, init);
          mutex_unlock(&text_mutex);

in arch/arm64/kernel/jump_label.c

         void arch_jump_label_transform(struct jump_entry *entry,
                                        enum jump_label_type type)
         {
                 void *addr = (void *)jump_entry_code(entry);
                 u32 insn;

                 if (type == JUMP_LABEL_JMP) {
                         insn = 
aarch64_insn_gen_branch_imm(jump_entry_code(entry),
jump_entry_target(entry),
AARCH64_INSN_BRANCH_NOLINK);
                 } else {
                         insn = aarch64_insn_gen_nop();
                 }

                 aarch64_insn_patch_text_nosync(addr, insn);
         }


Is there anything wrong with x86

or

is this missing for other architectures?


Thanks

---- Cheng Jian





Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ