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: <20130204.210826.189711339365165792.davem@davemloft.net>
Date:	Mon, 04 Feb 2013 21:08:26 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	paul.gortmaker@...driver.com
Cc:	netdev@...r.kernel.org, claudiu.manoil@...escale.com
Subject: Re: [PATCH net-next] gianfar: dont conditionally alloc Rx/Err irq
 structs

From: Paul Gortmaker <paul.gortmaker@...driver.com>
Date: Mon,  4 Feb 2013 14:49:42 -0500

> Commit ee873fda3bec7c668407b837fc5519eb961fcd37
> 
>     "gianfar: Pack struct gfar_priv_grp into three cachelines"
> 
> causes the following null dereference at driver init on sbc8548:
> 
>    libphy: Freescale PowerQUICC MII Bus: probed
>    Unable to handle kernel paging request for data at address 0x00000000
>    Faulting instruction address: 0xc01d6a38
>    Oops: Kernel access of bad area, sig: 11 [#1]
>    [...]
>    NIP [c01d6a38] gfar_parse_group+0x228/0x280
>    LR [c01d6a34] gfar_parse_group+0x224/0x280
>    Call Trace:
>    [ef82dd60] [c01d6a34] gfar_parse_group+0x224/0x280 (unreliable)
>    [ef82dd90] [c01d73a4] gfar_probe+0x284/0xfe0
> 
> The reason is that the commit also changed the allocation of the
> Rx and error handling irq structs to be skipped for !MQ_MG_MODE.
> In the !MQ_MG_MODE case, only the Tx irq struct is allocated.
> 
> Digging further, we see that MQ_MG_MODE is set only if we find
> the OF compatible string "fsl,etsec2".
> 
> A quick grep in the dts directory shows lots of boards that support
> Rx/Tx/Err, but without this specific compat string.  And hence they
> go after the unallocated Rx/Error structs and cause the above oops.
> 
> Hence such a change can not be deployed until all the dts files
> are updated and sufficiently deployed.  Further, the optimization
> is of limited value, since the kmalloc'd struct in question has only
> a single unsigned int, and an (IFNAMSIZ + 6) sized string.
> 
> Note that no changes to the freeing code are needed here, as it
> already did an unconditional free of Rx/Tx/Error gfar_irqinfo.
> 
> Cc: Claudiu Manoil <claudiu.manoil@...escale.com>
> Signed-off-by: Paul Gortmaker <paul.gortmaker@...driver.com>

Applied, thanks Paul.
--
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