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: <50939243.7080507@asianux.com>
Date:	Fri, 02 Nov 2012 17:28:35 +0800
From:	Chen Gang <gang.chen@...anux.com>
To:	Eric Dumazet <eric.dumazet@...il.com>,
	netdev <netdev@...r.kernel.org>
Subject: [PATCH] net-ipv6: change %8s to %s for rt->dst.dev->name in seq_printf
 of rt6_info_route

Hello Eric Dumazet:

1) This time (the first time):
   A) I have done according to what you have suggested.
      i)   git clone git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git
      ii)  format with `git format-patch -s --summary --stat`
      iii) cc to netdev@...r.kernel.org (not to linux-kernle@...r.kernel.org)  
   B) please check the 'Main Contents' (below of this mail).
   C) thank you for your original information again, they are truly useful for me.

2) Next time (if also for net/ipv6):
   A) I will send mail according to MAINTAINERS (which also you suggested)
      M:      "David S. Miller" <davem@...emloft.net>
      M:      Alexey Kuznetsov <kuznet@....inr.ac.ru>
      M:      James Morris <jmorris@...ei.org>
      M:      Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>
      M:      Patrick McHardy <kaber@...sh.net>
      L:      netdev@...r.kernel.org
      T:      git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git
   B) Only have 'Main Content' in next time.


Main Contents:
-----------------------------------------------------------------------------------
From: Chen Gang <gang.chen@...anux.com>
Date: Fri, 2 Nov 2012 16:02:11 +0800
Subject: [PATCH] net-ipv6: change %8s to %s for rt->dst.dev->name in seq_printf of rt6_info_route

  the length of rt->dst.dev->name is 16 (IFNAMSIZ)
  in seq_printf, it is not suitable to use %8s for rt->dst.dev->name.
  so change it to %s, since each line has not been solid any more.

  additional information:

    %8s  limit the width, not for the original string output length
         if name length is more than 8, it still can be fully displayed.
         if name length is less than 8, the ' ' will be filled before name.

    %.8s truly limit the original string output length (precision)


Signed-off-by: Chen Gang <gang.chen@...anux.com>
---
 net/ipv6/route.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index c42650c..b60bc52 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2835,7 +2835,7 @@ static int rt6_info_route(struct rt6_info *rt, void *p_arg)
        } else {
                seq_puts(m, "00000000000000000000000000000000");
        }
-       seq_printf(m, " %08x %08x %08x %08x %8s\n",
+       seq_printf(m, " %08x %08x %08x %08x %s\n",
                   rt->rt6i_metric, atomic_read(&rt->dst.__refcnt),
                   rt->dst.__use, rt->rt6i_flags,
                   rt->dst.dev ? rt->dst.dev->name : "");
-- 
1.7.9.5




-- 
Chen Gang

Asianux Corporation


--
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