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: <df9815e70810291931i4c00966u8f4493386e376b28@mail.gmail.com>
Date:	Thu, 30 Oct 2008 10:31:30 +0800
From:	"Jike Song" <albcamus@...il.com>
To:	"Ingo Molnar" <mingo@...e.hu>
Cc:	tglx@...utronix.de, mingo@...hat.com, hpa@...or.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86: fix inline assembly constraints

On Thu, Oct 30, 2008 at 12:34 AM, Ingo Molnar <mingo@...e.hu> wrote:
>
> * Jike Song <albcamus@...il.com> wrote:
>>
>> --
>
> that was an easy patch to act upon ;-)
>
>        Ingo
>
Sorry Ingo, I missed your point. Do you mean this patch is trivial or
unnecessary?

Besides, by looking at the inline assembly in kernel,  I found lots of
codes like this:

        static inline void atomic_add(int i, atomic_t *v)
        {
	        asm volatile(LOCK_PREFIX "addl %1,%0"
		             : "=m" (v->counter)
		             : "ir" (i), "m" (v->counter));
        }


Yes, it works. But a little ugly..  Should this be cleaned-up with the
following?

        : "+m" (v->counter)
        : "ir" (i)

If you agrees, I'll send out the patch; otherwise I won't wasting your time ;-)


-- 
Thanks,
Jike
--
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