Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2637127lqp; Mon, 25 Mar 2024 05:18:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXkMbWXpW3EvfRoDpZtlR7xAMpE6lGxrA6D7hM2/kw7vwkcZvfTB27E6bGUor60QvKT3HLQFtP2u9lBzvne1OipbarkECXinxm6aq8Wwg== X-Google-Smtp-Source: AGHT+IEnsSuKlWhewGAa0TwexkOO6zhWHHcs3W4XYvasXBPwNxalO7QE2hjnphzid8QyK5Goh6ii X-Received: by 2002:a05:620a:1677:b0:78a:51d6:23cd with SMTP id d23-20020a05620a167700b0078a51d623cdmr4277931qko.17.1711369101042; Mon, 25 Mar 2024 05:18:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711369101; cv=pass; d=google.com; s=arc-20160816; b=mGOElV768+QifEd9HqkNSUMFmcaB1+wl5nW3b+NzcOtrEiZ4A0N9aTYaHT/PaLjngU +V2lqYNxn2pvcAAw6zylgzIBUi+DBzqgaau8RDVYJfII2wSnQ1aRwol2YjduEpBfrhgE y+45+xAuM2tPiJPPh+djLjNfi/04edh7In+IEqald8ZjzmrjZPeqSp8jiORyivwFFMRP sKko+uHnsF4r2KnMba2CUT3bMOewIiHQht9uzDb6X+jL6bCMcq5Vez+zXt+MAeYAgymE amF9sqBImFccUePuw5zdKfUbWuiWZYlHa6CoihNrehBy3x2o+bMcjTn7CZDF9UCI+ieE +kzA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:organization:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=YOdtmHPlSQvZnXpp+A40cBxvFZqxl0yRTekuewsgNoU=; fh=wgq3SFFcpYoLsYNr1Fy+HYH2+WGNJgTNu+AnKLa6P2U=; b=kZs67LMcUjRpl06dbziNBVWC+KsQthl8PWc7j8KzmugWHubGmoPBy3Mn4TEWjTm9gU BbZ7G3X75RMNfFlW/lMX0I9opCX1+zsiWEzW+29Wlz41JZWhhEnDl5DLhSO3SE/2sKzu L3xg73TJTCwbx1qii7Kjwfq6omDQmN3erRy0291lr8kMe1nkhQ1ghp4R+brQmJqiqWRr N2XlFA7iTwwSmRus5U4e8QBZMhpJZB+Gsk6zKokp4uESGVkLtgLyAX4PO283NeKuCHJs vXKp+ZHkIxh2pcz0F2dQVP4lRxIA3TY+tPZNi1rkJZSiCo57ONdn8v3i33TShqX1I7Mw SrOw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iCvUAqM+; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-116586-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116586-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id m10-20020ae9e00a000000b0078a26803e27si5187369qkk.394.2024.03.25.05.18.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 05:18:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-116586-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iCvUAqM+; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-116586-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116586-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 C2A3D1C333AD for ; Mon, 25 Mar 2024 12:18:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6F7F1139CE6; Mon, 25 Mar 2024 08:53:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="iCvUAqM+" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) (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 C7E5415ECCC; Mon, 25 Mar 2024 06:40:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711348860; cv=none; b=PFQ1l2KdkmU39PbFjzsEAlelshSWacjh6Cce4TXBYRbli2OgrSbvIKngkmgZxQ2Qlcpwe2uMt7SUvKgWuKogzsy0cVQ1TaDw8WEdOJV4Q5qsrsnomB6bYTezIY30bcOQSfWg/viIl4C8c57vIKoyDyUv4XOKFvPKmjAQqTgXPq0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711348860; c=relaxed/simple; bh=bS1S2X2CJjfZI9Wdu/gKC/PtojbjfoojrJoco+YT8K0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FONK/Qc9G2oRRUFRsK6T4xFLA0OJjRbzn6Tvha7tgxjWP+GqVXo70yhQxf7VFPsoShkolB+SEmDT4tGOntWGsv7bA0aYZOg3A9HeadTglGO/bTCCw30Ia535SNBV2WXYzH/DvSzxMv0kaPI0i1ssQ4kQNuFhOPONP/5lOyBO0ok= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=iCvUAqM+; arc=none smtp.client-ip=192.198.163.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711348858; x=1742884858; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bS1S2X2CJjfZI9Wdu/gKC/PtojbjfoojrJoco+YT8K0=; b=iCvUAqM+P763FFkqvP9fbv69XTONy7MqqfFgwaGSej2T5t05KuRiZri/ HGqhHtZ+8zYRtnnMf/OEQk7iHFCZWOhPSAlt0yyhH/u5ydovpU+lym2Ct BDZ0LWQXMWylXc2l3AAIUXhqhT1zSzACUpRzgxgNGKBnLDtAHGpIv38CH ZVlHp0T2Oj2N9tmaCWN/eYT9lsayUYIBkf6Zz9y0Lsq17KMp4OK2Y/LIi C+UNSAKpaDaXMTe3VizOlPvo5OTBF006bn9sd0eD8edmcoG9LOl7hi/Hz jzgYhRapenVRCnafneDk38xovJOaJ75Z/P7CtKy7ZejDv4CWQgHemnTMA w==; X-IronPort-AV: E=McAfee;i="6600,9927,11023"; a="17065130" X-IronPort-AV: E=Sophos;i="6.07,152,1708416000"; d="scan'208";a="17065130" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Mar 2024 23:40:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,152,1708416000"; d="scan'208";a="38629577" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.251.211.155]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Mar 2024 23:40:52 -0700 From: Adrian Hunter To: Thomas Gleixner Cc: Michael Ellerman , Nicholas Piggin , Christophe Leroy , "Aneesh Kumar K.V" , "Naveen N. Rao" , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Andy Lutomirski , Vincenzo Frascino , John Stultz , Stephen Boyd , Peter Zijlstra , Randy Dunlap , Bjorn Helgaas , Arnd Bergmann , Anna-Maria Behnsen , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Subject: [PATCH V2 03/19] vdso: Add CONFIG_GENERIC_VDSO_OVERFLOW_PROTECT Date: Mon, 25 Mar 2024 08:40:07 +0200 Message-Id: <20240325064023.2997-4-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240325064023.2997-1-adrian.hunter@intel.com> References: <20240325064023.2997-1-adrian.hunter@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Content-Transfer-Encoding: 8bit Add CONFIG_GENERIC_VDSO_OVERFLOW_PROTECT in preparation to add multiplication overflow protection to the VDSO time getter functions. Suggested-by: Thomas Gleixner Signed-off-by: Adrian Hunter --- lib/vdso/Kconfig | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/vdso/Kconfig b/lib/vdso/Kconfig index d883ac299508..c46c2300517c 100644 --- a/lib/vdso/Kconfig +++ b/lib/vdso/Kconfig @@ -30,4 +30,11 @@ config GENERIC_VDSO_TIME_NS Selected by architectures which support time namespaces in the VDSO +config GENERIC_VDSO_OVERFLOW_PROTECT + bool + help + Select to add multiplication overflow protection to the VDSO + time getter functions for the price of an extra conditional + in the hotpath. + endif -- 2.34.1