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: <20140720211759.GA28467@mikrodark.usersys.redhat.com>
Date:	Sun, 20 Jul 2014 23:17:59 +0200
From:	Veaceslav Falico <vfalico@...il.com>
To:	Yuval Mintz <Yuval.Mintz@...gic.com>
Cc:	netdev <netdev@...r.kernel.org>,
	David Miller <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Vlad Yasevich <vyasevic@...hat.com>,
	stephen hemminger <stephen@...workplumber.org>,
	Jerry Chu <hkchu@...gle.com>,
	Ben Hutchings <bhutchings@...arflare.com>,
	David Laight <David.Laight@...LAB.COM>
Subject: Re: [PATCH net-next] net: print a notification on device rename

On Sun, Jul 20, 2014 at 12:37:52PM +0000, Yuval Mintz wrote:
>> Currently it's done silently (from the kernel part), and thus it might be hard to
>> track the renames from logs.
>>
>> Add a simple netdev_info() to notify the rename, but only in case the previous
>> name was valid.
>
>Hi,
>
>Why you're at it, perhaps we could also consider adding an optional ndo callback
>in the drivers to notify them of the device name change?
>[e.g., multi-module dependencies where one would wish to inform the others
>of the name change]

There's already one, I think:

1142         ret = call_netdevice_notifiers(NETDEV_CHANGENAME, dev);

It's also possible to block it. Or did you mean something else?

Thank you!

>
>Cheers,
>Yuval
>
>>
>> CC: "David S. Miller" <davem@...emloft.net>
>> CC: Eric Dumazet <edumazet@...gle.com>
>> CC: Vlad Yasevich <vyasevic@...hat.com>
>> CC: stephen hemminger <stephen@...workplumber.org>
>> CC: Jerry Chu <hkchu@...gle.com>
>> CC: Ben Hutchings <bhutchings@...arflare.com>
>> CC: David Laight <David.Laight@...LAB.COM>
>> Signed-off-by: Veaceslav Falico <vfalico@...il.com>
>> ---
>>  net/core/dev.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/net/core/dev.c b/net/core/dev.c index 239722a..d14ebf0 100644
>> --- a/net/core/dev.c
>> +++ b/net/core/dev.c
>> @@ -1113,6 +1113,9 @@ int dev_change_name(struct net_device *dev, const
>> char *newname)
>>               return err;
>>       }
>>
>> +     if (oldname[0] && !strchr(oldname, '%'))
>> +             netdev_info(dev, "renamed from %s\n", oldname);
>> +
>>       old_assign_type = dev->name_assign_type;
>>       dev->name_assign_type = NET_NAME_RENAMED;
>>
>
>________________________________
>
>This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.
--
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