Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1385919lqb; Thu, 30 May 2024 08:42:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWOwepbGLAQx351PDcUGosXqlpIc2DcuYTaAGgI1H/iXH4Scs6f69ijSTzppfV5OkVpSNSYtGeBlm6iL9TppUIoIZSrnwP1bMAxsjunkQ== X-Google-Smtp-Source: AGHT+IEgMJJen52WiI0X7JJAqZ9FdScBGXkMqDuL+Guko3RblIuCtTBJBgaYYrbWXPhzLpNr4XgD X-Received: by 2002:a17:902:dacd:b0:1f4:b7ff:ac4a with SMTP id d9443c01a7336-1f61972d4cbmr26648865ad.37.1717083743302; Thu, 30 May 2024 08:42:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717083743; cv=pass; d=google.com; s=arc-20160816; b=0V/Skq2zN24RfED3TZkEw109w0WvVctxXdrK4v0+xSMkfE5uTrQEtffKe/0WyEWaL4 n5ngKZmdWdgxsyVy3gdkTcau1ikR3yNithN3CtNIoECao9RKDWg7iuZQFfa92lOutHLZ gHsykuTPIzcNrBjVr3hvtVDV6nf30mxkn30XRf1mU9s5xPHUlV+VXrZtlIP23f4tuv5D XW8CTpSC6zIUG6y14VTOKynHs5xWnqJ50KgPFHhP6rahwh/qg3+uluc5H0jtO+MjO7O3 2c5MQ6oVFxJEPN/gZPLHe9aOLAjKqxzoGzHT2MySGooCsrjH3PKW8xMw4O5mGxOt85ja NoRQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=4j/W0RCkMX6PNwPuDOG5kkKx8vuxg0XIiZy/FRUoHvM=; fh=Iw5ZpCHWnX87HQrtHASy/lDzoRoksiVRXoqQaL6PS6k=; b=JC47Ht/t29EnIJVfeOlbF7PEOd6702c91g8cfQTo6xlAl6+oKFN1v3pU9f8clfnm8x A6nsfK+2KnOk1xK72HY5Pc4PnaT66y+oZQ76+d90fc8PKplMnLo8clDxtl18n2IVirFl vrRkS0iVEsO1eo2yJvD2tsSRU3OWWr6bU/7dQCdLsfSDZZCxVsy++xlAdu/eldzWI/W3 tF7VrbsAdz067c5CDaedwJqaylNVT8FHa/VQpwiKnMqw/16pfDKW+5q1yIBQKaZZ29gj KtaQ8rP85kQHJIJwzc10iwewXZXOyXX5Q6BygkfYB7SGxzSZxbPZSLH1ZASJU864Xgk9 ygIQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b=AwMw8jpT; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-195612-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195612-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f44c9e4372si4958605ad.546.2024.05.30.08.42.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 08:42:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195612-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b=AwMw8jpT; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-195612-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195612-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id DD74D282E40 for ; Thu, 30 May 2024 15:42:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0DFF118308F; Thu, 30 May 2024 15:42:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="AwMw8jpT" Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (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 368D0187543 for ; Thu, 30 May 2024 15:42:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717083734; cv=none; b=BipltE31RqzSaPN2D7I7ycct6rOATxscbgw62T+QEmqemwS18x2C9RLJXOWVbScMfwrr5ykiPhZc50IuaGgahjTXMinomT45/02Ug5FjKtqlBXcduuHWprqtiwjMUTTWuw3ixU4Sc/XzEqO09heNHhoYyP/L8XWJErpsQyz0DQc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717083734; c=relaxed/simple; bh=Hd3TXDh7+1gdd5BKaCfkA1GBlm5HEbnW0ANpefjwrRw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=O0CPO5R6oeScIh5JlNkuBbG88/EBl2zWz2PWzI+PiBDQ+oPvSWb0k/7T75S/wxMzC8FTx47CrygDTjvcrlwsNVz0Emdi8gbxs2pKnLU2wug7YGis25zmll57+h7riCjgIsX7RW2nbfzumUGjYBFtAlLvnBpHlTwvdU8BULbnPug= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=AwMw8jpT; arc=none smtp.client-ip=209.85.208.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-2e724bc466fso11495211fa.3 for ; Thu, 30 May 2024 08:42:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1717083729; x=1717688529; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=4j/W0RCkMX6PNwPuDOG5kkKx8vuxg0XIiZy/FRUoHvM=; b=AwMw8jpTuLGABt1BG9WyTBXcOK9nlaqk+6V3sR2hifJ8DJAYQDnMGeb0wVYexQwCk1 cYhZojlMJ3a1bRv6VZN9HwhcB0IRwYM7ZkHuKLTcXVwGIfzclj47OhHxK8fE1CBkvP91 wGC2wmlqY98dms0GM8CiK3capMRop1SJvN16NpYQEC1/kqHtELMZUZiarYFlqNCkpRrD coLAFjZLfEHG+H0+neIYTm/b2NFft2JjwlVy+90YDGVjYha9AvwZmZNEfVTTM16oLJco WPZF0BVwu0Hgq6A6ssh85a+9mq19pUlkWoiM+P+A4pRAy04c25jDk4gG0vH76/QlIrTr qi1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717083729; x=1717688529; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4j/W0RCkMX6PNwPuDOG5kkKx8vuxg0XIiZy/FRUoHvM=; b=GluZpYFjxcTR1lFsIOeWom0vyzr6q5zzsSV8Z5i2m8+kqxj7yIpShS8Hptu5sD5PBr 14mlX37LqKZVptwxTP1RsSzakRy/lixjBz+K9ZDr6fZ8b2iFfc9njXlujdxoQtHYGbGR Su5GkVjSDFQbw4tQT+hNlfjkPFLPus3qMRz5mda3MSVOwbLhZLTU31l3tluSABwO7UTt /tu4g0XT4PGbUR8mUZ52lrJ7KgaRQ3+Ymtd/lV+mQ188HfwN9qaVpefpw87vwDYJG9HP Fm0D3OjP2n3wJSlAMrBH6NvxpK/ftqNyIWXpYDHOjmDiSF5p2ZOtWb1FIcowhDpBJXG2 c2UQ== X-Gm-Message-State: AOJu0YxE2wHf704k3tJaKe8CvlOsfN52oVSE/4Lr7C4XD38Fr+Skwqj+ J9h59hi1ou0KguFyXjKp5DKm11G9Yd3DL1gr7tD2BMjTiedFyx77mLE4ijJHK7I= X-Received: by 2002:a2e:b711:0:b0:2e9:8b00:73f0 with SMTP id 38308e7fff4ca-2ea847d4e60mr22286011fa.28.1717083729307; Thu, 30 May 2024 08:42:09 -0700 (PDT) Received: from ?IPV6:2a10:bac0:b000:5de0:a23:f1c3:862a:5eac? ([2a10:bac0:b000:5de0:a23:f1c3:862a:5eac]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dcdbfad6fsm544649f8f.24.2024.05.30.08.42.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 May 2024 08:42:08 -0700 (PDT) Message-ID: <0d3f7c58-7fc0-4e8b-b6fb-c4d0d9969ce7@suse.com> Date: Thu, 30 May 2024 18:42:07 +0300 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() To: Jeff Johnson , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Kees Cook , "H. Peter Anvin" Cc: linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, kernel-janitors@vger.kernel.org References: <20240529-fortify_panic-v1-1-9923d5c77657@quicinc.com> From: Nikolay Borisov Content-Language: en-US In-Reply-To: <20240529-fortify_panic-v1-1-9923d5c77657@quicinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 29.05.24 г. 21:09 ч., Jeff Johnson wrote: > As discussed in [1] add a prototype for __fortify_panic() to fix the > 'make W=1 C=1' warning: > > arch/x86/boot/compressed/misc.c:535:6: warning: symbol '__fortify_panic' was not declared. Should it be static? Actually doesn't it make sense to have this defined under ../string.h ? Actually given that we don't have any string fortification under the boot/ why have the fortify _* functions at all ? > > Link: https://lore.kernel.org/all/79653cc7-6e59-4657-9c0a-76f49f49d019@quicinc.com/ [1] > Signed-off-by: Jeff Johnson > --- > arch/x86/boot/compressed/misc.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/x86/boot/compressed/misc.h b/arch/x86/boot/compressed/misc.h > index b353a7be380c..3a56138484a9 100644 > --- a/arch/x86/boot/compressed/misc.h > +++ b/arch/x86/boot/compressed/misc.h > @@ -68,6 +68,7 @@ void __putdec(unsigned long value); > #define error_putstr(__x) __putstr(__x) > #define error_puthex(__x) __puthex(__x) > #define error_putdec(__x) __putdec(__x) > +void __fortify_panic(const u8 reason, size_t avail, size_t size); > > #ifdef CONFIG_X86_VERBOSE_BOOTUP > > > --- > base-commit: e0cce98fe279b64f4a7d81b7f5c3a23d80b92fbc > change-id: 20240529-fortify_panic-325601efe71d > >