Skip to content

Instantly share code, notes, and snippets.

View mpe's full-sized avatar
🏚️
WFH

Michael Ellerman mpe

🏚️
WFH
View GitHub Profile
@mpe
mpe / fix-ppcle-vdso.diff
Created December 18, 2020 00:26
For the 32-bit LE VDSO, the stack & symbol macros, in particular DOTSYM, need to be based on the bitness of the current compilation unit, not the kernel.
diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h
index cfa814824285..f806e1082561 100644
--- a/arch/powerpc/include/asm/ppc_asm.h
+++ b/arch/powerpc/include/asm/ppc_asm.h
@@ -180,7 +180,7 @@ END_FW_FTR_SECTION_IFSET(FW_FEATURE_SPLPAR)
#define VCPU_GPR(n) __VCPU_GPR(__REG_##n)
#ifdef __KERNEL__
-#ifdef CONFIG_PPC64
+#ifdef __powerpc64__
$ cat stackprot-alignment.c
#include <stdint.h>
#include <string.h>
void foo(uint8_t *buf);
void vsx_func(char *src, char *dst)
{
uint8_t buf[16];
diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
index 5cdbba0cd873..1813306711b8 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
@@ -3065,7 +3065,7 @@ static bool dcn20_validate_bandwidth_internal(struct dc *dc, struct dc_state *co
}
-bool dcn20_validate_bandwidth(struct dc *dc, struct dc_state *context,
+bool noinline dcn20_validate_bandwidth_fp(struct dc *dc, struct dc_state *context,
======================================================
WARNING: possible circular locking dependency detected
5.7.0-rc2-00429-gbf4f73e8473a-dirty #1 Not tainted
------------------------------------------------------
01-ppe-setup/1864 is trying to acquire lock:
c0000003f943c118 (&mm->mmap_sem){++++}-{3:3}, at: .__might_fault+0x50/0xc0
but task is already holding lock:
c0000003f8b859c0 (&ctx->state_mutex){+.+.}-{3:3}, at: .spufs_mem_write+0x54/0xe0
diff --git a/memcheck/mc_main.c b/memcheck/mc_main.c
index 3afc9911a..68955319c 100644
--- a/memcheck/mc_main.c
+++ b/memcheck/mc_main.c
@@ -1511,7 +1511,8 @@ ULong mc_LOADVn_slow ( Addr a, SizeT nBits, Bool bigendian )
&& n_addrs_bad < VG_WORDSIZE * 2)
# elif defined(VGA_ppc64be) || defined(VGA_ppc64le)
/* On power unaligned loads of words are OK. */
- if (szB == VG_WORDSIZE && n_addrs_bad < VG_WORDSIZE)
+ if ((szB == VG_WORDSIZE && n_addrs_bad < VG_WORDSIZE) ||
Verifying that +realmpe is my blockchain ID. https://onename.com/realmpe
@mpe
mpe / gist:6c7c8e3b6422a93b722604166c9b1fc3
Last active May 3, 2016 04:27
nsq v0.3.7 not saving topics on SIGTERM
$ ./nsqd
[nsqd] 2016/05/03 14:22:09.888393 nsqd v0.3.6 (built w/go1.5.1)
[nsqd] 2016/05/03 14:22:09.888621 ID: 790
[nsqd] 2016/05/03 14:22:09.888782 TOPIC(test-mpe): created
[nsqd] 2016/05/03 14:22:09.888849 NSQ: persisting topic/channel metadata to nsqd.790.dat
[nsqd] 2016/05/03 14:22:09.888954 DISKQUEUE(test-mpe): readOne() opened test-mpe.diskqueue.000000.dat
[nsqd] 2016/05/03 14:22:09.894471 TCP: listening on [::]:4150
[nsqd] 2016/05/03 14:22:09.894541 HTTP: listening on [::]:4151
[nsqd] 2016/05/03 14:22:13.606642 200 GET /stats (10.61.2.158:49674) 163.585µs
<SIGTERM sent here>
@mpe
mpe / gist:dd79370eff8f52687a08
Created May 8, 2015 08:54
Duplicate message IDs leaving to E_FIN_FAILED
Clients:
A = 172.17.42.1
B = 10.61.161.21
Message ID in question is: 0844bda88acd2000
[nsqd] 2015/05/08 07:44:11.394365 nsqd v0.3.5 (built w/go1.4.2)
...
[nsqd] 2015/05/08 07:46:09.005252 PROTOCOL(V2): [172.17.42.1:50818] [FIN 0844bda88a4d2000]
12:29:24.173123 rename("/data/kisskb-slave-testslave.diskqueue.meta.dat.tmp", "/data/kisskb-slave-testslave.diskqueue.meta.dat") = 0
12:29:24.173520 futex(0xa486d8, FUTEX_WAKE, 1) = 1
12:29:24.173556 epoll_wait(5, {}, 128, 0) = 0
12:29:24.173578 futex(0xc2081b32f0, FUTEX_WAIT, 0, NULL) = 0
12:29:24.173976 open("/data/kisskb-builds:slaves.diskqueue.meta.dat.tmp", O_RDWR|O_CREAT|O_CLOEXEC, 0600) = 11
12:29:24.174029 write(11, "0\n0,956\n0,956\n", 14) = 14
12:29:24.174065 fsync(11) = 0
12:29:24.175030 futex(0xa486d8, FUTEX_WAKE, 1) = 1
12:29:24.175072 close(11) = 0
12:29:24.175097 rename("/data/kisskb-builds:slaves.diskqueue.meta.dat.tmp", "/data/kisskb-builds:slaves.diskqueue.meta.dat") = 0
open("/data/kisskb-builds:slaves.diskqueue.meta.dat.tmp", O_RDWR|O_CREAT|O_CLOEXEC, 0600) = 11
write(11, "0\n0,956\n0,956\n", 14) = 14
fsync(11) = 0
futex(0xa486d8, FUTEX_WAKE, 1) = 1
close(11) = 0
rename("/data/kisskb-builds:slaves.diskqueue.meta.dat.tmp", "/data/kisskb-builds:slaves.diskqueue.meta.dat") = 0
epoll_wait(5, {}, 128, 0) = 0
futex(0xc208018e70, FUTEX_WAIT, 0, NULL) = 0
epoll_wait(5, {}, 128, 0) = 0
futex(0xc208018e70, FUTEX_WAIT, 0, NULL) = 0