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.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 467B0C433ED for ; Tue, 18 May 2021 14:08:46 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 B8A2161185 for ; Tue, 18 May 2021 14:08:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B8A2161185 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=d/PXTINH0iaeu1k1v1+YHhzpkNUsssvLKsLVgGHJ4h4=; b=HhDj+hL1VcbAlpd/rKt+Bo1RL rjE+ZzjhhuvvGcAyl+ZJCwWJztlj9fHCppDGq0fR7vMWQiol9a9NL2ePZ9xD8ZZcfcNv4O5NZkcD5 PsxyqB8tsM1uYdMAwDAFgktnpe2jSESasclAJq0G9sSfDbT4A6b1xGJ/9X8BLOgLChOaD+1ITLGPd Ij009WdU4WUOjlu9hZuKids/Eae4MrEAYeOAvG0NhgFwr6Y6SxgftKVJTZO5avIyMpfWIhNmGOt/s Fno/6Q1g/e6o5Dw/+WJ2FEeFf+vhO6Vx6Lue/YQA7Y2jBmYVXLutY2UEY3H4hJpitWbNuwS7dupaH t2WjSfRFQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lj0NG-000xW7-So; Tue, 18 May 2021 14:07:07 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lj0N9-000xUq-3K; Tue, 18 May 2021 14:06:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=V3bhdLu4L3q0+RRecS/Q5h7MrhHzILgjrKVS3M7jBKw=; b=PRIE09J0xYLj24HRKBGwwzCVyf ZEay9ptaeWKcQD+QiVh84hmi7fe6tD4gVZL5K88YXKoWMVVZmFdP5pA8vk/FP30pSqgtie4fmbXTt 5uQw50uNhzoH7MpN04XCCgij29rGePs4pv0jrO575vGMQ+Qm8UaUyvPW1dLQdPF+Dm+tNOv0aZMvG 2o1k2PDqCL5Uim0tktvdDa+vzFXOSkHkF7kbF/TS/60NcvCNaKMwqKN8Z2e9vNzlp5f+7SJO2XfQf kGsT78/DA10kyNp3GgPtCar12goTtTN8SCWbSfweSNAshN4SIm8JaIOqZ3J2scPBW6vSwFsst7AvD ydS41jjQ==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lj0N6-00EiBB-Ge; Tue, 18 May 2021 14:06:57 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 220086117A; 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-f42.google.com with SMTP id o127so5494593wmo.4; Tue, 18 May 2021 07:06:56 -0700 (PDT) X-Gm-Message-State: AOAM533rfAPoKzMhU1LSLAFDpCsO6S8vPoTH29sVSs6vhqmvhkg+nHLg UeTctcdl91BX87kOdg2aq3DQztFHMhOz/r23Cpw= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_070656_592677_484E47B8 X-CRM114-Status: GOOD ( 22.89 ) 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, 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel