From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29D2EC433DF for ; Thu, 14 May 2020 02:43:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DB79820693 for ; Thu, 14 May 2020 02:43:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="RJxI7nc5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DB79820693 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7F7C18004A; Wed, 13 May 2020 22:43:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7A9088003E; Wed, 13 May 2020 22:43:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 696A68004A; Wed, 13 May 2020 22:43:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0026.hostedemail.com [216.40.44.26]) by kanga.kvack.org (Postfix) with ESMTP id 4D4A38003E for ; Wed, 13 May 2020 22:43:45 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 0A49A180AD80F for ; Thu, 14 May 2020 02:43:45 +0000 (UTC) X-FDA: 76813779210.19.thumb67_20b0f98ae194c X-HE-Tag: thumb67_20b0f98ae194c X-Filterd-Recvd-Size: 4753 Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) by imf32.hostedemail.com (Postfix) with ESMTP for ; Thu, 14 May 2020 02:43:44 +0000 (UTC) Received: by mail-lj1-f194.google.com with SMTP id g1so1779823ljk.7 for ; Wed, 13 May 2020 19:43:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=L3In83ZNtvhCqrpK0vVjzsKNvprMyvL+zJ9ohua4z10=; b=RJxI7nc5/+qicT+av7MVnCPyCWQNYqEmo+1I8aEDjYrcgsKm1JO+ximEumc2BGCHG6 IRKjgEiRjwQuoza3oL4WOrhIpbRc8zh7pT5r3iUQzrEjc7+dcHsaKetaMFqukCgIbr+Y 1swtCFlefWtGVUfsLBR/jTXuJr1SgZ0x45QhE= 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=L3In83ZNtvhCqrpK0vVjzsKNvprMyvL+zJ9ohua4z10=; b=tmeHT6XOGBBOpZ8g7b07WyrmalgliLhOBM/d2o/uUkIJqYKrRPuMBQfmzSxmraQwfA WwnjeAPaK7vsXVBCXQf5Od+04Or1D9Tdogyhyr4rNSyjaYyf6BI6v4CrVYo9Ap+2wVgv pZNljj6W+R05JUhsDSuhXmZ3j2jyC1zHXkt/ZwWxjvaRimzGmD7XlZECBw4ku8sOmzQe M1KdMJn40mzoRFiOfs4c9uI70cmtCXBnRkdqOykAOkmZa/o5BtOWd3LzgNbwVnZeRBD1 wHd7muVDCSW/nPmFP4oS9cmPZhtJyvYoQ8lZbf6l7x2w0WxOs3h2xiOOxshCe264Rx7I Yufw== X-Gm-Message-State: AOAM530rrrzWillogYtmtJybPTGe+D+TWn2cwvGOo9rYeUgIobObb7pb 45Ai3csFGIdJ+8weazCc5aAIfZR4lrY= X-Google-Smtp-Source: ABdhPJwZRcIMcCnbBqNoRrfqDrljJwAQgOtXi5vQbEfIHzDR+yrG7vjqiMdecfxmRKGFA792fq3h4A== X-Received: by 2002:a2e:9842:: with SMTP id e2mr1172598ljj.273.1589424222096; Wed, 13 May 2020 19:43:42 -0700 (PDT) Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com. [209.85.167.45]) by smtp.gmail.com with ESMTPSA id q13sm797226lfh.73.2020.05.13.19.43.40 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 May 2020 19:43:40 -0700 (PDT) Received: by mail-lf1-f45.google.com with SMTP id a9so1261270lfb.8 for ; Wed, 13 May 2020 19:43:40 -0700 (PDT) X-Received: by 2002:a19:6e4e:: with SMTP id q14mr1567307lfk.192.1589424220085; Wed, 13 May 2020 19:43:40 -0700 (PDT) MIME-Version: 1.0 References: <20200513160038.2482415-1-hch@lst.de> <20200513160038.2482415-12-hch@lst.de> <20200513192804.GA30751@lst.de> <0c1a7066-b269-9695-b94a-bb5f4f20ebd8@iogearbox.net> <20200514082054.f817721ce196f134e6820644@kernel.org> <20200514100009.a8e6aa001f0ace5553c7904f@kernel.org> In-Reply-To: <20200514100009.a8e6aa001f0ace5553c7904f@kernel.org> From: Linus Torvalds Date: Wed, 13 May 2020 19:43:24 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 11/18] maccess: remove strncpy_from_unsafe To: Masami Hiramatsu Cc: Daniel Borkmann , Christoph Hellwig , "the arch/x86 maintainers" , Alexei Starovoitov , Andrew Morton , linux-parisc@vger.kernel.org, linux-um , Netdev , bpf@vger.kernel.org, Linux-MM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, May 13, 2020 at 6:00 PM Masami Hiramatsu wrote: > > > But we should likely at least disallow it entirely on platforms where > > we really can't - or pick one hardcoded choice. On sparc, you really > > _have_ to specify one or the other. > > OK. BTW, is there any way to detect the kernel/user space overlap on > memory layout statically? If there, I can do it. (I don't like > "if (CONFIG_X86)" thing....) > Or, maybe we need CONFIG_ARCH_OVERLAP_ADDRESS_SPACE? I think it would be better to have a CONFIG variable that architectures can just 'select' to show that they are ok with separate kernel and user addresses. Because I don't think we have any way to say that right now as-is. You can probably come up with hacky ways to approximate it, ie something like if (TASK_SIZE_MAX > PAGE_OFFSET) .... they overlap .. which would almost work, but.. Linus