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: <20111115213734.GA5094@mail.gnudd.com>
Date:	Tue, 15 Nov 2011 22:37:34 +0100
From:	Alessandro Rubini <rubini@...dd.com>
To:	gregkh@...e.de
Cc:	linux-kernel@...r.kernel.org, giancarlo.asnaghi@...com
Subject: Re: [RFC PATCH] debugfs: add tools to printk 32-bit registers

Hi Greg. Thanks for looking.

>> +/*
>> + * The regset32 stuff is used to print 32-bit registers using the
>> + * seq_file utilities. We offer printing a register set in an already-opened
>> + * sequential file or create a debugfs file that only prints a regset32.
>> + */
> 
> Can this be part of the kerneldoc below somehow so that people are more
> aware of it?

Ok. There's also a file by Jon in Documentation that needs updating, as it
has all the other debugfs file types.
 
> +int debugfs_print_regs32(struct seq_file *s, struct debugfs_reg32 *regs,
>> +			   int nregs, void __iomem *base, char *prefix)

> This function also needs to be part of debugfs.h in the "debugfs is not
> enabled" section of the file, right?

Not really. The other one makes a regiters-only file, and it's good
to register it withouth ifdef.

This one is used to embed a register block in a file with more
stuff, so it shouldn't be used if debugfs is not selected (btw,
I compiled my internal stuff with and without CONFIG_DEBUG_FS
before rebasing to next).

Example:

   static int pl08x_debugfs_show(struct seq_file *s, void *data)
   {  
	[...]
        list_for_each_entry(chan, &pl08x->slave.channels, chan.device_node) {
                seq_printf(s, "%s\t\t%s\n", chan->name,
                           pl08x_state_str(chan->state));
        }

        /* dump registers */
        seq_printf(s, "\nPL08x registers\n");
        debugfs_print_regs32(s, pl08x_regs, ARRAY_SIZE(pl08x_regs),
                               pl08x->base, "");

        seq_printf(s, "\nPL08x registers channel\n");
        for (i = 0; i < pl08x->vd->channels; i++) {
	[...]
   }

So, I'll post a V2 shortly, unless you refuse it in reply to this.

thanks
/alessandro
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ