Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752270AbdLLTML (ORCPT ); Tue, 12 Dec 2017 14:12:11 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:35438 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751554AbdLLTMJ (ORCPT ); Tue, 12 Dec 2017 14:12:09 -0500 X-Google-Smtp-Source: ACJfBos9H/frxKqjlipqATN3JgHzMzQCYzRiFhX4PEvf3Nf/AowMWqSAL5WYHbgIpnpt4gJsMI41sQ== Subject: Re: [BISECTED] tpm CLKRUN breaks PS/2 keyboard and touchpad on Braswell system To: Jason Gunthorpe Cc: James Ettle , linux-integrity@vger.kernel.org, azhar.shaikh@intel.com, jarkko.sakkinen@linux.intel.com, linux-kernel@vger.kernel.org, james.l.morris@oracle.com References: <57d96314-cc9c-0656-186e-4eb77a132b70@ettle.org.uk> <34b361bf-cce7-a1ac-f8a3-76ef22f5b6b0@redhat.com> <20171212185730.GC16603@ziepe.ca> From: Javier Martinez Canillas Message-ID: Date: Tue, 12 Dec 2017 20:12:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171212185730.GC16603@ziepe.ca> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1434 Lines: 40 Hello Jason, On 12/12/2017 07:57 PM, Jason Gunthorpe wrote: > On Tue, Dec 12, 2017 at 12:38:00PM +0100, Javier Martinez Canillas wrote: > >> I'm not familiar with LPC so please let me know if my assumptions are wrong, >> but I find suspicious that a driver for a single device attached to the bus >> can control the CLKRUN# signal which AFAIU may be needed for other devices. > > My understanding was that the fix was to force CLKRUN on before > starting a LPC transaction for TPM. > Yes, I got that part from the commit message and the thread when was posted. > I guess the issues is blindly assuming that CLKRUN started out as off. > It needs to remember the old setting and put it back, and hope against > all hope there isn't another thread mucking with it. > This is the part that worries me, and it seems that assumption was wrong due the reported issues with other PS/2 devices attached to the LPC bus. > Guessing that on a system with a LPC connected superio controller for > PS/2 that CLKRUN will be always high??? > I'm not really familiar with the LPC bus trasmision protocol to comment on this. But if different devices rely on the CLKRUN state, then as you said it needs to remember the old setting and also some synchronization mechanism should be used to serialize access to it and prevent a race? > Jason > Best regards, -- Javier Martinez Canillas Software Engineer - Desktop Hardware Enablement Red Hat