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 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 64725C001DB for ; Fri, 4 Aug 2023 23:41:18 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qS4Pr-00045z-0z; Fri, 04 Aug 2023 19:41:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qS4Pp-00045n-Q8 for qemu-devel@nongnu.org; Fri, 04 Aug 2023 19:41:05 -0400 Received: from mailfish.xiph.osuosl.org ([140.211.166.35] helo=mailfish.xiph.org) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qS4Pm-0000F8-2o for qemu-devel@nongnu.org; Fri, 04 Aug 2023 19:41:05 -0400 Received: from [192.168.0.104] (c-24-126-94-29.hsd1.va.comcast.net [24.126.94.29]) by mailfish.xiph.org (Postfix) with ESMTPSA id 399729F798; Fri, 4 Aug 2023 23:40:55 +0000 (UTC) To: qemu-devel@nongnu.org References: Subject: [PATCH v9 07/24] linux-user: Do not call get_errno() in do_brk() Cc: richard.henderson@linaro.org, akihiko.odaki@daynix.com, deller@gmx.de From: Nathan Egge Message-ID: Date: Fri, 4 Aug 2023 19:40:50 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Received-SPF: pass client-ip=140.211.166.35; envelope-from=negge@xiph.org; helo=mailfish.xiph.org X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On 2023-08-04 18:00, Richard Henderson wrote: > From: Akihiko Odaki > > Later the returned value is compared with -1, and negated errno is not > expected. > > Fixes: 00faf08c95 ("linux-user: Don't use MAP_FIXED in do_brk()") > Reviewed-by: Helge Deller > Signed-off-by: Akihiko Odaki > Message-Id: <20230802071754.14876-4-akihiko.odaki@daynix.com> > Signed-off-by: Richard Henderson > --- >  linux-user/syscall.c | 6 +++--- >  1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index 95727a816a..b9d2ec02f9 100644 > --- a/linux-user/syscall.c > +++ b/linux-user/syscall.c > @@ -862,9 +862,9 @@ abi_long do_brk(abi_ulong brk_val) >       */ >      if (new_host_brk_page > brk_page) { >          new_alloc_size = new_host_brk_page - brk_page; > -        mapped_addr = get_errno(target_mmap(brk_page, new_alloc_size, > -                                        PROT_READ|PROT_WRITE, > -                                        MAP_ANON|MAP_PRIVATE, 0, 0)); > +        mapped_addr = target_mmap(brk_page, new_alloc_size, > +                                  PROT_READ|PROT_WRITE, > +                                  MAP_ANON|MAP_PRIVATE, 0, 0); >      } else { >          new_alloc_size = 0; >          mapped_addr = brk_page; > -- > 2.34.1 This patch is triggering a gitlab pipeline failure in Richard's tcg-next branch: https://gitlab.com/rth7680/qemu/-/pipelines/956532662 It can be reproduced locally by adding a git remote for rth7680 and then running: $ git checkout rth7680/tcg-next $ .gitlab-ci.d/check-patch.py Checking all commits since c26d005e62f4fd177dae0cd70c24cb96761edebc... f7cca41b17c809958a7f04b7d7f64af40d64e645:31: ERROR: spaces required around that '|' (ctx:VxV) f7cca41b17c809958a7f04b7d7f64af40d64e645:32: ERROR: spaces required around that '|' (ctx:VxV) total: 2 errors, 0 warnings, 12 lines checked     ❌ FAIL one or more commits failed scripts/checkpatch.pl The linux-user/syscall.c has many such places where this style check is failing. Should these be fixed in a separate patch? Sincerely, Nathan