Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp5252634imb; Thu, 7 Mar 2019 11:08:06 -0800 (PST) X-Google-Smtp-Source: APXvYqwrkeAVi4WsFFc1XhJ9XdAw6PKWObElNXHA5TIO5IOKko74IIVxRdLpHGUIuqaJ7it3I91E X-Received: by 2002:a17:902:b416:: with SMTP id x22mr14563755plr.285.1551985686757; Thu, 07 Mar 2019 11:08:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551985686; cv=none; d=google.com; s=arc-20160816; b=tMuBhiKhygmr2t90jxY7igVPYC6zguSQxYO74VPKq6gVk6jfCc87tsYnRjXBniqjyk m6obE+WGlHFImS3f4Sw6lgagM3LmG5lk8lcurdvKaMkJvwKHxuK/aoyFH0RSkXJ8k4kn yus2X25PLUyPM0Ix5o2W++K6q/wugoGkT6LYdFXDidREEkyDZ7tjpvYrMQiWbQw4XrML aT8X4IayE9sY4w6a3o9+V6t5ctKENBpNxXT7qcV2OKTTT4ttCZpKshyJyg6rfMK6DeYC EAUvgBeXOyIvcpkVl3IeTxsk26Lh2+rBbLcfwrUtZRqkCX09Irw2la+1OS0Bw2xz9exm 1x4Q== 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; bh=5WmbIOH/QL0A2bRpCuJ9JMmkcApAiOAy7EexJpuoYBk=; b=c5924nA+e88KGvp5uNz1pvAH3VPOVt6aEdekH+OuNVKbUe/Wre+VNReg7HevRp5Lsh tT4MehdHdAFZkPBc7F6JxbAHUDe3ihpfSJg2EUn2m9dVDzdzP5F/K/UxbkcskrASus4L 3m3Tmv3nSSjqNXQ8WAnKG1El9xq7GCz7sqT8R63IKzWQcBJdFRWBQjJHL3f2XQnT8mGY /f4OiNEqlPv9YwNIkhKbwVTAC4Z4CPH+x8BHXimgsK4LZtkW3kw17amVrHfm+TOMINQx FDUsORQCh6fteBwC42dd/dUj1pZ/c4k7OtSnuFaBfF0S3SPlnQxGvcHisOdzZOB0GiKA SX9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MQWTcQNr; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g21si4506285pgi.448.2019.03.07.11.07.50; Thu, 07 Mar 2019 11:08:06 -0800 (PST) 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=@kernel.org header.s=default header.b=MQWTcQNr; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726496AbfCGTHL (ORCPT + 99 others); Thu, 7 Mar 2019 14:07:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:33380 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726127AbfCGTHL (ORCPT ); Thu, 7 Mar 2019 14:07:11 -0500 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6373D20879 for ; Thu, 7 Mar 2019 19:07:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1551985630; bh=xUQpkflw/lleDy8DtQBoKdYhV0IIr3oEasuhYJKVhXU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=MQWTcQNrxXs40b9iel8ZXoBNgMhUYD0iKoVEJojuX23yICstqRzq7TCTnHzuwoYz4 kjgLiOZDz8Qjlu1Em0Ua1YooprbSOPqHzhVF69vZGAyHbBIKG9tqClGSLNjj7aBJzG kQyO9OI2WRXBKBZ2gkDPyo6c1WiYLc8TJ97AYkuo= Received: by mail-wm1-f50.google.com with SMTP id x10so10277844wmg.2 for ; Thu, 07 Mar 2019 11:07:10 -0800 (PST) X-Gm-Message-State: APjAAAWBkR8qjjsKFRK+bjMRYjbavRJPAv/NP3NUwoKkdN2y+LuVIJ0l ihR9R1UNDDB1nDHf6PBB8G8dVikYx2LF2ih7gWYInw== X-Received: by 2002:a1c:7906:: with SMTP id l6mr6491195wme.83.1551985628850; Thu, 07 Mar 2019 11:07:08 -0800 (PST) MIME-Version: 1.0 References: <20190307114511.870090179@infradead.org> <20190307115159.708180729@infradead.org> <20190307185922.GA2482@worktop.programming.kicks-ass.net> In-Reply-To: <20190307185922.GA2482@worktop.programming.kicks-ass.net> From: Andy Lutomirski Date: Thu, 7 Mar 2019 11:06:57 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 07/20] x86/uaccess: Always inline force_valid_ss() To: Peter Zijlstra Cc: Linus Torvalds , Thomas Gleixner , "H. Peter Anvin" , Julien Thierry , Will Deacon , Ingo Molnar , Catalin Marinas , James Morse , valentin.schneider@arm.com, Brian Gerst , Josh Poimboeuf , Andrew Lutomirski , Borislav Petkov , Denys Vlasenko , LKML , Dmitry Vyukov , Steven Rostedt 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 Thu, Mar 7, 2019 at 10:59 AM Peter Zijlstra wrote: > > On Thu, Mar 07, 2019 at 10:05:43AM -0800, Andy Lutomirski wrote: > > On Thu, Mar 7, 2019 at 3:52 AM Peter Zijlstra wrote: > > > > > > arch/x86/kernel/signal.o: warning: objtool: restore_sigcontext()+0x3cc: call to force_valid_ss.isra.5() with UACCESS enabled > > > > > > XXX: move the callsite out of te AC=1 region instead? > > > > Let's move it instead. I looked at the code and it should be fine. > > Something like so; or did I miss something subtle? Reviewed-by: Andy Lutomirski Also, this stuff is pretty well covered by the x86 selftests, mostly because getting it right in the first place was way too subtle for comfort. --Andy