Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp11499018rwd; Thu, 22 Jun 2023 14:17:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7gOKPGca/ezoZBRYe/U6HKAZc5iSZD8IQH8zmMdg8Qhg6jjOglVHtn+3HSNcNX8+CTj5bV X-Received: by 2002:a05:6358:cc22:b0:130:ef29:70be with SMTP id gx34-20020a056358cc2200b00130ef2970bemr9240793rwb.32.1687468640326; Thu, 22 Jun 2023 14:17:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687468640; cv=none; d=google.com; s=arc-20160816; b=GA9rcatBG/NqUGvENDWTSsUWfyKxpcKXVymoYRS+JQL1VEjslitvwf+HyCZ48xfpW9 qMePmt/8QMe50HXHG4Y3A7yUlQGQn/5dTA6Y5nDUyJVxfjp8o/lX4k3y6rtzrIhtJRnW yZeW6cBpyl/T7iQb+xLeTkti1qzoL4k1WHMGTnqdi8h5QABlpYeeDhrB3F9lVgUax9Y4 zoZrcmQaCQ4D2JCHolUtNrHsjit6GRFVstZbyWgkfQgKYlfxWlhfZWQKE2YbXDxWUSYR 0K6ph9g5EKoSlrKO+ByzxqPm7B2PChZ15Y9NJQM7z6w7ES8n0FYuDiGgJZhQ81JomMr3 o4Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=rRceC2Em04Mn9wWhJvKcNrbkdrle685Lc8A6OEbK70c=; b=d+aeyCE4ojDWvURTJXSOUTAMtoKXlPwQ/A8R/oCZ+F6AlR7yo2OrRiarIs2nqtC2/F U3QdqzZYylaX8i1LZ6zFc9rU6NzGQZPzBIqPCk3ZnZiOotrq4WEnHPtd+/3DfjU8mkcy NPP/8oRh2g+5YjNXbw5qWb/4wipx+B0GkgxBdD7nw7VxSj58TSv2OGtezQrEdwoggzML I9DnbsVQDSGjfB+OGfrYbxbWT1bpAjtaXBs1vSnNUoX26kxJmBNEJzs/R39DXWkpPAN4 j3SMkRpXY4QVIyszjRqFt3AEZIekmjXzg5UiRBihPWusT6mHrKNm1BonCV4Jyt3T2j01 6CtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=bsirya4z; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bu29-20020a63295d000000b0054fcef3f7b7si2839937pgb.539.2023.06.22.14.17.08; Thu, 22 Jun 2023 14:17:20 -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; dkim=pass header.i=@chromium.org header.s=google header.b=bsirya4z; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230343AbjFVUHK (ORCPT + 99 others); Thu, 22 Jun 2023 16:07:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229549AbjFVUHI (ORCPT ); Thu, 22 Jun 2023 16:07:08 -0400 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68E9119B for ; Thu, 22 Jun 2023 13:07:07 -0700 (PDT) Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1b53b8465daso38208595ad.0 for ; Thu, 22 Jun 2023 13:07:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1687464427; x=1690056427; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=rRceC2Em04Mn9wWhJvKcNrbkdrle685Lc8A6OEbK70c=; b=bsirya4zb/3ljIjxpSptQZleePVH2CV1o92QhMq5NxKbXezIIWsrETVcJPExRmrWI0 VHMWYzwCE0iMHi45bkHW3s864nrpv+huGC+J3hhyUhbEK63ZXZrIy9cGbq0A3JZ6CMdm JKUEQOL5VVmno+2HdwPSKy9rHYMCuMBSTbeCo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687464427; x=1690056427; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=rRceC2Em04Mn9wWhJvKcNrbkdrle685Lc8A6OEbK70c=; b=OYVWBqMmlBBhHP1lArGWqDUixI8QsQC3DUPKZrXzYjYTVWPUUxN0PIffEik5+IP03T deS00j8UIqTrB2uYd7FotddRP8TLZNP0TPndAcfSo4+Xm2EMGOHfKoMJdXdXXzAWeaQG RlrO8rvlQUDYkKttd/pfVOsqGGrvbMlPOGY6ckro5nc0Q5bYIuPcT0o+mAvCwOoIKRlN JFiRGXqUCGh/fPczNrFAUjyjIigpHdJqwwAuXavyDBYJQkJRjmEEXF7rvK3gRSI37SFT RuHLSea9HYlhGWtVObZsprbz3bsHQgT7lhoEXwgWiRY8X6IEsiapZehD9rt0BRQeRcdT D6bg== X-Gm-Message-State: AC+VfDwT6js+0umxhCuh/YrRVTCdMHwxlgFfeAEtlXAuhGpL7qUDpLH7 0HUuHmA1qUg9hYe6SI9GsCHivw== X-Received: by 2002:a17:903:190:b0:1b1:9968:53be with SMTP id z16-20020a170903019000b001b1996853bemr14191367plg.64.1687464426840; Thu, 22 Jun 2023 13:07:06 -0700 (PDT) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id iy9-20020a170903130900b001aaed524541sm5735306plb.227.2023.06.22.13.07.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jun 2023 13:07:05 -0700 (PDT) Date: Thu, 22 Jun 2023 13:07:04 -0700 From: Kees Cook To: Baruch Siach Cc: Eric Biederman , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RESEND] elf: correct note name comment Message-ID: <202306221305.5F23BC4@keescook> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Thu, Jun 22, 2023 at 09:02:43AM +0300, Baruch Siach wrote: > Only the NT_PRFPREG note is named "LINUX". Correct the comment > accordingly. > > Fixes: 00e19ceec80b ("ELF: Add ELF program property parsing support") > Signed-off-by: Baruch Siach > --- > > Resending in hope kvack.org mail server would be willing to accept my > submission this time. > > Adding LKML as a safety net. > --- > include/uapi/linux/elf.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git include/uapi/linux/elf.h include/uapi/linux/elf.h > index ac3da855fb19..a8a0cced62c6 100644 > --- include/uapi/linux/elf.h > +++ include/uapi/linux/elf.h > @@ -372,7 +372,7 @@ typedef struct elf64_shdr { > * Notes used in ET_CORE. Architectures export some of the arch register sets > * using the corresponding note types via the PTRACE_GETREGSET and > * PTRACE_SETREGSET requests. > - * The note name for all these is "LINUX". > + * The note name for most types is "CORE". NT_PRFPREG note is named "LINUX". > */ > #define NT_PRSTATUS 1 > #define NT_PRFPREG 2 Is this accurate? I see this logic in fs/binfmt_elf.c: bool is_fpreg = note_type == NT_PRFPREG; ... fill_note(&t->notes[note_iter], is_fpreg ? "CORE" : "LINUX", note_type, ret, data); i.e. only FPREG is named "CORE", otherwise "LINUX". Shouldn't this patch have CORE and LINUX swapped? -- Kees Cook