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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101004175039.GC2900@redhat.com>
Date:	Mon, 4 Oct 2010 13:50:39 -0400
From:	Jason Baron <jbaron@...hat.com>
To:	David Daney <ddaney@...iumnetworks.com>
Cc:	Rabin Vincent <rabin@....in>, linux-mips@...ux-mips.org,
	ralf@...ux-mips.org, linux-kernel@...r.kernel.org,
	rostedt@...dmis.org, David Miller <davem@...emloft.net>
Subject: Re: [PATCH] jump label: Add MIPS support.

On Mon, Oct 04, 2010 at 10:43:07AM -0700, David Daney wrote:
> On 10/03/2010 11:15 AM, Rabin Vincent wrote:
>> On Tue, Sep 28, 2010 at 11:40 PM, David Daney<ddaney@...iumnetworks.com>  wrote:
>>> +void arch_jump_label_text_poke_early(jump_label_t addr)
>>> +{
>>> +       union mips_instruction *insn_p =
>>> +               (union mips_instruction *)(unsigned long)addr;
>>> +
>>> +       insn_p->word = 0; /* nop */
>>> +       flush_icache_range((unsigned long)insn_p,
>>> +                          (unsigned long)insn_p + sizeof(*insn_p));
>>> +}
>>
>> Can't this function be a no-op on MIPS?  This seems to be
>> used on x86 to patch in the optimal nop instruction, but
>> on MIPS the optimal/only nop instruction should already
>> be in place at build time.  Same thing for the SPARC
>> implementation.
>>
>
> Yes, I think you are correct.
>
> On MIPS the NOP is already optimal.  I will respin the MIPS patch to  
> make arch_jump_label_text_poke_early() be empty.
>
> davem wasn't CCed on the original message, so I added him.  I would  
> defer to him on the SPARC version.
>
>

that's right, arch_jump_label_text_poke_early() can probably be a no-op
for most arches.

We can also look at adding an empty definition into the generic
header. So that arches don't have to provide an empty definition.

thanks,

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