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: <Ya8L5x7cL5GKmL0y@google.com>
Date:   Mon, 6 Dec 2021 23:23:19 -0800
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     Charles Keepax <ckeepax@...nsource.cirrus.com>
Cc:     linux-input@...r.kernel.org, patches@...nsource.cirrus.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Input: ff-core - Correct magnitude setting for rumble
 compatibility

On Tue, Nov 30, 2021 at 01:50:39PM +0000, Charles Keepax wrote:
> When converting a rumble into a periodic effect, for compatibility,
> the magnitude is effectively calculated using:
> 
> magnitude = max(strong_rubble / 3 + weak_rubble / 6, 0x7fff);
> 
> The rumble magnitudes are both u16 and the resulting magnitude is
> s16. The max is presumably an attempt to limit the result of the
> calculation to the maximum possible magnitude for the s16 result,
> and thus should be a min.
> 
> However in the case of strong = weak = 0xffff, the result of the first
> part of the calculation is 0x7fff, meaning that the min would be
> redundant anyway, so simply remove the current max.
> 
> Signed-off-by: Charles Keepax <ckeepax@...nsource.cirrus.com>

Applied, thank you.

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ