Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp429993rwd; Tue, 30 May 2023 23:46:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6libRW0AeSdzWaYeyjHEbOGQ9OscYcCC/mQ0u4JRuIa8PAOpvyB0X+IZkXsgx7i6AQOya6 X-Received: by 2002:a17:902:8546:b0:1ad:dbea:6e09 with SMTP id d6-20020a170902854600b001addbea6e09mr4297613plo.66.1685515571631; Tue, 30 May 2023 23:46:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685515571; cv=none; d=google.com; s=arc-20160816; b=UZyHJy3rEjzBJLGasBUc4ZYuC9svx4we6cW3sxXw1Cpmj2T2JPaxvo5nkVYCLbthx9 nJZAkMf5aAzjnfgESaaTVU/DxdaOyzX4AUOUNPTBDZr8uOztidrr8txY6Ih/xnbyCIKg g3ORGFimRoPwVX1YDPvG1bXUIJqd5MHw0btcVJorF4R4//L0kZZXLgFXwcnHiZCYFeJv DswX7nssJsjBPVuFGKxNz/+XL5aTWbBKwfaUfGZNBb+2ZFK98odWbsetCELN1YbHLpkO eH1ChWnv8cHKJz3HqU+eG4iKT+IAe5eYlnyMsUh75um8YyL67FBTWGTo2VwgFF9v7Y7K 8Kmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date; bh=2qmuDO+xrHh9g0wcVRBg74MoVHeNLwzOYOsrYGiKNtc=; b=hlYnTwXiKktoBNDD6ROmj7Ymiz6w/pkzRZnheStvqRKJqL6xCfIOTYVbENdLSrxG6i WRiyuQheYS6x9bLtHidl2SuPNwNrzdE9dF18AqLv++vN034bSeiDzSoHIKpMb+DIoqfI LflV6Ic//9lIchicqp8p7KqtrNVbhTFCHoQMYO+a1rFB7OQzbRLcja2sIyi+XplTDgQt CxTt5+e7kGlensSkAWd8CMyv5HzF3a2JlzWr0a01Sx4R2dZl2Z6TYdSN8p35mlutCEA8 McNqthNKFNIiiC5N+ZXD+A840ldKEof0bNb7FcoqWY8END3tObqdlo7+RIbWivs0Qzsa Vpug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u9-20020a170902b28900b001aaed82c2afsi392357plr.171.2023.05.30.23.45.57; Tue, 30 May 2023 23:46:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232250AbjEaG0b convert rfc822-to-8bit (ORCPT + 99 others); Wed, 31 May 2023 02:26:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232239AbjEaG03 (ORCPT ); Wed, 31 May 2023 02:26:29 -0400 Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B81B59F; Tue, 30 May 2023 23:26:28 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 6F1F661CECF8; Wed, 31 May 2023 08:26:27 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id OMHGyQ5Lvv4L; Wed, 31 May 2023 08:26:27 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 21F3561A7038; Wed, 31 May 2023 08:26:27 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 6iJ5euobrcBa; Wed, 31 May 2023 08:26:27 +0200 (CEST) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id E70AC616B2CF; Wed, 31 May 2023 08:26:26 +0200 (CEST) Date: Wed, 31 May 2023 08:26:26 +0200 (CEST) From: Richard Weinberger To: Johannes Berg , Azeem Shaikh Cc: Kees Cook , kernel test robot , Maxim Krasnyansky , oe-kbuild-all , linux-hardening , linux-kernel , anton ivanov , linux-um Message-ID: <959209724.158062.1685514386841.JavaMail.zimbra@nod.at> In-Reply-To: <8033fb8f9677cf9aae411e97eb554d251ca03011.camel@sipsolutions.net> References: <20230530164004.986750-1-azeemshaikh38@gmail.com> <202305311135.zGMT1gYR-lkp@intel.com> <09A0C6FA-669F-4B73-9620-43AEA17E5D0C@kernel.org> <8033fb8f9677cf9aae411e97eb554d251ca03011.camel@sipsolutions.net> Subject: Re: [PATCH] uml: Replace all non-returning strlcpy with strscpy MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Originating-IP: [195.201.40.130] X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF97 (Linux)/8.8.12_GA_3809) Thread-Topic: Replace all non-returning strlcpy with strscpy Thread-Index: hWem4mJ9JdjGKB725Dk79ubQ3raPHg== X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE,T_SPF_PERMERROR autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- Ursprüngliche Mail ----- >> Ah, yeah, this is another "not actually in the kernel" cases. Let's ignore this >> strlcpy for now. >> > > Well, strlcpy() isn't part of libc either, so all this would need is to > add it to user.h just like strlcpy() is now? I think so. Azeem, can you please test your changes with this fixup applied? diff --git a/arch/um/include/shared/user.h b/arch/um/include/shared/user.h index bda66e5a9d4e3..e5d3fbbafe4d2 100644 --- a/arch/um/include/shared/user.h +++ b/arch/um/include/shared/user.h @@ -52,6 +52,7 @@ static inline int printk(const char *fmt, ...) extern int in_aton(char *str); extern size_t strlcpy(char *, const char *, size_t); extern size_t strlcat(char *, const char *, size_t); +extern ssize_t strscpy(char *, const char *, size_t); /* Copied from linux/compiler-gcc.h since we can't include it directly */ #define barrier() __asm__ __volatile__("": : :"memory") Thanks, //richard