From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756798AbcA3Agw (ORCPT ); Fri, 29 Jan 2016 19:36:52 -0500 Received: from mail-lb0-f175.google.com ([209.85.217.175]:33700 "EHLO mail-lb0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753756AbcA3Agu (ORCPT ); Fri, 29 Jan 2016 19:36:50 -0500 Date: Sat, 30 Jan 2016 03:36:45 +0300 From: Mike Krinkin To: aryabinin@virtuozzo.com Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org Subject: CONFIG_UBSAN_ALIGNMENT breaks x86-64 kernel with lockdep enabled Message-ID: <20160130003645.GA30158@kmu-tp-x230> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, option CONFIG_UBSAN_ALIGNMENT breaks x86-64 kernel with lockdep enabled, i. e kernel with CONFIG_UBSAN_ALIGNMENT fails to load without even any error message. The problem is that ubsan callbacks use spinlocks and might be called before lockdep is initialized. Particularly this line in the reserve_ebda_region function causes problem: lowmem = *(unsigned short *)__va(BIOS_LOWMEM_KILOBYTES); If i put lockdep_init() before reserve_ebda_region call in x86_64_start_reservations kernel loads well. Since CONFIG_UBSAN_ALIGNMENT isn't useful for x86 anyway it might be better to disable this option for x86 arch?