Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp982215lqp; Fri, 22 Mar 2024 01:45:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUGt1/DzsC+MYx7Itpww3ZF2tdXG8PIDU/g3Q7UnQqIKhCbBWdfW6uqOisTtBEbQJST4YGXUSot27QeEN9H0KREg70E56F7LmWqdg9YCQ== X-Google-Smtp-Source: AGHT+IHbUtfE61fXFlHWfu3R7wVpbVQuKdAh78/Qqpkz10Gx8mKS8+w9QQA8V8wa9Q0fyj+7ZTfQ X-Received: by 2002:a50:d4de:0:b0:568:7c01:a4a2 with SMTP id e30-20020a50d4de000000b005687c01a4a2mr984332edj.13.1711097127524; Fri, 22 Mar 2024 01:45:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711097127; cv=pass; d=google.com; s=arc-20160816; b=ealbkL42lp8z4CMPJeq7PNovSXcAyPecoFBE3S52+0zu3PXbsAxPMnwCyMTOCplDHH fS9UV1vL/LorsXKjmWMp5VF03u4zqLhB8XDi9hf+gXmwR62VYoBE8iapmZxsp0cOpkTi 7E9SJp7596XN7iuJx3Rovf766ykBMFq4/imr8yReb+8NdLdsY+ma2BGoWB2dhWEreClh 6RoNc4zcm4PHRTlfu6bAb6/NKceSBVi5BwYFLxemsc1qDwBiKCehmXx4wTjOGzyq3OYY fmTIBhYw/hTee1cuWzmfPtHSzf0lmMzbu0/qWI6LqqH0oY5flMy21hJK/FYn09T95Lfr eeGQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:sender:dkim-signature; bh=aB/vJcbosEWR8zB5L3DEigEI/JurQaOSkuKB+JwQ5ns=; fh=dn6VJ3QrnZewBRMbVXNbiBx9m8F1OuGQ3bPpxkTtq4Y=; b=FdNCICa8he+tGJBFSnRf3EzUJaPq+ytuYBLrvMhzJODzIxyOXVL7Tr2y+bdWtcb5UU ++XGqec/eXC8L2kZXgEqNjsD9ubsfSdKdn3cYVUS7uhrZuLfOf24JciyKvFpywVmAzC8 H2/onNpu/c5Jx7sb9m0xcHTrSUU90iMFVmppWlLwV+z2Z9SOcG4ME1UwjBVp1O8EagYq QtI34DKq6YrSr11bDU36ejgb5EcSQvAxwC5qjcA6DH+/L3+o+MWOrSMa5iGCADx7evDX RVHGLr+Jx9zK2Ile76o4MPvBUN+S5ca5tsx5tFEcVz0PhieoQu8VsTohBGBjkSSt3zVK 47pA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lbaKmzLl; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-111152-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111152-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id v24-20020a056402175800b005689f735366si712710edx.551.2024.03.22.01.45.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 01:45:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-111152-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lbaKmzLl; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-111152-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111152-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 377121F247B4 for ; Fri, 22 Mar 2024 08:45:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8D8941863B; Fri, 22 Mar 2024 08:45:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lbaKmzLl" Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (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 20418F4FA; Fri, 22 Mar 2024 08:45:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711097119; cv=none; b=p4GIwa6GYYRWO5fdaETkqJNt132AJQXiyywbmSqvaC3PqvhNU/gIAXBXEOxbsSGzr+9m4NcjxqcsDy9szMEcbjqv4s8hpnMfTB5HlbezSyFTODQIRZ6gNWRVJ68Q1b1p15pnITlcn7nrHC1DgCLsZcxjhFWAGfiTRmJ5+cPEp8U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711097119; c=relaxed/simple; bh=ffZPhfs8D27xRgmcskKdyiYjUqpVTZr1aOvEyUA6vso=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lPqoFgbadgTpsyCfzDiRfy9itdwePWPDr53GpGXCETUN59JSAD2GuPA7yBU2eckCyXs4C31bmcpB2peClaJ7uYGsLxkgU6HCsbLhl99A3lULiO0+Ugma/wMKa+kjWCdSOy2QKqa/8ZZNHV1IODiVYUPTH9tzjcV/71OXRXt9GOo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=lbaKmzLl; arc=none smtp.client-ip=209.85.128.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-41468f6d584so13689865e9.0; Fri, 22 Mar 2024 01:45:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711097116; x=1711701916; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=aB/vJcbosEWR8zB5L3DEigEI/JurQaOSkuKB+JwQ5ns=; b=lbaKmzLlg2nu0ustifOqbb41eN4HhadLsNURw5rct8JP0Y4iM0/+mlAPI/XDSrm04N uMzAFClP3s5Meuesrk4MTsbBUc9hRu03my5izW2KQ9LachCZq8V9fh2ChAvqkdOOh8DZ rkQrfCR8mUFperhhyrngtOw/zY11yqEpCYp9jOr2pvXWnWiCxpV3gqqw47YL0E6+xugJ 51Ol8pIMg2GDEifFqRu0lYta41D5DjPvyrDdBAZM5u7xCSFVG/Hm1IlY4xsfS+gkt27u UggpdkwlbaVYEs2odsgmDoD+BvXSVWV6AVm0XUG0bA6A1XJAhnOWgGd2u1JJ19r8jeGG jhcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711097116; x=1711701916; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aB/vJcbosEWR8zB5L3DEigEI/JurQaOSkuKB+JwQ5ns=; b=I2VXxpuF40cbIeHSRTOqxDJt1RRmsiAWftMdkLX/arsZ/Ek0BKW//5FHoLoPd6ZlDY kDzg0P3Kg4GRwZaRm/L2zRlTEHiewYsLKYMgKzSMUe69uyhCPHvkFeKZfzsAeys4gwYJ K5dYBpULQDveZVZflU1YTVdc5kxrkULXbR8AkqN+M0HlJwSPXoG9Ud3lEOBS+B+oyl4u BrERqSsE1fG76olCcDzQlQwLBtPNMK+qMQ7eif5nlmAlo3bs28PfUIdjvfnEqQj5dB2E xSpcA5L3p6CaSgNRLwYAbtrrvkpIP/EXhTuSlJNykWAbZO6QPd2EfspQ4rGysgCm3NEU hGzQ== X-Forwarded-Encrypted: i=1; AJvYcCVs170dzwEu5HXuqziu+f6nWrit+qUug+woGg6koKqycoz1bR+n4znoOELmf0bBPgJ7TuXHZGuRn7x2E6uz8OXrnSDbYOFI8EerwyCUdS4XyeIHpTWRSz8uuOJ5C4Cbu87ahO39k1Vn2IxVzCsV X-Gm-Message-State: AOJu0YwAcGIJ1gS/+Vq9jegl9suKf7j3uZcU1cZifuUz5MmHpWDbQNeM N2PHDu5SHtNIt+x6R6CFRMw837usECRYc2/rsHBAY6V2XDz1JEjB X-Received: by 2002:a05:600c:3ca8:b0:413:fea7:bd19 with SMTP id bg40-20020a05600c3ca800b00413fea7bd19mr1024404wmb.15.1711097115824; Fri, 22 Mar 2024 01:45:15 -0700 (PDT) Received: from gmail.com (1F2EF04C.nat.pool.telekom.hu. [31.46.240.76]) by smtp.gmail.com with ESMTPSA id p21-20020a05600c359500b00414038b4d64sm2387878wmq.27.2024.03.22.01.45.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 01:45:15 -0700 (PDT) Sender: Ingo Molnar Date: Fri, 22 Mar 2024 09:45:12 +0100 From: Ingo Molnar To: Kees Cook Cc: tglx@linutronix.de, Guixiong Wei , jgross@suse.com, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, peterz@infradead.org, gregkh@linuxfoundation.org, tony.luck@intel.com, adobriyan@gmail.com, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH] x86, relocs: Ignore relocations in .notes section on walk_relocs Message-ID: References: <20240317150547.24910-1-weiguixiong@bytedance.com> <171079804927.224083.15609364452504732018.b4-ty@chromium.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <171079804927.224083.15609364452504732018.b4-ty@chromium.org> * Kees Cook wrote: > On Sun, 17 Mar 2024 23:05:47 +0800, Guixiong Wei wrote: > > The commit aaa8736370db ("x86, relocs: Ignore relocations in > > .notes section") only ignore .note section on print_absolute_relocs, > > but it also need to add on walk_relocs to avoid relocations in .note > > section. > > > > > > Applied to for-next/hardening, thanks! > > [1/1] x86, relocs: Ignore relocations in .notes section on walk_relocs > https://git.kernel.org/kees/c/6ba438a29b5d Please don't - these are x86 patches, plus it contains an eyesore - see below ... Thanks, Ingo relocs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) Index: tip/arch/x86/tools/relocs.c =================================================================== --- tip.orig/arch/x86/tools/relocs.c +++ tip/arch/x86/tools/relocs.c @@ -752,9 +752,8 @@ static void walk_relocs(int (*process)(s * values there are meant for pre-boot consumption (e.g. * startup_xen). */ - if (sec_applies->shdr.sh_type == SHT_NOTE) { + if (sec_applies->shdr.sh_type == SHT_NOTE) continue; - } sh_symtab = sec_symtab->symtab; sym_strtab = sec_symtab->link->strtab;