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] [day] [month] [year] [list]
Message-ID: <20150520193644.GF23809@dtor-ws>
Date:	Wed, 20 May 2015 12:36:44 -0700
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Shailendra Verma <shailendra.capricorn@...il.com>
Cc:	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Input:evdev - Fix to avoid the execution of same
 instruction in every iteration of for loop.

Hi Shailendra,

On Thu, May 21, 2015 at 12:35:46AM +0530, Shailendra Verma wrote:
> Here in for loop the instruction "len / sizeof(compat_long_t)" is used
> as a terminating condition which is executing (being computed) in every
> iteration of for loop. Below is the armv7-a architecture assembly code with
> similar for loop having the same instruction in condition.Note that the
> instruction "lsr r3, r3, #2" i.e Logical Shift Right on behalf of
> "len / sizeof(compat_long_t)" is getting executed every time the loop
> iterates.

No, it is not. We compile kernel with -O2 and compiler is smart enough
to optimize such constructs.

Thanks.

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