From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754042AbcBAWS6 (ORCPT ); Mon, 1 Feb 2016 17:18:58 -0500 Received: from arcturus.aphlor.org ([188.246.204.175]:55388 "EHLO arcturus.aphlor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753994AbcBAWS4 (ORCPT ); Mon, 1 Feb 2016 17:18:56 -0500 Date: Mon, 1 Feb 2016 17:18:52 -0500 From: Dave Jones To: Andrey Ryabinin Cc: LKML Subject: Re: UBSAN: run-time undefined behavior sanity checker Message-ID: <20160201221852.GA23344@codemonkey.org.uk> Mail-Followup-To: Dave Jones , Andrey Ryabinin , LKML References: <20160121205717.AF61F661293@gitolite.kernel.org> <20160122051539.GA1326@codemonkey.org.uk> <56A25C4B.2000204@virtuozzo.com> <20160122170053.GB30299@codemonkey.org.uk> <56A62B44.2080904@virtuozzo.com> <20160126165322.GA24364@codemonkey.org.uk> <56AF830E.1050707@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56AF830E.1050707@virtuozzo.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Score: -2.9 (--) X-Spam-Report: Spam detection software, running on the system "arcturus.aphlor.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Mon, Feb 01, 2016 at 07:08:46PM +0300, Andrey Ryabinin wrote: > > > > tried it on hangs the same way, really early. Any thoughts on how to chase this down ? > > > Try to disable instrumentation for early code, like in the patch bellow. > > This didn't help. > > So after I enabled UBSAN_ALIGNMENT in your config, the kernel didn't boot. > That is because unaligned access happens before lockdep_init() so ubsan callback takes the > spinlock before locked_init() which is not allowed. [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 01, 2016 at 07:08:46PM +0300, Andrey Ryabinin wrote: > > > > tried it on hangs the same way, really early. Any thoughts on how to chase this down ? > > > Try to disable instrumentation for early code, like in the patch bellow. > > This didn't help. > > So after I enabled UBSAN_ALIGNMENT in your config, the kernel didn't boot. > That is because unaligned access happens before lockdep_init() so ubsan callback takes the > spinlock before locked_init() which is not allowed. > Could you try it without CONFIG_DEBUG_LOCKDEP? > Or alternatively with patch like this: Tried with the patch, seems to work fine now. thanks, Dave