Re: [PATCH 4/12: eCryptfs] Main module functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/3/05, Greg KH <[email protected]> wrote:
> On Wed, Nov 02, 2005 at 08:49:29PM -0700, Phillip Hellewell wrote:
> > +#include <net/sock.h>
> > +#include <linux/file.h>
>
> net/ after linux/ please.  Why do you need sock.h anyway?
We don't, thanks for pointing that out. It will be removed.

> > +/**
> > + * Module parameter that defines the ecryptfs_verbosity level.
> > + */
> > +#define VERBOSE_DUMP 9
> > +#ifdef DEBUG
> > +int ecryptfs_verbosity = VERBOSE_DUMP;
> > +#else
> > +int ecryptfs_verbosity = 1;
> > +#endif
> > +module_param(ecryptfs_verbosity, int, 1);
>
> I don't think you want a "1" here, do you?  Hint, it's not doing what
> you think it is doing...
Would you care to explain, providing its short, what it does? I don't
mind admitting I don't know everything, especially when it comes to
kernel code. If I am to RTFM, please point me to the right M. :)

> > +void __ecryptfs_kfree(void *ptr, const char *fun, int line)
> > +{
> > +     if (unlikely(ECRYPTFS_ENABLE_MEMORY_TRACING))
> > +             ecryptfs_printk_release(ptr, fun, line);
> > +     kfree(ptr);
> > +}
> > +
> > +void *__ecryptfs_kmalloc(size_t size, unsigned int flags, const char *fun,
> > +                      int line)
>
> <snip>
>
> Don't have wrappers for all of the common kernel functions, just call
> them directly.
We do call them directly as long as DEBUG is not defined. This code
exists for development purposes (or debug, if you will) so that we can
track memory allocations and other various things in the logs. All
wrappers for the common kernel functions are #defined in
ecryptfs_kernel.h so via preprocessing, it all becomes pretty.

Of course, these can be removed, assuming that this is not an
acceptable approach.

Mike
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux