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: <20080623192918.GB6989@il.ibm.com>
Date:	Mon, 23 Jun 2008 22:29:19 +0300
From:	Muli Ben-Yehuda <muli@...ibm.com>
To:	Chandru <chandru@...ibm.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, Alexis Bruemmer <alexisb@...ibm.com>
Subject: Re: [RFC] [Patch] calgary iommu: Use the first kernel's tce tables
	in kdump

On Sat, Jun 21, 2008 at 05:41:43PM +0530, Chandru wrote:

> kdump kernel fails to boot with calgary iommu and aacraid driver on
> a x366 box. The ongoing dma's of aacraid from the first kernel
> continue to exist until the driver is loaded in the kdump
> kernel. Calgary is initialized prior to aacraid and creation of new
> tce tables causes wrong dma's to occur. Here we try to get the tce
> tables of the first kernel in kdump kernel and use them. While in
> the kdump kernel we do not allocate new tce tables but instead read
> the base address register contents of calgary iommu and use the
> tables that the registers point to. With these changes the kdump
> kernel and hence aacraid now boots normally.
> 
> Signed-off-by: Chandru Siddalingappa <chandru@...ibm.com>

Hi Chandru,

I am not a big fan of this patch, but I guess it would do as a
stop-gap measure. However it is not appropriate for 2.6.26 and should
go in at the beginning of the 2.6.27 merge window. Also, minor
comments below.

> @@ -1206,9 +1213,14 @@ static int __init calgary_init(void)
>  	struct calgary_bus_info *info;
>  
>  	ret = calgary_locate_bbars();
> +

unneeded whitespace

> @@ -1256,6 +1268,24 @@ error:
>  	return ret;
>  }
>  
> +
> +/*
> + * calgary_init_bitmap_from_tce_table():
> + * Funtion for kdump case. In the second/kdump kernel initialize
> + * the bitmap based on the tce table entries obtained from first kernel
> + */
> +static void calgary_init_bitmap_from_tce_table(struct iommu_table *tbl)
> +{
> +	u64 *tp;
> +	unsigned int index;
> +	tp = ((u64 *)tbl->it_base);
> +	for (index = 0 ; index < tbl->it_size; index++) {
> +	if (*tp != 0x0)
> +		set_bit(index, tbl->it_map);
> +		tp++;
> +	}

I think the code is correct, but the indentation is misleading. Please
fix.

> +}
> +
>  static inline int __init determine_tce_table_size(u64 ram)
>  {
>  	int ret;
> @@ -1318,6 +1348,8 @@ static int __init build_detail_arrays(vo
>  	return 0;
>  }
>  
> +
> +

unneeded whitespace.

Cheers,
Muli
--
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