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]
Date:   Thu, 8 Nov 2018 21:43:40 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Sunil Kovvuri <sunil.kovvuri@...il.com>
Cc:     Networking <netdev@...r.kernel.org>,
        David Miller <davem@...emloft.net>, linux-soc@...r.kernel.org,
        Sunil Goutham <sgoutham@...vell.com>
Subject: Re: [PATCH 08/20] octeontx2-af: Alloc and config NPC MCAM entry at a time

On Thu, Nov 8, 2018 at 7:37 PM <sunil.kovvuri@...il.com> wrote:
> @@ -666,4 +668,20 @@ struct npc_mcam_unmap_counter_req {
>         u8  all;   /* Unmap all entries using this counter ? */
>  };
>
> +struct npc_mcam_alloc_and_write_entry_req {
> +       struct mbox_msghdr hdr;
> +       struct mcam_entry entry_data;
> +       u16 ref_entry;
> +       u8  priority;    /* Lower or higher w.r.t ref_entry */
> +       u8  intf;        /* Rx or Tx interface */
> +       u8  enable_entry;/* Enable this MCAM entry ? */
> +       u8  alloc_cntr;  /* Allocate counter and map ? */
> +};

I noticed that this structure requires padding at the end because
struct mbox_msghdr has a 32-bit alignment requirement. For
data structures in an interface, I'd recommend avoiding that kind
of padding and adding reserved fields or widening the types
accordingly.

I also noticed a similar problem in struct mbox_msghdr. Maybe
use the 'pahole' tool to check for this kind of padding in the
API structures.

         Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ