Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6770237imu; Wed, 14 Nov 2018 06:44:45 -0800 (PST) X-Google-Smtp-Source: AJdET5d7A60thcDCsaJSQ+p460wMjP1g/+2impbxDpVpISm0kc1VK3iCEdWK13s4oq48AsAI7JKa X-Received: by 2002:a62:8f8c:: with SMTP id n134-v6mr2272797pfd.258.1542206684963; Wed, 14 Nov 2018 06:44:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542206684; cv=none; d=google.com; s=arc-20160816; b=bpbDgEgwhyXBNCmggXM4THxxLzzmYpUblSg4c13r2iW/n5HTUH2IppKcCX68WCstFO nqLnkPeCTVlrHCxTeDKMSvydoxHhVO7GD/l9c9BsCOD9SmBjliAaQ5ZLJgCANlh4wGpX aTUDRguxD5NLwfEEZ5UWgSapTjwpDMD4FHqSBs3DkZ/TR42iWEN1Gv6T+DuXDOC1u4Rh Ar8EORmohBWF1vi+nz4LsObPFnq63MbSe+/CaQ5uFp6XAlqCFQq6ckFE1rCELa52ByK7 nrF34XB2MzzZ/rrDSLAHR6Ug0qNRX7CbKaF4inn2pq9bnJJOQ1jvmHrgEZm8cKdrkgRQ GtsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=kFxVGjA1WrSZXI4e4K2i2ml8xSdfjR7pxZmLb3Gxuo0=; b=C9ToDVM7v2QBXeZIZO18LjSDze8/8rFOPI+R2ZAyyh0Hrqineqw86LJZiHlgteyOX7 rZV7T5+p6zhTn0HLz8iTJw/IeNhaKFsye0fS4758Szx2Siw7p6/B4dP0TmMPrBaDy35k Fz+J2uHETtoQq2RIAAdGbPl3Mv+1D1RJVgz3Lnu8MUwjNRCDXzehkoB7bcemoGIHM/30 xSqqaAH5LYz+YCls7VIAnETVIxziDRDc62ANttXl0gTTM7igYofTTy9kYepFWgHiTv56 MJAH9WUISbHCNsJDwNC4RMMpEaPswQDGVOwOyUIRw60R3ZjXPuObLZfrthFfMP23G8Kp LYBA== 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 b31-v6si25002405plb.309.2018.11.14.06.44.29; Wed, 14 Nov 2018 06:44:44 -0800 (PST) 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 S1732767AbeKOAqj (ORCPT + 99 others); Wed, 14 Nov 2018 19:46:39 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:27567 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727780AbeKOAqi (ORCPT ); Wed, 14 Nov 2018 19:46:38 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 42w6ft26mkz9tx58; Wed, 14 Nov 2018 15:43:02 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id EAe8Y7IfrNS7; Wed, 14 Nov 2018 15:43:02 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 42w6ft1b1Vz9tx56; Wed, 14 Nov 2018 15:43:02 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id F2F1B8B83A; Wed, 14 Nov 2018 15:43:06 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id McwZ0D3rWjVT; Wed, 14 Nov 2018 15:43:06 +0100 (CET) Received: from PO15451 (unknown [192.168.232.3]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 723198B838; Wed, 14 Nov 2018 15:43:06 +0100 (CET) Subject: Re: UBSAN: Undefined behaviour in kernel/rcu/tree_plugin.h in 4.20-rc1 To: paulmck@linux.ibm.com Cc: "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" References: <20181109201030.GI4170@linux.ibm.com> From: Christophe LEROY Message-ID: <9b4e6f39-f36b-06e2-ea96-92dec192edc7@c-s.fr> Date: Wed, 14 Nov 2018 15:43:05 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <20181109201030.GI4170@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 09/11/2018 à 21:10, Paul E. McKenney a écrit : > On Fri, Nov 09, 2018 at 06:11:20PM +0100, Christophe LEROY wrote: >> (Resending due to error in Paul's address) >> >> Paul >> >> I get the following UBSAN reports in 4.20-rc1 on an MPC8321E >> (powerpc/book3s/32) >> >> I bisected it to 3e31009898699dfc ("rcu: Defer reporting RCU-preempt >> quiescent states when disabled") > > Fixed by dfdc33585b0a ("rcu: Avoid signed integer overflow in > rcu_preempt_deferred_qs()") in my -rcu tree and in -next, which I intend > to push into the next merge window. > Thanks, I confirm it fixes the issue. Do you intend to push it into 4.20-rc3 or do you mean 4.21 ? Christophe > Thanx, Paul > >> Thanks >> Christophe >> >> [ 4.919995] ================================================================================ >> [ 4.928428] UBSAN: Undefined behaviour in kernel/rcu/tree_plugin.h:623:28 >> [ 4.935198] signed integer overflow: >> [ 4.938766] 0 - -2147483648 cannot be represented in type 'int' >> [ 4.944678] CPU: 0 PID: 119 Comm: mkdir Not tainted >> 4.19.0-rc1-s3k-dev-00005-g5a60513 #214 >> [ 4.952908] Call Trace: >> [ 4.955382] [dec4fd20] [c02cb0d0] ubsan_epilogue+0x18/0x74 (unreliable) >> [ 4.962003] [dec4fd30] [c02cb5e0] handle_overflow+0xd0/0xe0 >> [ 4.967588] [dec4fdb0] [c007b424] rcu_preempt_deferred_qs+0xc0/0xc8 >> [ 4.973857] [dec4fdd0] [c007be28] rcu_note_context_switch+0x74/0x608 >> [ 4.980217] [dec4fe10] [c064b790] __schedule+0x58/0x6e0 >> [ 4.985448] [dec4fe50] [c064bfdc] preempt_schedule_common+0x48/0x9c >> [ 4.991717] [dec4fe70] [c01308c8] handle_mm_fault+0x10fc/0x1ecc >> [ 4.997639] [dec4fee0] [c001339c] do_page_fault+0x10c/0x760 >> [ 5.003225] [dec4ff40] [c001234c] handle_page_fault+0x14/0x40 >> [ 5.008968] --- interrupt: 401 at 0xff9cff8 >> [ 5.008968] LR = 0xfeefd78 >> [ 5.016170] ================================================================================ >> [ 5.024591] ================================================================================ >> [ 5.033005] UBSAN: Undefined behaviour in kernel/rcu/tree_plugin.h:627:28 >> [ 5.039775] signed integer overflow: >> [ 5.043342] -2147483648 + -2147483648 cannot be represented in type 'int' >> [ 5.050118] CPU: 0 PID: 119 Comm: mkdir Not tainted >> 4.19.0-rc1-s3k-dev-00005-g5a60513 #214 >> [ 5.058348] Call Trace: >> [ 5.060813] [dec4fd20] [c02cb0d0] ubsan_epilogue+0x18/0x74 (unreliable) >> [ 5.067433] [dec4fd30] [c02cb5e0] handle_overflow+0xd0/0xe0 >> [ 5.073014] [dec4fdb0] [c007b408] rcu_preempt_deferred_qs+0xa4/0xc8 >> [ 5.079283] [dec4fdd0] [c007be28] rcu_note_context_switch+0x74/0x608 >> [ 5.085640] [dec4fe10] [c064b790] __schedule+0x58/0x6e0 >> [ 5.090871] [dec4fe50] [c064bfdc] preempt_schedule_common+0x48/0x9c >> [ 5.097139] [dec4fe70] [c01308c8] handle_mm_fault+0x10fc/0x1ecc >> [ 5.103059] [dec4fee0] [c001339c] do_page_fault+0x10c/0x760 >> [ 5.108642] [dec4ff40] [c001234c] handle_page_fault+0x14/0x40 >> [ 5.114385] --- interrupt: 401 at 0xff9cff8 >> [ 5.114385] LR = 0xfeefd78 >> [ 5.121588] ================================================================================ >>