Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp194304imm; Thu, 12 Jul 2018 17:11:53 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfWABxjsBAliw9owY9RuMSYagdfaRMQjvHOTxywkylmB5XLj/q/BG7bKjTMY/QaYPTRLDGn X-Received: by 2002:a62:6147:: with SMTP id v68-v6mr4541077pfb.115.1531440713248; Thu, 12 Jul 2018 17:11:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531440713; cv=none; d=google.com; s=arc-20160816; b=OYNsveAA/5fm9bu01dFqnBX1dS2LJQ2kITiTfv/ecbClfKNnSjR/3QlHwhdxTIVWrY HwjQ8LavUgO+fxMLPh/UUaCPh+xHtNvVFJuhs1/8XE2oggs6J6UPJ8mD5FPCQpzHWC2H vNrdIzkfr3kQ5qZv8lfNiDWiUdH7Ym0n2KTgqknvN4bPxHktN+Tqaei0mmjs4NRf1Gkp RbE16MBULPADSYqfCiWxBaWRbY2tcVwz+q9NhcjpaoyLYo5bGpST1s9OL3tf3/S0kATU DXHSP9oZ33hJBGH0h6HNcOZhEeEUT5Q+8eBwjBH4n93cNdQ+IW0qEfwJ+XE3gIXC4DjJ M9Zg== 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=GoYn5IW+7n9rQqNM8JicsfZ+kT4nG9MwtzrX55SnyFE=; b=qwHtwkVfhWtOh2dMN1pk0t6VPysNpCsp8qEOmzpn1o10V8vEEaWTci+xuTjBkL0sRY YSxQ+68zuE6WmIKfI94L+VnTz2T8WXx/QNJih6Wly37iBWlH0ix9NsSSX1Ae8cO0M6gx s6OfwDafzd+Ixp3NGwmOyRzxldMafVpiEjiEFN7w2wMke9+WOb3LrNuLwtQbAT2AtXgP hO2TGZF4hOjxarP6KqQNlvnnYWgutyFOEEwnP0qNx3NCGM3tydp4/NF7GAy04ieaTVSM saXqfhmQjLSoIPRBzawpXrEjW1JzH6nMzXBTDTC6PRnXKUDf3VFS8xXmPdxlaW2x9iCq g4tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@osandov-com.20150623.gappssmtp.com header.s=20150623 header.b="R7hFe/+b"; 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 k20-v6si21660547pgb.115.2018.07.12.17.11.38; Thu, 12 Jul 2018 17:11:53 -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="R7hFe/+b"; 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 S2387754AbeGMAVo (ORCPT + 99 others); Thu, 12 Jul 2018 20:21:44 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:45677 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387715AbeGMAVo (ORCPT ); Thu, 12 Jul 2018 20:21:44 -0400 Received: by mail-pf0-f195.google.com with SMTP id i26-v6so10110882pfo.12 for ; Thu, 12 Jul 2018 17:09:46 -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=GoYn5IW+7n9rQqNM8JicsfZ+kT4nG9MwtzrX55SnyFE=; b=R7hFe/+bqrESIOPCIiArXF+53J3w5blMcmcP7MFn6brg3Ry4U8AWvoxKUZ/dTBq6a8 UA0DGWh+sqdzgzE9KgwuaB7wG+6Gq4w7EUDyj9wzPkU3q8WlNWG4oz1vzmgSlE8TIIGF E2NuiKL6LqopBLlufdfx2YM79WqqWSudzMrtL+CKUIlM82dn376J5IGrTfuMdEpsbcSV gV7wZWipkEeswxaCHS9Vn1hv+a2teyKAIqQLuPOpu8DThCdgK8hxq2iwqmlhtCUzYOs0 RRwndEz7790vBalXfJGLLj/1Rmam+DYe48xjN68jTHvLRIePda3lbUefLofn/ubmebKP FrrQ== 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=GoYn5IW+7n9rQqNM8JicsfZ+kT4nG9MwtzrX55SnyFE=; b=L9tCkpplmmrqvpxYGd30vc+wYeSqFGmu3ajvPqehx0sEKGC1AFz1xak+fXN1+8LCBt aBGpbuNTZelS6REAyOUoqVuWOmhJdLU/PfZs/P4zCrOlA1NZ8gcTnJU0j+wuOL1BLa+9 JSMQ+6Ocz4IzU0eMzA4TUjtucZPu8ghFztLZgUFzjiGM6+t9rCk+cXgULplY5l1U23TK AgNgaqhUOLv4yre9mEM2rjSyk8RIPgP7aSRcxzjg21+i2yvOVvxh/MhSqGvHqbyneHiZ 6HTFv1g3roBDCiiJ61ZbsVHLvo61dlDNOoSoY3jnMGxL4uFQL4m6aszMj3jNCV9Lf1pl q0OA== X-Gm-Message-State: AOUpUlEjqk7Oa7FyoSSNsD/wyibqLBOToDG/xR5K4VBuE+gyLaImNXw0 rlowyR6B6kp5JD5f3sVZam++9cbHUUM= X-Received: by 2002:a62:e30c:: with SMTP id g12-v6mr4584365pfh.25.1531440585820; Thu, 12 Jul 2018 17:09:45 -0700 (PDT) Received: from vader.thefacebook.com ([2620:10d:c090:200::5:74a0]) by smtp.gmail.com with ESMTPSA id b86-v6sm4452067pfj.35.2018.07.12.17.09.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jul 2018 17:09:45 -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 v2 0/7] /proc/kcore improvements Date: Thu, 12 Jul 2018 17:09:32 -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 and 2 are prep patches. Patch 3 is a fix/cleanup. Patch 4 is another prep patch. Patches 5 and 6 are optimizations to ->read(). Patch 7 adds vmcoreinfo to /proc/kcore (apparently I'm not the only one who wants this, see https://www.spinics.net/lists/arm-kernel/msg665103.html). I tested that the crash utility still works with this applied, and readelf is happy with it, as well. Andrew, since this didn't get any traction on the fsdevel side, and you're already carrying James' patch, could you take this through -mm? Thanks! 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 (7): proc/kcore: don't grab lock for kclist_add() 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 | 536 +++++++++++++++++-------------------- include/linux/crash_core.h | 2 + kernel/crash_core.c | 4 +- 4 files changed, 251 insertions(+), 292 deletions(-) -- 2.18.0