Received: by 10.192.165.148 with SMTP id m20csp5267670imm; Tue, 1 May 2018 11:57:01 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoOxWVqC39C1Ep98JE0mcT6+dLL8v01yrsL0jjV1gqqVGmS1SMWitUJEdcKCzfaItIGNN+6 X-Received: by 10.98.166.92 with SMTP id t89mr16728297pfe.27.1525201021133; Tue, 01 May 2018 11:57:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525201021; cv=none; d=google.com; s=arc-20160816; b=GUDy5G8iAqvuqJm6RQjS48VpTBy9XYkXhGwM4tPD16mmHlFJZXz6PQh/mi11PPNPLk IGGxXlpLZXbFF1WYZ/M91Yn8M4QckX8DzvnUFF82/n7zlIpse2kM5W6/qaUbAuwrLVhe Hz1KA8u5guXbeP0n0+F71ljoLxIZfK3Cy6c1nM6JIZfzQgKVKjKyBsEWxARwfVTTS/pj BGiGJ6N9PwyWr9sTJg4DU9j/DDFFuzcMgMj9z/AF22C3FsARpLTtdCYd20t9TnZoFdpl +brQOLPJyNMNDypd4xCibRRcFLJi7pnU0T0YNMEWgd+GiptC/oPxeyY5dmif0MuhKi1l WYag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=xyxkSA8YDHfbMH28YgUznhWEmc0mLpKE023agTai1Uk=; b=Bq8g46k/U7/k8U+sBfo0ru5/PyYnTv8ii+wrpwR0+Lcjui+Z+ZPlxz/kXNPZDHxo7p Wn10rPQX7OR0sEFtcIKrZVBloBI4MbLqrdLcngkU3lClqHFSIS6OG38xiRhQJOYPIHCi FAauxEXtDvaz95NZpRP5XLNaUpT3O14x6P+XeTDrXcXNtJPHw8kgpt6+fjKMdp7az5Xv TzKkB5nQG6WY9vh+CGyuJb02WWLMWMcc4eVb6Qu4zVhie1junXrbwqxIY+GUiFt/bKnI Jtp1LpKm2u2nlrZaMAXcXaSmBh/w7zEA+vpgOfQk+zmxBIdonx6HLs815oPCBVSw+8Aa XnOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GQt/ShSx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r63si9868089pfj.331.2018.05.01.11.56.46; Tue, 01 May 2018 11:57:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GQt/ShSx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756592AbeEAS4b (ORCPT + 99 others); Tue, 1 May 2018 14:56:31 -0400 Received: from mail-yw0-f195.google.com ([209.85.161.195]:41225 "EHLO mail-yw0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756382AbeEAS4a (ORCPT ); Tue, 1 May 2018 14:56:30 -0400 Received: by mail-yw0-f195.google.com with SMTP id t135-v6so3827697ywc.8 for ; Tue, 01 May 2018 11:56:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xyxkSA8YDHfbMH28YgUznhWEmc0mLpKE023agTai1Uk=; b=GQt/ShSx7aj+EvHqYU5VFoloRP+ewqeLiFMpxPUA0Ipr0oaLwGW+YAcllIChFJ3ksP +JLV1QkpTx+pqf8jbcOaWVE6sgUPGZm5otOjI1cboyeUDMfNbsIAsE0GWHDa/Iv+kz/P oKZnaZGWX1hg3x8QNZ1VsFYnSW4yMMMHW2DmjiDoz/oEyb47Xh/+pspoBoxtvIVRqeh0 KVlfXGf7FXvsS81a8lB8p/KBbipu/rOBebd906NseWPHWaSpvfS1mTO4daHVC91H8Mwc UK9pwy1Zg5Hrq2TOPeLGKjNJu7Tcvw4lcjFWx7hc7y2AareHJ5CtLcL/rBiCe6jLifSq NKBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xyxkSA8YDHfbMH28YgUznhWEmc0mLpKE023agTai1Uk=; b=TY303YxF/890nqtu0T5XtG1opTLZScqDCsGLuZMSBKge2l6TCptqeW+VkubD68coec ibBbzgrQjfSG9OrFxwp/Y6QoEMcmYJi7N6s9u8+yLj07UE2MBXujVJcb9y5awOPePZu/ s5raIbLORbPEXSimljpMTjeIaOk9tBc/L9QX4M9gkex7BnwY3BDaekiEW8nh3biNBBTq BXTSEj4qsUSGqZOXT/DDjqxGnJC1umPZoZiysU9Nl0wCYb5dviY22Hnm44sV9TUzbBB5 UqrwdB5Y/IK9H0uMhYf2kzthVB2BvxDDpbFcjCcuObHMbF++2DAyT/3kdLHDHbjDzSsn OO3A== X-Gm-Message-State: ALQs6tDdoDIRaZq6th3yxEl8U482ObX0KrxCHWpOuf65M8WVq015mq1N lqdvA3c9b7CUk/cRoXdLl+sujcXUQtCV1SuGfbcdypKw X-Received: by 2002:a81:451c:: with SMTP id s28-v6mr9373610ywa.74.1525200989393; Tue, 01 May 2018 11:56:29 -0700 (PDT) MIME-Version: 1.0 References: <20180430111245.31072-1-mika.westerberg@linux.intel.com> In-Reply-To: <20180430111245.31072-1-mika.westerberg@linux.intel.com> From: Yehezkel Bernat Date: Tue, 01 May 2018 18:56:13 +0000 Message-ID: Subject: Re: [PATCH v2] thunderbolt: Handle NULL boot ACL entries properly To: Mika Westerberg Cc: LKML , Andreas Noever , michael.jamet@intel.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 30, 2018 at 2:12 PM Mika Westerberg < mika.westerberg@linux.intel.com> wrote: > If the boot ACL entry is already NULL we should not fill in the upper > two DWs with 0xfffffffff. Otherwise they are not shown as empty entries > when the sysfs attribute is read. > Fixes: 9aaa3b8b4c56 ("thunderbolt: Add support for preboot ACL") > Signed-off-by: Mika Westerberg > --- > Changes from v1 (https://lkml.org/lkml/2018/4/27/845): > * Use || instead of && to make sure UUIDs with only one zero DW > are still treated as valid. > drivers/thunderbolt/icm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > diff --git a/drivers/thunderbolt/icm.c b/drivers/thunderbolt/icm.c > index 2d2ceda9aa26..500911f16498 100644 > --- a/drivers/thunderbolt/icm.c > +++ b/drivers/thunderbolt/icm.c > @@ -1255,7 +1255,7 @@ static int icm_ar_get_boot_acl(struct tb *tb, uuid_t *uuids, size_t nuuids) > /* Map empty entries to null UUID */ > uuid[0] = 0; > uuid[1] = 0; > - } else { > + } else if (uuid[0] != 0 || uuid[1] != 0) { > /* Upper two DWs are always one's */ > uuid[2] = 0xffffffff; > uuid[3] = 0xffffffff; > -- > 2.17.0 Acked-by: Yehezkel Bernat