[Ksummit-discuss] [MAINTAINERS SUMMIT] API replacement/deprecation

Jan Kara jack at suse.cz
Fri Sep 7 08:19:12 UTC 2018


On Thu 06-09-18 16:24:03, Kees Cook wrote:
> On Thu, Sep 6, 2018 at 4:18 PM, Stephen Rothwell <sfr at canb.auug.org.au> wrote:
> > Hi Kees,
> >
> > On Thu, 6 Sep 2018 11:24:11 -0700 Kees Cook <keescook at chromium.org> wrote:
> >>
> >> If there was an agreement by all maintainers that deprecated
> >> functions/patterns should not be added, and we documented the
> >> deprecation somewhere like Documentation/process/deprecated.rst, then
> >> we could make the declaration that if such functions got added (it's
> >> easy to mechanically check for them), it would be the responsibility
> >> of the author and maintainer chain to see that it got fixed before the
> >> release is cut. We already have this for things like "breaks the x86
> >> allmodconfig build" or similar. The checking would be manual, and the
> >> enforcement would be by agreement, but it'd be better than the kind of
> >> "please don't do this" hand-waving we've had in the past.
> >
> > I could do this in linux-next, of course, the same way I check for
> > missing signed-off-bys.  All I would need is the list of deprecated
> > things.
> 
> Hopefully we can all agree on deprecating strcpy() and strncpy() in
> favor of strscpy()?

So if you want to start enforcing "no deprecated functions in new patches",
then I'm afraid you will need to get a wider consensus on every deprecated
function. Otherwise this ends up like another checkpatch which annoys
quite some people because they don't consider the warnings interesting.

To take your example above, if I get an email like: "You must not use
strcpy(name, ".."). Use strscpy() instead in your patch." then it should be
accompanied by a good explanation why the change needs to be made.
Otherwise people get annoyed by this check pushing more work onto them.
And this is different from other checks e.g. 0-day does - 99% of developers
agree that kernel should always built so they are OK with the burden of
fixing compilation of exotic configuration their patch breaks. And with
deprecation you need to do similar convincing for each and every deprecated
function...

								Honza
-- 
Jan Kara <jack at suse.com>
SUSE Labs, CR


More information about the Ksummit-discuss mailing list