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=-3.8 required=3.0 tests=BAYES_00, 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 7ED7AC433E0 for ; Tue, 12 Jan 2021 00:59:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 40D3722BF5 for ; Tue, 12 Jan 2021 00:59:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730341AbhALA7M (ORCPT ); Mon, 11 Jan 2021 19:59:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726215AbhALA7L (ORCPT ); Mon, 11 Jan 2021 19:59:11 -0500 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BB73C061575; Mon, 11 Jan 2021 16:58:31 -0800 (PST) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz80t-009Rjx-NZ; Tue, 12 Jan 2021 00:58:23 +0000 Date: Tue, 12 Jan 2021 00:58:23 +0000 From: Al Viro To: Willem de Bruijn Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, willy@infradead.org, arnd@kernel.org, Willem de Bruijn Subject: Re: [PATCH 0/6] fs: deduplicate compat logic Message-ID: <20210112005823.GB3579531@ZenIV.linux.org.uk> References: <20210112003017.4010304-1-willemdebruijn.kernel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210112003017.4010304-1-willemdebruijn.kernel@gmail.com> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 11, 2021 at 07:30:11PM -0500, Willem de Bruijn wrote: > From: Willem de Bruijn > > Use in_compat_syscall() to differentiate compat handling exactly > where needed, including in nested function calls. Then remove > duplicated code in callers. IMO it's a bad idea. Use of in_compat_syscall() is hard to avoid in some cases, but let's not use it without a good reason. It makes the code harder to reason about.