Received: by 2002:a4a:be92:0:0:0:0:0 with SMTP id o18csp3117730oop; Mon, 18 Feb 2019 18:38:08 -0800 (PST) X-Google-Smtp-Source: AHgI3IbTea+wXy/IeE405ZENOibWh0CgweISXClBWVDuQJSjV7hf8glyRD8LSaqUv+YNS71b4Rc+ X-Received: by 2002:a62:2ad1:: with SMTP id q200mr9561279pfq.34.1550543888485; Mon, 18 Feb 2019 18:38:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550543888; cv=none; d=google.com; s=arc-20160816; b=VKUPO1LHqpP6SM1/QYsWkAaj1s3FeGG7rDIHZeE7qbVwN1MG9lxXG1JoZrNw4212CN P/SU0GDTxR4yH3ca3fPNpFzT7ysdOOvTpWB/bR65+AIrSiINqKaQBeoxL2qR1rIUZJPh pEKHULPHTH2al0ZtQFNSHO3ubIOvsUqnktOsAZrhylD+j6UIEoqhEOzKYvyy3a8gW80H iw0yccV6ouSxfVtXXmNzDf/eSoiAaJGOzxMntnXfLGPGqsbQ9jJnjMRBPOtPfYQqUymt 67+IEBPmEbtkCYv42aMB1HP3m70uz+C2w5EUz5rAYkYRafAkxefp5s95eCcti+dXJUdq EwHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=TpHbu5/eRuzDTUCsQ7BKcjiZUsGS7o/lqb4GurKqCwQ=; b=LGriG/VVuvekEe/OHX8eZ5tRUxYijLVeUiocolWnf3vJVZqHEevPBB0FeHTE71XWCS cYM0n2SLsilry6VTBcLpuhHieS1DAyxWBmq8JaKCd2z4G8HPH90sV4eaiB3WBwR53T52 HE77C/4koKv3wCZVQhKQXkdLPuc2WrJaNkBHHZRKzP7CTW8M0+rqVI++ih/xSTH3sdxq 65IkGIKpP/LWzQC7iuwpPdbFFgVLuOCCotuMgs4j/Q82MNw+2gg3pI7NUvHJxta4LH44 rBWozxt65AN+MR2ioMvuEJln9odjrkKpEK9algiofoMdDxxuQKB6dbblWXw2/OFzr+sI tQJw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 38si15213087pln.313.2019.02.18.18.37.53; Mon, 18 Feb 2019 18:38:08 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731011AbfBRVvz (ORCPT + 99 others); Mon, 18 Feb 2019 16:51:55 -0500 Received: from mail12.gandi.net ([217.70.182.73]:35049 "EHLO gandi.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726955AbfBRVvz (ORCPT ); Mon, 18 Feb 2019 16:51:55 -0500 Received: from khany.gandi.net (fob.gandi.net [217.70.181.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gandi.net (Postfix) with ESMTPSA id 4ED4A160348; Mon, 18 Feb 2019 21:51:53 +0000 (UTC) Received: by khany.gandi.net (Postfix, from userid 1000) id 1D663DD164B; Mon, 18 Feb 2019 21:51:51 +0000 (GMT) Date: Mon, 18 Feb 2019 21:51:50 +0000 From: Arthur Gautier To: Andy Lutomirski Cc: Thomas Gleixner , Al Viro , Jann Horn , the arch/x86 maintainers , Ingo Molnar , Borislav Petkov , kernel list , Pascal Bouchareine Subject: Re: [PATCH] x86: uaccess: fix regression in unsafe_get_user Message-ID: <20190218215150.xklqbfckwmbtdm3t@khany> References: <20190215235901.23541-1-baloo@gandi.net> <4F2693EA-1553-4F09-9475-781305540DBC@amacapital.net> <20190216234702.GP2217@ZenIV.linux.org.uk> <20190217034121.bs3q3sgevexmdt3d@khany> <20190217042201.GU2217@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 18, 2019 at 11:15:44AM -0800, Andy Lutomirski wrote: > This seems like it's just papering over the underlying problem: with > Jann's new checks in place, strncpy_from_user() is simply buggy. Does > the patch below look decent? It's only compile-tested, but it's > conceptually straightforward. I was hoping I could get rid of the > check-maximum-address stuff, but it's needed for architectures where > the user range is adjacent to the kernel range (i.e. not x86_64). I'm unable to trigger the BUG I had with my initramfs with this patch applied. Thanks! -- \o/ Arthur G Gandi.net