[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <2024033032-catalyze-clip-cc53@gregkh>
Date: Sat, 30 Mar 2024 08:01:58 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: huangchenghai <huangchenghai2@...wei.com>
Cc: zhangfei.gao@...aro.org, wangzhou1@...ilicon.com,
linux-kernel@...r.kernel.org, linux-crypto@...r.kernel.org,
fanghao11@...wei.com, shenyang39@...wei.com, liulongfang@...wei.com,
qianweili@...wei.com
Subject: Re: [PATCH] misc: uacce - add the null check for the input pointer
and its pointer members
On Sat, Mar 30, 2024 at 11:34:24AM +0800, huangchenghai wrote:
>
> On Fri, Mar 29, 2024 at2:34PM, Greg KH wrote:
>
> > On Fri, Mar 29, 2024 at 02:26:55PM +0800, Chenghai Huang wrote:
> > > The uacce_alloc() is the member of the EXPORT_SYMBOL_GPL. Therefore, null
> > > pointer verification is added on the pointer type input parameter and its
> > > pointer members.
> > I do not understand, why does the export type matter? Just fix any
> > callers to use this properly and send proper parameters. What in-tree
> > caller needs this?
> >
> > thanks,
> >
> > greg k-h
>
> The interface defined by the export type seems important and the input
> parameters need to be verified.
The export type does not matter at all.
> But I understand from your mail that this is the job of the caller.
Exactly.
> By the way, I still have a confusion. Interfaces like ioctrl, debugfs, read,
> or write require parameter validation. so what kind of kernel interfaces require
> parameter validation? Is there a definition?
Some do, some do not, it depends on the situation. If data comes from
an untrusted source (i.e. outside the kernel), then it MUST be validated
(remember "all input is evil"), but if it's from within the kernel,
usually it does not.
thanks,
greg k-h
Powered by blists - more mailing lists