Displaying 20 results from an estimated 400 matches similar to: "[PATCH] drm/nouveau/mmu: use struct_size() helper"
2019 Aug 07
0
[PATCH] drm/nouveau/nvif/mmu: Use struct_size() helper
One of the more common cases of allocation size calculations is finding
the size of a structure that has a zero-sized array at the end, along
with memory for some number of elements for that array. For example:
struct nvif_mmu_kind_v0 {
...
__u8 data[];
};
Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes.
So, replace
2019 Dec 17
1
[PATCH] drm/nouveau: Add correct turing page kinds
Turing introduced a new simplified page kind
scheme, reducing the number of possible page
kinds from 256 to 16. It also is the first
NVIDIA GPU in which the highest possible page
kind value is not reserved as an "invalid" page
kind.
To address this, the invalid page kind is made
an explicit property of the MMU HAL, and a new
table of page kinds is added to the tu102 MMU
HAL.
One
2019 Jun 19
3
[PATCH] scsi: virtio_scsi: Use struct_size() helper
One of the more common cases of allocation size calculations is finding
the size of a structure that has a zero-sized array at the end, along
with memory for some number of elements for that array. For example:
struct virtio_scsi {
...
struct virtio_scsi_vq req_vqs[];
};
Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes.
2019 Jun 19
3
[PATCH] scsi: virtio_scsi: Use struct_size() helper
One of the more common cases of allocation size calculations is finding
the size of a structure that has a zero-sized array at the end, along
with memory for some number of elements for that array. For example:
struct virtio_scsi {
...
struct virtio_scsi_vq req_vqs[];
};
Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes.
2020 Aug 17
0
[PATCH][next] drm/virtio: Use struct_size() helper in kmalloc()
On Wed, Jun 17, 2020 at 04:57:07PM -0500, Gustavo A. R. Silva wrote:
> Make use of the struct_size() helper instead of an open-coded version
> in order to avoid any potential type mistakes.
>
> This code was detected with the help of Coccinelle and, audited and
> fixed manually.
>
> Signed-off-by: Gustavo A. R. Silva <gustavoars at kernel.org>
Queued up for
2023 Mar 29
1
[PATCH] drm/nouveau/svm: remove unused ret variable
clang with W=1 reports
drivers/gpu/drm/nouveau/nouveau_svm.c:929:6: error: variable
'ret' set but not used [-Werror,-Wunused-but-set-variable]
int ret;
^
This variable is not used so remove it.
Signed-off-by: Tom Rix <trix at redhat.com>
---
drivers/gpu/drm/nouveau/nouveau_svm.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git
2010 Mar 27
3
Dovecot 2.0beta4 HG 11014: Crashes on parsing settings via LMTP service
Hi,
unfortunately no core was dumped. Let me know if you need more info to debug.
==> /var/log/dovecot.log <==
Mar 27 08:13:38 spectre dovecot: lmtp(8362): Connect from local
Mar 27 08:13:38 spectre dovecot: lmtp(8362): Panic: file settings-parser.c: line 1501 (settings_link_get_new): assertion failed: (diff + sizeof(*old_link->array) <= old_link->parent->info->struct_size)
2023 Nov 16
3
[PATCH][next] nouveau/gsp: replace zero-length array with flex-array member and use __counted_by
Fake flexible arrays (zero-length and one-element arrays) are deprecated,
and should be replaced by flexible-array members. So, replace
zero-length array with a flexible-array member in `struct
PACKED_REGISTRY_TABLE`.
Also annotate array `entries` with `__counted_by()` to prepare for the
coming implementation by GCC and Clang of the `__counted_by` attribute.
Flexible array members annotated with
2019 Jul 12
0
[PATCH] scsi: virtio_scsi: Use struct_size() helper
Gustavo,
> One of the more common cases of allocation size calculations is finding
> the size of a structure that has a zero-sized array at the end, along
> with memory for some number of elements for that array. For example:
Applied to 5.4/scsi-queue, thanks!
--
Martin K. Petersen Oracle Linux Engineering
2023 Sep 25
1
[PATCH 1/9] drm/amd/pm: Annotate struct smu10_voltage_dependency_table with __counted_by
On Mon, Sep 25, 2023 at 08:30:30AM +0200, Christian K?nig wrote:
> Am 22.09.23 um 19:41 schrieb Alex Deucher:
> > On Fri, Sep 22, 2023 at 1:32?PM Kees Cook <keescook at chromium.org> wrote:
> > > Prepare for the coming implementation by GCC and Clang of the __counted_by
> > > attribute. Flexible array members annotated with __counted_by can have
> > >
2023 Sep 25
1
[PATCH 1/9] drm/amd/pm: Annotate struct smu10_voltage_dependency_table with __counted_by
On Mon, Sep 25, 2023 at 08:30:30AM +0200, Christian K?nig wrote:
> Am 22.09.23 um 19:41 schrieb Alex Deucher:
> > On Fri, Sep 22, 2023 at 1:32?PM Kees Cook <keescook at chromium.org> wrote:
> > > Prepare for the coming implementation by GCC and Clang of the __counted_by
> > > attribute. Flexible array members annotated with __counted_by can have
> > >
2023 Sep 25
1
[PATCH 1/9] drm/amd/pm: Annotate struct smu10_voltage_dependency_table with __counted_by
On Mon, Sep 25, 2023 at 08:30:30AM +0200, Christian K?nig wrote:
> Am 22.09.23 um 19:41 schrieb Alex Deucher:
> > On Fri, Sep 22, 2023 at 1:32?PM Kees Cook <keescook at chromium.org> wrote:
> > > Prepare for the coming implementation by GCC and Clang of the __counted_by
> > > attribute. Flexible array members annotated with __counted_by can have
> > >
2019 Jan 29
2
[PATCH] drm/nouveau: mark expected switch fall-through
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
This patch fixes the following warning:
drivers/gpu/drm/nouveau/nouveau_bo.c:1434:53: warning: this statement may fall through [-Wimplicit-fallthrough=]
Warning level 3 was used: -Wimplicit-fallthrough=3
This patch is part of the ongoing efforts to enabling
-Wimplicit-fallthrough.
2012 Sep 04
1
Repeated Asterisk 10.7.0 crashes
I'm getting cycles of repeated crashes which occur and then stop occurring.
Looking at the dumps via gdb shows that something peculiar is happening
that looks like memory corruption:
Program terminated with signal 6, Aborted.
#0 0x0000003686e30285 in raise () from /lib64/libc.so.6
(gdb) up
#1 0x0000003686e31d30 in abort () from /lib64/libc.so.6
(gdb) up
#2 0x0000003686e6971b in
2018 Jul 24
2
[PATCH] drm/nouveau/secboot/acr: fix memory leak
In case memory resources for *bl_desc* were allocated, release
them before return.
Addresses-Coverity-ID: 1472021 ("Resource leak")
Fixes: 0d466901552a ("drm/nouveau/secboot/acr: Remove VLA usage")
Signed-off-by: Gustavo A. R. Silva <gustavo at embeddedor.com>
---
drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 1 +
1 file changed, 1 insertion(+)
diff --git
2020 Mar 03
1
[PATCH][next] drm: Replace zero-length array with flexible-array member
On 2/25/20 08:17, Jani Nikula wrote:
> On Tue, 25 Feb 2020, "Gustavo A. R. Silva" <gustavo at embeddedor.com> wrote:
>> The current codebase makes use of the zero-length array language
>> extension to the C90 standard, but the preferred mechanism to declare
>> variable-length types such as these ones is a flexible array member[1][2],
>> introduced in C99:
2018 Sep 08
2
[PATCH] drm/nouveau/secboot/acr: fix memory leak
On 8/2/18 12:51 PM, Gustavo A. R. Silva wrote:
> Hi all,
>
> Friendly ping! Who can take this?
>
> Thanks
> --
> Gustavo
>
> On 07/24/2018 08:27 AM, Gustavo A. R. Silva wrote:
>> In case memory resources for *bl_desc* were allocated, release
>> them before return.
>>
>> Addresses-Coverity-ID: 1472021 ("Resource leak")
>> Fixes:
2018 Mar 13
2
[PATCH v2] drm/nouveau/secboot: remove VLA usage
In preparation to enabling -Wvla, remove VLA. In this particular
case directly use macro NVKM_MSGQUEUE_CMDLINE_SIZE instead of local
variable cmdline_size. Also, remove cmdline_size as it is not
actually useful anymore.
The use of stack Variable Length Arrays needs to be avoided, as they
can be a vector for stack exhaustion, which can be both a runtime bug
or a security flaw. Also, in general, as
2018 Mar 16
2
[PATCH v2] drm/nouveau/secboot: remove VLA usage
On 14 March 2018 at 21:08, Thierry Reding <thierry.reding at gmail.com> wrote:
> On Tue, Mar 13, 2018 at 11:24:11AM -0500, Gustavo A. R. Silva wrote:
>> In preparation to enabling -Wvla, remove VLA. In this particular
>> case directly use macro NVKM_MSGQUEUE_CMDLINE_SIZE instead of local
>> variable cmdline_size. Also, remove cmdline_size as it is not
>> actually
2018 Oct 08
2
[PATCH] drm/nouveau: fix missing break in switch statement
From: Colin Ian King <colin.king at canonical.com>
The NOUVEAU_GETPARAM_PCI_DEVICE case is missing a break statement and falls
through to the following NOUVEAU_GETPARAM_BUS_TYPE case and may end up
re-assigning the getparam->value to an undesired value. Fix this by adding
in the missing break.
Detected by CoverityScan, CID#1460507 ("Missing break in switch")
Fixes: