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]
Message-ID: <20241008122820.71f67378@kernel.org>
Date: Tue, 8 Oct 2024 12:28:20 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Mina Almasry <almasrymina@...gle.com>
Cc: Brett Creeley <bcreeley@....com>, Taehee Yoo <ap420073@...il.com>,
 davem@...emloft.net, pabeni@...hat.com, edumazet@...gle.com,
 netdev@...r.kernel.org, linux-doc@...r.kernel.org, donald.hunter@...il.com,
 corbet@....net, michael.chan@...adcom.com, kory.maincent@...tlin.com,
 andrew@...n.ch, maxime.chevallier@...tlin.com, danieller@...dia.com,
 hengqi@...ux.alibaba.com, ecree.xilinx@...il.com,
 przemyslaw.kitszel@...el.com, hkallweit1@...il.com, ahmed.zaki@...el.com,
 paul.greenwalt@...el.com, rrameshbabu@...dia.com, idosch@...dia.com,
 asml.silence@...il.com, kaiyuanz@...gle.com, willemb@...gle.com,
 aleksander.lobakin@...el.com, dw@...idwei.uk, sridhar.samudrala@...el.com
Subject: Re: [PATCH net-next v3 5/7] net: devmem: add ring parameter
 filtering

On Thu, 3 Oct 2024 11:49:50 -0700 Mina Almasry wrote:
> > > +       dev->ethtool_ops->get_ringparam(dev, &ringparam,
> > > +                                       &kernel_ringparam, extack);
> > > +       if (kernel_ringparam.tcp_data_split != ETHTOOL_TCP_DATA_SPLIT_ENABLED ||
> > > +           kernel_ringparam.tcp_data_split_thresh) {
> > > +               NL_SET_ERR_MSG(extack,
> > > +                              "tcp-header-data-split is disabled or threshold is not zero");
> > > +               return -EINVAL;
> > > +       }
> > > +  
> > Maybe just my personal opinion, but IMHO these checks should be separate
> > so the error message can be more concise/clear.
> >  
> 
> Good point. The error message in itself is valuable.

If you mean that the error message is more intuitive than debugging why
PP_FLAG_ALLOW_UNREADABLE_NETMEM isn't set - I agree :)

I vote to keep the patch, FWIW. Maybe add a comment that for now drivers
should not set PP_FLAG_ALLOW_UNREADABLE_NETMEM, anyway, but this gives
us better debuggability, and in the future we may find cases where
doing a copy is cheaper than buffer circulation (and therefore may lift
this check).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ