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=-6.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 F358DC43460 for ; Wed, 19 May 2021 09:56:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8DFDD6124C for ; Wed, 19 May 2021 09:56:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8DFDD6124C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id BD0E76B0036; Wed, 19 May 2021 05:56:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B80446B006C; Wed, 19 May 2021 05:56:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9F9626B006E; Wed, 19 May 2021 05:56:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0105.hostedemail.com [216.40.44.105]) by kanga.kvack.org (Postfix) with ESMTP id 6956A6B0036 for ; Wed, 19 May 2021 05:56:21 -0400 (EDT) Received: from smtpin38.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id DCCF5180AD838 for ; Wed, 19 May 2021 09:56:20 +0000 (UTC) X-FDA: 78157525320.38.161AD80 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf26.hostedemail.com (Postfix) with ESMTP id 7F18F40B8CDE for ; Wed, 19 May 2021 09:56:20 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 8058660FF2 for ; Wed, 19 May 2021 09:56:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621418179; bh=sZokVnqgg00yP4zqIdHOGtJNBrDhc7J4zbJvv0Ja+io=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=GYQJtAh0WaKxA6miEevGbUjT/mk3FvnIDKg/CajqjoSahOznMEGHCRzfEIrcVsIgw jVonLhDVI3iO2i3b48e+LZgxHdDKmIXzTZmGy8LtB+vutYxuwIPD3D0SfNma2Dy8bH fIaAfkbRt74xUeORaRxWYpDorVwd4ufaJvtD42xpkC7PBMC6VvqF0GH+RRw5BS9Y9F V/XLOyj7zDVj9SRnU2xFjKcCjHrJhnvUImDYRi1Ao/BOX9t7RGebtf4046niW1Mxzw 6jRAK7SIiwi+H/pR2F0wkuhdZKh7EXx+LRh+Cy2bMyX9b9vO+N7Fcdjv0axjqcDG8o QNbVDBUWvjxFg== Received: by mail-wr1-f47.google.com with SMTP id h4so13289142wrt.12 for ; Wed, 19 May 2021 02:56:19 -0700 (PDT) X-Gm-Message-State: AOAM5313Cr7L/RJ0eyQfvJOOb0lYtQJhJ7MJYBkvHl1c+hGez1zbSDqp BkoZ8d8Hmt/6RQZGMI6krhHu2KHplSi3/tMKpMc= X-Google-Smtp-Source: ABdhPJxirDRKmtA1WHZsh+96IOOD39lg70KHdjcBxrpwvP9eC7gAvKJhLCHII5pv2yoe8aJ74qHdnQpI6dkT/Ni7pnk= X-Received: by 2002:adf:e589:: with SMTP id l9mr13892459wrm.361.1621418178204; Wed, 19 May 2021 02:56:18 -0700 (PDT) MIME-Version: 1.0 References: <20210517203343.3941777-1-arnd@kernel.org> <20210517203343.3941777-2-arnd@kernel.org> In-Reply-To: From: Arnd Bergmann Date: Wed, 19 May 2021 11:55:05 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 1/4] kexec: simplify compat_sys_kexec_load To: "Eric W. Biederman" Cc: linux-arch , Christoph Hellwig , Alexander Viro , Andrew Morton , Borislav Petkov , Brian Gerst , Ingo Molnar , "H. Peter Anvin" , Thomas Gleixner , Linux ARM , Linux Kernel Mailing List , Linux-MM , kexec@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=GYQJtAh0; spf=pass (imf26.hostedemail.com: domain of arnd@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=arnd@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 7F18F40B8CDE X-Stat-Signature: dje48jn7d7hgaqgoq8xgt59ty5udw5eg X-HE-Tag: 1621418180-843655 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 19, 2021 at 12:45 AM Eric W. Biederman wrote: > Arnd Bergmann writes: > > On Tue, May 18, 2021 at 4:05 PM Arnd Bergmann wrote: > >> On Tue, May 18, 2021 at 3:41 PM Eric W. Biederman wrote: > > I think something like the untested diff below is enough to get rid of > compat_alloc_user cleanly. > > Certainly it should be enough to give any idea what I am thinking. Yes, that looks sufficient to me. I had started a slightly different approach by trying to move the kimage_alloc_init() into the top-level entry points to avoid the extra kmalloc, but that got rather complicated, and your patch is simpler overall. The allocation could still be combined with kexec_load_check() into a new function to reduce the number of duplicate lines, but if you think the current version is ok, then I'll leave this part as it is. I've fixed a duplicate kfree() and some whitespace damage, and rebased the rest of my series on top of this to give it a spin on the build test boxes. I'll send a v4 series once I have made sure there are no build-time regressions. Can I add your Signed-off-by for the patch? Is there a set of tests I should run on it? Arnd