Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1600834rdd; Thu, 11 Jan 2024 04:16:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IGQFtCEzvMEdeKYwisjDtKozAlcBPKJ+WUtKUNbiV6bhq/gul8JFzhz04bTCX2mjzeUV9OL X-Received: by 2002:a17:903:41cd:b0:1d4:bd30:3ec3 with SMTP id u13-20020a17090341cd00b001d4bd303ec3mr1312785ple.34.1704975412779; Thu, 11 Jan 2024 04:16:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704975412; cv=none; d=google.com; s=arc-20160816; b=kx9fRwFnjr9Nht967gZJAXYhEreB6hxPPCrQqYZPW6mfKe0ulfTnljuVoTF44qxgtJ pS/wbVa+QWugnsFCLhOhTQdOSJZwBd3cYnEAU2T+3TlCpdE6Xt0qXyWOA13HRaRUVyYl 2Xlnbz+8r3XJ8wAWTSM57IxPbvzNOwVY3BQA0/k+d+i/8eLcPgq+Me4wNiItlRrJwnW8 hTRAJ8OyUSzHi+WHPpgNKYoATEDeqfDW+CfOdYXCTclgSUOhgvguwJM5qhTpnCZLsyfK 0jktzYxiAGiEB/ioZGel71yhdFuJUKgflh54aVNSpxDxAUhYKQA/1/sBF7T8GrvciCAa UkGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=cj3cWUfiYOkSaZuF7Vbf9ylbLMlsWQEJ2fAOj9vz6Yk=; fh=aVUJ+21DVQTNbnl4/Heth/ui9ykhVe5nMExsH8n77UY=; b=pUX+l3cZbiDXz+Su3IVhIm/e3kjOti3SVfgqb7CB4e9JuM6p7MWzupPS+c841PZeZv zgGg23uM+NdOLb1ENL6KpyvLRo54CQe/VmyQImHpVbcv0OCRXMuxkoIQUveWcJ/CmazQ fc7OZN4B0ym8i2arLjHK/l6p7aK3lRRgSKUP+8fl+37FueVDgwoVg6kaf4Dy6Q6Skw4M 23iLFuXN984ah0DuMf9PsU2uBnPyq98hHdCVVG1V3X5OJlfa2uvHy0RHsuTaUPcTq7ve e29BRoc1cri5HpueN46BDJKW5uV17GBv5Ije5l+gxSB+Ttf4g/naG4Ctey6ZRnhhOxC4 0OwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=NjUKSC9Y; spf=pass (google.com: domain of linux-kernel+bounces-23569-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23569-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id t1-20020a170902e84100b001d578bdafa4si992812plg.209.2024.01.11.04.16.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 04:16:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23569-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=@collabora.com header.s=mail header.b=NjUKSC9Y; spf=pass (google.com: domain of linux-kernel+bounces-23569-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23569-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com 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 B56CAB27ACC for ; Thu, 11 Jan 2024 12:12:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 52E24156F6; Thu, 11 Jan 2024 12:12:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="NjUKSC9Y" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2434C15AC4; Thu, 11 Jan 2024 12:12:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1704975144; bh=TB5P8KrCbMGbGJbuacdDLOIpRYEMY/WzZcPaRIxL9Io=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=NjUKSC9YpMGUIeFDwmk/rtOZbUG5chj6AL1sw0IzoKiRdD4/c8ziU8tBNqWKaPbJp VW9GVpaWILaUVn6Sz+5ICS4lWlqeRZuAG5kv/K+QO3Cv7qIuHFcGF1KpUk15yCB7YO db/+UzO5u5cFNf4SxKMIlqwjspz62TTwOBRSI4F2JdFFQfaOqtRFMj3tT3zne06vsL ajnNp42AKGS0Mop0VyYy8OVOvDw3gHNA6yvnHCe331JqE7ahWQiI8+X1vOBSph94Nt KQSWLyEFNEUo4dYW6BtF7Qb9ff1DnNt9GX1rH0IGiKeo+fj+YjSYboT+J0V9Bqi7wv oeKBhuO0O2hOA== Received: from [100.113.186.2] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 56F393781182; Thu, 11 Jan 2024 12:12:23 +0000 (UTC) Message-ID: <549d8438-cae7-4c81-8f2e-1513a5e2dd5d@collabora.com> Date: Thu, 11 Jan 2024 13:12:23 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] ARM: unwind: Add missing "Call trace:" line Content-Language: en-US To: Kees Cook , Russell King Cc: Mark Brown , Ard Biesheuvel , Arnd Bergmann , Linus Walleij , Vladimir Murzin , Zhen Lei , Keith Packard , Haibo Li , linux-arm-kernel@lists.infradead.org, Matthias Brugger , Alexandre Mergnat , linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org References: <20240110215554.work.460-kees@kernel.org> From: AngeloGioacchino Del Regno In-Reply-To: <20240110215554.work.460-kees@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Il 10/01/24 22:56, Kees Cook ha scritto: > 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 Reviewed-by: AngeloGioacchino Del Regno