19 Apr, 2020

1 commit

  • 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:

    struct foo {
    int stuff;
    struct boo array[];
    };

    By making use of the mechanism above, we will get a compiler warning
    in case the flexible array does not occur last in the structure, which
    will help us prevent some kind of undefined behavior bugs from being
    inadvertently introduced[3] to the codebase from now on.

    Also, notice that, dynamic memory allocations won't be affected by
    this change:

    "Flexible array members have incomplete type, and so the sizeof operator
    may not be applied. As a quirk of the original implementation of
    zero-length arrays, sizeof evaluates to zero."[1]

    This issue was found with the help of Coccinelle.

    [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
    [2] https://github.com/KSPP/linux/issues/21
    [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour")

    Signed-off-by: Gustavo A. R. Silva

    Gustavo A. R. Silva
     

05 Jun, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation version 2 of the license

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 315 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Armijn Hemel
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190531190115.503150771@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

20 Feb, 2012

1 commit

  • time_t was used in the signature and key packet headers,
    which is typedef of long and is different on 32 and 64 bit architectures.
    Signature and key format should be independent of architecture.
    Similar to GPG, I have changed the type to uint32_t.

    Signed-off-by: Dmitry Kasatkin
    Signed-off-by: James Morris

    Dmitry Kasatkin
     

18 Jan, 2012

1 commit


09 Nov, 2011

1 commit

  • This patch implements RSA digital signature verification using GnuPG library.

    The format of the signature and the public key is defined by their respective
    headers. The signature header contains version information, algorithm,
    and keyid, which was used to generate the signature.
    The key header contains version and algorythim type.
    The payload of the signature and the key are multi-precision integers.

    The signing and key management utilities evm-utils provide functionality
    to generate signatures and load keys into the kernel keyring.
    When the key is added to the kernel keyring, the keyid defines the name
    of the key.

    Signed-off-by: Dmitry Kasatkin
    Acked-by: Mimi Zohar

    Dmitry Kasatkin