Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp537872lqc; Fri, 8 Mar 2024 05:16:22 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVwcPP5sJcVarOB5gI9WLHh+wACllHqxknRnsPGYmIli8nFNg7aCANGsZHw8qhJje8eAYfw776ZA+tVnwwE8tQSi3QSzpdKthCDA9L0Jw== X-Google-Smtp-Source: AGHT+IE9tJdrqwg4i36B5RKYqvspUfWy3Euy0v0kN9z9j3boyvUt0k4bUukvpySGVxPgK4xnzwOt X-Received: by 2002:a05:6a20:a889:b0:1a1:4ded:c9d2 with SMTP id ca9-20020a056a20a88900b001a14dedc9d2mr9374737pzb.41.1709903782532; Fri, 08 Mar 2024 05:16:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709903782; cv=pass; d=google.com; s=arc-20160816; b=hhmHQS28diq31eJhU1Elg93ardJ32rGElf8+LzNjnZfPUvhVRqm0va87zDFxXxntVc pfisLWiEvP5pgCqXFrtd/jDHu2JiqG1VldtMTsGp9YSW57jY/pXUeKJN6W4P908Y/rwR YU1ucTXHWA0mZYqpvj5nGZcGvmNCVNqsl0nmavNKGDpV5sg7ETpsA3qy7mE50+4xqctJ YVKr/YHTQBh1L4a60zeK477gVBTvShehGoTTn1SZeDLoIPFzW5qF7deOWbSqusiiV/Su TWjoqFjn1V2YUd4JT6O/USzF7opINekAyVM36F/t2bTtjaKhSuhrZw4R5WSdtzrGm2oQ yAtw== 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=DmhU0LjxJ7Pg/iVAP8NgztPY+exZjmLkdKys9NdrIxKZovbXQO78EOlojzqdu3rJpc rvp2OhlnkceQpBR+huZKnrHb9AHQ4kVdDlkoQf1tD7HKfFbPIvFUdYsvM3uA6YpzvUyX mYwtR4d1KBVe/d+96628eynNLy8jniWROzySAFH8gyVAdddaTjVYW/+Zl2O9PTEg5rwc w0mPeVwu51DyUHC/mKTWlZffkRE9qcCs4daJuNGUjaG/ArMtQzZR4mxgTEESlYkPf/wc 6sTn4AysXJAgx13W50t5RhAyAErFMqEQUYAmlEX/eyPTU7mCy+JWM7cReOQqkR1A8jdg Qalw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=AR+K6M+P; 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-97045-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97045-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 cp12-20020a170902e78c00b001dd09050be3si6289855plb.174.2024.03.08.05.16.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 05:16:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97045-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=@intel.com header.s=Intel header.b=AR+K6M+P; 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-97045-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97045-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 089F2281389 for ; Fri, 8 Mar 2024 13:16:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 35257225CE; Fri, 8 Mar 2024 13:15:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="AR+K6M+P" 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 BD3633D3B9; Fri, 8 Mar 2024 13:15:49 +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=1709903751; cv=none; b=Y6Wek6dxxuPvFaLHnRQuJKNTK7zzZApOlrBTY7dIRF1FPWMWd1+TKEz6Nu2f64hNwPebLUDUyYiz9lO03moNGjEY1tR/ghyR3CWPL1ihdBQK0ggoPUhUhZBP55YB9x0gQB5Adn8M+MUyS0/11Tf915cbCzwSQoB6AyOUfu2TgHc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709903751; c=relaxed/simple; bh=bS1S2X2CJjfZI9Wdu/gKC/PtojbjfoojrJoco+YT8K0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=dPL3qCRDJppDeKEJS1+waz5c6hVfcYq0xgdts0p6jHlkACaF3Vx+pmwr0rtuKD9r6yxqpaKI+HXdSmgPk8vToRsbCxJi8SotKhzC3ekzGRltk5kAdZkERQG/B+eTYNKOVbZdf/onyGwpk5LoOxnLGo9EdxQ8RKg3h04mfmB48qo= 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=AR+K6M+P; 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=1709903750; x=1741439750; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bS1S2X2CJjfZI9Wdu/gKC/PtojbjfoojrJoco+YT8K0=; b=AR+K6M+PiMSFInoWU8aHUXT/cUkPQYyi+gOWGcMZr0z1yQJnBqxCGy06 /ABuvKs3SF3shO4GnDTPrtYYoJHAICe0cOlE9mxKVLO2uv9pjVJc08agL vU78ykaHhn70ZsPMzv+Dzv5EK3UO0dEi7jqvGKTYy+4n/OI1giL08PJhU kuXCa2f9kz5RO2Cuvv81rHGRXI9sOII2LchJjZXbJgj1OOasjAbI7kOYg IuZ/EaPy64+jxruVnKGteV2gIXiSNswxaz1PuX4USE6MVl9SMj54fWRTh IRWic35vuj/jezoma+UlZWO6nWO9BHY9i2SEFUCBy2d7Fl1UL/JqPEUFe w==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="15342442" X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="15342442" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 05:15:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="15161375" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.249.46.63]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 05:15:41 -0800 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 03/19] vdso: Add CONFIG_GENERIC_VDSO_OVERFLOW_PROTECT Date: Fri, 8 Mar 2024 15:14:56 +0200 Message-Id: <20240308131512.44324-4-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240308131512.44324-1-adrian.hunter@intel.com> References: <20240308131512.44324-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