From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754476AbcH0PXW (ORCPT ); Sat, 27 Aug 2016 11:23:22 -0400 Received: from mail-wm0-f42.google.com ([74.125.82.42]:35905 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754402AbcH0PXV (ORCPT ); Sat, 27 Aug 2016 11:23:21 -0400 From: Nicolai Stange To: Thomas Gleixner Cc: Nicolai Stange , John Stultz , linux-kernel@vger.kernel.org Subject: Re: [RFC v4 14/22] clockevents: clockevents_program_event(): turn clc into unsigned long References: <20160822233320.4548-1-nicstange@gmail.com> <20160822233320.4548-15-nicstange@gmail.com> Date: Sat, 27 Aug 2016 17:23:18 +0200 In-Reply-To: (Thomas Gleixner's message of "Thu, 25 Aug 2016 15:20:59 +0200 (CEST)") Message-ID: <87zinyxml5.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thomas Gleixner writes: > On Tue, 23 Aug 2016, Nicolai Stange wrote: > >> Right now, being of type unsigned long long, the clc local variable in >> clockevents_program_event() is unnecessarily wide as it gets cast to >> unsigned long anyway. > > Congrats! You just broke 32bit systems. When delta is sufficiently large then > the mult overflows.... The 32bit breakage has been introduced in [13/22] ("clockevents: check a programmed delta's bounds in terms of cycles") already -- please see my reply there.