Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b28e4f08 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull s390 fixes from Martin Schwidefsky:
 "Two bug fixes, one to fix a potential information leak in the BPF jit
  and common-io-layer fix for old firmware levels"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/bpf,jit: initialize A register if 1st insn is BPF_S_LDX_B_MSH
  s390/chsc: fix SEI usage on old FW levels
parents b7270cce 6e0de817
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -276,7 +276,6 @@ static void bpf_jit_noleaks(struct bpf_jit *jit, struct sock_filter *filter)
	case BPF_S_LD_W_IND:
	case BPF_S_LD_W_IND:
	case BPF_S_LD_H_IND:
	case BPF_S_LD_H_IND:
	case BPF_S_LD_B_IND:
	case BPF_S_LD_B_IND:
	case BPF_S_LDX_B_MSH:
	case BPF_S_LD_IMM:
	case BPF_S_LD_IMM:
	case BPF_S_LD_MEM:
	case BPF_S_LD_MEM:
	case BPF_S_MISC_TXA:
	case BPF_S_MISC_TXA:
+17 −5
Original line number Original line Diff line number Diff line
@@ -541,18 +541,27 @@ static void chsc_process_sei_nt0(struct chsc_sei_nt0_area *sei_area)


static void chsc_process_event_information(struct chsc_sei *sei, u64 ntsm)
static void chsc_process_event_information(struct chsc_sei *sei, u64 ntsm)
{
{
	do {
	static int ntsm_unsupported;

	while (true) {
		memset(sei, 0, sizeof(*sei));
		memset(sei, 0, sizeof(*sei));
		sei->request.length = 0x0010;
		sei->request.length = 0x0010;
		sei->request.code = 0x000e;
		sei->request.code = 0x000e;
		if (!ntsm_unsupported)
			sei->ntsm = ntsm;
			sei->ntsm = ntsm;


		if (chsc(sei))
		if (chsc(sei))
			break;
			break;


		if (sei->response.code != 0x0001) {
		if (sei->response.code != 0x0001) {
			CIO_CRW_EVENT(2, "chsc: sei failed (rc=%04x)\n",
			CIO_CRW_EVENT(2, "chsc: sei failed (rc=%04x, ntsm=%llx)\n",
				      sei->response.code);
				      sei->response.code, sei->ntsm);

			if (sei->response.code == 3 && sei->ntsm) {
				/* Fallback for old firmware. */
				ntsm_unsupported = 1;
				continue;
			}
			break;
			break;
		}
		}


@@ -568,7 +577,10 @@ static void chsc_process_event_information(struct chsc_sei *sei, u64 ntsm)
			CIO_CRW_EVENT(2, "chsc: unhandled nt: %d\n", sei->nt);
			CIO_CRW_EVENT(2, "chsc: unhandled nt: %d\n", sei->nt);
			break;
			break;
		}
		}
	} while (sei->u.nt0_area.flags & 0x80);

		if (!(sei->u.nt0_area.flags & 0x80))
			break;
	}
}
}


/*
/*