Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp454618pxx; Thu, 29 Oct 2020 06:38:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTSpCj8OXRxMOJT2tFvff2WoSppjg2KRodMDER5L0q6NDRJleO7RqdN6f4PFwpwn6Qjiqh X-Received: by 2002:a17:906:5651:: with SMTP id v17mr4109215ejr.2.1603978697518; Thu, 29 Oct 2020 06:38:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603978697; cv=none; d=google.com; s=arc-20160816; b=B2xRB/K4YjynvZ136583Xu/644+FVl2oJ+wKz5sjQAr+UejZ1GcCIqE7G7YrpxdS3S HYF/XJwpHS2DLXiwjmsDdL4g/rmdA00v+Alo/M1rCSER4vCjqsl3oQ3dgnBodi/emZiF Lzs516R1pPBWuxkA1yHb2DH8FfiPSYuE7uR3voOBJLdrLvYdfex8HDFdRZUw2CglG1Ju Nd2hFHxolnLEAuxXJTUgrv/AkxKKBcWzYvU8IUC2XGNKVCk+SHfR2JnF1xlTyxplbMi8 Ryg9A4pjPR5yK0XD83eFiLDyL3hp8qlrqyPnf5RSeDBKlFtTpnPBYoIM5EJUBrYd/n0w MfMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=lrdBnNYM6V1qdpeAtCsBJPvSVfKaJMPs4aR/Qe3l5gI=; b=pR7acrErU0OhWNE++0acEus6dlkAu7Et9OIoBZ9YB7w2xgKCS2uWHxD/zwUYLq/JvE AtwWUmVybpy4yBV4eoxM0sWnjQGtopPm6jB0qY0fMoWco7pRyZ1EmGhr/tFP4zU4IJda Dpo/7CXUKbJwDpCh+yGT90fnXLYaj5YsuJxLF0WioYQvqJ4VDi9tmyr4Afqvl80vR2eI Tt7qE4h+Vh8rr+zkn0Iu0DWrlwLqsmVd37zlYNDq6C6/gptbKUoSx3s/B8fexyBf2Sy9 Qsi6ET+Zayfvep9D7il9FK3mYOzoStdMkhKqA5avyWLUZFoO92zT021Mfvdw+ek7Oyfh Gn2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YMyXrxe1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t9si1862980ejx.145.2020.10.29.06.37.54; Thu, 29 Oct 2020 06:38:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YMyXrxe1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727226AbgJ2NgM (ORCPT + 99 others); Thu, 29 Oct 2020 09:36:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:54768 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725787AbgJ2NgL (ORCPT ); Thu, 29 Oct 2020 09:36:11 -0400 Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 602062087E for ; Thu, 29 Oct 2020 13:36:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603978570; bh=IhR3DmS+TZFpEiDkNsRmgsp+IEHMhN3+bzXx9omzx9w=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=YMyXrxe1WtVV8tjgeLyeSLPArUsrTL2qopihARvFEIkv3UZVOsSpLREKASe4Wdd9X Ovu4KQosYZGDbOOLQ0zfb/0UeVm++ypZ/pqGBxQkAIrJXpR/N3mfyuLur37CGdCYju b8ri02vas+QKo45iDQ5hlV3csuc13qHjpghCECGQ= Received: by mail-qt1-f170.google.com with SMTP id m14so1772920qtc.12 for ; Thu, 29 Oct 2020 06:36:10 -0700 (PDT) X-Gm-Message-State: AOAM532sLot88WESlz3VQv39v/uD5zkLpzWK8bc++xat33dUSmRscf/x in0aUjapMQJs2ujtBWBxCbesXNaW95x8dd3QfYo= X-Received: by 2002:ac8:7955:: with SMTP id r21mr3553963qtt.204.1603978569360; Thu, 29 Oct 2020 06:36:09 -0700 (PDT) MIME-Version: 1.0 References: <20201026160342.3705327-1-arnd@kernel.org> <20201026160342.3705327-2-arnd@kernel.org> <20201026165543.GA42952@C02TD0UTHF1T.local> In-Reply-To: <20201026165543.GA42952@C02TD0UTHF1T.local> From: Arnd Bergmann Date: Thu, 29 Oct 2020 14:35:53 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/4] arm64: hide more compat_vdso code To: Mark Rutland Cc: Catalin Marinas , Will Deacon , Arnd Bergmann , Vincenzo Frascino , Ard Biesheuvel , Andrei Vagin , Michel Lespinasse , Mark Brown , Linux ARM , "linux-kernel@vger.kernel.org" , Dmitry Safonov , Andrew Morton Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 26, 2020 at 5:55 PM Mark Rutland wrote: > On Mon, Oct 26, 2020 at 05:03:29PM +0100, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > When CONFIG_COMPAT_VDSO is disabled, we get a warning > > about a potential out-of-bounds access: > > > > arch/arm64/kernel/vdso.c: In function 'aarch32_vdso_mremap': > > arch/arm64/kernel/vdso.c:86:37: warning: array subscript 1 is above array bounds of 'struct vdso_abi_info[1]' [-Warray-bounds] > > 86 | unsigned long vdso_size = vdso_info[abi].vdso_code_end - > > | ~~~~~~~~~^~~~~ > > > > This is all in dead code however that the compiler is unable to > > eliminate by itself. > > > > Change the array to individual local variables that can be > > dropped in dead code elimination to let the compiler understand > > this better. > > > > Fixes: 0cbc2659123e ("arm64: vdso32: Remove a bunch of #ifdef CONFIG_COMPAT_VDSO guards") > > Signed-off-by: Arnd Bergmann > > This looks like a nice cleanup to me! I agree we don't need the array > here. > > Reviewed-by: Mark Rutland Thanks! I see the patch now conflicts with "mm: forbid splitting special mappings" in -mm, by Dmitry Safonov. I have rebased my patch on top, should I send it to Andrew for inclusion in -mm then? Arnd