From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753266AbeADOqP (ORCPT + 1 other); Thu, 4 Jan 2018 09:46:15 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:37804 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753119AbeADOqN (ORCPT ); Thu, 4 Jan 2018 09:46:13 -0500 Date: Thu, 4 Jan 2018 17:45:54 +0300 From: Dan Carpenter To: Dmitry Vyukov Cc: Greg KH , devel@driverdev.osuosl.org, syzbot , tkjos@android.com, syzkaller-bugs@googlegroups.com, LKML , arve@android.com, maco@android.com, sumit.semwal@linaro.org Subject: Re: WARNING in ion_ioctl Message-ID: <20180104144554.ae7i3zr3ooycec5j@mwanda> References: <20180104140627.GB17490@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8763 signatures=668651 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801040203 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Thu, Jan 04, 2018 at 03:13:01PM +0100, Dmitry Vyukov wrote: > On Thu, Jan 4, 2018 at 3:06 PM, Greg KH wrote: > > On Thu, Jan 04, 2018 at 05:57:01AM -0800, syzbot wrote: > >> Hello, > >> > >> syzkaller hit the following crash on > >> 71ee203389f7cb1c1927eab22b95baa01405791c > >> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/master > >> compiler: gcc (GCC) 7.1.1 20170620 > >> .config is attached > >> Raw console output is attached. > >> C reproducer is attached > >> syzkaller reproducer is attached. See https://goo.gl/kgGztJ > >> for information about syzkaller reproducers > >> > >> > >> IMPORTANT: if you fix the bug, please add the following tag to the commit: > >> Reported-by: syzbot+fa2d5f63ee5904a0115a@syzkaller.appspotmail.com > >> It will help syzbot understand when the bug is fixed. See footer for > >> details. > >> If you forward the report, please keep this part and the footer. > >> > >> audit: type=1400 audit(1514734723.062:7): avc: denied { map } for > >> pid=3502 comm="syzkaller809746" path="/root/syzkaller809746698" dev="sda1" > >> ino=16481 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 > >> tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 > >> WARNING: CPU: 0 PID: 3502 at drivers/staging/android/ion/ion-ioctl.c:73 > >> ion_ioctl+0x2db/0x380 drivers/staging/android/ion/ion-ioctl.c:73 > >> Kernel panic - not syncing: panic_on_warn set ... > > > > This is to be expected when you pass in a crappy ion ioctl structure. > > > > So don't do that :) > > > > Yeah, it's a harsh warning, but I think the userspace developers like it > > to ensure they got their implementation correct. > > > > After the warning is thrown, all keeps working just fine. > > Hi Greg, > > Or, don't do WARNINGs on EINVAL and do pr_warn instead, as useful but > also enables automated kernel testing with non-tainted reports, which > is kinda a useful property. With pr_warn() you have to impliment the _ONCE() logic yourself which is sort of a pain. regards, dan carpenter