Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5347746ioo; Wed, 1 Jun 2022 03:46:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCNcAqGJTLpVGhR35rTlwiS4KS91VYo0QKREeg0f9+XrB0o4P9DnzbutSQ5wz+fvu0tSok X-Received: by 2002:a63:89c2:0:b0:3fc:8bd2:aa5a with SMTP id v185-20020a6389c2000000b003fc8bd2aa5amr4094215pgd.362.1654080410302; Wed, 01 Jun 2022 03:46:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654080410; cv=none; d=google.com; s=arc-20160816; b=M270LUMhluwQIht8NyAJafD/j5xsJ1CMQMVAlcUGXDflqcUMgC3OO0iut7EuI3qL1e x4eKcacSFYUkAJ15SlXBqGuLGr3MFRPSP/mvEM2ao/nqAHEnJXXIES7yUe2zYdCBfWyE lsGOaHwluPoVucfb26CndgtxLEBjnc0op5kW254ZgAsZyFbaQtoQu54yZNJiVPgdSa71 reNjV8UYERx59KLGiVpNvJ1s/CGx36iwR0hv3+Hwx71tvST6A18c7ilWNdUn5g2me84C FgbBGYtfzNxwzJTVBTma0QfsjM7Z8/A8sZrJm60DBV8FIo/jJLfK9+erN6nQrMZadISx KEyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=MgAIfXuZbnO66UplqyXtbnNG1M1uphwmPAPlMZl/NsM=; b=CVavmsT2NEkOAEuywjCfUVPiOAJSsr8dieYJMs5EIcYx0iMOrYS9elFwwn1ZedBHSi ++HrMeXoUVfUqPgo1O5Lp3dYEiDXKc4YvU7Isg8YkJPuIraEFBQ9TmgHAtdI1OvaQCO3 nz6UXp8gTyRTnxRh2ruOzSBKhh39ZWIkHcm4dXQUNudkYv566nRu30m8IdkSqIb6ltYo qJkhU6aXgI/vRd+8BaoZ+IlZ2YswGlnKkPNa+LnCvzDgCkygv0EyeqRjJ1u2B8fqdCr5 BCCkO56kbCq39DmdyXBZTVH31tPR7Vmv5EVNYWH4EgrIwOvWdw4vLSMSj06tL9wN0Ah+ yG8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=tSh9PSln; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k11-20020a170902c40b00b00163ddc0d459si2218452plk.320.2022.06.01.03.46.35; Wed, 01 Jun 2022 03:46:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=tSh9PSln; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241157AbiE3Qyd (ORCPT + 99 others); Mon, 30 May 2022 12:54:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240341AbiE3Qya (ORCPT ); Mon, 30 May 2022 12:54:30 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CC80A7761 for ; Mon, 30 May 2022 09:54:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=MgAIfXuZbnO66UplqyXtbnNG1M1uphwmPAPlMZl/NsM=; b=tSh9PSln6DPu8EU2UgGJUTJM7k M9mcUReU4aaRVJosOtdMc3v5aI9sfFmp1rEG6L2u3E7wDYf4yTINLVhRhXVN/EqYlfaid9d7MEO8t xXMWRQmLev64HwjQ6W0X5Y65b66Z2MGU8EQxvD+Zap2oMEARGlqnSc/PfOy6QHglj/tadSYTvVniP AO4yP505lrU+L21yItjbZX64YqiJWOejR0Nsh8qobpuSMtwDybfi3gkkXOKwVuU8PJ3NwIMDkHBNK sjUWVQwNuk3+i5NgulP5F54Q4R0CFOfj3tLSSJrCtiq8L3R4nCCkZru8Zxm2xrsD3JQv379w5s5yl b3AdTxTA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:60884) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nvieX-00045f-Ar; Mon, 30 May 2022 17:54:01 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1nvieL-0001ZQ-Um; Mon, 30 May 2022 17:53:49 +0100 Date: Mon, 30 May 2022 17:53:49 +0100 From: "Russell King (Oracle)" To: Jani Nikula Cc: Linus Torvalds , Arnd Bergmann , Sudip Mukherjee , Viresh Kumar , Shiraz Hashim , Ville =?iso-8859-1?Q?Syrj=E4l=E4?= , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , dri-devel , Linux Kernel Mailing List , Linux ARM , SoC Team Subject: Re: mainline build failure due to f1e4c916f97f ("drm/edid: add EDID block count and size helpers") Message-ID: References: <87a6aztli2.fsf@intel.com> <877d63tleq.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <877d63tleq.fsf@intel.com> Sender: Russell King (Oracle) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 30, 2022 at 12:33:17PM +0300, Jani Nikula wrote: > On Mon, 30 May 2022, Jani Nikula wrote: > > On Sat, 28 May 2022, Linus Torvalds wrote: > >> On Sat, May 28, 2022 at 11:59 AM Arnd Bergmann wrote: > >>> > >>> It's CONFIG_ARM_AEABI, which is normally set everywhere. Without this > >>> option, you the kernel is built for the old 'OABI' that forces all non-packed > >>> struct members to be at least 16-bit aligned. > >> > >> Looks like forced word (32 bit) alignment to me. > >> > >> I wonder how many other structures that messes up, but I committed the > >> EDID fix for now. > > > > Thanks for the fix, and the thorough commit message! > > > >> This has presumably been broken for a long time, but maybe the > >> affected targets don't typically use EDID and kernel modesetting, and > >> only use some fixed display setup instead. > >> > >> Those structure definitions go back a _loong_ time (from a quick 'git > >> blame' I see November 2008). > >> > >> But despite that, I did not mark my fix 'cc:stable' because I don't > >> know if any of those machines affected by this bad arm ABI issue could > >> possibly care. > >> > >> At least my tree hopefully now builds on them, with the BUILD_BUG_ON() > >> that uncovered this. > > > > Indeed the bug is ancient. I just threw in the BUILD_BUG_ON() on a whim > > as an extra sanity check when doing pointer arithmetics on struct edid > > *. > > > > If there are affected machines, buffer overflows are the real danger due > > to edid->extensions indicating the number of extensions. > > That is, for EDID. Makes you wonder about all the other packed structs > with enum members across the kernel. enum should not be used in structures if the layout of the struct matters. ISTR there was a proposal for EABI to make enums just about big enough to hold their enumerated constants - so you'd end up with 8-bit, 16-bit etc according to the largest enumerated value that the compiler thinks it could hold. That's a latent disaster when enums get used in structs where the layout matters, __packed or not. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!