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=-9.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 17FD2C433B4 for ; Tue, 27 Apr 2021 23:01:14 +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 6E4766105A for ; Tue, 27 Apr 2021 23:01:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6E4766105A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.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=L4D1jBqHyv2BEi41dSV+6UguY0h7w7PUXQX05QUeN78=; b=MKM682APJiAmq320YGP7xvJry 7OyG+kLn+0xeyP4am8tUUVwXBsA7B/KDLMmqxmdNgtDB8OzEJhUGUGTMYG0U8sTViLGT0cEmwre3S VgvRC+lt9fZlee453YsdWXL5Xt264eVZnvt3FuJO6/FTymrnZMDcDbiNKI3NwcbkPGRK2piq/iAQb tqa+zHlxKrPWKPSYTUmCa3I/78SUy67plsz49nSnSlL1y7FbHm1b2vMa/hmZZG7pyYZDm9vM70ohW m8PESw/6+7T7rVPGW6CntXKFI+mSfYpNaw6JEfVxnosKyJOFDkJmgTRHF+eDEy0aQjnyc7qBzIKJx u9bcoE1tw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lbWf3-002Nlh-Iv; Tue, 27 Apr 2021 22:58:40 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lbWf0-002Nko-GC for linux-arm-kernel@desiato.infradead.org; Tue, 27 Apr 2021 22:58:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=j981qgFtuq6fxvASGv/oGF89vtoeN/Z0NvemUV1hOwQ=; b=rft3wmsBsCWYCw4yBEk546Ynfq LxLj54OmrDQBb2lNKfM9fzqPkwmX8IunNLZVkZI1NCX6GkwjhCPaBydAcj8mb77/XnKTroRUvXYS9 jMP0V0Du1lDxILydr9hdIFDfztWHQ57nDL1UGw/tskp/NlOeMzN1NldUy5c5oT4NSk/BGavE3thoV IbqnsbPjsofAbqlKLW7+SfKvVmWFKXcW6yVzsqxdfROLb2hLkirBtAgnGa9JXn5sO++Xh6kLtInvj 8minc/EUcq5W5071E/WZTTNeGylW5rQCE3o1jxNl/nKa6KtTsFbGec3jzETG9XQXiPjly3bOsVN68 xlnabpUw==; Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lbWex-00H4bM-Ub for linux-arm-kernel@lists.infradead.org; Tue, 27 Apr 2021 22:58:29 +0000 Received: by mail-pf1-x42c.google.com with SMTP id h11so2766718pfn.0 for ; Tue, 27 Apr 2021 15:58:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=j981qgFtuq6fxvASGv/oGF89vtoeN/Z0NvemUV1hOwQ=; b=eMNwqZvisi/AEYs+s/j2rYEwpIK7mfT3y2VNF93m2aZf6cv/xm3EqCRd1YYQiLu+Ig +Eo2YaS7O6RGHL5PfjWD8W4UbrOhrlUY4J9PeNEhX+m+sLXto+2lCuLamJHySwM0uB25 cOoKplxtQYeXK691N+YX9kf7MWv8Z85+u6P40= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=j981qgFtuq6fxvASGv/oGF89vtoeN/Z0NvemUV1hOwQ=; b=K4gSRxC0IrkuMZ5g1iUSgjSJV2EhM0p0aiY70befdDp5RW3fftXh5lxsFqwSGzIMgQ Gk9Az4z/u4IshqCXzx3ZfEO3m1G0r2YNCMaZFkXeq8UxCUmm13ae1iCDQEhdNOAx71Yr sCyKEErx/kZHcOlZY+ZijC2tpzAJvnHd5r55uTk5+8mWoVWvHabjXFfTaIAgtER3ZxV0 1YQOtXR52auKemcOiRGYq5lQF9/rn6nhBaF+wcWsksyA3OItOM0U2zblwZhGiCqxt2kE a9KB5zGE3+vsLaly+TV+7n0KrE23oyMtMyKpf4s2XBfX8Et7wb6qUN32IdUA3rRAZJEc 4mOQ== X-Gm-Message-State: AOAM533zUGCnb5O7swhGmQh+nyHmPIqmmgq6lNT0Z45vVfhby0JQH2az 73fhSwxw77sK8e+M5jqdRXWhVA== X-Google-Smtp-Source: ABdhPJz2smX0IXcQ12KDTvvczsej3/4e1ExBTvxs12ZncPpHAXGAlCAocFZngK+A9ulNrmxn+uRjiA== X-Received: by 2002:a63:ff22:: with SMTP id k34mr23954095pgi.336.1619564305243; Tue, 27 Apr 2021 15:58:25 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id fy1sm3353275pjb.14.2021.04.27.15.58.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Apr 2021 15:58:24 -0700 (PDT) Date: Tue, 27 Apr 2021 15:58:23 -0700 From: Kees Cook To: Bill Wendling Cc: Ard Biesheuvel , Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] arm64/vdso: Discard .note.gnu.property sections in vDSO Message-ID: <202104271557.412DD365A@keescook> References: <20210423205159.830854-1-morbo@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210423205159.830854-1-morbo@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210427_155828_026513_8E30B08F X-CRM114-Status: GOOD ( 16.89 ) 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 Fri, Apr 23, 2021 at 01:51:59PM -0700, Bill Wendling wrote: > The arm64 assembler in binutils 2.32 and above generates a program > property note in a note section, .note.gnu.property, to encode used x86 > ISAs and features. But the kernel linker script only contains a single > NOTE segment: > > PHDRS > { > text PT_LOAD FLAGS(5) FILEHDR PHDRS; /* PF_R|PF_X */ > dynamic PT_DYNAMIC FLAGS(4); /* PF_R */ > note PT_NOTE FLAGS(4); /* PF_R */ > } > > The NOTE segment generated by the vDSO linker script is aligned to 4 bytes. > But the .note.gnu.property section must be aligned to 8 bytes on arm64. > > $ readelf -n vdso64.so > > Displaying notes found in: .note > Owner Data size Description > Linux 0x00000004 Unknown note type: (0x00000000) > description data: 06 00 00 00 > readelf: Warning: note with invalid namesz and/or descsz found at offset 0x20 > readelf: Warning: type: 0x78, namesize: 0x00000100, descsize: 0x756e694c, alignment: 8 > > Since the note.gnu.property section in the vDSO is not checked by the > dynamic linker, discard the .note.gnu.property sections in the vDSO. > > Similar to commit 4caffe6a28d31 ("x86/vdso: Discard .note.gnu.property > sections in vDSO"), but for arm64. > > Signed-off-by: Bill Wendling Seems good to me. If we ever need the BTI markings, etc, for the vDSO, we can revisit it then. Reviewed-by: Kees Cook -Kees -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel