Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3149591ybc; Thu, 21 Nov 2019 04:09:39 -0800 (PST) X-Google-Smtp-Source: APXvYqx8kWDOzVJP05YOB/hLj6tM2yMkQyDC97LTh9lzFOFnlPSvhrWkLY3YBobVfZepu+xkFbHN X-Received: by 2002:a17:907:447b:: with SMTP id oo19mr13016204ejb.81.1574338178903; Thu, 21 Nov 2019 04:09:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574338178; cv=none; d=google.com; s=arc-20160816; b=yoIpccnWudQ4yxsHJegCaDV6oRY0SVbDP6TvSro1sZ9eWqMTr845mCcLPLyGncSSAZ uDi7DWmpuKiTaPQ7vvSxTPlCs7CBtwT0nUTkvf1iQzyizh2G1+n5uEBjYqgEsfDGdOk6 vJIyoHiQGrmUy2MvyVX29b5uM0xQLyTSL8hvM913AjT3V1wqDx0UbJQTkE5WqlGUDhXp GZfpxiL+VKzlNyQw/DVy3NICkNrWpFerSeOD4hjlcQTYEXcySRE9cpqqJjwu4syQlXZr l34NYOEGM2SkATt0tb+zWFRaroZcjxzvYHISvgO4eF26q8cX4ElsA5FXgd8uw48YYl3a HJqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=7mYFFCf+Z8nXytmTMuBZdPdUGhhj9kPEmros5X8MpI8=; b=rnOb+eNwvW5CyOR/5m83aKttxByYxRGhrnALlP6dpkFnaHn/DSBwLgki/bCLv3Ebxk 6G5z9Q3JFyMTNcAiPWWgHnmwVGfalQP6xI/1DdoG37QGyZcmyRw/6FUQL2Idnbh72ddL Krl4JjHxP0zCILM6J16t3Oi3j/HXltcYL1N/kdjKLxa7psZdT38pyVAzW+kwSEGWeE3J lud7npSzBvq1R9Xj23Vzl1C7mpP7zqOwsl6y6siUtzqGlS/vMrji41eFeqRq47RFsz/K igtxPT1VbNSJI3KvtlFdi5Av6LX56Oeu178ZyYCHMa5wv/lcsHqi+2aEGcYSHvBwPsxd 9QPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oM5zxwWj; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 5si1648692ejz.59.2019.11.21.04.09.13; Thu, 21 Nov 2019 04:09:38 -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=@linaro.org header.s=google header.b=oM5zxwWj; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726379AbfKUMHq (ORCPT + 99 others); Thu, 21 Nov 2019 07:07:46 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:40512 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726197AbfKUMHq (ORCPT ); Thu, 21 Nov 2019 07:07:46 -0500 Received: by mail-wr1-f67.google.com with SMTP id 4so770759wro.7 for ; Thu, 21 Nov 2019 04:07:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7mYFFCf+Z8nXytmTMuBZdPdUGhhj9kPEmros5X8MpI8=; b=oM5zxwWj71aKIK5gCiqEg+Xfgz/PgCFK35D6Tf7BaiVD9qsk4r29bvVMeiKyDwuiZa RUjplmH7Qag3ZB7ejbg//qBuodF/HGAHEzs6LpMUn4oRs6UtJSK9a3aGNFuVfbqAcCEo uAGfWXRH1XHvAWZ2pprlEs5whnjdpwqPwud/6fflCdfnpBiJJJEh5lNigfjXvsuhpLaD sDw4jcg6m6ibTEMBcnqoLufTobjrnwy+UOP3p4ajmvuAv8rFsn5wXjGX7dhuStr+nPgy Ky92E4k/8Qj1pdpE3gdiaV+IVoKWI5LGjk2O0EWg8HFcg2ALYbwRwiimbjXTIXO1/wsT 32sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7mYFFCf+Z8nXytmTMuBZdPdUGhhj9kPEmros5X8MpI8=; b=hz0zs7/31yYSzFmvTqBxQe4/A+xs3Bsa0ryCfSi97dfWu0pBKjiakQSQ9We0KbqDho WLHENHnYPin4cUUmUTrmfQ8SHcSlvBBoFF4BKQulDgbz/eatWlllPpmAc/OJrXwszPDM wgO9eIQHGAE3VVQOxBRIiTQVu5jYWs8Y6XzUwBlLpweAMeOpCO8PJEUKE4c3ZAvu3KRi QIUiwIWfh5p3HwTNeEwRBvDQEH9bNGtYURx7vJNC5qtjfts1ZrVNE6Ug+nXTEDYsU/vw mCdzJ1CaJcb9ssu4t+PIGnHiJ/nntWOw9uzlU1zlbtMUR/HLnzToNk4cKJb1DYklQqzs 5qMA== X-Gm-Message-State: APjAAAWSZjDuv04sh4m//iw+gV9bRwQB90gcGNt5R/3hv6h3D0BIYI55 LGGanN/iTUTPjwWyYCXJW36bP7zPqmxJwi3jkbSV6w== X-Received: by 2002:adf:f20d:: with SMTP id p13mr9663729wro.325.1574338064211; Thu, 21 Nov 2019 04:07:44 -0800 (PST) MIME-Version: 1.0 References: <20191121115902.2551-1-will@kernel.org> In-Reply-To: <20191121115902.2551-1-will@kernel.org> From: Ard Biesheuvel Date: Thu, 21 Nov 2019 13:07:32 +0100 Message-ID: Subject: Re: [RESEND PATCH v4 00/10] Rework REFCOUNT_FULL using atomic_fetch_* operations To: Will Deacon Cc: Linux Kernel Mailing List , Kees Cook , Ingo Molnar , Elena Reshetova , Peter Zijlstra , Hanjun Guo Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 21 Nov 2019 at 12:59, Will Deacon wrote: > > 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. > For the series, Reviewed-by: Ard Biesheuvel > 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 >