From patchwork Wed Jun 3 05:52:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 11584999 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 572AF1392 for ; Wed, 3 Jun 2020 05:53:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3D61D2077D for ; Wed, 3 Jun 2020 05:53:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="fmJ7r4GA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725910AbgFCFwu (ORCPT ); Wed, 3 Jun 2020 01:52:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725810AbgFCFwp (ORCPT ); Wed, 3 Jun 2020 01:52:45 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55290C05BD1E; Tue, 2 Jun 2020 22:52:45 -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:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=9xSJyTCnmOFnoeTw5DYF1pLBCTjN1a9aWOgqqyu87SA=; b=fmJ7r4GApABmWyYi50Df2Mbsxk YdvT5dRIM9PPbaEED6f8lLSZSY58sKEKwjxq+SxUDrp4P5qG5V0TSPFxNzfx7f7EYdUlhKVQYWQnl u0vmRyVQuXMbG84dX43uK/32+eRCvjSSk2kGuQoALO3aHRxE6l+bOW+6v9NqB09QcOqIC0MwQBLr9 CDkEfstsG4Gm5OC4Gu8VzpEVx60EGyyxHYeE3muDf6JYZQFZumn9wkKVA9cP6lvc63/3PcapccrLt INa1dn2cfNitFyq9IPKRm4Hrmu10EKbAK6HBZSksRGQad4Dg8aA0jeZaYuEILKNuh+Ca4K5QB6ar7 7jWY/LDQ==; Received: from p4fdb1ad2.dip0.t-ipconnect.de ([79.219.26.210] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jgMKQ-0003na-Iy; Wed, 03 Jun 2020 05:52:43 +0000 From: Christoph Hellwig To: Alexander Viro Cc: Luis Chamberlain , Kees Cook , Iurii Zaikin , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, build test robot Subject: [PATCH 1/4] net/sysctl: use cpumask_parse in flow_limit_cpu_sysctl Date: Wed, 3 Jun 2020 07:52:34 +0200 Message-Id: <20200603055237.677416-2-hch@lst.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200603055237.677416-1-hch@lst.de> References: <20200603055237.677416-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org cpumask_parse_user works on __user pointers, so this is wrong now. Fixes: 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler") Reported-by: build test robot Signed-off-by: Christoph Hellwig --- net/core/sysctl_net_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c index 0ddb13a6282b0..d14d049af52ae 100644 --- a/net/core/sysctl_net_core.c +++ b/net/core/sysctl_net_core.c @@ -126,7 +126,7 @@ static int flow_limit_cpu_sysctl(struct ctl_table *table, int write, return -ENOMEM; if (write) { - ret = cpumask_parse_user(buffer, *lenp, mask); + ret = cpumask_parse(buffer, mask); if (ret) goto done; From patchwork Wed Jun 3 05:52:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 11585001 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0E02F90 for ; Wed, 3 Jun 2020 05:53:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DF8B92077D for ; Wed, 3 Jun 2020 05:53:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="BbzGrzFz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725888AbgFCFwu (ORCPT ); Wed, 3 Jun 2020 01:52:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725792AbgFCFwt (ORCPT ); Wed, 3 Jun 2020 01:52:49 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C138DC05BD43; Tue, 2 Jun 2020 22:52:48 -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:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=actIeAq1J+DzXI5nECQdqeNdyNGdoq0WIhUeUKynMMM=; b=BbzGrzFz1zB1O0YdRhY/VKblus Wo5vAq0xmlzY/0eOBRXNGnvg+WRrbJvW3Zb6HcmnL9rcXtoydefCVfXNZ4QACGCFLvZpWCrMVLiuf tbcpTKQqrLljldddXykgp+VkUmAuSdTZSeSIEMgQ0PG7QC/zZT6s8NRKWKKDO0e8kZSv5iNYofLKI bkA2mkzjdT+Vrz8Uvk4aIiwTgT2Auuow7v8BeXNS18B0B8+rWXkMM8f+Cf/lpF2gDjNlLEyzhlr0Z C4yfiuLBX7m+a6LrSCBwVP4fi8aSs5x1kbUx/sUB68ReDRCMAzppo9yAI35+Ku88tApIOW1qGHMUi l09hH2yA==; Received: from p4fdb1ad2.dip0.t-ipconnect.de ([79.219.26.210] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jgMKT-0003oS-85; Wed, 03 Jun 2020 05:52:45 +0000 From: Christoph Hellwig To: Alexander Viro Cc: Luis Chamberlain , Kees Cook , Iurii Zaikin , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, build test robot Subject: [PATCH 2/4] net/sysctl: remove leftover __user annotations on neigh_proc_dointvec* Date: Wed, 3 Jun 2020 07:52:35 +0200 Message-Id: <20200603055237.677416-3-hch@lst.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200603055237.677416-1-hch@lst.de> References: <20200603055237.677416-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Remove the leftover __user annotation on the prototypes for neigh_proc_dointvec*. The implementations already got this right, but the headers kept the __user tags around. Fixes: 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler") Reported-by: build test robot Signed-off-by: Christoph Hellwig --- include/net/neighbour.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/net/neighbour.h b/include/net/neighbour.h index e1476775769c9..81ee17594c329 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h @@ -392,13 +392,12 @@ void *neigh_seq_next(struct seq_file *, void *, loff_t *); void neigh_seq_stop(struct seq_file *, void *); int neigh_proc_dointvec(struct ctl_table *ctl, int write, - void __user *buffer, size_t *lenp, loff_t *ppos); + void *buffer, size_t *lenp, loff_t *ppos); int neigh_proc_dointvec_jiffies(struct ctl_table *ctl, int write, - void __user *buffer, + void *buffer, size_t *lenp, loff_t *ppos); int neigh_proc_dointvec_ms_jiffies(struct ctl_table *ctl, int write, - void __user *buffer, - size_t *lenp, loff_t *ppos); + void *buffer, size_t *lenp, loff_t *ppos); int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p, proc_handler *proc_handler); From patchwork Wed Jun 3 05:52:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 11585003 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9440114E3 for ; Wed, 3 Jun 2020 05:53:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 72BFE2077D for ; Wed, 3 Jun 2020 05:53:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="o1mSU51C" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725986AbgFCFxC (ORCPT ); Wed, 3 Jun 2020 01:53:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725884AbgFCFwu (ORCPT ); Wed, 3 Jun 2020 01:52:50 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C449AC05BD43; Tue, 2 Jun 2020 22:52:49 -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:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=VTC5z9WT+GGVGPYd/YpFD1cmXsGsFb5+ORKTNAOuro8=; b=o1mSU51CZ8EA5+r7DZyaRGWlZE jMupoQn720fhh6NupmpEMc8l/DcA23ZRWOV5LW3ZW1ZwCPuuXiUc/TY9L9wbpcHIvCNL7CBXaMIDQ 7DH1shYafh37ZtG0OTN/VcxG4PPUVDLkuOwYj0zJn5ju97VncPMDkMedmW/Fet64lKgHX3uejyR0U Xb81DVpqW5NX5Veq4HcsMUnZpQEzcBmC3NgE/cI/0E7WEc4D3yk6G4lWLGB9xOWiJzCz6YqsUQu+B Cs/vtNoa495GDnmyfad3wBqAkUvTtNjBUR/uMjhJkv9sPfPuZfKU17CMdtRdI+k3bpHg8vTaRUFxb Us44Nk8w==; Received: from p4fdb1ad2.dip0.t-ipconnect.de ([79.219.26.210] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jgMKW-0003op-0j; Wed, 03 Jun 2020 05:52:48 +0000 From: Christoph Hellwig To: Alexander Viro Cc: Luis Chamberlain , Kees Cook , Iurii Zaikin , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, build test robot Subject: [PATCH 3/4] random: fix an incorrect __user annotation on proc_do_entropy Date: Wed, 3 Jun 2020 07:52:36 +0200 Message-Id: <20200603055237.677416-4-hch@lst.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200603055237.677416-1-hch@lst.de> References: <20200603055237.677416-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org No user pointers for sysctls anymore. Fixes: 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler") Reported-by: build test robot Signed-off-by: Christoph Hellwig --- drivers/char/random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/random.c b/drivers/char/random.c index 1e0db78b83baa..cf8a43f5eb2a0 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -2087,7 +2087,7 @@ static int proc_do_uuid(struct ctl_table *table, int write, * Return entropy available scaled to integral bits */ static int proc_do_entropy(struct ctl_table *table, int write, - void __user *buffer, size_t *lenp, loff_t *ppos) + void *buffer, size_t *lenp, loff_t *ppos) { struct ctl_table fake_table; int entropy_count; From patchwork Wed Jun 3 05:52:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 11584997 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C851090 for ; Wed, 3 Jun 2020 05:52:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A33AF207DA for ; Wed, 3 Jun 2020 05:52:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="uMvIOi8i" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725955AbgFCFwx (ORCPT ); Wed, 3 Jun 2020 01:52:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725943AbgFCFww (ORCPT ); Wed, 3 Jun 2020 01:52:52 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AF30C05BD43; Tue, 2 Jun 2020 22:52:52 -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:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=QN7oI7JO3aC05O3t9oy8oBvuvZKExBcNr+amt4s0nQk=; b=uMvIOi8ieP0EvZtaJSUdZoPpIZ SxrxdLMf/Y7nbP6vTq9eyjskD9kCNrajX6mjMa22Xap973Ax/v77D45XQ4pzSSTV60XrYFtvG+XKI 7SClKN0YP6cRH6RQh5FgU4zf8q7AXvKZnYOoxmNPamDyV+GrDW+eLtfGbjuAxGiPEO4KgJNbYe+SD q4biRsgdr8XscXExlfyl514kQDWKX4QekFEQPHZNQ6ld7B88OA4EStVxpDp0MgY/lbnmwIJTDJNc/ ZIaw5eIIMHKsKxJYzlFNlTb74nPJU2H//Pk+NI5pFEEFKuBJ17FQoMgUO/s5ApRzZPquujJgA8qC4 LBQLGMkw==; Received: from p4fdb1ad2.dip0.t-ipconnect.de ([79.219.26.210] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jgMKY-0003rC-M1; Wed, 03 Jun 2020 05:52:51 +0000 From: Christoph Hellwig To: Alexander Viro Cc: Luis Chamberlain , Kees Cook , Iurii Zaikin , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, build test robot Subject: [PATCH 4/4] trace: fix an incorrect __user annotation on stack_trace_sysctl Date: Wed, 3 Jun 2020 07:52:37 +0200 Message-Id: <20200603055237.677416-5-hch@lst.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200603055237.677416-1-hch@lst.de> References: <20200603055237.677416-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org No user pointers for sysctls anymore. Fixes: 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler") Reported-by: build test robot Signed-off-by: Christoph Hellwig --- include/linux/ftrace.h | 5 ++--- kernel/trace/trace_stack.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index ddfc377de0d2c..fce81238f304d 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h @@ -319,9 +319,8 @@ static inline void arch_ftrace_set_direct_caller(struct pt_regs *regs, extern int stack_tracer_enabled; -int stack_trace_sysctl(struct ctl_table *table, int write, - void __user *buffer, size_t *lenp, - loff_t *ppos); +int stack_trace_sysctl(struct ctl_table *table, int write, void *buffer, + size_t *lenp, loff_t *ppos); /* DO NOT MODIFY THIS VARIABLE DIRECTLY! */ DECLARE_PER_CPU(int, disable_stack_tracer); diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c index c557f42a93971..98bba4764c527 100644 --- a/kernel/trace/trace_stack.c +++ b/kernel/trace/trace_stack.c @@ -515,9 +515,8 @@ static const struct file_operations stack_trace_filter_fops = { #endif /* CONFIG_DYNAMIC_FTRACE */ int -stack_trace_sysctl(struct ctl_table *table, int write, - void __user *buffer, size_t *lenp, - loff_t *ppos) +stack_trace_sysctl(struct ctl_table *table, int write, void *buffer, + size_t *lenp, loff_t *ppos) { int was_enabled; int ret;