From patchwork Tue Oct 18 20:51:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Jones X-Patchwork-Id: 4314 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp2157264wrs; Tue, 18 Oct 2022 13:59:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6MmRLM5m4c0JAz+1EIBuRXYSrf/Re96meE8wdv6Cbyh7kBNH9PXgrgqUnqOd4x79dUBzIu X-Received: by 2002:a17:907:b10:b0:78e:2eb4:1faa with SMTP id h16-20020a1709070b1000b0078e2eb41faamr3953135ejl.216.1666126791481; Tue, 18 Oct 2022 13:59:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666126791; cv=none; d=google.com; s=arc-20160816; b=A1e1U2OEVCaAOJNdTGf/cKkVEaX64GWdCPNB+oksC53KDYCr57TOAp623wsbL5BNMT yOm50UcbmskfD/2cU2bSK2TBPdbvo9emK4sISz38nCSku5ryBNLSaODeWJGvUFUmJ69j HhWIzxP9W7660OgdDeCVGXfDDcXbqEENjWikEoinm6lkR5hIdYLlnWYokx4bCBwmK9dl dRl0qxyPSfltMKSU2PZJoqF//kANA7Z6FKUvk2LYSNdyWRE1h5xvpG207sS75Oj/0ku9 rstNV5ZiAysnGHVc92HBZAcz4UEoHwfgX+oIzknrhd8ze8PgO+wKkwS5wIlThZiG+NiP 7DNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eWi6wuB5HGGcs2ZE5l92syX7bW4mEyCwXTaW+zedCrM=; b=I9jXVt4PWNI0B0/hApJ1zuwEVilDy6KeVMy8ezi3mx5Xacqob8PAM8sNn7vxIplUGd 7dOt2qlSxoEoXqoa+1LMdHIUiGD6Z/ylrPv7FAEIQ/CjQAs2/eOaDj63ozVXZcOoiTxr uEuPEmjs2UEJk2zJfTt+PdVmSzhcDIODzhdxSt6+JFqm0gG5LAv86tn8vw+i1VgXyqqm Ob96ZFTMb+cocPT6BNQVDZIUS0N5JaROAI6t0PUhAjp3d5QHdeSR19K1oloB2tW8Tv3o CBkxGtvEYi3k5AOfs8PL1IWaRAzEmN5a8lzwLlvV+po/4y4322vOLdAz/JM6gJKWOn/g r0rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dYUDDVHE; 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=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 4-20020a170906328400b0078d473448afsi11511084ejw.233.2022.10.18.13.59.26; Tue, 18 Oct 2022 13:59:51 -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=@redhat.com header.s=mimecast20190719 header.b=dYUDDVHE; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229765AbiJRUvf (ORCPT + 99 others); Tue, 18 Oct 2022 16:51:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229756AbiJRUve (ORCPT ); Tue, 18 Oct 2022 16:51:34 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 282E883F0B for ; Tue, 18 Oct 2022 13:51:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666126291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eWi6wuB5HGGcs2ZE5l92syX7bW4mEyCwXTaW+zedCrM=; b=dYUDDVHEuQQZH6h12ti9N0sziwC9NoAxgJ3WwyMhhDBqwWN/He00AcKhmQoFcOL2KfWy3n /Wvi2Nbxlc9hvPU2Atn49vuf4db5bBxV2w/OsP3qIISn3C+AmUBJ+Of5cF6EhRbafq4A/0 VpAp0C8ZCCyAy7lB24owpNnwiMMehHI= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-118-6hu93Nz5PluP7rG2sEfPfA-1; Tue, 18 Oct 2022 16:51:24 -0400 X-MC-Unique: 6hu93Nz5PluP7rG2sEfPfA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 054BB3C3C968; Tue, 18 Oct 2022 20:51:24 +0000 (UTC) Received: from random.internal.datastacks.com (unknown [10.2.17.157]) by smtp.corp.redhat.com (Postfix) with ESMTP id EAF5F9E70; Tue, 18 Oct 2022 20:51:22 +0000 (UTC) From: Peter Jones To: Evgeniy Baskov Cc: Borislav Petkov , Andy Lutomirski , Dave Hansen , Ingo Molnar , Peter Zijlstra , Thomas Gleixner , Alexey Khoroshilov , lvc-project@linuxtesting.org, x86@kernel.org, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, Ard Biesheuvel , Peter Jones Subject: [PATCH] efi/libstub: make memory protection warnings include newlines. Date: Tue, 18 Oct 2022 16:51:18 -0400 Message-Id: <20221018205118.3756594-1-pjones@redhat.com> In-Reply-To: <5de2d80398986b81b6cfcdd35436bba8bf62c0e7.1662459668.git.baskov@ispras.ru> References: <5de2d80398986b81b6cfcdd35436bba8bf62c0e7.1662459668.git.baskov@ispras.ru> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747060566314171228?= X-GMAIL-MSGID: =?utf-8?q?1747060566314171228?= efi_warn() doesn't put newlines on messages, and that makes reading warnings without newlines hard to do. Signed-off-by: Peter Jones --- drivers/firmware/efi/libstub/mem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/efi/libstub/mem.c b/drivers/firmware/efi/libstub/mem.c index 4d6c7f4fb7e..1b874096109 100644 --- a/drivers/firmware/efi/libstub/mem.c +++ b/drivers/firmware/efi/libstub/mem.c @@ -293,7 +293,7 @@ efi_status_t efi_adjust_memory_range_protection(unsigned long start, rounded_end - rounded_start, attr_clear); if (status != EFI_SUCCESS) { - efi_warn("Failed to clear memory attributes at [%08lx,%08lx]: %lx", + efi_warn("Failed to clear memory attributes at [%08lx,%08lx]: %lx\n", (unsigned long)rounded_start, (unsigned long)rounded_end, status); @@ -306,7 +306,7 @@ efi_status_t efi_adjust_memory_range_protection(unsigned long start, rounded_end - rounded_start, attributes); if (status != EFI_SUCCESS) { - efi_warn("Failed to set memory attributes at [%08lx,%08lx]: %lx", + efi_warn("Failed to set memory attributes at [%08lx,%08lx]: %lx\n", (unsigned long)rounded_start, (unsigned long)rounded_end, status);