Received: by 10.223.164.202 with SMTP id h10csp4260517wrb; Wed, 29 Nov 2017 03:40:47 -0800 (PST) X-Google-Smtp-Source: AGs4zMaugSdCEmONtfrmJ+T7xIStIFUXQevyXCNPOiTTUWWwIYvm4UTGlvFRpZH1rUJgLYvUVlmU X-Received: by 10.101.73.203 with SMTP id t11mr2519818pgs.446.1511955647415; Wed, 29 Nov 2017 03:40:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511955647; cv=none; d=google.com; s=arc-20160816; b=G2YHWmSZdCPMr9XWUBUBNV4j5LeOTrEF70T9IXyxBPYKsEaPVAAWGTnbgYNamXovC2 NwW0ZCRAYCoylFMh70Iz3j8SDwFsmLLqQZ1vyyYPDGcLIcnmJQXOVY281TF0WBW51BhQ L4txfK14a03rfYLYe4LVVUtlj7jf2ANRb2ZxUW6R6SjEz3IUSym4rg8dHvwZyl3g/VxR pvRn9fk+WcmqGM8d1p9OVGAxuzRFK/ZDCjvCT6vQ5eW+Dt1vTHny9DrMwmoz1yYAkMCM uJlJPDoVD/akS6cEZ/udHJyc1d+hjBhceLT3WJADRgM5LJiHFYzrc8yxj+fkbLYt1Lx3 4eHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=3aSUzaGnCPHb67F9zvurIvX1v5dVzBbtQcuBNYXbPSg=; b=YubtNjmRYlnGVwufD7tcrshFnNl4jM59Hpr29BZ1Kc9+H7+HqeYwF0GKbSZKVbW99w flic4ETwj4AEm4QN01pwrxngTauN9LWrRLdk3s3+2eiNAzdiGOXG8B1ZQOlXWsiTN3Wi jfhTAagB5zxfB9/X20dwlKlfgXohg86pH8bxNng6GN28PTQBH/VYVlmMElTOg4oZw6Qx NXkZPX+DM/c9oHH5l/NW0+fnf2IdmFSuvhYR1k9LqhgmclAZRR/uw0FZN5li7Kc6L/qT 76LnLMt9jZF+s1dZy/A9Fnq5v7ze/MGF1pdyGcdnUK8QLDRPtgnM/R8W9LgDQVnwvPg1 rx9g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o6si1168869pgn.138.2017.11.29.03.40.36; Wed, 29 Nov 2017 03:40:47 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754627AbdK2LiN (ORCPT + 70 others); Wed, 29 Nov 2017 06:38:13 -0500 Received: from mga07.intel.com ([134.134.136.100]:31716 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752280AbdK2LiM (ORCPT ); Wed, 29 Nov 2017 06:38:12 -0500 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Nov 2017 03:38:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,472,1505804400"; d="scan'208";a="1249857000" Received: from elena-thinkpad-x230.fi.intel.com ([10.237.72.87]) by fmsmga002.fm.intel.com with ESMTP; 29 Nov 2017 03:38:07 -0800 From: Elena Reshetova To: david@fromorbit.com Cc: darrick.wong@oracle.com, linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, peterz@infradead.org, keescook@chromium.org, Elena Reshetova Subject: [PATCH 0/5] v2 xfs refcount conversions Date: Wed, 29 Nov 2017 13:37:58 +0200 Message-Id: <1511955483-18275-1-git-send-email-elena.reshetova@intel.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dave, Following our previous conversation I have updated each patch with a highlight of potential problematic places with regards to the memory ordering guarantees, as well as link to the document I am working on to clarify the matter. While I didn't see any issues with these 5 particular conversions, of course I don't understand code anywhere good enough to make the final claim that "everything is 100% ok". Please let me know what kind of other clarification or anything is needed that can help you to make the needed verification. Best Regards, Elena. Changes in v2: - each patch now has a clarification on potential problematic places with regards to the memory ordering guarantees as well as reference to a hopefully soon to be merged more extensive documentation on the differences between atomic_t and refcount_t on ordering. - Rebase on linux-next master. This series, for xfs, replaces atomic_t reference counters with the new refcount_t type and API (see include/linux/refcount.h). By doing this we prevent intentional or accidental underflows or overflows that can lead to use-after-free vulnerabilities. The patches are fully independent and can be cherry-picked separately. If there are no objections to the patches, please merge them via respective trees. Elena Reshetova (5): fs, xfs: convert xfs_bui_log_item.bui_refcount from atomic_t to refcount_t fs, xfs: convert xfs_efi_log_item.efi_refcount from atomic_t to refcount_t fs, xfs: convert xlog_ticket.t_ref from atomic_t to refcount_t fs, xfs: convert xfs_cui_log_item.cui_refcount from atomic_t to refcount_t fs, xfs: convert xfs_rui_log_item.rui_refcount from atomic_t to refcount_t fs/xfs/xfs_bmap_item.c | 6 +++--- fs/xfs/xfs_bmap_item.h | 2 +- fs/xfs/xfs_extfree_item.c | 6 +++--- fs/xfs/xfs_extfree_item.h | 2 +- fs/xfs/xfs_linux.h | 1 + fs/xfs/xfs_log.c | 10 +++++----- fs/xfs/xfs_log_priv.h | 2 +- fs/xfs/xfs_refcount_item.c | 6 +++--- fs/xfs/xfs_refcount_item.h | 2 +- fs/xfs/xfs_rmap_item.c | 6 +++--- fs/xfs/xfs_rmap_item.h | 2 +- 11 files changed, 23 insertions(+), 22 deletions(-) -- 2.7.4 From 1585323033040654059@xxx Tue Nov 28 15:10:59 +0000 2017 X-GM-THRID: 1585323033040654059 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread