Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp280298ybz; Thu, 23 Apr 2020 23:45:32 -0700 (PDT) X-Google-Smtp-Source: APiQypI5zI/+YEsxEw2RP8OQCHUjnFJ5EBqGIawKmW1NiljE7oPGigEiLe7cz882Mm8VjSuLoJzg X-Received: by 2002:a17:906:68cf:: with SMTP id y15mr5571928ejr.260.1587710732807; Thu, 23 Apr 2020 23:45:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587710732; cv=none; d=google.com; s=arc-20160816; b=l9G3x0rEF4USmYabG64QkGnwU19AncEbmakb4F2GapPCvCI/cJUFXxuTixe4h0ZD5l aFNzn5VP+DjgTRRYKpO+UsoOGsAoBKsAUjt3A5Mr0/DqojSXSzb4pFhyE2JA0RTWkntc YJUiQCcx/HwcW+VRF8sshjOh4TMDCLtqT8cFFTjYj3I/uI7fFA8rhwfWCYNaB48FvZKf LmMp4h6Fer5tZ3iHgbPAJ9FpHeDFTGcqLJfOgJ94F7pKTQDhvvunv0W5DTgKiTbP/1RP 8ofXABQ5dyepla64040GBn3JK8JgHcC26vfn3D2q9JWLzX2MGCG0r3sZ96XEOfjR6358 0wQw== 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=cBz4tJHnQHNWX5/s05IRxaWmdiK710lyvwkHBVoVZ1A=; b=HeIRBz3OGOZOofhZ4zHf/jGBZ3qwl7/WceJhHiqAR8kUe2OfGPCMbhxwtb+3TNXWaf Ecbr+pgThcwKf55jpWonEZuBlzcHOwYIbumcWSi8MtISPufbUUzvOVC4GXW1Xt7yhh6k kX+fANhRx9QaVNvJJ9/U/7bORIpoyYbAlll4w1HZuaDCfjF0C0D/2DR+nCn98WB0lAFU pkoGTSmmAIMWZ4QOCq4+G3iIz3S5/j+QmS9NJPWVQDoc6uKLrXxmjA3omBzbPladVL9K mHiFoMGNY8V7iqdNZM7cvMBsR7MureZ3j0zbJFhGktWfzICZP0dJBoXcXG7wz8W2tivs HgUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="O5rZfLz/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o59si2407386eda.39.2020.04.23.23.45.09; Thu, 23 Apr 2020 23:45:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="O5rZfLz/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726628AbgDXGno (ORCPT + 99 others); Fri, 24 Apr 2020 02:43:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726008AbgDXGno (ORCPT ); Fri, 24 Apr 2020 02:43:44 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C2C3C09B045; Thu, 23 Apr 2020 23:43:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=cBz4tJHnQHNWX5/s05IRxaWmdiK710lyvwkHBVoVZ1A=; b=O5rZfLz/kA3hjQLqxThURHHFHw WVdVmpBegPWygKZU22Jw9l3pQ9IWS/996tNQ0C4wj38TTWNK7myf+3P6LrFcc+AZZ1lsqPYKzKqfG vzIzFiC+ccCq9PcH3pGYeyq5JAlL0Tsy4CyZrjfJRHRNySyHnov41WcAoZoGZlXBciOzPgBAxG++8 FNybSovzHbahApoVHS4sp5bL/X1eeQdr7b1XitrN/2ysBS1Vl4+xx7HZ3r6Jl3ZzjTCjwZ4BPFfL4 UER/3AcVJUKAo8h2UqFT8wUr5Z1TdIQzGfwkcfq6oWHFURm4j/w3I5c9jTHqm1ksyMV4QbNaItlTI 9agJNzvA==; Received: from [2001:4bb8:193:f203:c70:4a89:bc61:2] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jRs3o-00012a-Hd; Fri, 24 Apr 2020 06:43:40 +0000 From: Christoph Hellwig To: Kees Cook , Iurii Zaikin Cc: Alexei Starovoitov , Daniel Borkmann , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org Subject: pass kernel pointers to the sysctl ->proc_handler method v3 Date: Fri, 24 Apr 2020 08:43:33 +0200 Message-Id: <20200424064338.538313-1-hch@lst.de> X-Mailer: git-send-email 2.26.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, this series changes the sysctl ->proc_handler methods to take kernel pointers. This simplifies some of the pointer handling in the methods (which could probably be further simplified now), and gets rid of the set_fs address space overrides used by bpf. Changes since v2: - free the buffer modified by BPF - move pid_max and friends to pid.h Changes since v1: - drop a patch merged by Greg - don't copy data out on a write - fix buffer allocation in bpf