linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacopo Mondi <jacopo@jmondi.org>
To: "Mani, Rajmohan" <rajmohan.mani@intel.com>
Cc: Tomasz Figa <tfiga@chromium.org>,
	"Zhi, Yong" <yong.zhi@intel.com>,
	"Qiu, Tian Shu" <tian.shu.qiu@intel.com>,
	"Cao, Bingbu" <bingbu.cao@intel.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	"Hu, Jerry W" <jerry.w.hu@intel.com>,
	"Toivonen, Tuukka" <tuukka.toivonen@intel.com>
Subject: Re: [PATCH v7 00/16] Intel IPU3 ImgU patchset
Date: Thu, 10 Jan 2019 09:19:55 +0100	[thread overview]
Message-ID: <20190110081955.uuevbwgdlo7xr6gi@uno.localdomain> (raw)
In-Reply-To: <6F87890CF0F5204F892DEA1EF0D77A599B321627@fmsmsx122.amr.corp.intel.com>

[-- Attachment #1: Type: text/plain, Size: 6040 bytes --]

Hi Raj,

On Wed, Jan 09, 2019 at 06:36:02PM +0000, Mani, Rajmohan wrote:
> Hi Jacopo,
>
> > Subject: Re: [PATCH v7 00/16] Intel IPU3 ImgU patchset
> >
> > Hi Raj,
> >
> > On Wed, Jan 09, 2019 at 06:01:39PM +0000, Mani, Rajmohan wrote:
> > > Hi Jacopo,
> > >
> > > > Subject: Re: [PATCH v7 00/16] Intel IPU3 ImgU patchset
> > > >
> > > > Hello Raj,
> > > >
> > > > On Wed, Jan 09, 2019 at 05:00:21PM +0000, Mani, Rajmohan wrote:
> > > > > Hi Laurent, Tomasz, Jacopo,
> > > > >
> > > > > > Subject: Re: [PATCH v7 00/16] Intel IPU3 ImgU patchset
> > > > > >
> > > > > > Hello,
> > > > > >
> > > > > > On Tue, Jan 08, 2019 at 03:54:34PM +0900, Tomasz Figa wrote:
> > > > > > > Hi Raj, Yong, Bingbu, Tianshu,
> > > > > > >
> > > > > > > On Fri, Dec 21, 2018 at 12:04 PM Tomasz Figa
> > > > > > > <tfiga@chromium.org>
> > > > wrote:
> > > > > > > >
> > > > > > > > On Fri, Dec 21, 2018 at 7:24 AM Laurent Pinchart
> > > > > > > > <laurent.pinchart@ideasonboard.com> wrote:
> > > > > > > > >
> > > > > > > > > Hellon
> > > > > > > > >
> > > > > > > > > On Sunday, 16 December 2018 09:26:18 EET Laurent Pinchart
> > wrote:
> > > > > > > > > > Hello Yong,
> > > > > > > > > >
> > > > > > > > > > Could you please have a look at the crash reported below ?
> > > > > > > > >
> > > > > > > > > A bit more information to help you debugging this. I've
> > > > > > > > > enabled KASAN in the kernel configuration, and get the
> > > > > > > > > following use-after-free
> > > > > > reports.
> > > > > >
> > > > > > I tested as well using the ipu-process.sh script shared by
> > > > > > Laurent, with the following command line:
> > > > > > ./ipu3-process.sh --out 2560x1920 --vf 1920x1080
> > > > > > frame-2592x1944.cio2
> > > > > >
> > > > > > and I got a very similar trace available at:
> > > > > > https://paste.debian.net/hidden/5855e15a/
> > > > > >
> > > > > > Please note I have been able to process a set of images (with
> > > > > > KASAN enabled the machine does not freeze) but the kernel log
> > > > > > gets flooded and it is not possible to process any other frame after this.
> > > > > >
> > > > > > The issue is currently quite annoying and it's a blocker for
> > > > > > libcamera development on IPU3. Please let me know if I can
> > > > > > support with
> > > > more testing.
> > > > > >
> > > > > > Thanks
> > > > > >    j
> > > > > >
> > > > > > > > >
> > > > > > > > > [  166.332920]
> > > > > > > > >
> > > > > >
> > > >
> > ================================================================
> > > > > > ==
> > > > > > > > > [  166.332937] BUG: KASAN: use-after-free in
> > > > > > > > > __cached_rbnode_delete_update+0x36/0x202
> > > > > > > > > [  166.332944] Read of size 8 at addr ffff888133823718 by
> > > > > > > > > task
> > > > > > > > > yavta/1305
> > > > > > > > >
> > > > > > > > > [  166.332955] CPU: 3 PID: 1305 Comm: yavta Tainted: G         C
> > > > 4.20.0-
> > > > > > rc6+ #3
> > > > > > > > > [  166.332958] Hardware name: HP Soraka/Soraka, BIOS
> > > > > > > > > 08/30/2018 [ 166.332959] Call Trace:
> > > > > > > > > [  166.332967]  dump_stack+0x5b/0x81 [  166.332974]
> > > > > > > > > print_address_description+0x65/0x227
> > > > > > > > > [  166.332979]  ? __cached_rbnode_delete_update+0x36/0x202
> > > > > > > > > [  166.332983]  kasan_report+0x247/0x285 [  166.332989]
> > > > > > > > > __cached_rbnode_delete_update+0x36/0x202
> > > > > > > > > [  166.332995]  private_free_iova+0x57/0x6d [  166.332999]
> > > > > > > > > __free_iova+0x23/0x31 [  166.333011]
> > > > > > > > > ipu3_dmamap_free+0x118/0x1d6 [ipu3_imgu]
> > > > > > > >
> > > > > > > > Thanks Laurent, I think this is a very good hint. It looks
> > > > > > > > like we're basically freeing and already freed IOVA and
> > > > > > > > corrupting some allocator state?
> > > > > > >
> > > > > > > Did you have any luck in reproducing and fixing this double free
> > issue?
> > > > > > >
> > > > >
> > > > > This issue is either hard to reproduce or comes with different
> > > > > signatures with the updated yavta (that now supports meta output)
> > > > > with the 4.4 kernel that I have been using.
> > > > > I am switching to 4.20-rc6 for better reproducibility.
> > > > > Enabling KASAN also results in storage space issues on my Chrome
> > device.
> > > > > Will enable this just for ImgU to get ahead and get back with more
> > updates.
> > > > >
> > > >
> > > > Thanks for testing this.
> > > >
> > > > For your informations I'm using the following branch, from Sakari's
> > > > tree: git://linuxtv.org/sailus/media_tree.git ipu3
> > > >
> > > > Although it appears that the media tree master branch has everything
> > > > that is there, with a few additional patches on top. I should move
> > > > to use media tree master as well...
> > > >
> > > > I have here attached 2 configuration files for v4.20-rc5 I am using
> > > > on Soraka, in case they might help you. One has KASAN enabled with
> > > > an increased kernel log size, the other one is the one we use for daily
> > development.
> > >
> > > I think I am missing a trick here to override the default chrome os
> > > kernel config with the one that you supplied.
> > >
> > > In particular I am looking for steps to build the upstream kernel
> > > within chrome os build environment using your config, so I can update my
> > Soraka device.
> >
> > I'm sorry I can not help much building 'withing chrome os build environment'.
> > Care to explain what you mean?
> >
>
> This is part of the Chromium OS build environment and development workflow.
> https://chromium.googlesource.com/chromiumos/docs/+/master/kernel_faq.md
>
> No worries.
> I will sync up with Tomasz, as he managed to get this working with 4.20 kernel.
>

I'm sorry I can't help much here. I suggest to work with mainline (or
better, media master) and install a GNU/Linux distro on the chromebook so
you can easily update your kernel.

I personally used https://chrx.org/ that makes installing gallium (or
else) very easy. Once you get that running, I find easy enough to
update the kernel installing a .deb package.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-01-10  8:19 UTC|newest]

Thread overview: 123+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-29 22:22 [PATCH v7 00/16] Intel IPU3 ImgU patchset Yong Zhi
2018-10-29 22:22 ` [PATCH v7 01/16] v4l: Add Intel IPU3 meta buffer formats Yong Zhi
2018-11-02 12:59   ` Mauro Carvalho Chehab
2018-11-02 13:05     ` Mauro Carvalho Chehab
2018-11-29 19:16   ` Laurent Pinchart
2018-11-29 23:12     ` Zhi, Yong
2018-10-29 22:22 ` [PATCH v7 02/16] doc-rst: Add Intel IPU3 documentation Yong Zhi
2018-11-29 22:50   ` Laurent Pinchart
2018-12-13  9:38     ` Sakari Ailus
2018-12-13 10:41       ` Laurent Pinchart
2018-12-13 10:50         ` Sakari Ailus
2018-12-13  9:38     ` [PATCH 1/1] staging/ipu3-imgu: Address documentation comments Sakari Ailus
2018-10-29 22:22 ` [PATCH v7 03/16] v4l: Add Intel IPU3 meta data uAPI Yong Zhi
2018-11-02 13:02   ` Sakari Ailus
2018-11-16 22:37     ` Zhi, Yong
     [not found]       ` <20181129224548.qwbkau6suipt2veq@kekkonen.localdomain>
2018-11-29 23:06         ` Zhi, Yong
2018-11-29 23:06           ` Zhi, Yong
2018-12-01 20:57           ` Sakari Ailus
2018-12-01 20:57             ` Sakari Ailus
2018-11-02 13:49   ` Mauro Carvalho Chehab
2018-11-02 14:04     ` Tomasz Figa
2018-11-06 23:27       ` Mani, Rajmohan
2018-11-15 10:52         ` Hans Verkuil
2018-11-29  0:41           ` Mani, Rajmohan
2018-11-06 18:25     ` Zhi, Yong
2018-11-15 12:51   ` Hans Verkuil
2018-11-21 18:45     ` Zhi, Yong
2018-10-29 22:22 ` [PATCH v7 04/16] intel-ipu3: abi: Add register definitions and enum Yong Zhi
2018-10-29 22:22 ` [PATCH v7 05/16] intel-ipu3: abi: Add structs Yong Zhi
2018-11-05  8:27   ` Sakari Ailus
2018-11-05 19:05     ` Mani, Rajmohan
2018-11-06  8:04       ` Sakari Ailus
2018-11-06 23:31         ` Mani, Rajmohan
2018-10-29 22:23 ` [PATCH v7 06/16] intel-ipu3: mmu: Implement driver Yong Zhi
2018-11-05 11:55   ` Sakari Ailus
2018-11-06  5:50     ` Zhi, Yong
2018-11-06  5:56       ` Tomasz Figa
2018-10-29 22:23 ` [PATCH v7 07/16] intel-ipu3: Implement DMA mapping functions Yong Zhi
2018-10-29 22:23 ` [PATCH v7 08/16] intel-ipu3: css: Add dma buff pool utility functions Yong Zhi
2018-11-08 15:36   ` Sakari Ailus
2018-11-09 23:16     ` Zhi, Yong
2018-11-12  9:21       ` Sakari Ailus
2018-10-29 22:23 ` [PATCH v7 09/16] intel-ipu3: css: Add support for firmware management Yong Zhi
2018-11-28 22:22   ` Sakari Ailus
2018-10-29 22:23 ` [PATCH v7 11/16] intel-ipu3: css: Compute and program ccs Yong Zhi
2018-10-29 22:23 ` [PATCH v7 12/16] intel-ipu3: css: Initialize css hardware Yong Zhi
2018-11-09 12:06   ` Sakari Ailus
2018-10-29 22:23 ` [PATCH v7 13/16] intel-ipu3: Add css pipeline programming Yong Zhi
2018-10-29 22:23 ` [PATCH v7 14/16] intel-ipu3: Add v4l2 driver based on media framework Yong Zhi
2018-11-09 12:36   ` Sakari Ailus
2018-11-09 23:26     ` Zhi, Yong
2018-11-15 12:51   ` Hans Verkuil
2018-11-15 16:09     ` Zhi, Yong
2018-10-29 22:23 ` [PATCH v7 15/16] intel-ipu3: Add imgu top level pci device driver Yong Zhi
2018-11-09 12:54   ` Sakari Ailus
2018-11-12 22:16     ` Zhi, Yong
2018-10-29 22:23 ` [PATCH v7 16/16] intel-ipu3: Add dual pipe support Yong Zhi
2018-11-01 12:03 ` [PATCH v7 00/16] Intel IPU3 ImgU patchset Sakari Ailus
2018-11-07  4:16   ` Bing Bu Cao
2018-11-09  1:28     ` Zhi, Yong
2018-11-09 11:28       ` Sakari Ailus
2018-11-09 10:09     ` Sakari Ailus
2018-11-12  4:31       ` Bing Bu Cao
2018-11-13 10:31         ` Sakari Ailus
2018-11-13 11:04           ` Bing Bu Cao
2018-11-13 21:58             ` Sakari Ailus
2018-11-14  7:02               ` Bing Bu Cao
2018-11-29 23:09       ` Laurent Pinchart
2018-11-30 13:37         ` Sakari Ailus
2018-11-29 23:07     ` Laurent Pinchart
2018-12-03  9:51       ` Sakari Ailus
2018-12-03 12:34         ` Laurent Pinchart
2018-11-14  0:25 ` jacopo mondi
2018-11-14  7:40   ` Sakari Ailus
2018-11-18  0:12     ` jacopo mondi
2018-11-29 14:43 ` Laurent Pinchart
2018-11-29 19:51   ` Tomasz Figa
2018-11-29 22:54     ` Laurent Pinchart
2018-11-29 22:58       ` Mani, Rajmohan
2018-12-04 16:07       ` Mani, Rajmohan
2018-12-04 16:42         ` Laurent Pinchart
2018-12-04 16:53           ` Mani, Rajmohan
2018-12-05  0:30           ` Mani, Rajmohan
2018-12-11 13:34             ` Laurent Pinchart
2018-12-11 13:43               ` Laurent Pinchart
2018-12-11 14:20                 ` Laurent Pinchart
2018-12-16  7:26                   ` Laurent Pinchart
2018-12-20 22:25                     ` Laurent Pinchart
2018-12-21  3:04                       ` Tomasz Figa
2019-01-08  6:54                         ` Tomasz Figa
2019-01-09 16:40                           ` Jacopo Mondi
2019-01-09 17:00                             ` Mani, Rajmohan
2019-01-09 17:25                               ` Jacopo Mondi
2019-01-09 18:01                                 ` Mani, Rajmohan
2019-01-09 18:20                                   ` Jacopo Mondi
2019-01-09 18:36                                     ` Mani, Rajmohan
2019-01-10  8:19                                       ` Jacopo Mondi [this message]
2019-01-12  2:06                                         ` Mani, Rajmohan
2019-01-12  2:30                                     ` Mani, Rajmohan
2019-01-12 15:10                                       ` Laurent Pinchart
     [not found]                                         ` <6F87890CF0F5204F892DEA1EF0D77A599B323499@fmsmsx122.amr.corp.intel.com>
2019-01-21  5:41                                           ` Tomasz Figa
2019-01-21  8:07                                             ` Laurent Pinchart
2019-01-22 16:21                                               ` Mani, Rajmohan
     [not found]                   ` <6F87890CF0F5204F892DEA1EF0D77A599B31FAF4@fmsmsx122.amr.corp.intel.com>
2019-01-08 23:34                     ` Laurent Pinchart
2018-12-12  4:55                 ` Bingbu Cao
2018-12-13 22:24                   ` Laurent Pinchart
2018-12-14  2:53                     ` Bingbu Cao
2018-12-17  3:14                     ` Bingbu Cao
2018-12-26 11:03                       ` Laurent Pinchart
2019-01-02  2:38                         ` Bingbu Cao
2019-01-02  8:20                           ` Laurent Pinchart
2019-01-02 20:26                             ` Sakari Ailus
2019-01-28 10:09                               ` Jacopo Mondi
2019-01-29  8:56                                 ` Tomasz Figa
2019-02-01 10:04                                   ` Jacopo Mondi
2019-02-05  6:01                                     ` Tomasz Figa
2019-03-23 13:02                           ` Jacopo Mondi
2019-03-25  3:45                             ` Bingbu Cao
2019-03-25  4:06                               ` Laurent Pinchart
2019-03-25  8:11                                 ` Jacopo Mondi
2019-03-25 10:07                                   ` Bingbu Cao
2019-03-26 11:16                                     ` Jacopo Mondi
2019-04-08  6:35                                       ` Bingbu Cao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190110081955.uuevbwgdlo7xr6gi@uno.localdomain \
    --to=jacopo@jmondi.org \
    --cc=bingbu.cao@intel.com \
    --cc=hans.verkuil@cisco.com \
    --cc=jerry.w.hu@intel.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=rajmohan.mani@intel.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tfiga@chromium.org \
    --cc=tian.shu.qiu@intel.com \
    --cc=tuukka.toivonen@intel.com \
    --cc=yong.zhi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).