lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <TYAPR01MB6201D438D832B667FEFB823392E6A@TYAPR01MB6201.jpnprd01.prod.outlook.com>
Date:   Wed, 30 Aug 2023 00:47:00 +0000
From:   <yuji2.ishikawa@...hiba.co.jp>
To:     <robin.murphy@....com>, <laurent.pinchart@...asonboard.com>
CC:     <krzysztof.kozlowski@...aro.org>, <hverkuil@...all.nl>,
        <sakari.ailus@....fi>, <mchehab@...nel.org>, <robh+dt@...nel.org>,
        <krzysztof.kozlowski+dt@...aro.org>, <conor+dt@...nel.org>,
        <nobuhiro1.iwamatsu@...hiba.co.jp>, <broonie@...nel.org>,
        <linux-media@...r.kernel.org>, <devicetree@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, <hch@....de>,
        <m.szyprowski@...sung.com>
Subject: RE: [PATCH v7 2/5] media: platform: visconti: Add Toshiba Visconti
 Video Input Interface driver

Hello Robin, Laurent,

> -----Original Message-----
> From: Robin Murphy <robin.murphy@....com>
> Sent: Monday, August 21, 2023 10:36 PM
> To: Laurent Pinchart <laurent.pinchart@...asonboard.com>; ishikawa yuji(石川
> 悠司 ○RDC□AITC○EA開) <yuji2.ishikawa@...hiba.co.jp>
> Cc: krzysztof.kozlowski@...aro.org; hverkuil@...all.nl; sakari.ailus@....fi;
> mchehab@...nel.org; robh+dt@...nel.org; krzysztof.kozlowski+dt@...aro.org;
> conor+dt@...nel.org; iwamatsu nobuhiro(岩松 信洋 ○DITC□DIT○OS
> T) <nobuhiro1.iwamatsu@...hiba.co.jp>; broonie@...nel.org;
> linux-media@...r.kernel.org; devicetree@...r.kernel.org;
> linux-arm-kernel@...ts.infradead.org; linux-kernel@...r.kernel.org; Christoph
> Hellwig <hch@....de>; Marek Szyprowski <m.szyprowski@...sung.com>
> Subject: Re: [PATCH v7 2/5] media: platform: visconti: Add Toshiba Visconti
> Video Input Interface driver
> 
> On 2023-08-21 14:19, Laurent Pinchart wrote:
> [...]
> >>>> +	viif_dev->tables =
> >>>> +		dma_alloc_wc(dev, sizeof(struct viif_table_area),
> &tables_dma, GFP_KERNEL);
> >>>> +	if (!viif_dev->tables) {
> >>>> +		dev_err(dev, "dma_alloc_wc failed\n");
> >>>
> >>> Are you sure DMA memory allocation errors shall be printed?
> >>
> >> Printing this error is useless for users in general?
> >> If so, I'll drop this debug output.
> >
> > Failures to allocate memory in the kernel generally result in warning
> > messages being printed by the allocation function, so there's no need
> > to do so manually in drivers. This being said, I check dma_alloc_wc()
> > (which is a wrapper around dma_alloc_attrs()), and unless I'm missing
> > something, it can return NULL without printing any error. I don't know
> > if this is an oversight in some code paths taken by dma_alloc_attrs()
> > or if it's on purpose. Maybe Christoph, Marek or Roben will known.
> 
> Yeah, there might be a few edge cases, but in most cases
> dma_alloc_attrs() will end up falling back to the page allocator as a last resort if
> all the more preferred allocation options fail, and thus complete failure should
> eventually cause that to scream unless DMA_ATTR_NO_WARN was specified.

I understand there's no need for printing this error message at driver code.
I'll remove dev_err().

> Thanks,
> Robin.

Regards,
Yuji

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ