Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp313054pxb; Thu, 26 Aug 2021 03:55:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2GjgCLizCxYrf+zjhQDGsY9cjQOSjydnVpR8qQuYBe8IgE57xyDISOvU7zMD11Hkv0iJy X-Received: by 2002:a92:cb4d:: with SMTP id f13mr2295640ilq.220.1629975342532; Thu, 26 Aug 2021 03:55:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629975342; cv=none; d=google.com; s=arc-20160816; b=e4oE2b9okoFihhWB8heTYOnkCHur6WkFn6CzuJ1AeM/HTHeZLCqeLEfIDCza0rMzUL XpDEj0EudCIw+FR3JnZHYeSdzCUtfCQTdcTpKG7abg5gXHvnsm+HDnX5BExr2+bIaCgS hi6Cedxusey+knLxE+u1cv2po3MxlLEnLkvPqI3Qi5wDSyxHuKBe0T9+AopBvn4kOO4i EVYkBrRxmOJjC39ubyg4AzC/BDN+9q9BLLVrRd3QrjRMMoPmM2oT7N7VG2QTrCHgCIbZ A4hlWnm+HOt4iKsyarZaj4IYF5DwJFrZEHdWXCO/aRNct/d/7anGeTI+EQe73ZBX20Y2 gLJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=CiSfKCGSmkPUy5M3rS66uAQPpwo4rYnZY7UDZTqEsa4=; b=qNOpNgrNRbJkpT6SB0wXqKt0c9AzcyCytPY4e+1Oi7UKjM15YuQBSyw0xcbrPGOTWF IBjN4PxJKjDpZP8jDy6RDShPcFfs49O5mvFtWaZtT19jQqJGgoLjW4/aCCO7do+azMPZ TLb60rBuANeKDcE+tFiuziYxC0WujDgMXXBCTJ/BDn9/6NZKttSRPct2tMPwgcrbUTo4 CJ7hkB3+jb+kd7g25jXXzkI0a+kLPsFWMa8DMFkJDQAWZs0ufVzwGEJDIQJVNRezBac0 uvuB0DjU+LTrcx7HB3qJ7cEA42t2K8Mj/g/POh0LHcH85zXe8PkDz+Rqj23iex4Ihoes 40kA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OjjbqPrE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f10si2352021ilk.8.2021.08.26.03.55.31; Thu, 26 Aug 2021 03:55:42 -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=pass header.i=@linuxfoundation.org header.s=korg header.b=OjjbqPrE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241552AbhHZKzG (ORCPT + 99 others); Thu, 26 Aug 2021 06:55:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:52200 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234296AbhHZKzF (ORCPT ); Thu, 26 Aug 2021 06:55:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A207160FC1; Thu, 26 Aug 2021 10:54:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1629975258; bh=3COvzkeM/l1x3SVib6kbANwKzq1rzz8/bNWnK5LJTh4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OjjbqPrErjAAwn/gK0egjwHkX1sjV9lqg3PgbElLuWvQZ/vtg3onfAeeqjepK+Jwk IxkzDexi1m+XzGInKdti3lY4O1igyftWtPppa4u2dZHvFNwFDfrJn8jKu4lLLiLY3w UoQwkqbfKGIxIWM+dcHdUv635O9ta7UMdSCEmbgU= Date: Thu, 26 Aug 2021 12:54:14 +0200 From: Greg Kroah-Hartman To: Woody Lin Cc: Todd Kjos , Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Martijn Coenen , Joel Fernandes , Christian Brauner , Hridya Valsaraju , Suren Baghdasaryan , linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Subject: Re: [PATCH] ANDROID: staging: add userpanic-dev driver Message-ID: References: <20210826092854.58694-1-woodylin@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 26, 2021 at 06:23:53PM +0800, Woody Lin wrote: > On Thu, Aug 26, 2021 at 5:48 PM Greg Kroah-Hartman > wrote: > > > > On Thu, Aug 26, 2021 at 05:28:54PM +0800, Woody Lin wrote: > > > Add char device driver 'userpanic-dev' that exposes an interface to > > > userspace processes to request a system panic with customized panic > > > message. > > > > > > Signed-off-by: Woody Lin > > > --- > > > drivers/staging/android/Kconfig | 12 +++ > > > drivers/staging/android/Makefile | 1 + > > > drivers/staging/android/userpanic-dev.c | 110 ++++++++++++++++++++++++ > > > > Why is this in staging? What is wrong with it that it can not just go > > into the real part of the kernel? A TODO file is needed explaining what > > needs to be done here in order for it to be accepted. > > Got it. No more TODO for this driver and I will move it to drivers/android/. > > > > > But why is this really needed at all? Why would userspace want to panic > > the kernel in yet-another-way? > > The idea is to panic the kernel with a panic message specified by the userspace > process requesting the panic. Without this the panic handler can only collect > panic message "sysrq triggered crash" for a panic triggered by user processes. > Using this driver, user processes can put an informative description - > process name, > reason ...etc. - to the panic message. What custom userspace tool is going to use this new user/kernel api and again, why is it needed? Who needs to panic the kernel with a custom message and where is that used? thanks, greg k-h