Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1051753pxu; Wed, 2 Dec 2020 09:48:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJx8zlMY6rRm3FHK2wJo8+6mkqmgjy2yUvyag72uUtibmIczko6/xJgP+euuZVx+MiIBVgif X-Received: by 2002:a17:906:1955:: with SMTP id b21mr908285eje.236.1606931286536; Wed, 02 Dec 2020 09:48:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606931286; cv=none; d=google.com; s=arc-20160816; b=wcugMiy9Wi3puzzHohLGRRQYaK58CYiUAFMKX4MbvZ6yN+Ag/sWKLgnsPiJhtsaXKI 6wq6HDsh6w4qGIHtRIlyLheXvTvwxNIDMduI3s8WjoM7jaav2t16ZwXCb5Y4wlRGLqXu fX2CGbEmf/YK2iRBbGCQzrm6ikRGt9OzDNvbJPfUaWqE8HtMQ7wdj0mNglEDPAR+K6Fo ngIXJf/JukyyJdcS7GROQ3As2YUQdQRXMaf6iV+rZYUc81j2urFKCqMhBpP779XMqiPU n2vh2GfE8FflT85FvLK+HIIBhnHFUR0Qa2pMoAzsTB7Z7kezyJAdQ5B7IAiCL0/X6EMX yl8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from :dkim-signature:date; bh=8nOFHxX6j3tdRHt3fQ1C06cXP/B7gbDEg9/MFupB4hE=; b=q1qEcydGVNzsChLoEoAe+9Qf1aTujjZYwn+fnYj370iWDfP1R6thRuxUcxQ4zy6v1J copaUtwoto+sHjhM0vRK3B+wSvmgUaQH+UsLEuP4kFPMc/bJxhxE/I0UBVLfbp3UOEmp CqmKbothirdlsXvxLgB/QUPqOggPxJqh6Uvu/QZ48SWSsh/9xXTXqgVwk6e1gsPGBICJ bLRhaPNr6lt9ZuO304mrnRg66D6zuyJSSedYm3K86YqALK9Kijtkt0QzZY2C+Nv4dDcx EuYH4/D5fY4GYHpWRZGu+jwdD/a9yBfFB2gUmYvxjx8rR4tGPbK+aPmMOiIeAWZOoefd k4qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qPNDX4Y6; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k15si368984ejk.389.2020.12.02.09.47.42; Wed, 02 Dec 2020 09:48:06 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=qPNDX4Y6; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728585AbgLBRng (ORCPT + 99 others); Wed, 2 Dec 2020 12:43:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:47506 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726061AbgLBRnf (ORCPT ); Wed, 2 Dec 2020 12:43:35 -0500 Date: Wed, 2 Dec 2020 17:42:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606930974; bh=cqmV/I9FRZ4kYw4yyZj/9mTxHnFQnGQs3KzuxScuNO8=; h=From:To:Cc:Subject:References:In-Reply-To:From; b=qPNDX4Y6a/KFdERBe6ZlJGjU8wbI/C1LlTJNYV9/Jb779ie1B/mgOVK74wQyVQlEI CJmAjK1AjgcOmRuS7LUdRfDU3AZzhLLU4tmHif4kpoX6IXvCXly/f6HVZHkdEiVaxy ySa6YEOtZFQ+pHd1RMQhC0Hbfi3HwSvLI4DZNJUc= From: Will Deacon To: Qais Yousef Cc: linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Catalin Marinas , Marc Zyngier , Greg Kroah-Hartman , Peter Zijlstra , Morten Rasmussen , Suren Baghdasaryan , Quentin Perret , Tejun Heo , Li Zefan , Johannes Weiner , Ingo Molnar , Juri Lelli , Vincent Guittot , kernel-team@android.com Subject: Re: [PATCH v4 04/14] arm64: Kill 32-bit applications scheduled on 64-bit-only CPUs Message-ID: <20201202174247.GB29939@willie-the-truck> References: <20201124155039.13804-1-will@kernel.org> <20201124155039.13804-5-will@kernel.org> <20201127131217.skekrybqjdidm5ki@e107158-lin.cambridge.arm.com> <20201201165633.GC27783@willie-the-truck> <20201202135216.7jilpcvocnqqp5aj@e107158-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201202135216.7jilpcvocnqqp5aj@e107158-lin.cambridge.arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 02, 2020 at 01:52:16PM +0000, Qais Yousef wrote: > On 12/01/20 16:56, Will Deacon wrote: > > On Fri, Nov 27, 2020 at 01:12:17PM +0000, Qais Yousef wrote: > > > On 11/24/20 15:50, Will Deacon wrote: > > > > Scheduling a 32-bit application on a 64-bit-only CPU is a bad idea. > > > > > > > > Ensure that 32-bit applications always take the slow-path when returning > > > > to userspace on a system with mismatched support at EL0, so that we can > > > > avoid trying to run on a 64-bit-only CPU and force a SIGKILL instead. > > > > > > > > Signed-off-by: Will Deacon > > > > --- > > > > > > nit: We drop this patch at the end. Can't we avoid it altogether instead? > > > > I did it like this so that the last patch can be reverted for > > testing/debugging, but also because I think it helps the structure of the > > series. > > Cool. I had a comment about the barrier(), you were worried about > cpu_affinity_invalid() being inlined by the compiler and then things get > mangled such that TIF_NOTIFY_RESUME clearing is moved after the call as you > described? Can the compiler move things if cpu_affinity_invalid() is a proper > function call (not inlined)? I think function calls implicitly clobber memory, but you'd have to annotate the thing as noinline to prevent it being inlined. Will