From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161041AbbBCTpy (ORCPT ); Tue, 3 Feb 2015 14:45:54 -0500 Received: from mail-wg0-f52.google.com ([74.125.82.52]:36123 "EHLO mail-wg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966568AbbBCTpu (ORCPT ); Tue, 3 Feb 2015 14:45:50 -0500 Date: Tue, 3 Feb 2015 20:45:43 +0100 From: Richard Cochran To: John Stultz Cc: lkml , Thomas Gleixner , Ingo Molnar , Sasha Levin , stable@vger.kernel.org Subject: Re: [PATCH] ntp: Fixup adjtimex freq validation on 32bit systems Message-ID: <20150203194543.GA21745@localhost.localdomain> References: <1422989859-16456-1-git-send-email-john.stultz@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1422989859-16456-1-git-send-email-john.stultz@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 03, 2015 at 10:57:38AM -0800, John Stultz wrote: > Unfortunately the patch used LONG_MAX/MIN instead of > LLONG_MAX/MIN, which was fine on 64bit systems, but being > much smaller on 32bit systems caused false positives > resulting in most direct frequency adjustments to fail w/ > EINVAL. ... > One note: > 0day kbuild bot complains about > >> kernel/time/ntp.c:637: warning: comparison is always false due to limited range of data type > >> kernel/time/ntp.c:639: warning: comparison is always false due to limited range of data type > > We could fix this via adding an extra (BITS_PER_LONG == 64) > case before we check these to avoid it, but that seemed a > bit too ugly to me. Thoughts? So the check is 64 bit only? Might as well mark it like that explicitly to avoid needless head scratching of 32 bit people. Thanks, Richard