Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp736617lqh; Fri, 31 May 2024 15:20:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWXrPqK6exVjkRNNUV+CBO7n/yHkIo2L4PucG4kdyG7k7REtG0cBnkD3Wqbl5HNRrSARIIk7WHZx1YBo+GVDM/h7hrPC5xoqP/jw7nc+A== X-Google-Smtp-Source: AGHT+IEnTyfLyNcI6BBn7RJTrFziTDN9xiYlqx2Sjt4Z2AxiExckEA52CAvY8N4q2uE3s8A/KlWN X-Received: by 2002:a05:620a:1a29:b0:792:bc3f:401 with SMTP id af79cd13be357-794fb5079a7mr178322385a.3.1717194046769; Fri, 31 May 2024 15:20:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717194046; cv=pass; d=google.com; s=arc-20160816; b=yhGpCbyULv4g9tnXvNuX8jgenOW4P+hxw3TnnOALkCABKDHqKz0r4SBdYsSJBHAZUx p8r3H+jJMCdxbRUACL6ms+WzM6a5Hu9Sb1Gno0njGJwc5nkxMixj8V5bsbyqxAzEE2y+ JQJoR+njNn4ANmMOoWIOPh9c89kZEaH9LCMFIn0oZ+qknwjDV+1zEmcOntKLA1ubYWMp 1dyxVADLE8IORXO48vf2YFWyeDbV/CM0tIg8DM20K+fu9kuey/L1wSjvqHFa/oYAyFC8 B2sQETvHT90WBteCFhUGg4vLV6QC1veiLJ2GCu8+Ci/TM8UCGBs+swtxn78yfsGoJeUA GnXA== ARC-Message-Signature: i=2; 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=8EeTbS7V3xBsQQmjVucu5lZPJSlCH65R118shwfNRWY=; fh=iUV5mKZkSY6rDtBI4I/vQUH9/njBZpIDPLDJAkh95ek=; b=xoRRTvlvdytaXnlXsEDVHmL/89UixDXgDZ9Du8DT68ulJjXNQ6JAIpmOSFngP+gUU/ 71oVNW7WqfeXP6FTgviPnWh69e9403FQ9qdbQGF2WUJ8nUdXqUz+sMzZ/JZouIUHdBSa critp8Xmsi4fUwrNeR4NPsDpZhrpY0rLFIKNKN+D0dejzapPh0WHLCgWBRMZqcg1R8C0 HHDdkIJCr/p0+mk5MR//XwxG9LFIOu9IQodoGSZUaZudB/KrB+XZWj7hudTTJ0i3k/0V oNmN3qZbfUSdMy0kFipg8+2VSsgUd8X0pl2MrdxZLtqh4CilMQHJL+ygYfCzl++nJW5V qMNA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=JfJhcFCz; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-197548-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197548-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-794f318cbbesi336018085a.526.2024.05.31.15.20.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 15:20:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-197548-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=JfJhcFCz; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-197548-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197548-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 779AE1C2337C for ; Fri, 31 May 2024 22:20:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 869BB8120F; Fri, 31 May 2024 22:20:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="JfJhcFCz" Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 33747200B7; Fri, 31 May 2024 22:20:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717194037; cv=none; b=QpHbhAOdYzm8FM6DMsVk21fdDHtcdbyHjVZayzwhiG1QknVucMYSgLxcevW3z3RGloSuFCfVTNGxuTeHoMxftT00y8TmNnDgReXlyc98I5chQI7gG3saUh+9P9R0yJEcYBjUKc339gu49p7/IF45+N6QRj/0MYpGIHX7kbTHJdw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717194037; c=relaxed/simple; bh=3c0IvTL5z3oMH0RomYMrTIOJkyINupn1llC2QZEzO9I=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=fFnpYeVMkBe7hsRII1B65YMWQNVtCsdwXmBuPUOoBBYP2ne7BuPfkFQVWTrnT348v52o3iYk1B0c5UAm4bwzSScgOH46iK8Hafy3L+ADejDQY6cPx568oyhabH5L9WADR5qybC3XBKkzLG+64+i8awjZYXxrSVWCQy05Uqqv/fk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=JfJhcFCz; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44VGcPfI012130; Fri, 31 May 2024 22:20:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 8EeTbS7V3xBsQQmjVucu5lZPJSlCH65R118shwfNRWY=; b=JfJhcFCzXmYvV5Z4 VqZJX2qNTG0MAx1onO3i1MgMlaXcwgY+D13AIYIi79y5d1BJIeMWzPA6v76RUAAS BTMhurTyaPth9zrIvxgnYpheG6ROwK9sMM9UXyP5ngC94iaKRD1jcCXjaukkOYYw x4wvfTAsxVe/Jd32TKf4i45zMYv47l8C+PsRJB7EjAs0r2hYG1UeATEc3CgMo72w HbOHggHyxy22bdvifVHT3f4F1f0llO9AeGLGZdh7eL+7uCUg8tXoE7AXdDGywHDl yVVxcPJk6MfoMZWs63h5PfC/uhL/0M1tmDQ83IbWkya/2BnxJmDKdqp5sJemMaR8 ifQglw== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3yba0ggnke-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 31 May 2024 22:20:06 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 44VMK4IA024521 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 31 May 2024 22:20:04 GMT Received: from [10.48.241.93] (10.49.16.6) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Fri, 31 May 2024 15:20:03 -0700 Message-ID: <45b0265c-8aaa-42cf-959f-04583269cf99@quicinc.com> Date: Fri, 31 May 2024 15:20:03 -0700 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] x86/boot: add prototype for __fortify_panic() Content-Language: en-US To: Borislav Petkov , Kees Cook CC: Nikolay Borisov , Thomas Gleixner , Ingo Molnar , Dave Hansen , , "H. Peter Anvin" , , , References: <0d3f7c58-7fc0-4e8b-b6fb-c4d0d9969ce7@suse.com> <5658B525-6642-43A2-B14C-BC4AA916FBCC@alien8.de> <202405310951.56D9BD5C41@keescook> <20240531190816.GLZlogIGgpc5maOeLN@fat_crate.local> <202405311345.D91BF6E9@keescook> <20240531204947.GNZlo367G0YXVbOk1I@fat_crate.local> <202405311359.EFC7345EC@keescook> <20240531212009.GOZlo_CV0lxZ1xviQW@fat_crate.local> <202405311431.BF9FE3F7A7@keescook> <20240531214545.GPZlpFCaXtTGinbcfl@fat_crate.local> From: Jeff Johnson In-Reply-To: <20240531214545.GPZlpFCaXtTGinbcfl@fat_crate.local> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: UYU71hobyl1PCXp2JziDIHJZy_Y-f7xE X-Proofpoint-ORIG-GUID: UYU71hobyl1PCXp2JziDIHJZy_Y-f7xE X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-31_14,2024-05-30_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 suspectscore=0 priorityscore=1501 bulkscore=0 phishscore=0 adultscore=0 spamscore=0 mlxlogscore=857 malwarescore=0 lowpriorityscore=0 clxscore=1015 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2405310169 On 5/31/2024 2:45 PM, Borislav Petkov wrote: > On Fri, May 31, 2024 at 02:34:07PM -0700, Kees Cook wrote: >> On Fri, May 31, 2024 at 11:20:09PM +0200, Borislav Petkov wrote: >>> So I get an allergic reaction everytime we wag the dog - i.e., fix the >>> code because some tool or option can't handle it even if it is >>> a perfectly fine code. In that case it is an unused symbol. >>> >>> And frankly, I'd prefer the silly warning to denote that fortify doesn't >>> need to do any checking there vs shutting it up just because. >> >> If we want to declare that x86 boot will never perform string handling >> on strings with unknown lengths, we could just delete the boot/ >> implementation of __fortify_panic(), and make it a hard failure if such >> cases are introduced in the future. This hasn't been a particularly >> friendly solution in the past, though, as the fortify routines do tend >> to grow additional coverage over time, so there may be future cases that >> do trip the runtime checking... > > Yes, and we should not do anything right now either. > > As said, I'd prefer the warning which actually says that fortify > routines are not used, which in itself is useful information vs shutting > it up. > I'm ok with whatever you want to do. I was just following the example from ARM where they have a prototype in arch/arm/boot/compressed/misc.h to match the implementation in arch/arm/boot/compressed/misc.c /jeff