Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3364076yba; Tue, 16 Apr 2019 09:51:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxg64yz5FL3KsT/EkqtkyfGz6lRseucveUyrvkgShdJ7JtPW8I/H6mCWn4Ipl2J01lW0LyP X-Received: by 2002:a17:902:a01:: with SMTP id 1mr55229083plo.36.1555433469114; Tue, 16 Apr 2019 09:51:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555433469; cv=none; d=google.com; s=arc-20160816; b=BlGu5Ew1iSN4A2QRY+WmFu+53wcY1cXU9U9UXxPyc357YHrNi/GFBAoYu/cED58tsH z87YFRjk1uQFmc9AirRbgu8zMnq63q86RsmL+hXqZ7g19z13ASjE0aOXfW0D1rForf8T ImxVJV/6/uunWuT4gLannuT9kIxjASj1EqiR5b7ao8syjJv+gVRANPgSjYgBhUe03IBC dEF8V5/ext2JtD5crklpHwlLXPrGFxYiHcOonIivmDF1YU0xelTEQHn65mgWu8ozN6vb VewEmd4mwlgVRu6NunT4CDcjfLeAUzo6HIwfvISKLPjO72BjK9eybaC+CSW8WqFY68s9 IyRA== 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=sCNFQh0jTa6sj9k5WIdIdVFNK8z05B2xT/7RvFXhZP8=; b=EMqKQx/egviVNuUcc8nXf7Ua/Lj01jQsLFBa73Ehg33EQc+TxTQF4V+8jqAWIjNnXL yIQP1J3OZcuYgLV3KlKnANA6DRF/gk6yQ4ykd+lnB9iUx5mjB+LviXr1kAhuhu4oOcup 6+6oyEk5eej9AR/Xnr61DNSpSixC9/Cu0cuF9/EHXTVkTS20t0arJY901IWhmt6/0f9u RKx0HsEDGIMaoW/IkcV3eT81Md/AnaqroGyLOoVZwPO3cRazgj1mGQecbtwbOVybq/O/ KiRP4VBVLIWpchV0N8Y5tL6IlA6dATWWvqs5auKQ2cnS6+5jwv/YnhVFsULmx7lUyeYy Gygg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=ZEmLI8WM; 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 h3si51080747pfe.90.2019.04.16.09.50.52; Tue, 16 Apr 2019 09:51:09 -0700 (PDT) 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=@linux-foundation.org header.s=google header.b=ZEmLI8WM; 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 S1730007AbfDPQuH (ORCPT + 99 others); Tue, 16 Apr 2019 12:50:07 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:38027 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729386AbfDPQuH (ORCPT ); Tue, 16 Apr 2019 12:50:07 -0400 Received: by mail-lf1-f66.google.com with SMTP id v1so7248857lfg.5 for ; Tue, 16 Apr 2019 09:50:05 -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=sCNFQh0jTa6sj9k5WIdIdVFNK8z05B2xT/7RvFXhZP8=; b=ZEmLI8WMiuJuHU8T3/vTMBZWhWtQVtDoUZX+2U07tSATOdKLcOnw17fuBT3SMvtM6W 2ICWxu5NxKagoiGd9ISMLrfsqYoHHn9sYbBxP3eQNHKBZ8NsNDKJeCb4HeWzxGgtJayW DpkP/A/FSVg8T3ieIk9gP0YymaHl1Ta7ZPwng= 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=sCNFQh0jTa6sj9k5WIdIdVFNK8z05B2xT/7RvFXhZP8=; b=AMuIRghrX2lNMKjIsLl09WSzQTM1TrDD5YmzdWo7BV9Mes6bQdsMXEc5L9uXGRefW3 TKtRt82d3Y3WtTEr1AtF7tsjVxVbNiZ5IodH4pregz6l3HuVzDdW30Z3pXGbSaN/Mved u8N1YkVWHFgM0m/7NQNdjoFdFKD8PVcqe1OF92Bi0Xb/xJJWO54MytD0skGfmjtwxhaf 2WjQIFtaTH48czzt55pePYFofkw33Kw2/XWUA2hDLAxLLeNTR6ikpVjqOTTgihpEr/As Vmb1d9E/NQEqVJ1I16vG8VtLRyaDY8+J7eHWR2ABRPgheN+995/VSV43xetuMIxoiy20 r5GQ== X-Gm-Message-State: APjAAAVTZJrPLgWFva4et12ADEMYkIpmCTYAh8WrqtQaNy2z2wIWuBNl i5rN2mtB9XVTt6u5zgnE3T/f21vc3rg= X-Received: by 2002:a19:7911:: with SMTP id u17mr12118773lfc.90.1555433404121; Tue, 16 Apr 2019 09:50:04 -0700 (PDT) Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com. [209.85.208.177]) by smtp.gmail.com with ESMTPSA id 18sm11447520lje.81.2019.04.16.09.50.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Apr 2019 09:50:03 -0700 (PDT) Received: by mail-lj1-f177.google.com with SMTP id y6so19719603ljd.12 for ; Tue, 16 Apr 2019 09:50:02 -0700 (PDT) X-Received: by 2002:a2e:8108:: with SMTP id d8mr18248032ljg.57.1555433402573; Tue, 16 Apr 2019 09:50:02 -0700 (PDT) MIME-Version: 1.0 References: <20190415051919.GA31481@infradead.org> <20190416110906.6c773aff@mschwideX1> <20190416140658.2cb73a3f@mschwideX1> In-Reply-To: From: Linus Torvalds Date: Tue, 16 Apr 2019 09:49:46 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Linux 5.1-rc5 To: Martin Schwidefsky Cc: Christoph Hellwig , Linux List Kernel Mailing , Michael Ellerman , linuxppc-dev@lists.ozlabs.org, linux-s390 Content-Type: multipart/mixed; boundary="0000000000006f45e80586a88f88" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --0000000000006f45e80586a88f88 Content-Type: text/plain; charset="UTF-8" On Tue, Apr 16, 2019 at 9:16 AM Linus Torvalds wrote: > > We actually already *have* this function. > > It's called "gup_fast_permitted()" and it's used by x86-64 to verify > the proper address range. Exactly like s390 needs.. > > Could you please use that instead? IOW, something like the attached. Obviously untested. And maybe 'current' isn't declared in , in which case you'd need to modify it to instead make the inline function be "s390_gup_fast_permitted()" that takes a pointer to the mm, and do something like #define gup_fast_permitted(start, pages) \ s390_gup_fast_permitted(current->mm, start, pages) instead. But I think you get the idea.. Linus --0000000000006f45e80586a88f88 Content-Type: text/x-patch; charset="US-ASCII"; name="patch.diff" Content-Disposition: attachment; filename="patch.diff" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_juk0utdu0 IGFyY2gvczM5MC9pbmNsdWRlL2FzbS9wZ3RhYmxlLmggfCAxMiArKysrKysrKysrKysKIDEgZmls ZSBjaGFuZ2VkLCAxMiBpbnNlcnRpb25zKCspCgpkaWZmIC0tZ2l0IGEvYXJjaC9zMzkwL2luY2x1 ZGUvYXNtL3BndGFibGUuaCBiL2FyY2gvczM5MC9pbmNsdWRlL2FzbS9wZ3RhYmxlLmgKaW5kZXgg NzZkYzM0NGVkYjhjLi5hMDgyNDg5OTVmNTAgMTAwNjQ0Ci0tLSBhL2FyY2gvczM5MC9pbmNsdWRl L2FzbS9wZ3RhYmxlLmgKKysrIGIvYXJjaC9zMzkwL2luY2x1ZGUvYXNtL3BndGFibGUuaApAQCAt MTY1OSw0ICsxNjU5LDE2IEBAIHN0YXRpYyBpbmxpbmUgdm9pZCBjaGVja19wZ3RfY2FjaGUodm9p ZCkgeyB9CiAKICNpbmNsdWRlIDxhc20tZ2VuZXJpYy9wZ3RhYmxlLmg+CiAKK3N0YXRpYyBpbmxp bmUgYm9vbCBndXBfZmFzdF9wZXJtaXR0ZWQodW5zaWduZWQgbG9uZyBzdGFydCwgaW50IG5yX3Bh Z2VzKQoreworCXVuc2lnbmVkIGxvbmcgbGVuLCBlbmQ7CisKKwlsZW4gPSAodW5zaWduZWQgbG9u Zylucl9wYWdlcyA8PCBQQUdFX1NISUZUOworCWVuZCA9IHN0YXJ0ICsgbGVuOworCWlmIChlbmQg PCBzdGFydCkKKwkJcmV0dXJuIGZhbHNlOworCXJldHVybiBlbmQgPD0gY3VycmVudC0+bW0tPmNv bnRleHQuYXNjZV9saW1pdDsKK30KKyNkZWZpbmUgZ3VwX2Zhc3RfcGVybWl0dGVkIGd1cF9mYXN0 X3Blcm1pdHRlZAorCiAjZW5kaWYgLyogX1MzOTBfUEFHRV9IICovCg== --0000000000006f45e80586a88f88--