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]
Date:   Tue, 14 Nov 2017 14:35:24 +0100
From:   Ralf Baechle <ralf@...ux-mips.org>
To:     jiaxun.yang@...goat.com
Cc:     linux-mips@...ux-mips.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4] MIPS: Loongson64: Yeeloong add platform driver
 Yeeloong is a laptop with a MIPS Loongson 2F processor, AMD CS5536 chipset,
 and KB3310B controller.

On Sun, Nov 12, 2017 at 02:36:16PM +0800, jiaxun.yang@...goat.com wrote:

> +     asm(".set noreorder\n");
> +     /*  input enable */
> +     outl(0x00000800, (gpio_base | 0xA0));
> +     /*  revert the input */
> +     outl(0x00000800, (gpio_base | 0xA4));
> +     /*  event-int enable */
> +     outl(0x00000800, (gpio_base | 0xB8));
> +     asm(".set reorder\n");

I forgot to comment on this .set noreorder thing.  GCC expects gas to be
in reorder mode at the end of every bit of inline assembler, so above
code is at the mercy of GCC.

Not sure what the intent was here, was it to avoid GCC from reordering
the outl() calls?  These are already marked volatlile and should not be
reordered by GCC.  .set (no)reorder on the other hand is a directive
to GAS and GCC won't be influenced at all by it.

Cheers,

  Ralf

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ