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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250601113425.4d5a3d89@foz.lan>
Date: Sun, 1 Jun 2025 11:34:38 +0200
From: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To: Ricardo Ribalda <ribalda@...omium.org>
Cc: Alexandre Courbot <gnurou@...il.com>, Mauro Carvalho Chehab
 <mchehab@...nel.org>, Hans Verkuil <hverkuil@...all.nl>, Albert Esteve
 <aesteve@...hat.com>, "Michael S. Tsirkin" <mst@...hat.com>, Jason Wang
 <jasowang@...hat.com>, Xuan Zhuo <xuanzhuo@...ux.alibaba.com>, Eugenio
 Pérez <eperezma@...hat.com>, gurchetansingh@...gle.com,
 daniel.almeida@...labora.com, adelva@...gle.com, changyeon@...gle.com,
 nicolas.dufresne@...labora.com, linux-kernel@...r.kernel.org,
 linux-media@...r.kernel.org, virtualization@...ts.linux.dev, Alexandre
 Courbot <acourbot@...gle.com>
Subject: Re: [PATCH v3] media: add virtio-media driver

Em Wed, 28 May 2025 18:23:02 +0200
Ricardo Ribalda <ribalda@...omium.org> escreveu:

> > +static int scatterlist_builder_add_userptr(struct scatterlist_builder *builder,
> > +                                          unsigned long userptr,
> > +                                          unsigned long length)
> > +{
> > +       int ret;
> > +       int nents;  
> Could you initialize nents and sg_list?
> old versions of gcc are a bit picky
> https://gitlab.freedesktop.org/linux-media/users/ribalda/-/jobs/77042562#L4381

Please don't. In this specific case, ret is always initialized:

> +       struct virtio_media_sg_entry *sg_list;
> +
> +       ret = __scatterlist_builder_add_userptr(builder, userptr, length,
> +                                               &sg_list, &nents);

nents and sg_list may or may not be initialized at the function,
but initializing it is wrong, as, when they are not initialized, the
ret code shall catch it (and if not, we *do* want gcc to warn).

So, if our CI is warning about that due to an old version, please upgrade 
the version at the CI runner.

Regards,
Mauro


Thanks,
Mauro

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ