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:   Wed, 18 Apr 2018 13:09:47 +0800
From:   Chris Ruehl <chris.ruehl@...ys.com.hk>
To:     f.fainelli@...il.com, netdev@...r.kernel.org
Subject: Re: [Regression] net/phy/micrel.c v4.9.94

On Wednesday, April 18, 2018 09:34 AM, Chris Ruehl wrote:
> Hello,
> 
> I like to get your heads up at a regression introduced in 4.9.94
> commitment lead to a kernel ops and make the network unusable on my MX6DL 
> customized board.
> 
> Race condition resume is called on startup and the phy not yet initialized.
> 
> [    7.313366] Unable to handle kernel NULL pointer dereference at virtual 
> address 00000008
> [    7.321602] pgd = ecfc0000
> 
> [    7.324950] [00000008] *pgd=8e901831
> 
> [    7.328652] Internal error: Oops: 17 [#1] PREEMPT SMP ARM
> 
> [    7.334061] Modules linked in:
> 
> [    7.337146] CPU: 0 PID: 269 Comm: ip Not tainted 4.9.94 #11
> 
> [    7.342725] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
> 
> [    7.349259] task: ece59900 task.stack: ec9ea000
> 
> [    7.353809] PC is at kszphy_config_reset+0x14/0x148
> 
> [    7.358703] LR is at kszphy_resume+0x1c/0x6c
> 
> [    7.362983] pc : [<c056a24c>]    lr : [<c056a4fc>]    psr: 60030013
> 
> [    7.362983] sp : ec9eb918  ip : ec9eb938  fp : ec9eb934
> 
> [    7.374467] r10: 00000007  r9 : 00000000  r8 : ee693c00
> 
> [    7.379700] r7 : 00000000  r6 : 00000000  r5 : 00000000  r4 : ee6fc000
> 
> [    7.386234] r3 : 00000001  r2 : 00000000  r1 : 00000110  r0 : ee6fc000
> 
> [    7.392768] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
> 
> [    7.399911] Control: 10c5387d  Table: 3cfc004a  DAC: 00000051
> 
> [    7.405663] Process ip (pid: 269, stack limit = 0xec9ea210)
> 
> [    7.411244] Stack: (0xec9eb918 to 0xec9ec000)
> 
> [    7.415611] b900: ee6fc000 00000000
> [    7.423800] b920: ee031000 00000000 ec9eb94c ec9eb938 c056a4fc c056a244 
> ee6fc000 00000000
> [    7.431988] b940: ec9eb97c ec9eb950 c05681e4 c056a4ec 00000007 ee6fc000 
> ee6fc000 c056ce7c
> [    7.440174] b960: c056ce7c ee031000 ee55c818 00000000 ec9eb99c ec9eb980 
> c05683cc c0568134
> [    7.448364] b980: 00000007 ec9eba10 ee6fc000 00000007 ec9eb9c4 ec9eb9a0 
> c0568450 c05683bc
> [    7.456550] b9a0: 00000007 00000005 ee031000 ec9eb9d3 00000200 c1508da4 
> ec9eba6c ec9eb9c8
> [    7.464736] b9c0: c056ce24 c0568410 00000005 ee03162c 32000001 30383831 
> 652e3030 72656874
> [    7.472921] b9e0: 2d74656e 00000031 000003e8 000000c8 c01732ec c0172adc 
> 000003e8 000000c8
> [    7.481109] ba00: 024000c0 ee55c000 c150e454 024000c0 38383132 2e303030 
> 65687465 74656e72
> [    7.489296] ba20: 303a312d ee000035 ec9eba6c ec9eba38 c0224b50 c0175eb8 
> ec9eba6c c056eb44
> [    7.497482] ba40: c056bbe0 f0c16000 ee031000 ee55c000 00000200 f0c16000 
> ee031000 ee55c000
> [    7.505667] ba60: ec9ebaa4 ec9eba70 c056eba4 c056cd1c 00000001 ee03162c 
> ec9ebaa4 ee031000
> [    7.513855] ba80: 00000000 c09566ec ee031030 00000000 ec9ccd10 ecb39900 
> ec9ebacc ec9ebaa8
> [    7.522043] baa0: c06ad6e0 c056e92c ec9ebacc ee031000 ee031000 00000001 
> 00001003 00001002
> [    7.530229] bac0: ec9ebaf4 ec9ebad0 c06ad99c c06ad63c 00001002 ee031000 
> ee031148 00001002
> [    7.538414] bae0: 00000000 00000000 ec9ebb1c ec9ebaf8 c06ada6c c06ad90c 
> 00001002 00000000
> [    7.546601] bb00: ee031000 ec9ebc28 00000000 c09566ec ec9ebb94 ec9ebb20 
> c06c1034 c06ada58
> [    7.554787] bb20: c0c50df8 2e184000 ec9ebb44 ec9ebb38 c0173528 c0173320 
> ec9ebbd4 c0e82b6c
> [    7.562972] bb40: 00000000 ece59dc8 ebb4e9d0 c9eae3f3 ece59900 00000003 
> ece59900 0000005e
> [    7.571157] bb60: c14e30ec c0d1e51c ece59900 00000000 ee031000 ec9ccd00 
> 00000000 00000000
> [    7.579346] bb80: ec9ebb98 00000000 ec9ebd04 ec9ebb98 c06c30cc c06c0d68 
> ec9ebbc4 00000000
> [    7.587531] bba0: c01758bc ecb39900 c09eb3a0 ec9ccd20 00000000 ec9ccd10 
> 00000001 ece59900
> [    7.595715] bbc0: c01e0e64 00000000 00000000 00000001 ec9ebbfc 00000000 
> 00000000 00000000
> [    7.603900] bbe0: 00000000 00000000 00000000 ffffff00 ec9ebc0c ec9ebc00 
> c0173528 c0173320
> [    7.612084] bc00: ec9ebc9c ec9ebc10 c01e0e64 c0173520 00000000 0000000e 
> ece59900 00000096
> [    7.620269] bc20: c14e30ec c0d1e51c 00000000 00000000 00000000 00000000 
> 00000000 00000000
> [    7.628452] bc40: 00000000 00000000 00000000 00000000 00000000 00000000 
> 00000000 00000000
> [    7.636636] bc60: 00000000 00000000 00000000 00000000 00000000 00000000 
> 00000000 00000000
> [    7.644819] bc80: 00000000 00000000 00000000 00000000 00000000 00000000 
> 00000000 00000000
> [    7.653003] bca0: 00000000 00000000 00000000 00000000 00000000 00000000 
> 00000000 00000000
> [    7.661186] bcc0: 00000000 00000000 00000000 00000000 00000000 00000000 
> c06d3870 00000000
> [    7.669372] bce0: ec9ccd00 ecb39900 c15226e4 00000000 00000000 ecb39900 
> ec9ebd44 ec9ebd08
> [    7.677556] bd00: c06c343c c06c2bdc c0869c2c c0173520 00000001 00000000 
> c06c06e4 00000000
> [    7.685741] bd20: 00000000 ec9ccd00 c06c32b8 ecb39900 ecb39900 00000000 
> ec9ebd64 ec9ebd48
> [    7.693926] bd40: c06d86cc c06c32c4 00000000 ecb39900 00000020 ec970400 
> ec9ebd7c ec9ebd68
> [    7.702110] bd60: c06c06f4 c06d8630 c06c06c4 ee15f400 ec9ebdac ec9ebd80 
> c06d802c c06c06d0
> [    7.710294] bd80: ec9ebf50 7fffffff ec970400 ec9ebf48 ec970400 00000000 
> 00000020 00000000
> [    7.718477] bda0: ec9ebe0c ec9ebdb0 c06d84e8 c06d7ec8 0000000c ec9ebe48 
> 0000000c 00000000
> [    7.726661] bdc0: beee97bc 00000008 00000000 ee0cbd80 00000000 0000010d 
> 00000000 00000000
> [    7.734845] bde0: ec9ebe24 ec9ebf48 00000000 eda478c0 00000128 00000000 
> 00000000 ec9ebe28
> [    7.743029] be00: ec9ebe1c ec9ebe10 c068b124 c06d8180 ec9ebf34 ec9ebe20 
> c068bcac c068b114
> [    7.751213] be20: ec9ebe8c 00000000 c01759cc c01704b0 ec9ebea4 ec9ebe40 
> c0209960 c01187ac
> [    7.759396] be40: 00000000 00000000 beeed828 00000020 00000000 00000000 
> 600f0113 ec98ce70
> [    7.767580] be60: beee9000 ed7ac714 ece59900 ed7ac6c0 00000817 beee977c 
> ed7ac714 00000055
> [    7.775764] be80: ec9ebea4 ec9ebe90 00000010 00000000 00000000 ec9ebfb0 
> ec9ebefc ec9ebea8
> [    7.783948] bea0: c0115b74 c016ec18 00000000 c0d55a61 c025e178 ffffffea 
> ee022f10 00000000
> [    7.792131] bec0: 00000000 00000000 00000800 00000000 c025ddc0 c0d0a44c 
> 00000817 c0115990
> [    7.800315] bee0: beee977c ec9ebfb0 00054694 beeedec0 ec9ebfac ec9ebf00 
> c0101368 c011599c
> [    7.808500] bf00: ec9ebf1c ec9ebf10 c025a578 eda478c0 00000000 beee97a4 
> 00000128 c0107ee4
> [    7.816685] bf20: ec9ea000 00000000 ec9ebf94 ec9ebf38 c068ca54 c068bad4 
> 00000000 00000000
> [    7.824868] bf40: 00000000 fffffff7 ec9ebe88 0000000c 00000001 00000000 
> 00000000 ec9ebe50
> [    7.833052] bf60: 00000000 00000001 00000000 00000000 00000000 00000000 
> ec9ebf94 0000000c
> [    7.841235] bf80: 00000010 beee9790 ec9ebfa4 ec9ebf98 c068ca94 c068ca18 
> 00000000 ec9ebfa8
> [    7.849419] bfa0: c0107d20 c068ca90 0000000c 00000010 00000003 beee97a4 
> 00000000 00000005
> [    7.857604] bfc0: 0000000c 00000010 beee9790 00000128 00000000 00054694 
> beee97a4 beee97c0
> [    7.865789] bfe0: 00000000 beee9774 00034d1d b6eaaf16 400f0030 00000003 
> 3fffd861 3fffdc61
> [    7.873968] Backtrace:
> 
> [    7.876450] [<c056a238>] (kszphy_config_reset) from [<c056a4fc>] 
> (kszphy_resume+0x1c/0x6c)
> [    7.884723]  r7:00000000 r6:ee031000 r5:00000000 r4:ee6fc000
> 
> [    7.890392] [<c056a4e0>] (kszphy_resume) from [<c05681e4>] 
> (phy_attach_direct+0xbc/0x1bc)
> [    7.898575]  r5:00000000 r4:ee6fc000
> 
> [    7.902158] [<c0568128>] (phy_attach_direct) from [<c05683cc>] 
> (phy_connect_direct+0x1c/0x54)
> [    7.910691]  r10:00000000 r9:ee55c818 r8:ee031000 r7:c056ce7c r6:c056ce7c 
> r5:ee6fc000
> [    7.918525]  r4:ee6fc000 r3:00000007
> 
> [    7.922108] [<c05683b0>] (phy_connect_direct) from [<c0568450>] 
> (phy_connect+0x4c/0x80)
> [    7.930117]  r6:00000007 r5:ee6fc000 r4:ec9eba10 r3:00000007
> 
> [    7.935785] [<c0568404>] (phy_connect) from [<c056ce24>] 
> (fec_enet_mii_probe+0x114/0x16c)
> [    7.943969]  r8:c1508da4 r7:00000200 r6:ec9eb9d3 r5:ee031000 r4:00000005 
> r3:00000007
> [    7.951720] [<c056cd10>] (fec_enet_mii_probe) from [<c056eba4>] 
> (fec_enet_open+0x284/0x320)
> [    7.960076]  r6:ee55c000 r5:ee031000 r4:f0c16000
> 
> [    7.964704] [<c056e920>] (fec_enet_open) from [<c06ad6e0>] 
> (__dev_open+0xb0/0x114)
> [    7.972281]  r10:ecb39900 r9:ec9ccd10 r8:00000000 r7:ee031030 r6:c09566ec 
> r5:00000000
> [    7.980113]  r4:ee031000
> 
> [    7.982655] [<c06ad630>] (__dev_open) from [<c06ad99c>] 
> (__dev_change_flags+0x9c/0x14c)
> [    7.990665]  r7:00001002 r6:00001003 r5:00000001 r4:ee031000
> 
> [    7.996333] [<c06ad900>] (__dev_change_flags) from [<c06ada6c>] 
> (dev_change_flags+0x20/0x50)
> [    8.004777]  r8:00000000 r7:00000000 r6:00001002 r5:ee031148 r4:ee031000 
> r3:00001002
> [    8.012533] [<c06ada4c>] (dev_change_flags) from [<c06c1034>] 
> (do_setlink+0x2d8/0x838)
> [    8.020456]  r8:c09566ec r7:00000000 r6:ec9ebc28 r5:ee031000 r4:00000000 
> r3:00001002
> [    8.028207] [<c06c0d5c>] (do_setlink) from [<c06c30cc>] 
> (rtnl_newlink+0x4fc/0x6e8)
> [    8.035784]  r10:00000000 r9:ec9ebb98 r8:00000000 r7:00000000 r6:ec9ccd00 
> r5:ee031000
> [    8.043616]  r4:00000000
> 
> [    8.046159] [<c06c2bd0>] (rtnl_newlink) from [<c06c343c>] 
> (rtnetlink_rcv_msg+0x184/0x234)
> [    8.054343]  r10:ecb39900 r9:00000000 r8:00000000 r7:c15226e4 r6:ecb39900 
> r5:ec9ccd00
> [    8.062175]  r4:00000000
> 
> [    8.064720] [<c06c32b8>] (rtnetlink_rcv_msg) from [<c06d86cc>] 
> (netlink_rcv_skb+0xa8/0xc4)
> [    8.072990]  r8:00000000 r7:ecb39900 r6:ecb39900 r5:c06c32b8 r4:ec9ccd00
> [    8.079701] [<c06d8624>] (netlink_rcv_skb) from [<c06c06f4>] 
> (rtnetlink_rcv+0x30/0x38)
> [    8.087622]  r6:ec970400 r5:00000020 r4:ecb39900 r3:00000000
> [    8.093291] [<c06c06c4>] (rtnetlink_rcv) from [<c06d802c>] 
> (netlink_unicast+0x170/0x1f8)
> [    8.101384]  r4:ee15f400 r3:c06c06c4
> [    8.104968] [<c06d7ebc>] (netlink_unicast) from [<c06d84e8>] 
> (netlink_sendmsg+0x374/0x388)
> [    8.113238]  r8:00000000 r7:00000020 r6:00000000 r5:ec970400 r4:ec9ebf48
> [    8.119952] [<c06d8174>] (netlink_sendmsg) from [<c068b124>] 
> (sock_sendmsg+0x1c/0x2c)
> [    8.127789]  r10:ec9ebe28 r9:00000000 r8:00000000 r7:00000128 r6:eda478c0 
> r5:00000000
> [    8.135621]  r4:ec9ebf48
> [    8.138167] [<c068b108>] (sock_sendmsg) from [<c068bcac>] 
> (___sys_sendmsg+0x1e4/0x20c)
> [    8.146095] [<c068bac8>] (___sys_sendmsg) from [<c068ca54>] 
> (__sys_sendmsg+0x48/0x78)
> [    8.153932]  r10:00000000 r9:ec9ea000 r8:c0107ee4 r7:00000128 r6:beee97a4 
> r5:00000000
> [    8.161764]  r4:eda478c0
> [    8.164304] [<c068ca0c>] (__sys_sendmsg) from [<c068ca94>] 
> (SyS_sendmsg+0x10/0x14)
> [    8.171880]  r6:beee9790 r5:00000010 r4:0000000c
> [    8.176510] [<c068ca84>] (SyS_sendmsg) from [<c0107d20>] 
> (ret_fast_syscall+0x0/0x1c)
> [    8.184261] Code: e92dd8f0 e24cb004 e590628c e1a04000 (e5d63008)
> [    8.192713] ---[ end trace 07c02ee14784bc48 ]---
> 
> Kind regards
> Chris
> 
> 

If I look at the patch I think it should call kszphy_config_init() not _reset()
in the resume function:


@@ -715,8 +723,14 @@ static int kszphy_suspend(struct phy_device *phydev)

  static int kszphy_resume(struct phy_device *phydev)
  {
+	int ret;
+
  	genphy_resume(phydev);

-	ret = kszphy_config_reset(phydev);
+       ret = kszphy_config_init(phydev);
+	if (ret)
+		return ret;
+

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ