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=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 B0C13C43603 for ; Tue, 18 May 2021 06:42:50 +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 7F4EA611BD for ; Tue, 18 May 2021 06:42:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7F4EA611BD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.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:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=QOXDx3WsfEYwsFKWycH6Uxp/cXdaZRBLgrxYIqEvRE4=; b=QOqBpHq9KFehc+plFJ2wdmSfn SG4zXof6GKEg1lM3rZUVQ/UXwtqgbP/hTCLFhgVHCmH4edZGqLo1E2H+OlFLx3fZDED6AhEgcNbJk nyJuAVLUXHQw3hlZjciCs7emzh2J1FmYalobLiR7XDezTcRu/WetWnjkvQ9SufhZ8x38k7bsrFaGw DPAlJhrlLpSrd0N7tCBZIqaZkkjcq+MJwRhPg7k89oGS0SE5sNCnA1vjn4jaS2QtBkWHdGhmi/pl4 z8Q9M3IqkGPNJ6pqFqE0RI/AXRceuqDIP/v6jnGtCFmPttoYBNzgB9OxVJvuEhK7+WaZz+i4T+xRD Q4L70sbQg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1litPq-00HBPQ-Ie; Tue, 18 May 2021 06:41:18 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1litPo-00HBOP-4n; Tue, 18 May 2021 06:41:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=dWGhCQRTKQ7yccRLGUQNnETO9ChctiK/g8rLylI0oJA=; b=egmZl1PT7u82JatkbyGXeH/9NN jhaKyX5We5mWcOM/lDZ5RxzGup4x8GVqidK0TN7wKRRvQP8IGmxzvVq0CAp6l4XeQH75hggx3bu48 UG6KWUgY+fOzytBC13USeGiBkRM6ecCNYUGMBajkM3mo3i5jKFWuwF95EbJjRnXQe7Xq/bQE33CN9 1caA4At3YDa1pGcKMU632544oIlZuT82e8wACee+qtmIxrzV5Y98nOwQgDulW9uUF8p6mjwUjxLef s53WeXzYmmPZYoVHIRWyTWZZj6DhnqOUNohCzE69HpOT4zEqE+i1t2LBkBr8o5EjiwRS7qOX4NKAo Mctg6q7w==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1litP3-00Dika-IP; Tue, 18 May 2021 06:40:47 +0000 Date: Tue, 18 May 2021 07:40:29 +0100 From: Christoph Hellwig To: "Eric W. Biederman" Cc: Arnd Bergmann , linux-arch@vger.kernel.org, Arnd Bergmann , Christoph Hellwig , Alexander Viro , Andrew Morton , Borislav Petkov , Brian Gerst , Ingo Molnar , "H. Peter Anvin" , Thomas Gleixner , Linux ARM , linux-kernel@vger.kernel.org, Linux-MM , kexec@lists.infradead.org Subject: Re: [PATCH v3 1/4] kexec: simplify compat_sys_kexec_load Message-ID: References: <20210517203343.3941777-1-arnd@kernel.org> <20210517203343.3941777-2-arnd@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html 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 Mon, May 17, 2021 at 10:57:24PM -0500, Eric W. Biederman wrote: > We open ourselves up to bugs whenever we lie to the type system. > > Skimming through the code it looks like it should be possible > to not need the in_compat_syscall and the casts to the wrong > type by changing the order of the code a little bit. What kind of bug do you expect? We must only copy from user addresses once anyway. I've never seen bugs due the use of in_compat_syscall, but plenty due to cruft code trying to avoid it. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel