Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp65199lqs; Thu, 13 Jun 2024 04:08:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV7Nnqb5jkCjEUIqHfBdN4y/SVjf9psr9ILhVOpVjSTylsCV+8BEc19SyKlTpfR94paPvyFBGRigAsWV6QTBEIuKUJMBT3Xe73+XMcRqQ== X-Google-Smtp-Source: AGHT+IH3Nky0ERAWO9mFL1mgLCvOKjQpcvhF4AxiT8us9DG4ZPmIMhXZbGerFAlAujBbMbs4jSAz X-Received: by 2002:a17:90a:67c7:b0:2c3:1937:3042 with SMTP id 98e67ed59e1d1-2c4a7600aeamr4646395a91.5.1718276930926; Thu, 13 Jun 2024 04:08:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718276930; cv=pass; d=google.com; s=arc-20160816; b=dm5/q/crzs69X/QZ27cJCUYDBhLrT90Hw0vlJ0VmvFG8zfGw8VM+eJ4z85VLgGhNWz T0EiWPRLwqw8PCWUkYwjHQYEepmGLQkW/IVnWH/z6shPATaAxcZOJ4fb4nvRvdgMY1yM Cls1FUo1B1HdrKXunDNqEubSJ6aFS48Iavcw6CuTsRqDS2PQdPdlnmmfY4muzf7Av7Z0 wli82FwVzCW2G332f9hAtjDoDj1/ejcWNBRPEZKmD8MmV44brpgEowZ1Lnl9psOlBk9b WkK61cJz9KW2d4fe/RwBpKPuBl2MiH/rAjLFiVBNVvAtI4z3ve0uPdPMzA5Bbfo5IOfZ abaA== 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=V/iWbWhG2My8bCeL6MeDIo/emE8CbfAk8+jMy72Gqbo=; fh=RimH4lXKhr8ClYvIWGz9OSEhiMpPbTlInMY3as7W2ug=; b=yhGowfTDnJSkn+C8QDmtYJaNIRHYXYMsdrK5mPbkAXm2EVOx9K2sc58NoWJuB+z1e6 RNiTNt0IErSW1yiCmitgxURkL98DLwNPWsaAq9fiio4cg5KuqmsnkFV3Meh0dwfE3Ykp Nq/gZJbYNcFK/WvMLP4cOrAxCU9aHReG0AeUgvGJsPzg0ksFBp/RbR10qfdmMMAifxHX HMtM7S48CA3MelzIizwGVL7hJsxb0R1w8IiTmL5+Y+AQIq8DgttVob3V+Rq+i/B0PKLP 6UZiqjI3Nh/ZRBXDIR2DoXPWGN9O4IO3I1+4BTgKfEVNyPeEfJbAyJt5O6EvMBiV/eWo qyzQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=BCIFIW7J; dkim=pass header.i=@suse.com header.s=susede1 header.b=BCIFIW7J; 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-213074-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213074-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. [139.178.88.99]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c4a75f3f3esi3414360a91.45.2024.06.13.04.08.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 04:08:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213074-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=BCIFIW7J; dkim=pass header.i=@suse.com header.s=susede1 header.b=BCIFIW7J; 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-213074-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213074-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 8E474282BF9 for ; Thu, 13 Jun 2024 11:08:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CDE68142E84; Thu, 13 Jun 2024 11:08:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="BCIFIW7J"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="BCIFIW7J" 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 5026A13F44A for ; Thu, 13 Jun 2024 11:08:43 +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=1718276925; cv=none; b=EJNzp602YGdjrFncDKyLL+p7yY6VG3oAMqhOrH5W+M+oRMLqOA/HopzqmH0FmL5BulAb/MOys9qjPzVTZSoKwOXZKwlpghfKNOq+u4hKxVoxDPHfQaW+sphr9vBHfTG4umrOL30Afn6b5AwB+LrobPDLSiJvdsIkeMm5IJNHGUc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718276925; c=relaxed/simple; bh=NoKlM3z2XRRml8IVaCoEAkq7esY2u38pvl3GFNeJv3I=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=fv2G6i8OwtJJJ1Lr6KduvgiOFsIg73SIh/VcDuPXEiZQQ1dTyrqu6kR3VEi5qnuFPTM7aL+Bxf8hmpdQ8MjAbAfPo36mbZlzGH3av46R7TWP+z5S2hJY9HEyek4+M1XWTQPhCnuzM7Y5ZEnIT3dPhAIahXvx1sfGEsWdbKGcAvs= 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=BCIFIW7J; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=BCIFIW7J; 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 620A7352E8; Thu, 13 Jun 2024 11:08:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1718276921; 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=V/iWbWhG2My8bCeL6MeDIo/emE8CbfAk8+jMy72Gqbo=; b=BCIFIW7JSProNphxHllz/TO+0aLiO6qBN8kvBH81YIO4Wv/eJcxqpNO7wIi9s7bhEIsQCy mkHWsmTH5zP6fX+c/sovbv8wOvfhvioRTv3KgO2TW63V9JsfcU+IWfEPQEgFXM1TZI0k7j dwHhD5Dg+gyL5719oodLn4yC5G5Cvak= Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1718276921; 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=V/iWbWhG2My8bCeL6MeDIo/emE8CbfAk8+jMy72Gqbo=; b=BCIFIW7JSProNphxHllz/TO+0aLiO6qBN8kvBH81YIO4Wv/eJcxqpNO7wIi9s7bhEIsQCy mkHWsmTH5zP6fX+c/sovbv8wOvfhvioRTv3KgO2TW63V9JsfcU+IWfEPQEgFXM1TZI0k7j dwHhD5Dg+gyL5719oodLn4yC5G5Cvak= 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 0A8A713A7F; Thu, 13 Jun 2024 11:08:41 +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 EEw2ADnTamb/DgAAD6G6ig (envelope-from ); Thu, 13 Jun 2024 11:08:41 +0000 From: Nikolay Borisov To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, kees@kernel.org, bp@alien8.de, Nikolay Borisov Subject: [PATCH v2] x86/boot: Remove unused function __fortify_panic() Date: Thu, 13 Jun 2024 14:08:37 +0300 Message-Id: <20240613110837.300273-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-Spamd-Result: default: False [-2.78 / 50.00]; BAYES_HAM(-2.98)[99.91%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Score: -2.78 X-Spam-Level: That function 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 --- Since v1: * Fixed typo in function * Added () after __fortify_panic mention in the changelog... 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