From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1C24DC433EF for ; Mon, 30 May 2022 09:31:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) id 0250EC385B8; Mon, 30 May 2022 09:31:29 +0000 (UTC) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 0EE59C34119; Mon, 30 May 2022 09:31:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.kernel.org 0EE59C34119 Authentication-Results: smtp.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653903087; x=1685439087; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=RNo1VFn9TNhcSAwdGqSc/kbrNGzlnlE99QCowyLqR4c=; b=hE21XmWSS0E/O1wON30DF892tKRUjqSiTkCf7nIKPiyPOcMMJEHN3oUO fJRMkXbSb++IME4/70dVAXgLDMLazA88V6iw+xifPRQHY9+mabm+YVlRo 5IhkoEoP4WEecNkGNJmH3qz3NJoxhCHPRFPq2rTdQL+ITRtH54DSRgswf 0NgZXdg11HPmFLiWB3p9TIwPeYLmMsvQiTHi3DA+saScEsaPNQdTsfLA4 T06rdd8kWg5s/0dFiyzOxvtJ1cT8maGQWucXheNse1KjP3itEihcLNn7f S4EAua+0lCMIT0MnQeQtCfBVcYUNAL+Kom3nb1ORgtSKolbubuwJTQJPd w==; X-IronPort-AV: E=McAfee;i="6400,9594,10362"; a="255438075" X-IronPort-AV: E=Sophos;i="5.91,262,1647327600"; d="scan'208";a="255438075" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2022 02:31:26 -0700 X-IronPort-AV: E=Sophos;i="5.91,262,1647327600"; d="scan'208";a="706083847" Received: from jkuna-mobl.ger.corp.intel.com (HELO localhost) ([10.249.150.228]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2022 02:31:20 -0700 From: Jani Nikula To: Linus Torvalds , Arnd Bergmann List-Id: Cc: Sudip Mukherjee , Russell King , Viresh Kumar , Shiraz Hashim , Ville =?utf-8?B?U3lyasOkbMOk?= , 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") In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: Date: Mon, 30 May 2022 12:31:17 +0300 Message-ID: <87a6aztli2.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain 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. BR, Jani. -- Jani Nikula, Intel Open Source Graphics Center From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8F231C433F5 for ; Mon, 30 May 2022 09:33:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Xf7QOc+Sc33i9Ite5DuhcDrl6yY8MneJAtrSwd/H/sU=; b=St/ef/0HHKRxSh nazB2q2yo6HazVBAEobL6PMzorcEgPaLuim2AYDUJuMzRhXW9XAP8KkRml1IOIcaSMBZGhi03Gr+1 H8KqtWfcMRsgJSVFosGyklAWzuV/iy9wbE8VFeBOua+y4nsr0v+rxTgahmwrmIse4po/HV/yyc7it oD8kfDi0B971anHIWO64ZiygUaG/oD2g0JDsV2TFCYOawGxVPsKNtHAZgQqjohl/2t2qJavAQNTaa PA79fOoIrY/wnOcEsiNMmbQu76cctn+sqTQbTP3vYJInUvnW8OMb2rEeuHByaWivykmUbj9BbISsm sUFmI+mC/nONla88w/Rg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvbkK-0067sd-Rn; Mon, 30 May 2022 09:31:32 +0000 Received: from mga17.intel.com ([192.55.52.151]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvbkI-0067r1-Fo for linux-arm-kernel@lists.infradead.org; Mon, 30 May 2022 09:31:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653903090; x=1685439090; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=RNo1VFn9TNhcSAwdGqSc/kbrNGzlnlE99QCowyLqR4c=; b=JzD4xbtHQJh7KT8gwCSCoRsg5ox0YNe+YZYLDEyjU0aXe7rYdoKBmhve a3fZoeOazgEQbHj3ICwHd+Pyhqxslv5v1XL6GeWAoIx5rY89nX3B0cpSU xHNgtyVUFlplDZeVZ+N1pxd2IhIKwsHLPyKsxrAIuClgPkExbufncTsr8 4beLiPWRbWke2F9uxhbPXwzaGoAVvzHRohB8aWtYyyNSPXvg71fN2a5Ti EGiMMyDNB3geP2vFL3xYGfCjYVhiOYmY0kCJp4hMNNrb9xrRt4U7FQSRj s2tl8x9eDOAfDG944L8qmxgNUAyvq/7V3PVFn9ofMaDfb3bHjYYOCEuEH w==; X-IronPort-AV: E=McAfee;i="6400,9594,10362"; a="255438071" X-IronPort-AV: E=Sophos;i="5.91,262,1647327600"; d="scan'208";a="255438071" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2022 02:31:26 -0700 X-IronPort-AV: E=Sophos;i="5.91,262,1647327600"; d="scan'208";a="706083847" Received: from jkuna-mobl.ger.corp.intel.com (HELO localhost) ([10.249.150.228]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2022 02:31:20 -0700 From: Jani Nikula To: Linus Torvalds , Arnd Bergmann Cc: Sudip Mukherjee , Russell King , Viresh Kumar , Shiraz Hashim , Ville =?utf-8?B?U3lyasOkbMOk?= , 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") In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: Date: Mon, 30 May 2022 12:31:17 +0300 Message-ID: <87a6aztli2.fsf@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220530_023130_569778_11164B63 X-CRM114-Status: GOOD ( 16.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. BR, Jani. -- Jani Nikula, Intel Open Source Graphics Center _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DB0DEC433F5 for ; Mon, 30 May 2022 09:31:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 19CC810E48D; Mon, 30 May 2022 09:31:28 +0000 (UTC) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id B621A10E48D for ; Mon, 30 May 2022 09:31:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653903086; x=1685439086; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=RNo1VFn9TNhcSAwdGqSc/kbrNGzlnlE99QCowyLqR4c=; b=QdzTZAuWxkmY5K5sRLkwYkYQyUGYKwdw1FeqZL61F4y0z+n4iUE1Vdny Wv6S/nHg7FAstK1OthiSUzBQRDQp1/QiDxTX1OJWVhD3jUQpYQrY240yb mPREj2jEJYJwC0vujhKFkvPhgY1NWzi4sgcoPxO4cW1LjXbiaIGS4bSJn BusZOOH21ABLDJPIQcHcs4bRCh708KB9ySwXLpeujwlnCoMo5RYrmPtlB pu9GjLSC82cgmADg6gAkYIYe76pEi/g8w0hps53omrH+4YICgHkgj+8A7 UOH7PypfYUvg9br8yC32tLQBdyRps7Lg14rJkGwfJkXiOp4U4Xs1Gfo11 g==; X-IronPort-AV: E=McAfee;i="6400,9594,10362"; a="274668022" X-IronPort-AV: E=Sophos;i="5.91,262,1647327600"; d="scan'208";a="274668022" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2022 02:31:26 -0700 X-IronPort-AV: E=Sophos;i="5.91,262,1647327600"; d="scan'208";a="706083847" Received: from jkuna-mobl.ger.corp.intel.com (HELO localhost) ([10.249.150.228]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2022 02:31:20 -0700 From: Jani Nikula To: Linus Torvalds , Arnd Bergmann Subject: Re: mainline build failure due to f1e4c916f97f ("drm/edid: add EDID block count and size helpers") In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: Date: Mon, 30 May 2022 12:31:17 +0300 Message-ID: <87a6aztli2.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux ARM , David Airlie , Viresh Kumar , Russell King , Linux Kernel Mailing List , SoC Team , dri-devel , Thomas Zimmermann , Shiraz Hashim , Sudip Mukherjee Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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. BR, Jani. -- Jani Nikula, Intel Open Source Graphics Center