Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2456962ybi; Mon, 17 Jun 2019 05:16:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqxXoub/+Iw7NqhAkLBO2wHwy5ocCrbeTyaPosbU0OugEEpQ31FuZcNUaPKX0L17sL2IV0XO X-Received: by 2002:a63:5211:: with SMTP id g17mr45512314pgb.405.1560773763100; Mon, 17 Jun 2019 05:16:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560773763; cv=none; d=google.com; s=arc-20160816; b=YR7lDdNDsKraH2uHX8CJdWXtDhBmJQVE086BqDVWYpNbukRiRoY+s1COudoEzxHaN/ +BXeZLz1eWBrPONiR0Eekg/GJev8TUuou8t/hdg2C4d3Uw4cksocnBx2yfpnjrj5C1cC 37EjuJxAe09jnTMqs1xOsXEHNICjXBrr0qG6z6upJPbKdGJFmpIn7qiGFBNQEthhVBI3 w99IBJC7e6WHQsGIjtmorI9WuXcHw9ZC6vTqX4g/eP6TmkyfVcmou6FAeIpZxa18Pf73 +QQA5OmnKHHHKc1LA8DNU3usDsPOcH2vfcIY+dZi4LTK0ZPQBv94ehbDYH7DpIynBHBo Zu9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=dQVilbr7fTvCHL5xe2kwQaEoYnyVxGOpM5+gi7+cc6w=; b=uaVl7LCSh5kAsNISQdI377YNEqiSeGmOryXzlKzezC28zH15bonJrtP64zzjFN6Eml LrQFpxaN5VHbUSZYXt5BLjTk6IdkdQgNGKpRHY8OsksQ+thEoj33yOUYJYeTXAobCxy7 xtT5+TyCPZYBGuRflHdFqDKRxG61qwjw6pZCJYTnSCXaVxfPZyOlB6Epa+sIhaRgRiAf v5JApmEcmsCtpTqhYBG/vdcIa35RNYQpIbIiSvpvD9iZnCxl8JxWU8RAB9+Z7DC2QaQg lz2MmB4YWAFZ0FlJplT/x8uvrA1vLdS2yp62VZaVVgNJogJB65uc1OapS+aLv2JLRhhS teTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d11si10606762pgj.238.2019.06.17.05.15.46; Mon, 17 Jun 2019 05:16:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727031AbfFQMPD (ORCPT + 99 others); Mon, 17 Jun 2019 08:15:03 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:43568 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725906AbfFQMPD (ORCPT ); Mon, 17 Jun 2019 08:15:03 -0400 Received: from [5.158.153.52] (helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1hcqXK-0006f3-C3; Mon, 17 Jun 2019 14:14:58 +0200 Date: Mon, 17 Jun 2019 14:14:57 +0200 (CEST) From: Thomas Gleixner To: =?GB2312?B?zqy/tcqv?= cc: John Stultz , sboyd@kernel.org, LKML , swkhack@qq.com, Miroslav Lichvar Subject: Re: [PATCH] time: fix a assignment error in ntp module In-Reply-To: Message-ID: References: <20190422093421.47896-1-swkhack@gmail.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-426885459-1560773698=:1854" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-426885459-1560773698=:1854 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Mon, 17 Jun 2019, 维康石 wrote: A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? A: No. Q: Should I include quotations after my reply? http://daringfireball.net/2007/07/on_top > Yes,the >UINT_MAX value can be passed by > syscall adjtimex->do_adjtimex->__do_adjtimex->process_adjtimex_modes by the > proper arugments. So there is clearly some sanity check missing, but surely not that type cast. > > > - if (txc->modes & ADJ_TAI && txc->constant > 0) > > > + if (txc->modes & ADJ_TAI && (int)txc->constant > 0) > > > *time_tai = txc->constant; > > > > The way more interesting question is whether txc->constant can be > > > UINT_MAX. In that case the txc->constant would be truncated. > > > > Miroslav? Thanks, tglx --8323329-426885459-1560773698=:1854--