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:	Mon, 2 Oct 2006 09:18:53 -0600
From:	Matthew Wilcox <matthew@....cx>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
Cc:	chas3@...rs.sourceforge.net, Jeff Garzik <jeff@...zik.org>,
	Andrew Morton <akpm@...l.org>,
	LKML <linux-kernel@...r.kernel.org>, netdev@...r.kernel.org,
	kkeil@...e.de, kai.germaschewski@....de,
	isdn4linux@...tserv.isdn4linux.de, mac@...ware.de,
	markus.lidel@...dowconnect.com, samuel@...tiz.org,
	Neela.Kolli@...enio.com, linux-scsi@...r.kernel.org,
	Greg KH <greg@...ah.com>, thomas@...ischhofer.net, ak@...e.de
Subject: Re: [PATCH] Introduce BROKEN_ON_64BIT facility

On Mon, Oct 02, 2006 at 04:12:35PM +0100, Alan Cox wrote:
> @@ -1423,14 +1418,15 @@
>  		printk(KERN_ERR DEV_LABEL "can't allocate DLEs\n");
>  		goto err_out;
>  	}
> -	iadev->rx_dle_q.start = (struct dle*)dle_addr;  
> +	iadev->rx_dle_q.start = (struct dle *)dle_addr;
>  	iadev->rx_dle_q.read = iadev->rx_dle_q.start;  
>  	iadev->rx_dle_q.write = iadev->rx_dle_q.start;  
> -	iadev->rx_dle_q.end = (struct dle*)((u32)dle_addr+sizeof(struct dle)*DLE_ENTRIES);  
> +	iadev->rx_dle_q.end = (struct dle*)((unsigned long)dle_addr+sizeof(struct dle)*DLE_ENTRIES);
>  	/* the end of the dle q points to the entry after the last  
>  	DLE that can be used. */  

dle_addr is a bit strange.  How about:

+++ b/drivers/atm/iphase.c
@@ -1404,7 +1404,7 @@ static int rx_init(struct atm_dev *dev) 
        IADEV *iadev;  
        struct rx_buf_desc __iomem *buf_desc_ptr;  
        unsigned long rx_pkt_start = 0;  
-       void *dle_addr;  
+       struct dle *dle_addr;  
        struct abr_vc_table  *abr_vc_table; 
        u16 *vc_table;  
        u16 *reass_table;  
@@ -1423,10 +1423,10 @@ static int rx_init(struct atm_dev *dev) 
                printk(KERN_ERR DEV_LABEL "can't allocate DLEs\n");
                goto err_out;
        }
-       iadev->rx_dle_q.start = (struct dle*)dle_addr;  
+       iadev->rx_dle_q.start = dle_addr;  
        iadev->rx_dle_q.read = iadev->rx_dle_q.start;  
        iadev->rx_dle_q.write = iadev->rx_dle_q.start;  
-       iadev->rx_dle_q.end = (struct dle*)((u32)dle_addr+sizeof(struct dle)*DLE
_ENTRIES);  
+       iadev->rx_dle_q.end = dle_addr + DLE_ENTRIES;
        /* the end of the dle q points to the entry after the last  
        DLE that can be used. */  
   
@@ -1884,7 +1884,7 @@ static int tx_init(struct atm_dev *dev) 
        IADEV *iadev;  
        struct tx_buf_desc *buf_desc_ptr;
        unsigned int tx_pkt_start;  
-       void *dle_addr;  
+       struct dle *dle_addr;  
        int i;  
        u_short tcq_st_adr;  
        u_short *tcq_start;  
@@ -1908,10 +1908,10 @@ static int tx_init(struct atm_dev *dev) 
                printk(KERN_ERR DEV_LABEL "can't allocate DLEs\n");
                goto err_out;
        }
-       iadev->tx_dle_q.start = (struct dle*)dle_addr;  
+       iadev->tx_dle_q.start = dle_addr;  
        iadev->tx_dle_q.read = iadev->tx_dle_q.start;  
        iadev->tx_dle_q.write = iadev->tx_dle_q.start;  
-       iadev->tx_dle_q.end = (struct dle*)((u32)dle_addr+sizeof(struct dle)*DLE
_ENTRIES);  
+       iadev->tx_dle_q.end = dle_addr + DLE_ENTRIES;
 
        /* write the upper 20 bits of the start address to tx list address regis
ter */  
        writel(iadev->tx_dle_dma & 0xfffff000,

(whitespace damaged; more for comment than for application).

> -        if ((u32)skb->data & 3) {
> +        if ((unsigned long)skb->data & 3) {

I suppose it quietens a compiler warning.  Doesn't actually fix a bug
though.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ