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: <20201102183430.GG15392@zn.tnic>
Date:   Mon, 2 Nov 2020 19:34:30 +0100
From:   Borislav Petkov <bp@...en8.de>
To:     Segher Boessenkool <segher@...nel.crashing.org>
Cc:     shuo.a.liu@...el.com, linux-kernel@...r.kernel.org, x86@...nel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "H . Peter Anvin" <hpa@...or.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        Sean Christopherson <sean.j.christopherson@...el.com>,
        Yu Wang <yu1.wang@...el.com>,
        Reinette Chatre <reinette.chatre@...el.com>,
        Yakui Zhao <yakui.zhao@...el.com>,
        Dave Hansen <dave.hansen@...el.com>,
        Dan Williams <dan.j.williams@...el.com>,
        Fengwei Yin <fengwei.yin@...el.com>,
        Zhi Wang <zhi.a.wang@...el.com>,
        Zhenyu Wang <zhenyuw@...ux.intel.com>,
        Arvind Sankar <nivedita@...m.mit.edu>,
        Peter Zijlstra <peterz@...radead.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>
Subject: Re: [PATCH v5 04/17] x86/acrn: Introduce hypercall interfaces

On Mon, Nov 02, 2020 at 12:10:00PM -0600, Segher Boessenkool wrote:
> movl works for moving anything g->r.

Right.

> This is not true for most insns, and not for most architectures at
> all (usually loading from memory has a separate mnemonic; moving an
> immediate number often as well (and it does not usually allow *every*
> immediate anyway, not even all numbers!)

So I've heard from other architectures. Every arch has its own problems.
:-)

> Most people do not read the documentation, they just copy from (bad)
> examples (and arguably, any example you do not really understand is a
> bad example).

Unfortunately.

> (It does not allow *all* memory and *all* constants, btw...  And the
> condition for registers is not really "general register", whatever that
> means...

I think that means general purpose registers. I.e., it won't use, say
FPU, XMM or whatever special regs.

What does the asm() parsing code in gcc do for "g"? There should be
some logic which constraints what register is valid...

> I hope no one ever told you our documentation does not have white
> lies!)

I have convinced myself of this a couple of times already so I either go
ask our gcc friends or go look straight at gcc source. It is useful to
know folks which hack on it so that I can ask them stupid questions and
not go off into the weeds, trying to figure out what the documentation
says.

But hey, if that gets the documentation improved, that's a win-win
situation right there. Might even make people copying from bad examples
to go look at the docs first...

:-)

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ