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=-9.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham 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 BE93EC4338F for ; Tue, 27 Jul 2021 17:42:42 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8199C600CD for ; Tue, 27 Jul 2021 17:42:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8199C600CD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6nG3Djsq8jwvoVQYoBVIuHoNFsqg9Qy+9Aam5lU+aYk=; b=PV0qpnxndoq3VC yd6XRD0d7kzRgNkgTS5e06MJEYEcX15uCM9F2LgX2qgBQCVnPor4aW6rJrklivNQv5H0XA0nsDItc lg5cJnFriNHb8dqlliAzDQX4NarU1oulMt/Joz292kiwoIKNHkLpfNVSn0hZBN8Ix8A+8fP31LFIS ALZLcpbnR8riLH7/43AUp4z465yjRSPQxQN6aAi46KpG4HyT/u7SRLECO8T2DB6HKkFIu57pTTiO/ rV+I/PWy4iPd1bcT8/XpMCLs+VLDo2EIkL/l2wzUD/08t7mELI2vh5u/CBRI8hUTde8nc8oF9oHlk fO/WTBbpLO0NI5aYmYyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8R4J-00FagI-6t; Tue, 27 Jul 2021 17:40:39 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8R4E-00Fafb-Tb for linux-arm-kernel@lists.infradead.org; Tue, 27 Jul 2021 17:40:36 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9D09560F91 for ; Tue, 27 Jul 2021 17:40:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627407634; bh=PrLaVhJtnv8oDcD5hqybwz9YD9godDZatvRa/JhR9M0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=riMxmf/dvTU1hsiSKcoJ+WSIQNPHXeV+hqeXTH2OUTRPYzLKb9j4cnM1BcbEXRnuE jN2rxmHRCaJTDsHvxWPWBBOVAKmNoE94I3BOILUILCqWTChKj0mp3PjVawv1wkhHf/ tTs5v16S61BPAvtwC/lVATzCerShaYn9n/W7G0vnRtOrOxVtkEoczgL1i8oAKAA28u 372rOdIIWyiFU+DgtS1Avpu5Zv2si7xK4ueSbRYcbooZbBakZA0sKOT5PgJGqdh+Qf AaT1Mk6zQfipgEzaEXKqjuHs32RYGm4woOKqrmStF/NVBUGNazEM0LaB0Wz4HcLM3d +HbR57EMZ1Iqg== Received: by mail-lf1-f43.google.com with SMTP id h2so23136921lfu.4 for ; Tue, 27 Jul 2021 10:40:34 -0700 (PDT) X-Gm-Message-State: AOAM533Iw0Y6MiQhT4k7HvqN34c6ROQ/+5FNLsW5B5HBTthyYBfG8tid 2oEtkf3FHFQDUZ+5yQcL/WCh10ysU9q8G3kSOrg= X-Google-Smtp-Source: ABdhPJwS3rT+yAdjePDzQkl1JqnECPTPxX9jMsyrg697T6BrM+4lIuGtTERdp1j5XGkArSly5ovA2pWeExL5zNS/vV0= X-Received: by 2002:adf:f446:: with SMTP id f6mr13242430wrp.361.1627407622867; Tue, 27 Jul 2021 10:40:22 -0700 (PDT) MIME-Version: 1.0 References: <20210727144859.4150043-1-arnd@kernel.org> <20210727144859.4150043-5-arnd@kernel.org> In-Reply-To: From: Arnd Bergmann Date: Tue, 27 Jul 2021 19:40:05 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 4/6] mm: simplify compat numa syscalls To: Heiko Carstens Cc: Andrew Morton , Arnd Bergmann , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Vasily Gorbik , Christian Borntraeger , "David S. Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "the arch/x86 maintainers" , "H. Peter Anvin" , Al Viro , "Eric W. Biederman" , Christoph Hellwig , Feng Tang , Linux ARM , Linux Kernel Mailing List , "open list:BROADCOM NVRAM DRIVER" , Parisc List , linuxppc-dev , linux-s390 , sparclinux , linux-arch , Linux API , Linux-MM , Christoph Hellwig X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210727_104035_014944_B97D1AF4 X-CRM114-Status: GOOD ( 18.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jul 27, 2021 at 7:27 PM Heiko Carstens wrote: > > On Tue, Jul 27, 2021 at 04:48:57PM +0200, Arnd Bergmann wrote: > > --- > > include/linux/compat.h | 17 ++-- > > mm/mempolicy.c | 175 +++++++++++++---------------------------- > > 2 files changed, 63 insertions(+), 129 deletions(-) > ... > > +static int get_bitmap(unsigned long *mask, const unsigned long __user *nmask, > > + unsigned long maxnode) > > +{ > > + unsigned long nlongs = BITS_TO_LONGS(maxnode); > > + int ret; > > + > > + if (in_compat_syscall()) > > + ret = compat_get_bitmap(mask, > > + (const compat_ulong_t __user *)nmask, > > + maxnode); > > compat_ptr() conversion for e.g. nmask is missing with the next patch > which removes the compat system calls. > Is that intended or am I missing something? I don't think it's needed here, since the pointer comes from the system call argument, which has the compat_ptr() conversion applied in arch/s390/include/asm/syscall_wrapper.h, not from a compat_uptr_t that gets passed indirectly. The compat_get_bitmap() conversion is only needed for byte order adjustment, not for converting pointers. It's also possible that I'm the one who's missing something. Arnd _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel