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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 17 Nov 2019 10:33:32 -0800 (PST) From: David Miller <davem@...emloft.net> To: sunil.kovvuri@...il.com Cc: netdev@...r.kernel.org, sgoutham@...vell.com Subject: Re: [PATCH 03/15] octeontx2-af: Cleanup CGX config permission checks From: sunil.kovvuri@...il.com Date: Sun, 17 Nov 2019 21:44:14 +0530 > From: Sunil Goutham <sgoutham@...vell.com> > > Most of the CGX register config is restricted to mapped RVU PFs, > this patch cleans up these permission checks spread across > the rvu_cgx.c file by moving the checks to a common fn(). > > Signed-off-by: Sunil Goutham <sgoutham@...vell.com> > --- > .../net/ethernet/marvell/octeontx2/af/rvu_cgx.c | 55 ++++++++++------------ > 1 file changed, 24 insertions(+), 31 deletions(-) > > diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c > index 0bbb2eb..5790a76 100644 > --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c > +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c > @@ -350,6 +350,18 @@ int rvu_cgx_exit(struct rvu *rvu) > return 0; > } > > +/* Most of the CGX configuration is restricted to the mapped PF only, > + * VF's of mapped PF and other PFs are not allowed. This fn() checks > + * whether a PFFUNC is permitted to do the config or not. > + */ > +inline bool is_cgx_config_permitted(struct rvu *rvu, u16 pcifunc) > +{ > + if ((pcifunc & RVU_PFVF_FUNC_MASK) || > + !is_pf_cgxmapped(rvu, rvu_get_pf(pcifunc))) > + return false; > + return true; > +} Do not use inline in foo.c files, let the compiler decide.
Powered by blists - more mailing lists