Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1062705imm; Wed, 18 Jul 2018 16:02:26 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdW/ECKkKhyzvGapxsKOsOLe8M8h3ySs7An+nb1WaSVPJzuyOq4x2X9ghltBMgzZqWW7YIy X-Received: by 2002:a62:8a83:: with SMTP id o3-v6mr7140850pfk.12.1531954946174; Wed, 18 Jul 2018 16:02:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531954946; cv=none; d=google.com; s=arc-20160816; b=Gd9MnNkqGSb5aK7O4p3ycIeNx9jHg4dPsvkNPH7+klDyh8K84EFraOLaYGdqAZFAk6 2l13aBFT4YmDxoT77aGiwlimyARIRdeDRQUu1fIh9KcHo5DbsbXNl9dUBJfba8Z3JLmd oB8aa4B2Oy8Jz55xrVkGGp9ad/h/8X3TWG5ZJPwtr76Ik1e0mmXuKif+FYBJXIY3KBYO /Qe0YsuLwdG7dLHwDUOsKCR2f+vk0ESvO22dbVN2A24ixzvS0uDtKrAsch4X2E3O3hfZ D4kNBC6Hn6EYn00G+cjkMO3WODNah1UmHZIb9g4iJcJ2IW/RK+sWPKglalX2KROUU+0i Z64Q== 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 :dkim-signature:arc-authentication-results; bh=puGNKRsOXkoHQ9ds45nPp7QSAjYJXFwGCuaji0Ojm3E=; b=LFW5EGvJBPlCdY2uSCilZPXBBlTMvpnGhdT4sOcvGMmBZ2OkV7Y5J28PiFwWdulJy6 W9ZHtkibraVepUyTvHuFjjfDxI1G/bL8WR0AcSPmVChHJzE1SdegVZ6J9imSo8fjubKL u1vUD2U6LP2JrPXLPs7Qh+thZUQM0LBwaBL3Ah2poo4USD9iABW/obp74QFp0H0Y+ZAU QgycmtZxyAMUBjbNBNQbGTyY9bAfK0D93DH5o+j1157HG48VbFojLY1YT8moHzZNtGI/ 3nIVGlkJS13fhrnJ5moo3kIQxc85PRjCV8eMLmbUcAk8QKBD4zpQeugw9GBZp0Yep9gI GmcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@osandov-com.20150623.gappssmtp.com header.s=20150623 header.b=Z7SF3rPQ; 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 d17-v6si4080506pgp.14.2018.07.18.16.02.11; Wed, 18 Jul 2018 16:02:26 -0700 (PDT) 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=@osandov-com.20150623.gappssmtp.com header.s=20150623 header.b=Z7SF3rPQ; 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 S1729706AbeGRXjU (ORCPT + 99 others); Wed, 18 Jul 2018 19:39:20 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:44224 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728467AbeGRXjU (ORCPT ); Wed, 18 Jul 2018 19:39:20 -0400 Received: by mail-pl0-f68.google.com with SMTP id m16-v6so2683596pls.11 for ; Wed, 18 Jul 2018 15:59:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osandov-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=puGNKRsOXkoHQ9ds45nPp7QSAjYJXFwGCuaji0Ojm3E=; b=Z7SF3rPQ4If5dZMRhFiLeelm43qr3VGM+/nRQ66BVea2XMGeyFKdAD7fxrm+kS3mJ/ g+mGzXgZH9isnyIStt+MMdrnJSjwrRne1jNl4TSQPACNwkR+Cxfg2GjsPTpGNr9W+sc5 2EfOAoGAKf366nZZGZp+7PJkm10TFH05sG21IIugaKezL4vSMgIq4mOfo8wKDY6X/O4O cNG/aGtid8DjiMot3T7SS+xr9iJSmcVx/4gz0RUknexAwljslIPIoAmLsAiAVf/4AyMA YKzZeVDExNqiWhzJVhzx6xwk9Uz5Jo/SX5r3rXaUSPbH6lUcYGSvC8jWcogGhinFNCZ3 x1VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=puGNKRsOXkoHQ9ds45nPp7QSAjYJXFwGCuaji0Ojm3E=; b=VgGj5OORi7t2e1SUzslEk53ooDLWvpPKTvn8nwVSU0+FPhJdRGgrvyal1ugpzKpBO0 uLstDAhrA16h+VYppr61zJUG/O72N+rcf393W43e8nxxhCcR+sOk5eUIwbXRJNhY7XJA ROS2GiMwxlXvRgr69Mrohh1orgIWDFSjdI3hmKT/3vwdDXSlBQiiKvbduZKWEfsQP9fz 1jSdNLIKUHRI5KgGHmJDKnW/f4O0eIArrOxY9eqfgv/jZcKgyFLOcBgiqa/rVCMK1jyC IxsBLQ11jo/NxYmMzgGfD2GZc3re3qKhDX/1hbr9HdRM55lLJUVMO7QobO781QzLVuqS ++1Q== X-Gm-Message-State: AOUpUlFTTu4Us+hN0PV6Q5oqa1I085XKmW1vWjXUuRldEs4hMJ7XAqCn m81rWuV4PwDi4TSsMZoqbGkmH6Yhhg0= X-Received: by 2002:a17:902:48c8:: with SMTP id u8-v6mr7737779plh.152.1531954753354; Wed, 18 Jul 2018 15:59:13 -0700 (PDT) Received: from vader.hsd1.wa.comcast.net ([2601:602:8800:a9a9:e6a7:a0ff:fe0b:c9a8]) by smtp.gmail.com with ESMTPSA id s16-v6sm6377946pfm.114.2018.07.18.15.59.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Jul 2018 15:59:12 -0700 (PDT) From: Omar Sandoval To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Andrew Morton Cc: Alexey Dobriyan , Eric Biederman , James Morse , Bhupesh Sharma , kernel-team@fb.com Subject: [PATCH v3 0/8] /proc/kcore improvements Date: Wed, 18 Jul 2018 15:58:40 -0700 Message-Id: X-Mailer: git-send-email 2.18.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Omar Sandoval Hi, This series makes a few improvements to /proc/kcore. Patches 1, 2, and 3 are prep patches. Patch 4 is a fix/cleanup. Patch 5 is another prep patch. Patches 6 and 7 are optimizations to ->read(). Patch 8 adds vmcoreinfo to /proc/kcore. Again, based on v4.18-rc4 + James' patch in the mm tree, and tested with crash and readelf. Thanks! Changes from v2: - Add __init to kclist_add() as per Andrew - Got rid of conversion of kcore_need_update from int to atomic_t and just used xchg() instead of atomic_cmpxchg() (split out into a new patch instead of combining it with the rwlock -> rwsem conversion) - Add comment about the increase in file size to patch 8 Changes from v1: - Rebased onto v4.18-rc4 + James' patch (https://patchwork.kernel.org/patch/10519739/) in the mm tree - Fix spurious sparse warning (see the report and response in https://patchwork.kernel.org/patch/10512431/) Omar Sandoval (8): proc/kcore: don't grab lock for kclist_add() proc/kcore: don't grab lock for memory hotplug notifier proc/kcore: replace kclist_lock rwlock with rwsem proc/kcore: fix memory hotplug vs multiple opens race proc/kcore: hold lock during read proc/kcore: clean up ELF header generation proc/kcore: optimize multiple page reads proc/kcore: add vmcoreinfo note to /proc/kcore fs/proc/Kconfig | 1 + fs/proc/kcore.c | 534 +++++++++++++++++-------------------- include/linux/crash_core.h | 2 + include/linux/kcore.h | 2 +- kernel/crash_core.c | 4 +- 5 files changed, 251 insertions(+), 292 deletions(-) -- 2.18.0