Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1402213pxj; Fri, 21 May 2021 13:22:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsD42TRBs5/UyFI1hSSB9mSRrWo6eeF2Q3UtoNAiESMXoHqCjId9S9ue/wXbO3WisIKCbC X-Received: by 2002:a05:6638:150d:: with SMTP id b13mr7286284jat.51.1621628558799; Fri, 21 May 2021 13:22:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621628558; cv=none; d=google.com; s=arc-20160816; b=b7x3e/6NFMVLZfqJtT4bOzineYhZ3Vqmu54vhBuFxtozYSUvyIaBUG486SRhac382y OyR4FoVIRS3tv0ZLb9YzLHos+geZQ0YLZolEG8rzNEJkogXv9F3xWW6c2uhJcCeD2+wE 70vR6PzYOrzZ5Dsq5PP1BRaQRWo7/eq+8vSgmDR0JFCCQ0LGEmkaD964rxZ6HfKsavWt 6OJcKtBbAPWnKthQnS+V4L0LopKqbasiWSZS827ed++nbE2qnKKYGkg6zcKB04+pubn6 hpJ2E1g93U7fcpI+HkuZKEZ1BNcOaYHIguH5SO4qpPaTsD3UgWbKvk7gyjeYUfxB3ZWD LB5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=uXKIcrE9dgNr/9z5zhZZg2ZVkD3OtZlQ1J5KB1ftVAc=; b=xNs3BhlhRJraqzli3J2NoykKBJMyMBB6o3DJXLN2wl6Eafy5SrUA70GgiYz5y/DkMu 22sUNpFZnmYm1pAtwZDiLM+0Sm8WfXIMJ4Is+N+EdsjoCJsqXaY409K5iba32gC9oF1s v9y+W9e3/HUN10qVlvJ89Eh/3ordmHUfzagsf7iALfR0hFdGUZQx+9l3IykBuI7sYw6S XpXvPEE73IDrTNqnZ4eNzFYKjc2IHrHr3B1U3Dc2lyvTkpsx5KUuLfEy3GT4Htua20PE t26GmKxG1lhhOJ+XLgwkFV9L0X7cDsrTveLQZ1M84P2kDtm++DYWlHNhOMeUDuPKfR/l h+YQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p14si7873914ils.62.2021.05.21.13.22.26; Fri, 21 May 2021 13:22:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233378AbhEUQT0 (ORCPT + 99 others); Fri, 21 May 2021 12:19:26 -0400 Received: from mga04.intel.com ([192.55.52.120]:15226 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231318AbhEUQTZ (ORCPT ); Fri, 21 May 2021 12:19:25 -0400 IronPort-SDR: o+9RwqpsqLpqJR+lZh/NwfeQcDXpXKspzArxamWJez+xKsrlFC9a7FSSpfGQJf+ztj4Q/mQdgD b3rvgdGraxDg== X-IronPort-AV: E=McAfee;i="6200,9189,9991"; a="199576048" X-IronPort-AV: E=Sophos;i="5.82,319,1613462400"; d="scan'208";a="199576048" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2021 09:17:35 -0700 IronPort-SDR: mZryhIX47sLJixgt8Qc9gLmzKgJ+SBzaiz6RVQKGwMt7tm3L2OaO0MqVZ1E/fkxF8q0Q1gVB29 ebFTGGc09p/A== X-IronPort-AV: E=Sophos;i="5.82,319,1613462400"; d="scan'208";a="434344646" Received: from yyu32-mobl1.amr.corp.intel.com (HELO [10.254.177.76]) ([10.254.177.76]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2021 09:17:27 -0700 Subject: Re: [PATCH v26 24/30] x86/cet/shstk: Introduce shadow stack token setup/verify routines To: Borislav Petkov Cc: x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Arnd Bergmann , Andy Lutomirski , Balbir Singh , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , Florian Weimer , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , "Ravi V. Shankar" , Vedvyas Shanbhogue , Dave Martin , Weijiang Yang , Pengfei Xu , Haitao Huang References: <20210427204315.24153-1-yu-cheng.yu@intel.com> <20210427204315.24153-25-yu-cheng.yu@intel.com> From: "Yu, Yu-cheng" Message-ID: Date: Fri, 21 May 2021 09:17:24 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/17/2021 12:45 AM, Borislav Petkov wrote: > On Tue, Apr 27, 2021 at 01:43:09PM -0700, Yu-cheng Yu wrote: [...] >> + >> + if ((!ia32 && !IS_ALIGNED(ssp, 8)) || !IS_ALIGNED(ssp, 4)) > > Flip this logic: > > if ((ia32 && !IS_ALIGNED(ssp, 4)) || !IS_ALIGNED(ssp, 8)) If !IS_ALIGNED(ssp, 4), then certainly !IS_ALIGNED(ssp, 8). This has to be as-is, I think. Thanks, Yu-cheng