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: <8F7AF80515AF0D4D93307E594F3CB40E4CA563BC@dlee03.ent.ti.com>
Date:	Thu, 1 Jul 2010 12:16:38 -0500
From:	"Kanigeri, Hari" <h-kanigeri2@...com>
To:	"Guzman Lugo, Fernando" <fernando.lugo@...com>,
	"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:	"ohad@...ery.com" <ohad@...ery.com>,
	"hiroshi.doyo@...ia.com" <hiroshi.doyo@...ia.com>,
	"ameya.palande@...ia.com" <ameya.palande@...ia.com>,
	"felipe.contreras@...ia.com" <felipe.contreras@...ia.com>,
	"Guzman Lugo, Fernando" <fernando.lugo@...com>
Subject: RE: [PATCHv3 5/9] dspbridge: add mmufault support

Hi Fernando,

> +int mmu_fault_isr(struct iommu *mmu)
> 
> -/*
> - *  ======== mmu_check_if_fault =======
> - *      Check to see if MMU Fault is valid TLB miss from DSP
> - *  Note: This function is called from an ISR
> - */
> -static bool mmu_check_if_fault(struct bridge_dev_context *dev_context)
>  {
> +	struct deh_mgr *dm;
> +	u32 da;
> +
> +	dev_get_deh_mgr(dev_get_first(), &dm);
> +
> +	if (!dm)
> +		return -EPERM;
> +
> +	da = iommu_read_reg(mmu, MMU_FAULT_AD);
> +	iommu_write_reg(mmu, 0, MMU_IRQENABLE);

-- Isn't the MMU already enabled at this point when the function callback is called by iommu ?

> +	dm->err_info.dw_val1 = da;
> +	tasklet_schedule(&dm->dpc_tasklet);

-- The iommu fault isr disables the IOMMU at the end of the fault handler, so by the time your tasklet is scheduled you might have the MMU in a disabled state. Looks to me either this requires change in iommu to remove the disable part or enable the MMU in the tasklet instead of doing it early in mmu_fault_isr.

Thank you,
Best regards,
Hari
--
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