Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3137686ybc; Thu, 21 Nov 2019 04:00:39 -0800 (PST) X-Google-Smtp-Source: APXvYqwPjFBiUSvgPsLqxExvuUOVdbWHcPhTJgkR8N173c5tdUzEZAqvogbiD+3g8BOYyNIufyoU X-Received: by 2002:a17:906:25cb:: with SMTP id n11mr12860360ejb.239.1574337639326; Thu, 21 Nov 2019 04:00:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574337639; cv=none; d=google.com; s=arc-20160816; b=sZjPq1MzrocepH4upcV6IAz13EE9qgLFd1QjSmHZPb7ERiAxNdScXd603yvHkntaDF 4jkJgZ+KDFGXSv4/uOJOe1XiQH4ANSD038S5U80aLL5hStXcqd4HyeHTiI+ldJX11sCW q0BA7nl0rYZYDbgCVTAClFEfP3u3nIqZK0X3t/hK8JljB5wJrSz4omffOZOkD8huersk UlwKDnDSfeq0MRLCNSfdDYt7NYdD7/gSz2CJTFVyP6xoGCwFTVsVXJlUml0u/gNvHFFT N7NqlugLLgjmRMFTJwvi4PEgbtQbzeo4h1zncSE0CpYzI83UFrwIZcFf3E7M21ihXBLq YOOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=iwuIrGlYelpzIqveq2t4okyC66kswpizl+EN3mIMiSA=; b=FVj8ragy5HT46pQwg63Ge/SWkv4WWwD+xbCzFodhtGPXAoziQKPsLOsc3DkQPRIpRy 9qGQRR57i60yxXrLcd0GAxc5Mj3hiskU4hLyYibRzhGlI0elOHY4O4L9hoMMNFf5tL+s Iq5rNYnwydy9UpjsJE0Rq69ELknyaPwM4uTSXs2d+SK65v5PVHbv+hddwne8uF7nqEUz 99OdOCRPk6uvG6OgWv/pq5lQxDbOXnFZ3kor/6wG+UW5xtFa4gElTQdKPDXvU7M/vAP4 nbEusNQckUP9PwwNGlbglw9rxctAObi+AWltUw3ry7m0KZ3OdFXQe/oFlYKkIFzlYY3i LOqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tiWuoNoJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ss14si1565783ejb.195.2019.11.21.04.00.13; Thu, 21 Nov 2019 04:00:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tiWuoNoJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726685AbfKUL7I (ORCPT + 99 others); Thu, 21 Nov 2019 06:59:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:45330 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726197AbfKUL7I (ORCPT ); Thu, 21 Nov 2019 06:59:08 -0500 Received: from localhost.localdomain (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 48A7C20855; Thu, 21 Nov 2019 11:59:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574337547; bh=dMs8ol8f+wZrnFfGD030jmzuZV5c9X4hlWVt3fXaYKw=; h=From:To:Cc:Subject:Date:From; b=tiWuoNoJC6w/8PPspgtAuyC49vSWyiyIFEleScvcdqp8fuzstBLFedq/Q1StYO7zm 3OJ1ZhMxUy3Nwp4g1s/w+trsEtdz6gJqiiu/B454sYMQK4E/n/2DSEmjkifnDNFaKh 6BkYUUBJReF2K8Ra4HagZcnQ1eJ/G08Msc9wK8jM= From: Will Deacon To: linux-kernel@vger.kernel.org Cc: Will Deacon , Kees Cook , Ingo Molnar , Elena Reshetova , Peter Zijlstra , Ard Biesheuvel , Hanjun Guo Subject: [RESEND PATCH v4 00/10] Rework REFCOUNT_FULL using atomic_fetch_* operations Date: Thu, 21 Nov 2019 11:58:52 +0000 Message-Id: <20191121115902.2551-1-will@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi everybody, This is a resend of version four of the patches I posted here: v4: https://lore.kernel.org/lkml/20191030143035.19440-1-will@kernel.org Previous versions can be found at: v1: https://lkml.kernel.org/r/20190802101000.12958-1-will@kernel.org v2: https://lkml.kernel.org/r/20190827163204.29903-1-will@kernel.org v3: https://lkml.kernel.org/r/20191007154703.5574-1-will@kernel.org I didn't receive any feedback last time around, other than some positive noises from Kees, so please consider this for inclusion in mainline. Thanks, Will Cc: Kees Cook Cc: Ingo Molnar Cc: Elena Reshetova Cc: Peter Zijlstra Cc: Ard Biesheuvel Cc: Hanjun Guo --->8 Will Deacon (10): lib/refcount: Define constants for saturation and max refcount values lib/refcount: Ensure integer operands are treated as signed lib/refcount: Remove unused refcount_*_checked() variants lib/refcount: Move bulk of REFCOUNT_FULL implementation into header lib/refcount: Improve performance of generic REFCOUNT_FULL code lib/refcount: Move saturation warnings out of line lib/refcount: Consolidate REFCOUNT_{MAX,SATURATED} definitions refcount: Consolidate implementations of refcount_t lib/refcount: Remove unused 'refcount_error_report()' function drivers/lkdtm: Remove references to CONFIG_REFCOUNT_FULL arch/Kconfig | 21 --- arch/arm/Kconfig | 1 - arch/arm64/Kconfig | 1 - arch/s390/configs/debug_defconfig | 1 - arch/x86/Kconfig | 1 - arch/x86/include/asm/asm.h | 6 - arch/x86/include/asm/refcount.h | 126 -------------- arch/x86/mm/extable.c | 49 ------ drivers/gpu/drm/i915/Kconfig.debug | 1 - drivers/misc/lkdtm/refcount.c | 11 +- include/linux/kernel.h | 7 - include/linux/refcount.h | 269 ++++++++++++++++++++++++----- kernel/panic.c | 11 -- lib/refcount.c | 255 +++------------------------ 14 files changed, 257 insertions(+), 503 deletions(-) delete mode 100644 arch/x86/include/asm/refcount.h -- 2.24.0.432.g9d3f5f5b63-goog