Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753963AbcKUKUB (ORCPT ); Mon, 21 Nov 2016 05:20:01 -0500 Received: from mail-wm0-f47.google.com ([74.125.82.47]:38414 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753905AbcKUKUA (ORCPT ); Mon, 21 Nov 2016 05:20:00 -0500 MIME-Version: 1.0 In-Reply-To: <20161119185732.GF22775@obsidianresearch.com> References: <1479468277-50798-1-git-send-email-dvyukov@google.com> <164538.1479522162@turing-police.cc.vt.edu> <20161119185732.GF22775@obsidianresearch.com> From: Dmitry Vyukov Date: Mon, 21 Nov 2016 11:19:33 +0100 Message-ID: Subject: Re: [PATCH] infiniband: remove WARN that is not kernel bug To: Jason Gunthorpe Cc: Valdis.Kletnieks@vt.edu, dledford@redhat.com, sean.hefty@intel.com, Hal Rosenstock , leon@kernel.org, linux-rdma@vger.kernel.org, LKML , syzkaller Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 828 Lines: 24 On Sat, Nov 19, 2016 at 7:57 PM, Jason Gunthorpe wrote: > On Fri, Nov 18, 2016 at 09:22:42PM -0500, Valdis.Kletnieks@vt.edu wrote: >> On Fri, 18 Nov 2016 12:24:37 +0100, Dmitry Vyukov said: >> > WARNINGs mean kernel bugs. >> > The one in ucma_write() points to user programming error >> > or a malicious attempt. This is not a kernel bug, remove it. >> >> > - if (WARN_ON_ONCE(!ib_safe_file_access(filp))) >> > + if (!ib_safe_file_access(filp)) >> > return -EACCES; >> >> In that case, wouldn't this be better? >> >> if (!ib_safe_file_access(filp)) { >> printk_once("Process %d (%s) tried to do something hinky", pid, comm); >> return _EACCESS; >> } >> >> so the sysadmin becomes aware of the malicious attempt? > > Yes please Mailed v2