Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1307996rdd; Wed, 10 Jan 2024 15:46:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IEqOmqqxULYG3Lo/gKeeDXxUH8gzHTOXTBlD2Z0zduZp4jtW2RZ8HYC+PeYqqy/SBBISkIf X-Received: by 2002:a17:902:db04:b0:1d4:b4b8:90c3 with SMTP id m4-20020a170902db0400b001d4b4b890c3mr1375889plx.6.1704930408419; Wed, 10 Jan 2024 15:46:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704930408; cv=none; d=google.com; s=arc-20160816; b=ODyrcUBUjRS5rkROTTDBnUGxbSPH4wtH+2is/ozqvWzTGyUAENUxDyGAyY6lcHHr97 IyC1rAYo9pdbUF/KT788zYNyCQ/X9vLm0eKHswJ4+2cF9i33r7Tp+tgI8G49VeFH1VQv 5sS14CUJfDp0ZNdnuJCJmz99jQ+8iXPU6VNXo4BfK5RtZstlko8Cz4tOnFcBWQYlFF10 uy03lJ1r9jTnEVu/517mAyaOu0Qx7XepxFLYFIUROivpl40pbFvMDjnIULMVkY4ygVtM jELpVtNDO2OuNsNXidceVkzPjQika5LQhFvZw/10mFg9uossGBhu6MTB/KlDBnzEqFEn wIUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=YmFQQJ+8nG8wUPicnQ4h9Swe0ak+9PDkXgvvWyQBNFE=; fh=DFHjujMOXm1Yz3k/E0uvebfFPecCWlidGSyLm0/CYbM=; b=pLVVDz87qeQSLaK8WloHBpW4S2abEkgrNQ4zulLOPXStTspt0ECdeTi0MjBQjjbvAG 34GjIUkT/Gq9CvXvPS3B/+xUYr1WMdDsx2lvKCBOfjfHni0PTXEU03nwocHmVZJiH4Hg I10ybunJooQ2WyI3QB7jYhx3AX8TxhSBGwv8MVosnpDAHoF3owY1tl9MeD6k5W7EDSsY r/9Mx+3RZ8ValWk6e1Rc8CJI1ge1RgMCY0CnL6f2fe6ujFT7PL18wtUWfI7mir8oQiRk d5bnEK8UTdzY2yjYSTjBuhjY9eCFQtZ7+phef4+alIULz8XfwQAVg0P3CCNd5cOpZina q1aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B0AtZgAQ; spf=pass (google.com: domain of linux-kernel+bounces-22894-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22894-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d7-20020a654247000000b005cd87b61051si4583545pgq.632.2024.01.10.15.46.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 15:46:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22894-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B0AtZgAQ; spf=pass (google.com: domain of linux-kernel+bounces-22894-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22894-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id A1D37B228AA for ; Wed, 10 Jan 2024 23:46:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9EFC14F8AB; Wed, 10 Jan 2024 23:46:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="B0AtZgAQ" Received: from mail-yw1-f179.google.com (mail-yw1-f179.google.com [209.85.128.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 99AFC4F89F for ; Wed, 10 Jan 2024 23:46:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yw1-f179.google.com with SMTP id 00721157ae682-5e734251f48so37500277b3.1 for ; Wed, 10 Jan 2024 15:46:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704930390; x=1705535190; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=YmFQQJ+8nG8wUPicnQ4h9Swe0ak+9PDkXgvvWyQBNFE=; b=B0AtZgAQNZKVEijcVK72/619gA4iwtHBLY7v+tc9glWzHxGn1RlH9tzotMs9MxKuUV vTULUDsty4NXEGRRRGed1ARXLpNpkWvuWlafeO35jNXIa9rcj08LfNbgCJ77M1y6LzAC EHMaWNtQO/s710tZpNwOpJ80P8c6LD2OGy7mhQFrV+sqkmvck+LnuA0sl291x83awxu/ hxLzJVsN/2rtUFzfttwg7IEoUDt8/tdiU7KlOP+45WUhuGbj5URIDRLnS5G33cp6f1kN ciC1obTjfoUUIy+6EDLhlTySOpuNpl63OxAhyiMB42jRX40Du4BxO7G1mqCKILnzwpTT ZMhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704930390; x=1705535190; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YmFQQJ+8nG8wUPicnQ4h9Swe0ak+9PDkXgvvWyQBNFE=; b=YIdBXoAkarSgTLKabjpvjlcwJHd5f2ANxUkqCwZJYXw1ahTKQXlQv23a340NMH58/P cbNScyajJpmOPVyWtXF2jY/LF/Su1gIR5x3b7J0st8dBvSOaNzTYVO9AcyL+IdnIMTen Ezr9298Utpf7f6mVYlHyMO83IOeRtpEtd4I1L03TNo8VsvGFWvVk3sSLfSspI4qgzrne B/OHlOzxtq+byJlTFWK4yM2jKSG0LVM6+zMmtjcBJ6VP3NrtB8y5hB70OXO1OF9ERuCR 72TrxB7EAWA0SXtx4sVchPG8xdaXAC1S85wRK4eLVOSR/IaP+8V52E4qG1hPw0Yha/IZ jORw== X-Gm-Message-State: AOJu0YyBsT5HEW51u2YNxd2HkXXpiZp3o7Tt9CNfh1/jkCHcWDr4DiMB It0bCyRTWtCBrtNYQRKHX+c4ObVjo9sGdyUlasFrdcaZMND9EA== X-Received: by 2002:a81:b613:0:b0:5fa:ae33:463d with SMTP id u19-20020a81b613000000b005faae33463dmr190769ywh.41.1704930390607; Wed, 10 Jan 2024 15:46:30 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240110215554.work.460-kees@kernel.org> In-Reply-To: <20240110215554.work.460-kees@kernel.org> From: Linus Walleij Date: Thu, 11 Jan 2024 00:46:19 +0100 Message-ID: Subject: Re: [PATCH] ARM: unwind: Add missing "Call trace:" line To: Kees Cook Cc: Russell King , Mark Brown , Ard Biesheuvel , Arnd Bergmann , Vladimir Murzin , Zhen Lei , Keith Packard , Haibo Li , linux-arm-kernel@lists.infradead.org, Matthias Brugger , AngeloGioacchino Del Regno , Alexandre Mergnat , linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jan 10, 2024 at 10:56=E2=80=AFPM Kees Cook = wrote: > Every other architecture in Linux includes the line "Call trace:" before > backtraces. In some cases ARM would print "Backtrace:", but this was > only via 1 specific call path, and wasn't included in CPU Oops nor things > like KASAN, UBSAN, etc that called dump_stack(). Regularize this line > so CI systems and other things (like LKDTM) that depend on parsing > "Call trace:" out of dmesg will see it for ARM. > > Before this patch: > > UBSAN: array-index-out-of-bounds in ../drivers/misc/lkdtm/bugs.c:= 376:16 > index 8 is out of range for type 'char [8]' > CPU: 0 PID: 1402 Comm: cat Not tainted 6.7.0-rc2 #1 > Hardware name: Generic DT based system > dump_backtrace from show_stack+0x20/0x24 > r7:00000042 r6:00000000 r5:60070013 r4:80cf5d7c > show_stack from dump_stack_lvl+0x88/0x98 > dump_stack_lvl from dump_stack+0x18/0x1c > r7:00000042 r6:00000008 r5:00000008 r4:80fab118 > dump_stack from ubsan_epilogue+0x10/0x3c > ubsan_epilogue from __ubsan_handle_out_of_bounds+0x80/0x84 > ... > > After this patch: > > UBSAN: array-index-out-of-bounds in ../drivers/misc/lkdtm/bugs.c:= 376:16 > index 8 is out of range for type 'char [8]' > CPU: 0 PID: 1402 Comm: cat Not tainted 6.7.0-rc2 #1 > Hardware name: Generic DT based system > Call trace: > dump_backtrace from show_stack+0x20/0x24 > r7:00000042 r6:00000000 r5:60070013 r4:80cf5d7c > show_stack from dump_stack_lvl+0x88/0x98 > dump_stack_lvl from dump_stack+0x18/0x1c > r7:00000042 r6:00000008 r5:00000008 r4:80fab118 > dump_stack from ubsan_epilogue+0x10/0x3c > ubsan_epilogue from __ubsan_handle_out_of_bounds+0x80/0x84 > ... > > Reported-by: Mark Brown > Cc: Russell King > Cc: Ard Biesheuvel > Cc: Arnd Bergmann > Cc: Linus Walleij > Cc: Vladimir Murzin > Cc: Zhen Lei > Cc: Keith Packard > Cc: Haibo Li > Cc: linux-arm-kernel@lists.infradead.org > Signed-off-by: Kees Cook Makes sense. Reviewed-by: Linus Walleij Yours, Linus Walleij