Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp4000599rdg; Wed, 18 Oct 2023 11:48:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFg9/tjaNYAAN8CiRxczm4G+v+o3XTUQNg/1bF0d2iXJqRqcW4hrgXtnSLuCRExxH+DgFI2 X-Received: by 2002:a17:90a:e517:b0:27d:4d6d:8379 with SMTP id t23-20020a17090ae51700b0027d4d6d8379mr5349805pjy.48.1697654903217; Wed, 18 Oct 2023 11:48:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697654903; cv=none; d=google.com; s=arc-20160816; b=MfBYQ3tDyWm+NcRzY5a3uaW9vCWYmJgCkc9e70BgG8sPhyd+XvuWIOCnqbtDiSpwij 0TAPFVT75jmrpnEpBJnMCAC+fLYHtwk3N5iJxRMwq9QlHLvqRUNu7ZxWItKwd0Gki46G Z3xsVVhQQNMtLDBfrb0OHEipRUX5nRdRG18V4yfsyWndvEje26q0W1gR/5R/acVDTSWK SA/+YfgGVUZTo+GwCTw7djlxA4jDVmeDYNthlpwxSfoIq54oEYBj5kGfSKXCOi7hW3zt OyQo5n9uzxxar1MCdAvTWwtKoSmA9hb3Bey2vEi7lOBlLhYUPd24cmaW1KQKnLKFeg/s 7imQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from; bh=mIDpBnnjD1WunlaGc4O6AwQ6sW5R9u3+ry9UKNGNwYk=; fh=G8Z8hiKw7HyTxGf2Ls+8oGJTQCg5ZicHV8+9Zruf9pc=; b=RvFAxREXpnkF/REbRQ66EZ9Tp1g2dC/CuQv62gWDN0OtUWl9PXLCSN6CLGjyaDYMRr zhCCjKqJli3Ee2eIRJwMFeKbH1lffZla8KAasqZ7gxAKlHJyjokUCT2rGvlN32Dds5Bn M96i/nwbUEIjP4rYsI3UtHkAm+tSdkncoRbvzthYddxDbOLZQWZs0piPV5A/BkJuWHWl S5VP9L6o+HA0kNVJs+wO/qI5WMY4oiWetitT0azR4tNSJbiy6+WqPHiaklXk+sxLBJVB Em516W6XfRKpL08p4v4yQjvYZqIqilTmy/pGY0VPRHqahJggRG6Jt/kMmdAc3VSPqXcI Z+Gw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id nv3-20020a17090b1b4300b0027cd01b6caasi536820pjb.47.2023.10.18.11.48.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 11:48:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 60D198100DBE; Wed, 18 Oct 2023 11:48:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229695AbjJRSsJ (ORCPT + 99 others); Wed, 18 Oct 2023 14:48:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjJRSsJ (ORCPT ); Wed, 18 Oct 2023 14:48:09 -0400 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B76DF114 for ; Wed, 18 Oct 2023 11:48:05 -0700 (PDT) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4S9fxD6sb1z1r1fc; Wed, 18 Oct 2023 20:48:00 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 4S9fxD5Pq3z1qqlS; Wed, 18 Oct 2023 20:48:00 +0200 (CEST) X-Virus-Scanned: amavis at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavis, port 10024) with ESMTP id yVsnDci_gSYG; Wed, 18 Oct 2023 20:47:59 +0200 (CEST) X-Auth-Info: z53x+HAGnC5Mr85hNarHhEetogq4Juc1fsSdAKqHPeyff1cH7hkefuC/L5r3bMDv Received: from igel.home (aftr-62-216-205-223.dynamic.mnet-online.de [62.216.205.223]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 18 Oct 2023 20:47:59 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id C38602C1354; Wed, 18 Oct 2023 20:47:58 +0200 (CEST) From: Andreas Schwab To: Charlie Jenkins Cc: linux-riscv@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Eric Biederman , Kees Cook , Paul Walmsley , Palmer Dabbelt , Albert Ou Subject: Re: [PATCH v4 1/2] riscv: Add remaining module relocations In-Reply-To: <20231017-module_relocations-v4-1-937f5ef316f0@rivosinc.com> (Charlie Jenkins's message of "Tue, 17 Oct 2023 22:34:16 -0700") References: <20231017-module_relocations-v4-0-937f5ef316f0@rivosinc.com> <20231017-module_relocations-v4-1-937f5ef316f0@rivosinc.com> X-Yow: I am having FUN... I wonder if it's NET FUN or GROSS FUN? Date: Wed, 18 Oct 2023 20:47:58 +0200 Message-ID: <871qdr938h.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 18 Oct 2023 11:48:16 -0700 (PDT) X-Spam-Level: ** On Okt 17 2023, Charlie Jenkins wrote: > +static int apply_r_riscv_sub6_rela(struct module *me, u32 *location, Elf_Addr v) > +{ > + *(u8 *)location = (*location - ((u8)v & 0x3F)) & 0x3F; I think that should use *(u8*) on both sides. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."