Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp303529lqp; Mon, 10 Jun 2024 05:00:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUzbvLxXjURZVbmhlrGXaBTmCa/faoXYPaubadIt0MGUkfGcNHY1n3FvrUm/mxzQLE8/+2DgVuwBKXTRoFYBVMHpZCN9DidbvN9AqU3WQ== X-Google-Smtp-Source: AGHT+IHXbZxfkPFyYLHyoN8KszUhakMXHp7/uYj2j09iadyg2woATyUBbWEnzx/USIzF9gT8MTIb X-Received: by 2002:ac8:5890:0:b0:440:5cea:d0fe with SMTP id d75a77b69052e-4405cead2aemr59788631cf.64.1718020804955; Mon, 10 Jun 2024 05:00:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718020804; cv=pass; d=google.com; s=arc-20160816; b=EyEy0m/UwgM9XhoROnT6OCRbaurdoEsEeHEP4nvIRDpSZAzdYVXKIyNHGbLRJtd+I1 gqePDkvnRy3FCRVPpsJucgSj1gSNp7brLa5c1L52g5P9Iv/Qrqa4zY/zu6dZtYpWSi2l zG6EvXHfwAqnbfm6kiZvOoabGjiXSjOXsAGjrVA33W63tF+HLcQI9Uzxf8dqteQWo6xc XLvyGe98RMSWhNRVHW7vG+1YVnqBLFHzcavn0oUk+TFZrG6HDQQanjvf2ft3YSPjWrXh 5gfh/2+zpeupnjF5sD/A/FQ4cb3/9e0Pftwdqt4jkxVZYG3x5edduz6aTCF6Q/q98Ifx 5fgQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature:dkim-signature; bh=/TdWq8PyXuXVwPR8Hv+sr1APX3Q4DXtBA/3pEQPpwp0=; fh=RimH4lXKhr8ClYvIWGz9OSEhiMpPbTlInMY3as7W2ug=; b=DhI4NyGGWnqIJ5pwBqDl3Hv0Rba7HTIeJxjDAH6no9tUGeottAoKkbmO2r4lQmfOVE CtrCZU7vkMG9q2cf7g380xnrEya0bVHHGtmFvT2nNz/uMsONSdP2dABaW6QqVn48zbPo sP30wA5W7b+2/mP8hDKFtBkJsiZgaS4URhoxvKD2GlGynCcsycNshbJ5AMuwI8cOcV5s 6cF5CEBvL1ps/cJjzmQCzPSJ1PSxX2Ttx747RnU4BmuUkZSr9UFW/64YfWs6kZlKjOdt qrNP+e7iBkHcJS7ng6zsHQvBt+S4r/8PxR8sTvsXCuXNDYQFdVsuxwdExw3qn8EeKHVP BY7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=HWmo+Dxe; dkim=pass header.i=@suse.com header.s=susede1 header.b=HWmo+Dxe; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-208120-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208120-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.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 d75a77b69052e-44063ea5f9csi33938411cf.317.2024.06.10.05.00.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 05:00:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208120-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=@suse.com header.s=susede1 header.b=HWmo+Dxe; dkim=pass header.i=@suse.com header.s=susede1 header.b=HWmo+Dxe; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-208120-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208120-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 6BEE71C230EC for ; Mon, 10 Jun 2024 11:59:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 143EF7FBDA; Mon, 10 Jun 2024 11:57:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="HWmo+Dxe"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="HWmo+Dxe" Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 8EB4078C9C for ; Mon, 10 Jun 2024 11:57:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718020648; cv=none; b=tkMae3Xvab2qSDLuwXobE3Z6awpbEvFvjpDQ5gerBncjrHFcXWxg+XdovEYUnyViwgWhgUq63myNcBf5GIyhZNxazquWOP/jYTWaUOaaWXi25u/dw3F8yAGSuAxxDHcdAZ5tW94cHeCKwJK37hWWkO70U0I5YqIbnd3HAIvorYc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718020648; c=relaxed/simple; bh=5qBxDQUXasngRYkylw5SsgPhp9hRTNTgYYxtIvVzhuw=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=s5GxQY6RQkgDOYmR4rvQ2q9qC6M4QDf3JXcB3jCrN5v3fez3JnHn22JH1BO+a1AABF+GolsJ6mLP0APrLGs0y2Zav7VbQnWTxRfoslv4ojhb+BYfjmxuCuQY6jtP5gxi9Y4OuSO62P7xewxzDVs9RH7Go+C55++Vdj5zz0om7Y0= 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 (1024-bit key) header.d=suse.com header.i=@suse.com header.b=HWmo+Dxe; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=HWmo+Dxe; arc=none smtp.client-ip=195.135.223.130 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: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id AFACC21A4D; Mon, 10 Jun 2024 11:57:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1718020644; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=/TdWq8PyXuXVwPR8Hv+sr1APX3Q4DXtBA/3pEQPpwp0=; b=HWmo+Dxe5K/yvlC1OWu7k0Zr5LtVLLDAi658wUHUu3i+nH1NbdOEb2NGyCMuKdC/jmBnAW TPhYi8oJc8o9jzA6YdgH1Ovs/qfLjJQW2dLp9vXv/sOhP0QwQoHFhaLH1nIXeqFX1G4OPf mC3vom045mH3Aicxtlz8grGCfXw6Wow= Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1718020644; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=/TdWq8PyXuXVwPR8Hv+sr1APX3Q4DXtBA/3pEQPpwp0=; b=HWmo+Dxe5K/yvlC1OWu7k0Zr5LtVLLDAi658wUHUu3i+nH1NbdOEb2NGyCMuKdC/jmBnAW TPhYi8oJc8o9jzA6YdgH1Ovs/qfLjJQW2dLp9vXv/sOhP0QwQoHFhaLH1nIXeqFX1G4OPf mC3vom045mH3Aicxtlz8grGCfXw6Wow= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 662E113A7F; Mon, 10 Jun 2024 11:57:24 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id qpOeFiTqZma9GAAAD6G6ig (envelope-from ); Mon, 10 Jun 2024 11:57:24 +0000 From: Nikolay Borisov To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, kees@kernel.org, bp@alien8.de, Nikolay Borisov Subject: [PATCH] x86/boot: Remove unused function __fortify_panic() Date: Mon, 10 Jun 2024 14:57:22 +0300 Message-Id: <20240610115722.107780-1-nik.borisov@suse.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Level: X-Spamd-Result: default: False [0.20 / 50.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-0.992]; MIME_GOOD(-0.10)[text/plain]; BAYES_HAM(-0.00)[25.82%]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCPT_COUNT_FIVE(0.00)[5]; FROM_HAS_DN(0.00)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: 0.20 X-Spam-Flag: NO That functino is only used when the kernel is compiled with FORTIFY_SOURCE and when the kernel proper string.h header is used. The decompressor code doesn't use the kernel proper header but has local copy which doesn't contain any fortified implementations of the various string functions. As such __fortify_panic can never be called from the decompressor so let's remove it. Signed-off-by: Nikolay Borisov --- arch/x86/boot/compressed/misc.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c index b70e4a21c15f..944454306ef4 100644 --- a/arch/x86/boot/compressed/misc.c +++ b/arch/x86/boot/compressed/misc.c @@ -531,8 +531,3 @@ asmlinkage __visible void *extract_kernel(void *rmode, unsigned char *output) return output + entry_offset; } - -void __fortify_panic(const u8 reason, size_t avail, size_t size) -{ - error("detected buffer overflow"); -} -- 2.34.1