From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752538AbdI1AmF (ORCPT ); Wed, 27 Sep 2017 20:42:05 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:37382 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752402AbdI1AmE (ORCPT ); Wed, 27 Sep 2017 20:42:04 -0400 X-Google-Smtp-Source: AOwi7QDsw3tF8YWiidG9gfFN6hME0l49XbARzOOo9xUcGi1esznW6fkFCEs5609cnm88t/A3FsmV/A== Date: Thu, 28 Sep 2017 09:41:58 +0900 From: Sergey Senozhatsky To: Andrew Morton Cc: Minchan Kim , Sergey Senozhatsky , linux-kernel@vger.kernel.org, Sergey Senozhatsky Subject: Re: [PATCH] zsmalloc: calling zs_map_object() from irq is a bug Message-ID: <20170928004158.GA3722@jagdpanzerIV.localdomain> References: <20170920063941.14662-1-sergey.senozhatsky@gmail.com> <20170920064739.GA11000@bbox> <20170926172632.cf302deff749d12f74d8a4da@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170926172632.cf302deff749d12f74d8a4da@linux-foundation.org> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (09/26/17 17:26), Andrew Morton wrote: > > On Wed, Sep 20, 2017 at 03:39:41PM +0900, Sergey Senozhatsky wrote: > > > Use BUG_ON(in_interrupt()) in zs_map_object(). Calling this > > > function from IRQ is a bug, because we use per-CPU mappings > > > and interrupt may corrupt those buffers. > > > > > > Signed-off-by: Sergey Senozhatsky > > > > IMHO, corruption the buffer would be not enough to be a BUG_ON > > which stop the system fully so user loses any chances to shut > > down smooth/hunt it down. > > > > More serious thing of our case is that it can leak other user's > > data by overwriting, which is more concern I am thinking now. > > > > In an off-list email Linus has basically stated that all new uses of > BUG_ON should include words in the changelog or code comments > explaining why it is justifiable to kill the machine when the condition > triggers. > > So can we please have a v2 with the appropriate comment? ah, OK. will follow up. -ss