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=-11.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 13407C43460 for ; Tue, 18 May 2021 14:07:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 958BB61360 for ; Tue, 18 May 2021 14:07:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 958BB61360 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 218528E0033; Tue, 18 May 2021 10:07:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1EFD08E002F; Tue, 18 May 2021 10:07:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0B8918E0033; Tue, 18 May 2021 10:07:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0242.hostedemail.com [216.40.44.242]) by kanga.kvack.org (Postfix) with ESMTP id CBC028E002F for ; Tue, 18 May 2021 10:06:59 -0400 (EDT) Received: from smtpin38.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 4B87DB9E2 for ; Tue, 18 May 2021 14:06:59 +0000 (UTC) X-FDA: 78154528158.38.F8CD78D Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf10.hostedemail.com (Postfix) with ESMTP id E035B4080F47 for ; Tue, 18 May 2021 14:06:55 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 3BF5861350 for ; Tue, 18 May 2021 14:06:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621346816; bh=EBdubQ1sGe/Bbb8YFCgOGYR3HaooPs65ywrzHVDre7k=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=RbV02EcJhjnPpoAgtlUffPYAFOIPf2Zfq2gUt1oVyTEiAYhzQx98Z7sJ0sTGbAXaS NlBJEs1szZ4F2EEkvUJ6IACrfC7cTICSOF5VcXMYLtKj6JaDd6gz1SfFGF7u8GExsK uzoJ/uR9JOLdzl8ubsB5wcrxikl5CIBETIRLr3nNKcFnYshed5fk6DIELvnt5Eu1t9 0A7NljYACgUoCSxWmsc/iOaQtu+4wuvo8m6LHULmb3/fbpofv7qPg1TafF9e3/MrHK yVasf0WeCo6NhlMmCSCsqPhsxLkc6y1uwYZycTnNEQ8sQXnTtplHuVzt+Fk8BgyEGp sZIbwqrUxDA4w== Received: by mail-wm1-f52.google.com with SMTP id t206so5533196wmf.0 for ; Tue, 18 May 2021 07:06:56 -0700 (PDT) X-Gm-Message-State: AOAM531U1EWuOk9H5T5fV+krPMJ8VLJmG/3PkKhqanU7KQNw4eQtDbf9 axds1QJSUvkRGCg25tK8KNdLy+3/2q9WyPTzO6E= X-Google-Smtp-Source: ABdhPJx+yeQS6ZDHm5FRpgmqd8Rk2r80K5a8CnDcKJIH0RKrLCYMj6CuRTSlOrPLbmKbp1JI5kZJwEAnlPfvw/suG58= X-Received: by 2002:a1c:9895:: with SMTP id a143mr5564837wme.43.1621346814762; Tue, 18 May 2021 07:06:54 -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: Tue, 18 May 2021 16:05:44 +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" X-Rspamd-Queue-Id: E035B4080F47 Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=RbV02EcJ; spf=pass (imf10.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: rspam04 X-Stat-Signature: 3us8xxqmtpickmwt9ior8boz3d3i1s6j X-HE-Tag: 1621346815-40965 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 Tue, May 18, 2021 at 3:41 PM Eric W. Biederman wrote: > > Arnd Bergmann writes: > > > From: Arnd Bergmann KEXEC_ARCH_DEFAULT > > > > The compat version of sys_kexec_load() uses compat_alloc_user_space to > > convert the user-provided arguments into the native format. > > > > Move the conversion into the regular implementation with > > an in_compat_syscall() check to simplify it and avoid the > > compat_alloc_user_space() call. > > > > compat_sys_kexec_load() now behaves the same as sys_kexec_load(). > > Nacked-by: "Eric W. Biederman" >KEXEC_ARCH_DEFAULT > The patch is wrong. > > The logic between the compat entry point and the ordinary entry point > are by necessity different. This unifies the logic and breaks the compat > entry point. > > The fundamentally necessity is that the code being loaded needs to know > which mode the kernel is running in so it can safely transition to the > new kernel. > > Given that the two entry points fundamentally need different logic, > and that difference was not preserved and the goal of this patchset > was to unify that which fundamentally needs to be different. I don't > think this patch series makes any sense for kexec. Sorry, I'm not following that explanation. Can you clarify what different modes of the kernel you are referring to here, and how my patch changes this? The only difference I can see between the native and compat entry points is the layout of the kexec_segment structure, and that is obviously preserved by my patch. Arnd