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:   Wed, 27 Mar 2019 00:50:39 +0100
From:   Sabrina Dubroca <sd@...asysnail.net>
To:     Bart Van Assche <bvanassche@....org>
Cc:     David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
        Willem de Bruijn <willemb@...gle.com>
Subject: Re: [PATCH v2 5/5] net/core: Allow the compiler to verify
 declaration and definition consistency

2019-03-26, 10:11:34 -0700, Bart Van Assche wrote:
> On Mon, 2019-03-25 at 19:26 +0100, Sabrina Dubroca wrote:
> > 2019-03-25, 09:17:23 -0700, Bart Van Assche wrote:
> > > diff --git a/net/core/datagram.h b/net/core/datagram.h
> > > new file mode 100644
> > > index 000000000000..bcfb75bfa3b2
> > > --- /dev/null
> > > +++ b/net/core/datagram.h
> > > @@ -0,0 +1,15 @@
> > > +/* SPDX-License-Identifier: GPL-2.0 */
> > > +
> > > +#ifndef _NET_CORE_DATAGRAM_H_
> > > +#define _NET_CORE_DATAGRAM_H_
> > > +
> > > +#include <linux/types.h>
> > > +
> > > +struct sock;
> > > +struct sk_buff;
> > > +struct iov_iter;
> > > +
> > > +int __zerocopy_sg_from_iter(struct sock *sk, struct sk_buff *skb,
> > > +			    struct iov_iter *from, size_t length);
> > > +
> > > +#endif /* _NET_CORE_DATAGRAM_H_ */
> > 
> > That's rather ugly. Could it just be moved to an appropriate file in
> > include/?
> 
> Hi Sabrina,
> 
> I think the convention in the Linux kernel is to keep header files with local
> declarations in the source code directory and only to declare functions that
> are used by other kernel components under include/.

I didn't realize it was a common practice.

> Do you think that the function __zerocopy_sg_from_iter() will be
> needed by other kernel components?

No idea. It has a couple of wrappers, so maybe not.

The patch looks ok, sorry for the noise.

-- 
Sabrina

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ