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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <491CF8E6.6030608@redhat.com>
Date:	Thu, 13 Nov 2008 23:04:54 -0500
From:	Masami Hiramatsu <mhiramat@...hat.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	ananth@...ibm.com, jkenisto@...ibm.com, davem@...emloft.net,
	linux-kernel@...r.kernel.org, systemtap@...rces.redhat.com,
	rusty@...tcorp.com.au
Subject: Re: [PATCH 2/7] kprobes: Add kprobe_insn_mutex and cleanup arch_remove_kprobe()

Hi Andrew,

Andrew Morton wrote:
> On Tue, 11 Nov 2008 15:56:21 -0500
> Masami Hiramatsu <mhiramat@...hat.com> wrote:
> 
>> Add kprobe_insn_mutex for protecting kprobe_insn_pages hlist, and remove
>> kprobe_mutex from architecture dependent code.
>>
>> This allows us to call arch_remove_kprobe() (and free_insn_slot) while holding
>> kprobe_mutex.
>>
>> Signed-off-by: Masami Hiramatsu <mhiramat@...hat.com>
>> ---
>>  arch/arm/kernel/kprobes.c     |    2 --
>>  arch/ia64/kernel/kprobes.c    |    8 +++++---
>>  arch/powerpc/kernel/kprobes.c |    7 ++++---
>>  arch/s390/kernel/kprobes.c    |    7 ++++---
>>  arch/x86/kernel/kprobes.c     |    7 ++++---
>>  include/linux/kprobes.h       |    1 -
>>  kernel/kprobes.c              |   25 +++++++++++++++++++++----
> 
> For some reasons sparc64 never had this mutex.  You've checked that
> sparc64 will be OK after this change?

I think it's OK for those archs.

Actually, this mutex is protecting insn_slot which stores copied
instructions into executable memory. Some architectures which
doesn't need that special memory have its own buffer in the
arch_specific_insn and they don't use insn_slot. On those arch,
kprobe_insn_mutex is not used (not defined).

Thank you,

-- 
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division

e-mail: mhiramat@...hat.com

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ