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:	Tue, 18 Aug 2015 10:18:51 -0700
From:	Scott Feldman <sfeldma@...il.com>
To:	Andrew Lunn <andrew@...n.ch>
Cc:	Netdev <netdev@...r.kernel.org>,
	Jiří Pírko <jiri@...nulli.us>
Subject: Re: [PATCH net-next v3] rocker: add debugfs support to dump internal tables

On Tue, Aug 18, 2015 at 7:01 AM, Andrew Lunn <andrew@...n.ch> wrote:
> On Mon, Aug 17, 2015 at 03:36:17PM -0700, sfeldma@...il.com wrote:
>> From: Scott Feldman <sfeldma@...il.com>
>>
>> > tree /sys/kernel/debug/rocker
>> /sys/kernel/debug/rocker
>> ????????? 5254001235010000
>>     ????????? fdb_tbl
>>     ????????? internal_vlan_tbl
>>     ????????? neigh_tbl
>>     ????????? of_dpa_flow_tbl
>>     ????????? of_dpa_group_tbl
>>
>> 1 directory, 5 files
>>
>> > cat /sys/kernel/debug/rocker/5254001235010000/internal_vlan_tbl
>> ifindex 5 ref_count 1 vlan 3843
>> ifindex 7 ref_count 2 vlan 3840
>> ifindex 4 ref_count 1 vlan 3842
>>
>> > cat /sys/kernel/debug/rocker/5254001235010000/fdb_tbl
>> learned 1 pport 1 addr 00:02:00:00:02:00 vlan 3840
>> learned 1 pport 2 addr 00:02:00:00:03:00 vlan 3840
>>
>> > cat /sys/kernel/debug/rocker/5254001235010000/neigh_tbl
>> 11.0.0.9 dev sw1p2 ref_count 3 index 1 dst 00:02:00:00:01:00 ttl_check 1
>> 11.0.0.1 dev sw1p1 ref_count 3 index 0 dst 00:02:00:00:00:00 ttl_check 1
>
> Hi Scott
>
> David is not so keen no debugfs stuff. He already NACKed adding more
> than what is currently in DSA:
>
> https://lkml.org/lkml/2015/7/11/8

That patch added writable debugfs files, which I can see might be used
as a back-door to program hardware.  That does seem bad.

> I think the key thing from David's message is:
>
>> Fetching information should be done by well typed, generic,
>> interfaces that apply to any similar device or object.
>
> So rather than splattering rocker stuff in debugfs, we should really
> be thinking about an interface which works well for both Rocker and
> DSA, i.e. generic, and keeps David happy by being typed.
>
> No idea what that actually is, not thought about it yet.

Rocker debugfs files are read-only and dump internal tables that are
very specific to the (rocker) device.  I don't see how these could be
generic as each device/driver will have it's own unique data
structures.

I'm OK with not including debugfs in rocker even for these read-only
files, but I find them very useful during development/debugging, and I
could see their value in troubleshooting issues with others using
rocker.

Writable debugfs files is another story.

-scott
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ