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:   Fri, 11 Sep 2020 13:53:24 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     <skardach@...vell.com>
Cc:     <davem@...emloft.net>, <sgoutham@...vell.com>,
        <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next 3/3] octeontx2-af: add support for custom KPU
 entries

On Fri, 11 Sep 2020 15:21:24 +0200 skardach@...vell.com wrote:
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/npc.h b/drivers/net/ethernet/marvell/octeontx2/af/npc.h
> index 6bfb9a9d3003..fe164b85adfb 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/npc.h
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/npc.h
> @@ -148,7 +148,7 @@ struct npc_kpu_profile_cam {
>  	u16 dp1_mask;
>  	u16 dp2;
>  	u16 dp2_mask;
> -};
> +} __packed;
>  
>  struct npc_kpu_profile_action {
>  	u8 errlev;
> @@ -168,7 +168,7 @@ struct npc_kpu_profile_action {
>  	u8 mask;
>  	u8 right;
>  	u8 shift;
> -};
> +} __packed;
>  
>  struct npc_kpu_profile {
>  	int cam_entries;
> @@ -323,6 +323,15 @@ struct npc_mcam_kex {
>  	u64 intf_ld_flags[NPC_MAX_INTF][NPC_MAX_LD][NPC_MAX_LFL];
>  } __packed;
>  
> +struct npc_kpu_fwdata {
> +	int	entries;
> +	/* What follows is:
> +	 * struct npc_kpu_profile_cam[entries];
> +	 * struct npc_kpu_profile_action[entries];
> +	 */
> +	u8	data[0];
> +} __packed;

Why do you mark a structure with a single int member as __packed?

Please drop all the __packed attrs you add in this series.

>  module_param(mkex_profile, charp, 0000);
>  MODULE_PARM_DESC(mkex_profile, "MKEX profile name string");
>  
> +static char *kpu_profile; /* KPU profile name */
> +module_param(kpu_profile, charp, 0000);
> +MODULE_PARM_DESC(kpu_profile, "KPU profile name string");

Why do you need a module parameter for this?

Just decide on a filename, always request it, and if user doesn't want
to load a special profile you'll get a -ENOENT and move on.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ