From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753496AbcENP0Z (ORCPT ); Sat, 14 May 2016 11:26:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38066 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752209AbcENP0X (ORCPT ); Sat, 14 May 2016 11:26:23 -0400 Date: Sat, 14 May 2016 16:24:18 +0200 From: Oleg Nesterov To: Meelis Roos Cc: Linux Kernel list , Andrew Morton Subject: Re: UBSAN: Undefined behaviour in kernel/signal.c:911:6 Message-ID: <20160514142417.GA6791@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Sat, 14 May 2016 15:26:22 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/12, Meelis Roos wrote: > > This is from a 32-bit x86 computer with 4.6-rc* and UBSAN enabled. I am > also seeing it on some other 32-bit x86 machines. This one is SMP > AthlonMP. > > [ 211.406263] ================================================================================ > [ 211.406327] UBSAN: Undefined behaviour in kernel/signal.c:911:6 > [ 211.406365] shift exponent 32 is too large for 32-bit type 'long unsigned int' Hmm, indeed... Oh, and this needs other cleanups. Thanks! I'll send the fix. > [ 211.406407] CPU: 1 PID: 1769 Comm: aptitude Not tainted 4.6.0-rc6-00072-g33656a1 #22 > [ 211.406445] Hardware name: Unknown Unknown/S2462 THUNDER K7, BIOS Guinness-8 04/07/2003 > [ 211.406486] 00000000 c134beac 00000007 f441be04 00000001 c1381f8b f441bdf8 00000020 > [ 211.406724] c1382516 c1700128 f441be08 00000020 c17b5288 00000002 00003233 c1a3d9c0 > [ 211.406959] 00010000 024280ca 00363335 00000100 f441bea8 c11bf41b 00000000 00000000 > [ 211.407194] Call Trace: > [ 211.407240] [] ? dump_stack+0x45/0x69 > [ 211.407278] [] ? ubsan_epilogue+0xb/0x40 > [ 211.407313] [] ? __ubsan_handle_shift_out_of_bounds+0xd6/0x120 > [ 211.407355] [] ? path_openat+0x1db/0x1930 > [ 211.407396] [] ? __sigqueue_alloc+0x75/0x190 > [ 211.407495] [] ? complete_signal+0x29c/0x3a0 > [ 211.407593] [] ? __send_signal.constprop.27+0x167/0x3b0 > [ 211.407690] [] ? do_send_sig_info+0x33/0x80 > [ 211.407786] [] ? do_send_specific+0x5e/0x90 > [ 211.407881] [] ? do_tkill+0x83/0xc0 > [ 211.407978] [] ? SyS_tgkill+0x19/0x30 > [ 211.408073] [] ? do_fast_syscall_32+0xb6/0x1d0 > [ 211.408172] [] ? sysenter_past_esp+0x40/0x6a > [ 211.408266] ================================================================================ > > > -- > Meelis Roos (mroos@linux.ee)