{"id":807627,"url":"http://patchwork.ozlabs.org/api/patches/807627/?format=json","web_url":"http://patchwork.ozlabs.org/project/lede/patch/1504099438-25344-1-git-send-email-dedeckeh@gmail.com/","project":{"id":54,"url":"http://patchwork.ozlabs.org/api/projects/54/?format=json","name":"LEDE development","link_name":"lede","list_id":"lede-dev.lists.infradead.org","list_email":"lede-dev@lists.infradead.org","web_url":"http://lede-project.org/","scm_url":"","webscm_url":"http://git.lede-project.org/","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<1504099438-25344-1-git-send-email-dedeckeh@gmail.com>","list_archive_url":null,"date":"2017-08-30T13:23:58","name":"[LEDE-DEV,ubox,1/3] kmodloader: fix endianess check","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"872348d9a7ee19505c06b4b5abb3f24f573f2c38","submitter":{"id":65331,"url":"http://patchwork.ozlabs.org/api/people/65331/?format=json","name":"Hans Dedecker","email":"dedeckeh@gmail.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/lede/patch/1504099438-25344-1-git-send-email-dedeckeh@gmail.com/mbox/","series":[{"id":611,"url":"http://patchwork.ozlabs.org/api/series/611/?format=json","web_url":"http://patchwork.ozlabs.org/project/lede/list/?series=611","date":"2017-08-30T13:23:58","name":"[LEDE-DEV,ubox,1/3] kmodloader: fix endianess check","version":1,"mbox":"http://patchwork.ozlabs.org/series/611/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/807627/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/807627/checks/","tags":{},"related":[],"headers":{"Return-Path":"<lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133;\n\thelo=bombadil.infradead.org;\n\tenvelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"rQopJBPL\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"FKENe/Xt\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xj5p5477Nz9t2x\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 30 Aug 2017 23:24:45 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dn2yr-0003Ey-UU; Wed, 30 Aug 2017 13:24:29 +0000","from mail-io0-x241.google.com ([2607:f8b0:4001:c06::241])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dn2yo-0002rI-0r\n\tfor lede-dev@lists.infradead.org; Wed, 30 Aug 2017 13:24:28 +0000","by mail-io0-x241.google.com with SMTP id j99so959604ioo.4\n\tfor <lede-dev@lists.infradead.org>;\n\tWed, 30 Aug 2017 06:24:05 -0700 (PDT)","from cplx43.eu.thmulti.com ([141.11.62.7])\n\tby smtp.gmail.com with ESMTPSA id\n\tv142sm2227772ita.35.2017.08.30.06.24.03\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tWed, 30 Aug 2017 06:24:04 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:\n\tList-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id:\n\tDate:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:\n\tResent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:\n\tList-Owner; bh=FQ8ZeblDuhTUT8TGNpsfq8gEuCDPqXC9M90y1C/RS4E=;\n\tb=rQopJBPLqTk+9N\n\tCPSnLIQvickx+7N3JtA7rfEPUh9qSZnabecPiBcRt+YpjIczzej1xGlI6Bi9JfwtsBmmZy6b4bKof\n\t/RQL0I+Ge089anZC6CrtqsUu3GaxJTjRISkLh4UrEckvywkKjr16iQN35hq95bZdDRIWIfdrv7Cd3\n\tUHs2ydsNKWUEsS/hSHWDYw3E4xDp1qsFyrVkRvaF/R4uft+0GjXXoxbm2WZqHd882U3yzczdZduK8\n\tCjmqsa2J7M0EPuy7dH09H+1QHUrKYr1HrqBwZpOtqoowxeeKSCFZfpPtoL2AcPaSembnanbUjVJFM\n\t9PcNKG5pLGkyxuHBXPpw==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id;\n\tbh=Ewmfxj4IILrG+k6OijDlkrJ2eQUWhCYyTwYJSH15cx4=;\n\tb=FKENe/Xt+xI2gO03pZjDvFY6EHQ/cFU/NhboD1SjnFUVwxwEcq9fq7UdJSJcJ4rZ8K\n\tCX3+xNvSkv66QprWRewmuc/e8eTTtdEW1WpFq9/ChDHh3B7Sew7pImO5GIV2zDxb4wP3\n\tfeb5I9Obrurpp/5iqbHLYnS/26fnuGCp85QFki573X4+CCm7nU5C42dyEfQZkJIAsTQ5\n\tt0lF8Yyfj+zVqF9SRNR9Gg1sqmcOL/XXXZTFTvZFQeTpfawB3JLuFKZeJL3OOazqYzhB\n\tRgZabM1RTvCLTljutKnRrErhm3bMaiKiQyxR7qLcfdAH/XQPOy7UzSsimqSCXROr/O8G\n\tvVXw=="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id;\n\tbh=Ewmfxj4IILrG+k6OijDlkrJ2eQUWhCYyTwYJSH15cx4=;\n\tb=VvkbCqxl6+i6FkN38Poa2+QMparlRk5OUQi8djjef3doQ1Uop0L4vdIIKTxfIcHGgr\n\tzAf5o3DTqXB41e0/JqmOhlB6E0wPkpjcdgP2s+oL5RUnTQdmEx2X90++DdQj9gtl5vX3\n\t9nbjffXNjE9u1yJxImVMJ1hxU7G8J3zG/zTC+x4l8HjAk9SCpR/YiJnTfdAnvf1XcrIS\n\t3jyQhGVkUHfRWUAJ2mEYA9msFs9Ivk24j0aMHDiFn0fc3BQPwZR5V+DYShGANgM3MJYB\n\t+Pfa57UbyesC31TI1W1Zaf9IaNVxBqEgzVlBnBoRhJCnPBm8MNWGfyLQZs7jPle47wst\n\tt2bQ==","X-Gm-Message-State":"AHPjjUiftPbtDUIvmab+vxQZ9iHZolwF1Q8EamL4WZvr6ljPEQVDjCqO\n\tS8ZmsodKoCHR0dMx","X-Received":"by 10.107.162.142 with SMTP id\n\tl136mr1324394ioe.192.1504099444635; \n\tWed, 30 Aug 2017 06:24:04 -0700 (PDT)","From":"Hans Dedecker <dedeckeh@gmail.com>","To":"john@phrozen.org,\n\tf.fainelli@gmail.com,\n\tlede-dev@lists.infradead.org","Date":"Wed, 30 Aug 2017 15:23:58 +0200","Message-Id":"<1504099438-25344-1-git-send-email-dedeckeh@gmail.com>","X-Mailer":"git-send-email 1.9.1","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170830_062426_232382_B8BB999A ","X-CRM114-Status":"UNSURE (   8.74  )","X-CRM114-Notice":"Please train this message.","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4001:c06:0:0:0:241 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\n\tprovider (dedeckeh[at]gmail.com)\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","Subject":"[LEDE-DEV] [PATCH ubox 1/3] kmodloader: fix endianess check","X-BeenThere":"lede-dev@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<lede-dev.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/lede-dev>,\n\t<mailto:lede-dev-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/lede-dev/>","List-Post":"<mailto:lede-dev@lists.infradead.org>","List-Help":"<mailto:lede-dev-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/lede-dev>,\n\t<mailto:lede-dev-request@lists.infradead.org?subject=subscribe>","Cc":"Hans Dedecker <dedeckeh@gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"Lede-dev\" <lede-dev-bounces@lists.infradead.org>","Errors-To":"lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"},"content":"Use __BYTE_ORDER macro to check system endianess as the macro's\n__LITTLE_ENDIAN, __BIG_ENDIAN are defined irrespective of the\nsytem endianess leading to an endianess check failure on big\nendian systems.\n\nSigned-off-by: Hans Dedecker <dedeckeh@gmail.com>\n---\n kmodloader.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)","diff":"diff --git a/kmodloader.c b/kmodloader.c\nindex a6aa795..a4d492d 100644\n--- a/kmodloader.c\n+++ b/kmodloader.c\n@@ -216,9 +216,9 @@ static int elf_find_section(char *map, const char *section, unsigned int *offset\n \tint clazz = map[EI_CLASS];\n \tint endian = map[EI_DATA];\n \n-#if defined(__LITTLE_ENDIAN)\n+#if __BYTE_ORDER == __LITTLE_ENDIAN\n \tif (endian != ELFDATA2LSB)\n-#elif defined(__BIG_ENDIAN)\n+#elif __BYTE_ORDER == __BIG_ENDIAN\n \tif (endian != ELFDATA2MSB)\n #else\n #error \"unsupported endian\"\n","prefixes":["LEDE-DEV","ubox","1/3"]}