From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6DEFC433B4 for ; Fri, 16 Apr 2021 18:28:22 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 54142610FB for ; Fri, 16 Apr 2021 18:28:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 54142610FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=UFQkoJJ3HK/FXXliOwf/umpSjBJVHkbiAEBPHyvoVTE=; b=DJt1jkf/XLDNqedXRoBcKHhad Yzu0OzL5e4/kERHGAJdg/FR51LuAfBBKxboLBiwUImMVFD62m1Qb8OAR7ZvCziHSMTgv+29MJ5oY6 Ct/GWUkhBU34h66nYM0EkHrYgGLE05LF5kFU6q/4BoEyYsMS/8JQS/c0WWT4KvB3J/9VYsdNILEQE eHXCBGminCKFy/xDT+m0DQmr3gRA/dpeCyk3vCOnYriSpD+CpkJRFjAvX9qWgdAlX/YavvvjLmxkh NJ2GvjHI/RxlV4h9QBwZ+m/7QlIGSDAs5obJQgytu5/Z8/+KJVRJ5odpI6VMd8QHshJKj8PRjnCux G0Ejz9GlA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lXTAW-0034LN-LF; Fri, 16 Apr 2021 18:26:16 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lXTAS-0034L4-Ml for linux-arm-kernel@desiato.infradead.org; Fri, 16 Apr 2021 18:26:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=+NoMdFRqvCj0wjEu2wU+EppPHqkD5aPuBzCUVO8B5Dw=; b=UBISeDzkF5PcLVs/FruGTJPggA GDIKl9+lz0DfyhtbuIqXvQRAoYGJttFRFdwskfqouwhC5C7XwFXRsLHWhsB/A1HkmBxA3vmda+1cE 1+iEGppcJuSfLbCDesF+Bw2VvzTPjT0eA9cvj2kso1o67Pt7od5vamCTq7GSKGGsUAmILe6d4OVpa co8h8sIjM82//0Fe93mJwDudvDuDw8oTSs+j3WhvY2GeR5cmLxECmIG6RNZw2s0qS2Gt6961HguS1 q36mj0TllTLGTme+H+umZ7mOg47TA7Exiy7NPoMjG5sM9nGCu6JCRY4Q6KPlX2VpVkTHoRHBl/i/J rdPS4PFw==; Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lXTAO-009chR-6R for linux-arm-kernel@lists.infradead.org; Fri, 16 Apr 2021 18:26:11 +0000 Received: by mail-pl1-x629.google.com with SMTP id q11so1329162plx.2 for ; Fri, 16 Apr 2021 11:26:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=+NoMdFRqvCj0wjEu2wU+EppPHqkD5aPuBzCUVO8B5Dw=; b=I7NkKx+ryboIFsQYOl0hn9Owr8ah4PzLF123GS1rr/xs+Is+upY0kBQ6YKQF01qdjT /JXCewbuJ6m9FkA+hTJ0ZLNndSrBrcAxe1SL6n+h8Dz/6WwoLJGOl3Usr09pFM+DDcyZ HJpE32jNzCiYvUL/nDIlAczIlyUI4lF30PKHl8NsfqW4O8uK4lBvECjt4Wbi84sc0yUO TBw88FWyBysNTaVA0RWN6HfYwvdJzPzqKYBclHUW4yQSNJtWsJQzFIky0SHayASO+TKR MGpyBRr6Fzxc539M6xaRvLtYi/XqzOG3e21wiGh1pwMNcYgqwMmamry8dLyz86+6T+LX 24uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=+NoMdFRqvCj0wjEu2wU+EppPHqkD5aPuBzCUVO8B5Dw=; b=hz7bOE0hSup3nr1c699ftT/3ktSh7pHAjYTlQzFDAvx7Muaxf0xN3FbP0cHBxL7/zS VtmWLrqYKWsg0NqRLo8khClISN+X02mXOtKyYyp/QxgAtxJHIzsVd/4yEbSieZzol8tN mYSKa8u3MxljTY93C5q4YiEyXhiUotX8+jZQVjH2rMTTaFeysNMvGxbZHmN4PJSh77RE krISBuV4zlBiSRmlZdRYXC+vGLZGmzLNQwGVMO5fZ98000JTNVal9UAd4z7Z7hoPViOn BQpTz4veMC0JpaZ7f1HagO9l9Coe2MnijBrpkyYLf4hCExi6KS8VT+0ozJ6+60lHo651 NG+g== X-Gm-Message-State: AOAM532aZl1w5H6P6aVpQNnsycNEkV6e5vmFhGYY22thrCxcT5/sZNbK LbOiw3xS1++HpIxv8Tz8g9QCC7QYlABo8j4n7BI= X-Google-Smtp-Source: ABdhPJw2kWFT896TOOCfe5suf1zLJSSp2jHsX2kBjJGSkduJ7jRvKnfFRK8cKa3n/6vBVu3+CGwaVQ== X-Received: by 2002:a17:90b:344e:: with SMTP id lj14mr11195691pjb.89.1618597567017; Fri, 16 Apr 2021 11:26:07 -0700 (PDT) Received: from taoren-ubuntu-R90MNF91 (c-73-252-146-110.hsd1.ca.comcast.net. [73.252.146.110]) by smtp.gmail.com with ESMTPSA id x1sm5324218pgp.24.2021.04.16.11.26.05 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Apr 2021 11:26:06 -0700 (PDT) Date: Fri, 16 Apr 2021 11:25:59 -0700 From: Tao Ren To: Guenter Roeck Cc: Wim Van Sebroeck , Joel Stanley , Andrew Jeffery , linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org, Tao Ren , Amithash Prasad Subject: Re: [PATCH v2] watchdog: aspeed: fix integer overflow in set_timeout handler Message-ID: <20210416182558.GA4816@taoren-ubuntu-R90MNF91> References: <20210416021337.18715-1-rentao.bupt@gmail.com> <2771f72a-cc3c-54a5-cc2c-715ea61be6b7@roeck-us.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <2771f72a-cc3c-54a5-cc2c-715ea61be6b7@roeck-us.net> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210416_112608_277498_B640689A X-CRM114-Status: GOOD ( 17.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Apr 15, 2021 at 10:07:32PM -0700, Guenter Roeck wrote: > On 4/15/21 7:13 PM, rentao.bupt@gmail.com wrote: > > From: Tao Ren > > > > Fix the time comparison (timeout vs. max_hw_heartbeat_ms) in set_timeout > > handler to avoid potential integer overflow when the supplied timeout is > > greater than aspeed's maximum allowed timeout (4294 seconds). > > > > I think this is the wrong focus: What this fixes is the wrong hardware > timeout calculation. Again, I think that the wrong calculation leads to > the overflow should not be the focus of this patch, though it can of > course be mentioned. > > I'll leave it up to Wim to decide if he wants to apply the patch with the > current explanation. > > Thanks, > Guenter Sorry I didn't get your point correctly, and I guess it was because of my lack of knowledge in timeout/max_hw_heartbeat_ms/worker (hopefully my understanding is correct now :)) Let me drop this patch and send a new one with different subject and description soon. Cheers, Tao _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel