From: Greg Kroah-Hartman Date: Thu, 21 Nov 2019 22:32:05 +0000 (+0100) Subject: 4.4-stable patches X-Git-Tag: v5.3.13~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fe4ddb4cc6d28c4f5efb5897d687706a9d8c43ea;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: apparmor-fix-module-parameters-can-be-changed-after-policy-is-locked.patch apparmor-fix-uninitialized-lsm_audit-member.patch apparmor-fix-update-the-mtime-of-the-profile-file-on-replacement.patch block-introduce-blk_rq_is_passthrough.patch fbdev-ditch-fb_edid_add_monspecs.patch fbdev-remove-unused-sh-mobile-hdmi-driver.patch kprobes-x86-prohibit-probing-on-exception-masking-instructions.patch libata-have-ata_scsi_rw_xlat-fail-invalid-passthrough-requests.patch uprobes-x86-prohibit-probing-on-mov-ss-instruction.patch x86-atomic-fix-smp_mb__-before-after-_atomic.patch --- diff --git a/queue-4.4/apparmor-fix-module-parameters-can-be-changed-after-policy-is-locked.patch b/queue-4.4/apparmor-fix-module-parameters-can-be-changed-after-policy-is-locked.patch new file mode 100644 index 00000000000..f8bbe536998 --- /dev/null +++ b/queue-4.4/apparmor-fix-module-parameters-can-be-changed-after-policy-is-locked.patch @@ -0,0 +1,158 @@ +From 58acf9d911c8831156634a44d0b022d683e1e50c Mon Sep 17 00:00:00 2001 +From: John Johansen +Date: Wed, 22 Jun 2016 18:01:08 -0700 +Subject: apparmor: fix module parameters can be changed after policy is locked + +From: John Johansen + +commit 58acf9d911c8831156634a44d0b022d683e1e50c upstream. + +the policy_lock parameter is a one way switch that prevents policy +from being further modified. Unfortunately some of the module parameters +can effectively modify policy by turning off enforcement. + +split policy_admin_capable into a view check and a full admin check, +and update the admin check to test the policy_lock parameter. + +Signed-off-by: John Johansen +Signed-off-by: Greg Kroah-Hartman + +--- + security/apparmor/include/policy.h | 2 ++ + security/apparmor/lsm.c | 22 ++++++++++------------ + security/apparmor/policy.c | 18 +++++++++++++++++- + 3 files changed, 29 insertions(+), 13 deletions(-) + +--- a/security/apparmor/include/policy.h ++++ b/security/apparmor/include/policy.h +@@ -403,6 +403,8 @@ static inline int AUDIT_MODE(struct aa_p + return profile->audit; + } + ++bool policy_view_capable(void); ++bool policy_admin_capable(void); + bool aa_may_manage_policy(int op); + + #endif /* __AA_POLICY_H */ +--- a/security/apparmor/lsm.c ++++ b/security/apparmor/lsm.c +@@ -749,51 +749,49 @@ __setup("apparmor=", apparmor_enabled_se + /* set global flag turning off the ability to load policy */ + static int param_set_aalockpolicy(const char *val, const struct kernel_param *kp) + { +- if (!capable(CAP_MAC_ADMIN)) ++ if (!policy_admin_capable()) + return -EPERM; +- if (aa_g_lock_policy) +- return -EACCES; + return param_set_bool(val, kp); + } + + static int param_get_aalockpolicy(char *buffer, const struct kernel_param *kp) + { +- if (!capable(CAP_MAC_ADMIN)) ++ if (!policy_view_capable()) + return -EPERM; + return param_get_bool(buffer, kp); + } + + static int param_set_aabool(const char *val, const struct kernel_param *kp) + { +- if (!capable(CAP_MAC_ADMIN)) ++ if (!policy_admin_capable()) + return -EPERM; + return param_set_bool(val, kp); + } + + static int param_get_aabool(char *buffer, const struct kernel_param *kp) + { +- if (!capable(CAP_MAC_ADMIN)) ++ if (!policy_view_capable()) + return -EPERM; + return param_get_bool(buffer, kp); + } + + static int param_set_aauint(const char *val, const struct kernel_param *kp) + { +- if (!capable(CAP_MAC_ADMIN)) ++ if (!policy_admin_capable()) + return -EPERM; + return param_set_uint(val, kp); + } + + static int param_get_aauint(char *buffer, const struct kernel_param *kp) + { +- if (!capable(CAP_MAC_ADMIN)) ++ if (!policy_view_capable()) + return -EPERM; + return param_get_uint(buffer, kp); + } + + static int param_get_audit(char *buffer, struct kernel_param *kp) + { +- if (!capable(CAP_MAC_ADMIN)) ++ if (!policy_view_capable()) + return -EPERM; + + if (!apparmor_enabled) +@@ -805,7 +803,7 @@ static int param_get_audit(char *buffer, + static int param_set_audit(const char *val, struct kernel_param *kp) + { + int i; +- if (!capable(CAP_MAC_ADMIN)) ++ if (!policy_admin_capable()) + return -EPERM; + + if (!apparmor_enabled) +@@ -826,7 +824,7 @@ static int param_set_audit(const char *v + + static int param_get_mode(char *buffer, struct kernel_param *kp) + { +- if (!capable(CAP_MAC_ADMIN)) ++ if (!policy_admin_capable()) + return -EPERM; + + if (!apparmor_enabled) +@@ -838,7 +836,7 @@ static int param_get_mode(char *buffer, + static int param_set_mode(const char *val, struct kernel_param *kp) + { + int i; +- if (!capable(CAP_MAC_ADMIN)) ++ if (!policy_admin_capable()) + return -EPERM; + + if (!apparmor_enabled) +--- a/security/apparmor/policy.c ++++ b/security/apparmor/policy.c +@@ -916,6 +916,22 @@ static int audit_policy(int op, gfp_t gf + &sa, NULL); + } + ++bool policy_view_capable(void) ++{ ++ struct user_namespace *user_ns = current_user_ns(); ++ bool response = false; ++ ++ if (ns_capable(user_ns, CAP_MAC_ADMIN)) ++ response = true; ++ ++ return response; ++} ++ ++bool policy_admin_capable(void) ++{ ++ return policy_view_capable() && !aa_g_lock_policy; ++} ++ + /** + * aa_may_manage_policy - can the current task manage policy + * @op: the policy manipulation operation being done +@@ -930,7 +946,7 @@ bool aa_may_manage_policy(int op) + return 0; + } + +- if (!capable(CAP_MAC_ADMIN)) { ++ if (!policy_admin_capable()) { + audit_policy(op, GFP_KERNEL, NULL, "not policy admin", -EACCES); + return 0; + } diff --git a/queue-4.4/apparmor-fix-uninitialized-lsm_audit-member.patch b/queue-4.4/apparmor-fix-uninitialized-lsm_audit-member.patch new file mode 100644 index 00000000000..fd9cd872300 --- /dev/null +++ b/queue-4.4/apparmor-fix-uninitialized-lsm_audit-member.patch @@ -0,0 +1,86 @@ +From b6b1b81b3afba922505b57f4c812bba022f7c4a9 Mon Sep 17 00:00:00 2001 +From: John Johansen +Date: Sun, 8 Jun 2014 11:20:54 -0700 +Subject: apparmor: fix uninitialized lsm_audit member + +From: John Johansen + +commit b6b1b81b3afba922505b57f4c812bba022f7c4a9 upstream. + +BugLink: http://bugs.launchpad.net/bugs/1268727 + +The task field in the lsm_audit struct needs to be initialized if +a change_hat fails, otherwise the following oops will occur + +BUG: unable to handle kernel paging request at 0000002fbead7d08 +IP: [] _raw_spin_lock+0xe/0x50 +PGD 1e3f35067 PUD 0 +Oops: 0002 [#1] SMP +Modules linked in: pppox crc_ccitt p8023 p8022 psnap llc ax25 btrfs raid6_pq xor xfs libcrc32c dm_multipath scsi_dh kvm_amd dcdbas kvm microcode amd64_edac_mod joydev edac_core psmouse edac_mce_amd serio_raw k10temp sp5100_tco i2c_piix4 ipmi_si ipmi_msghandler acpi_power_meter mac_hid lp parport hid_generic usbhid hid pata_acpi mpt2sas ahci raid_class pata_atiixp bnx2 libahci scsi_transport_sas [last unloaded: tipc] +CPU: 2 PID: 699 Comm: changehat_twice Tainted: GF O 3.13.0-7-generic #25-Ubuntu +Hardware name: Dell Inc. PowerEdge R415/08WNM9, BIOS 1.8.6 12/06/2011 +task: ffff8802135c6000 ti: ffff880212986000 task.ti: ffff880212986000 +RIP: 0010:[] [] _raw_spin_lock+0xe/0x50 +RSP: 0018:ffff880212987b68 EFLAGS: 00010006 +RAX: 0000000000020000 RBX: 0000002fbead7500 RCX: 0000000000000000 +RDX: 0000000000000292 RSI: ffff880212987ba8 RDI: 0000002fbead7d08 +RBP: ffff880212987b68 R08: 0000000000000246 R09: ffff880216e572a0 +R10: ffffffff815fd677 R11: ffffea0008469580 R12: ffffffff8130966f +R13: ffff880212987ba8 R14: 0000002fbead7d08 R15: ffff8800d8c6b830 +FS: 00002b5e6c84e7c0(0000) GS:ffff880216e40000(0000) knlGS:0000000055731700 +CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 +CR2: 0000002fbead7d08 CR3: 000000021270f000 CR4: 00000000000006e0 +Stack: + ffff880212987b98 ffffffff81075f17 ffffffff8130966f 0000000000000009 + 0000000000000000 0000000000000000 ffff880212987bd0 ffffffff81075f7c + 0000000000000292 ffff880212987c08 ffff8800d8c6b800 0000000000000026 +Call Trace: + [] __lock_task_sighand+0x47/0x80 + [] ? apparmor_cred_prepare+0x2f/0x50 + [] do_send_sig_info+0x2c/0x80 + [] send_sig_info+0x1e/0x30 + [] aa_audit+0x13d/0x190 + [] aa_audit_file+0xbc/0x130 + [] ? apparmor_cred_prepare+0x2f/0x50 + [] aa_change_hat+0x202/0x530 + [] aa_setprocattr_changehat+0x116/0x1d0 + [] apparmor_setprocattr+0x25d/0x300 + [] security_setprocattr+0x16/0x20 + [] proc_pid_attr_write+0x107/0x130 + [] vfs_write+0xb4/0x1f0 + [] SyS_write+0x49/0xa0 + [] tracesys+0xe1/0xe6 + +Signed-off-by: John Johansen +Acked-by: Seth Arnold +Signed-off-by: Greg Kroah-Hartman + +--- + security/apparmor/audit.c | 3 ++- + security/apparmor/file.c | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +--- a/security/apparmor/audit.c ++++ b/security/apparmor/audit.c +@@ -200,7 +200,8 @@ int aa_audit(int type, struct aa_profile + + if (sa->aad->type == AUDIT_APPARMOR_KILL) + (void)send_sig_info(SIGKILL, NULL, +- sa->u.tsk ? sa->u.tsk : current); ++ sa->type == LSM_AUDIT_DATA_TASK && sa->u.tsk ? ++ sa->u.tsk : current); + + if (sa->aad->type == AUDIT_APPARMOR_ALLOWED) + return complain_error(sa->aad->error); +--- a/security/apparmor/file.c ++++ b/security/apparmor/file.c +@@ -110,7 +110,8 @@ int aa_audit_file(struct aa_profile *pro + int type = AUDIT_APPARMOR_AUTO; + struct common_audit_data sa; + struct apparmor_audit_data aad = {0,}; +- sa.type = LSM_AUDIT_DATA_NONE; ++ sa.type = LSM_AUDIT_DATA_TASK; ++ sa.u.tsk = NULL; + sa.aad = &aad; + aad.op = op, + aad.fs.request = request; diff --git a/queue-4.4/apparmor-fix-update-the-mtime-of-the-profile-file-on-replacement.patch b/queue-4.4/apparmor-fix-update-the-mtime-of-the-profile-file-on-replacement.patch new file mode 100644 index 00000000000..8940f517b13 --- /dev/null +++ b/queue-4.4/apparmor-fix-update-the-mtime-of-the-profile-file-on-replacement.patch @@ -0,0 +1,28 @@ +From d671e890205a663429da74e1972e652bea4d73ab Mon Sep 17 00:00:00 2001 +From: John Johansen +Date: Fri, 25 Jul 2014 04:01:56 -0700 +Subject: apparmor: fix update the mtime of the profile file on replacement + +From: John Johansen + +commit d671e890205a663429da74e1972e652bea4d73ab upstream. + +Signed-off-by: John Johansen +Acked-by: Seth Arnold +Signed-off-by: Greg Kroah-Hartman + +--- + security/apparmor/apparmorfs.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/security/apparmor/apparmorfs.c ++++ b/security/apparmor/apparmorfs.c +@@ -380,6 +380,8 @@ void __aa_fs_profile_migrate_dents(struc + + for (i = 0; i < AAFS_PROF_SIZEOF; i++) { + new->dents[i] = old->dents[i]; ++ if (new->dents[i]) ++ new->dents[i]->d_inode->i_mtime = CURRENT_TIME; + old->dents[i] = NULL; + } + } diff --git a/queue-4.4/block-introduce-blk_rq_is_passthrough.patch b/queue-4.4/block-introduce-blk_rq_is_passthrough.patch new file mode 100644 index 00000000000..6f3e27c7ed2 --- /dev/null +++ b/queue-4.4/block-introduce-blk_rq_is_passthrough.patch @@ -0,0 +1,69 @@ +From 57292b58ddb58689e8c3b4c6eadbef10d9ca44dd Mon Sep 17 00:00:00 2001 +From: Christoph Hellwig +Date: Tue, 31 Jan 2017 16:57:29 +0100 +Subject: block: introduce blk_rq_is_passthrough + +From: Christoph Hellwig + +commit 57292b58ddb58689e8c3b4c6eadbef10d9ca44dd upstream. + +This can be used to check for fs vs non-fs requests and basically +removes all knowledge of BLOCK_PC specific from the block layer, +as well as preparing for removing the cmd_type field in struct request. + +Signed-off-by: Christoph Hellwig +Signed-off-by: Jens Axboe +[only take the blkdev.h changes as we only want the function for backported +patches - gregkh] +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/blkdev.h | 16 +++++++++++----- + 1 file changed, 11 insertions(+), 5 deletions(-) + +--- a/include/linux/blkdev.h ++++ b/include/linux/blkdev.h +@@ -199,6 +199,11 @@ struct request { + struct request *next_rq; + }; + ++static inline bool blk_rq_is_passthrough(struct request *rq) ++{ ++ return rq->cmd_type != REQ_TYPE_FS; ++} ++ + static inline unsigned short req_get_ioprio(struct request *req) + { + return req->ioprio; +@@ -582,9 +587,10 @@ static inline void queue_flag_clear(unsi + ((rq)->cmd_flags & (REQ_FAILFAST_DEV|REQ_FAILFAST_TRANSPORT| \ + REQ_FAILFAST_DRIVER)) + +-#define blk_account_rq(rq) \ +- (((rq)->cmd_flags & REQ_STARTED) && \ +- ((rq)->cmd_type == REQ_TYPE_FS)) ++static inline bool blk_account_rq(struct request *rq) ++{ ++ return (rq->cmd_flags & REQ_STARTED) && !blk_rq_is_passthrough(rq); ++} + + #define blk_rq_cpu_valid(rq) ((rq)->cpu != -1) + #define blk_bidi_rq(rq) ((rq)->next_rq != NULL) +@@ -645,7 +651,7 @@ static inline void blk_clear_rl_full(str + + static inline bool rq_mergeable(struct request *rq) + { +- if (rq->cmd_type != REQ_TYPE_FS) ++ if (blk_rq_is_passthrough(rq)) + return false; + + if (rq->cmd_flags & REQ_NOMERGE_FLAGS) +@@ -890,7 +896,7 @@ static inline unsigned int blk_rq_get_ma + { + struct request_queue *q = rq->q; + +- if (unlikely(rq->cmd_type != REQ_TYPE_FS)) ++ if (blk_rq_is_passthrough(rq)) + return q->limits.max_hw_sectors; + + if (!q->limits.chunk_sectors || (rq->cmd_flags & REQ_DISCARD)) diff --git a/queue-4.4/fbdev-ditch-fb_edid_add_monspecs.patch b/queue-4.4/fbdev-ditch-fb_edid_add_monspecs.patch new file mode 100644 index 00000000000..681b8417996 --- /dev/null +++ b/queue-4.4/fbdev-ditch-fb_edid_add_monspecs.patch @@ -0,0 +1,237 @@ +From 3b8720e63f4a1fc6f422a49ecbaa3b59c86d5aaf Mon Sep 17 00:00:00 2001 +From: Daniel Vetter +Date: Sun, 21 Jul 2019 22:19:56 +0200 +Subject: fbdev: Ditch fb_edid_add_monspecs + +From: Daniel Vetter + +commit 3b8720e63f4a1fc6f422a49ecbaa3b59c86d5aaf upstream. + +It's dead code ever since + +commit 34280340b1dc74c521e636f45cd728f9abf56ee2 +Author: Geert Uytterhoeven +Date: Fri Dec 4 17:01:43 2015 +0100 + + fbdev: Remove unused SH-Mobile HDMI driver + +Also with this gone we can remove the cea_modes db. This entire thing +is massively incomplete anyway, compared to the CEA parsing that +drm_edid.c does. + +Acked-by: Linus Torvalds +Cc: Tavis Ormandy +Signed-off-by: Daniel Vetter +Signed-off-by: Bartlomiej Zolnierkiewicz +Link: https://patchwork.freedesktop.org/patch/msgid/20190721201956.941-1-daniel.vetter@ffwll.ch +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/video/fbdev/core/fbmon.c | 95 -------------------------------------- + drivers/video/fbdev/core/modedb.c | 57 ---------------------- + include/linux/fb.h | 3 - + 3 files changed, 155 deletions(-) + +--- a/drivers/video/fbdev/core/fbmon.c ++++ b/drivers/video/fbdev/core/fbmon.c +@@ -997,97 +997,6 @@ void fb_edid_to_monspecs(unsigned char * + DPRINTK("========================================\n"); + } + +-/** +- * fb_edid_add_monspecs() - add monitor video modes from E-EDID data +- * @edid: 128 byte array with an E-EDID block +- * @spacs: monitor specs to be extended +- */ +-void fb_edid_add_monspecs(unsigned char *edid, struct fb_monspecs *specs) +-{ +- unsigned char *block; +- struct fb_videomode *m; +- int num = 0, i; +- u8 svd[64], edt[(128 - 4) / DETAILED_TIMING_DESCRIPTION_SIZE]; +- u8 pos = 4, svd_n = 0; +- +- if (!edid) +- return; +- +- if (!edid_checksum(edid)) +- return; +- +- if (edid[0] != 0x2 || +- edid[2] < 4 || edid[2] > 128 - DETAILED_TIMING_DESCRIPTION_SIZE) +- return; +- +- DPRINTK(" Short Video Descriptors\n"); +- +- while (pos < edid[2]) { +- u8 len = edid[pos] & 0x1f, type = (edid[pos] >> 5) & 7; +- pr_debug("Data block %u of %u bytes\n", type, len); +- if (type == 2) { +- for (i = pos; i < pos + len; i++) { +- u8 idx = edid[pos + i] & 0x7f; +- svd[svd_n++] = idx; +- pr_debug("N%sative mode #%d\n", +- edid[pos + i] & 0x80 ? "" : "on-n", idx); +- } +- } else if (type == 3 && len >= 3) { +- /* Check Vendor Specific Data Block. For HDMI, +- it is always 00-0C-03 for HDMI Licensing, LLC. */ +- if (edid[pos + 1] == 3 && edid[pos + 2] == 0xc && +- edid[pos + 3] == 0) +- specs->misc |= FB_MISC_HDMI; +- } +- pos += len + 1; +- } +- +- block = edid + edid[2]; +- +- DPRINTK(" Extended Detailed Timings\n"); +- +- for (i = 0; i < (128 - edid[2]) / DETAILED_TIMING_DESCRIPTION_SIZE; +- i++, block += DETAILED_TIMING_DESCRIPTION_SIZE) +- if (PIXEL_CLOCK) +- edt[num++] = block - edid; +- +- /* Yikes, EDID data is totally useless */ +- if (!(num + svd_n)) +- return; +- +- m = kzalloc((specs->modedb_len + num + svd_n) * +- sizeof(struct fb_videomode), GFP_KERNEL); +- +- if (!m) +- return; +- +- memcpy(m, specs->modedb, specs->modedb_len * sizeof(struct fb_videomode)); +- +- for (i = specs->modedb_len; i < specs->modedb_len + num; i++) { +- get_detailed_timing(edid + edt[i - specs->modedb_len], &m[i]); +- if (i == specs->modedb_len) +- m[i].flag |= FB_MODE_IS_FIRST; +- pr_debug("Adding %ux%u@%u\n", m[i].xres, m[i].yres, m[i].refresh); +- } +- +- for (i = specs->modedb_len + num; i < specs->modedb_len + num + svd_n; i++) { +- int idx = svd[i - specs->modedb_len - num]; +- if (!idx || idx >= ARRAY_SIZE(cea_modes)) { +- pr_warning("Reserved SVD code %d\n", idx); +- } else if (!cea_modes[idx].xres) { +- pr_warning("Unimplemented SVD code %d\n", idx); +- } else { +- memcpy(&m[i], cea_modes + idx, sizeof(m[i])); +- pr_debug("Adding SVD #%d: %ux%u@%u\n", idx, +- m[i].xres, m[i].yres, m[i].refresh); +- } +- } +- +- kfree(specs->modedb); +- specs->modedb = m; +- specs->modedb_len = specs->modedb_len + num + svd_n; +-} +- + /* + * VESA Generalized Timing Formula (GTF) + */ +@@ -1498,9 +1407,6 @@ void fb_edid_to_monspecs(unsigned char * + { + specs = NULL; + } +-void fb_edid_add_monspecs(unsigned char *edid, struct fb_monspecs *specs) +-{ +-} + void fb_destroy_modedb(struct fb_videomode *modedb) + { + } +@@ -1608,7 +1514,6 @@ EXPORT_SYMBOL(fb_firmware_edid); + + EXPORT_SYMBOL(fb_parse_edid); + EXPORT_SYMBOL(fb_edid_to_monspecs); +-EXPORT_SYMBOL(fb_edid_add_monspecs); + EXPORT_SYMBOL(fb_get_mode); + EXPORT_SYMBOL(fb_validate_mode); + EXPORT_SYMBOL(fb_destroy_modedb); +--- a/drivers/video/fbdev/core/modedb.c ++++ b/drivers/video/fbdev/core/modedb.c +@@ -289,63 +289,6 @@ static const struct fb_videomode modedb[ + }; + + #ifdef CONFIG_FB_MODE_HELPERS +-const struct fb_videomode cea_modes[65] = { +- /* #1: 640x480p@59.94/60Hz */ +- [1] = { +- NULL, 60, 640, 480, 39722, 48, 16, 33, 10, 96, 2, 0, +- FB_VMODE_NONINTERLACED, 0, +- }, +- /* #3: 720x480p@59.94/60Hz */ +- [3] = { +- NULL, 60, 720, 480, 37037, 60, 16, 30, 9, 62, 6, 0, +- FB_VMODE_NONINTERLACED, 0, +- }, +- /* #5: 1920x1080i@59.94/60Hz */ +- [5] = { +- NULL, 60, 1920, 1080, 13763, 148, 88, 15, 2, 44, 5, +- FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, +- FB_VMODE_INTERLACED, 0, +- }, +- /* #7: 720(1440)x480iH@59.94/60Hz */ +- [7] = { +- NULL, 60, 1440, 480, 18554/*37108*/, 114, 38, 15, 4, 124, 3, 0, +- FB_VMODE_INTERLACED, 0, +- }, +- /* #9: 720(1440)x240pH@59.94/60Hz */ +- [9] = { +- NULL, 60, 1440, 240, 18554, 114, 38, 16, 4, 124, 3, 0, +- FB_VMODE_NONINTERLACED, 0, +- }, +- /* #18: 720x576pH@50Hz */ +- [18] = { +- NULL, 50, 720, 576, 37037, 68, 12, 39, 5, 64, 5, 0, +- FB_VMODE_NONINTERLACED, 0, +- }, +- /* #19: 1280x720p@50Hz */ +- [19] = { +- NULL, 50, 1280, 720, 13468, 220, 440, 20, 5, 40, 5, +- FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, +- FB_VMODE_NONINTERLACED, 0, +- }, +- /* #20: 1920x1080i@50Hz */ +- [20] = { +- NULL, 50, 1920, 1080, 13480, 148, 528, 15, 5, 528, 5, +- FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, +- FB_VMODE_INTERLACED, 0, +- }, +- /* #32: 1920x1080p@23.98/24Hz */ +- [32] = { +- NULL, 24, 1920, 1080, 13468, 148, 638, 36, 4, 44, 5, +- FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, +- FB_VMODE_NONINTERLACED, 0, +- }, +- /* #35: (2880)x480p4x@59.94/60Hz */ +- [35] = { +- NULL, 60, 2880, 480, 9250, 240, 64, 30, 9, 248, 6, 0, +- FB_VMODE_NONINTERLACED, 0, +- }, +-}; +- + const struct fb_videomode vesa_modes[] = { + /* 0 640x350-85 VESA */ + { NULL, 85, 640, 350, 31746, 96, 32, 60, 32, 64, 3, +--- a/include/linux/fb.h ++++ b/include/linux/fb.h +@@ -716,8 +716,6 @@ extern int fb_parse_edid(unsigned char * + extern const unsigned char *fb_firmware_edid(struct device *device); + extern void fb_edid_to_monspecs(unsigned char *edid, + struct fb_monspecs *specs); +-extern void fb_edid_add_monspecs(unsigned char *edid, +- struct fb_monspecs *specs); + extern void fb_destroy_modedb(struct fb_videomode *modedb); + extern int fb_find_mode_cvt(struct fb_videomode *mode, int margins, int rb); + extern unsigned char *fb_ddc_read(struct i2c_adapter *adapter); +@@ -791,7 +789,6 @@ struct dmt_videomode { + + extern const char *fb_mode_option; + extern const struct fb_videomode vesa_modes[]; +-extern const struct fb_videomode cea_modes[65]; + extern const struct dmt_videomode dmt_modes[]; + + struct fb_modelist { diff --git a/queue-4.4/fbdev-remove-unused-sh-mobile-hdmi-driver.patch b/queue-4.4/fbdev-remove-unused-sh-mobile-hdmi-driver.patch new file mode 100644 index 00000000000..0ee9359e4d1 --- /dev/null +++ b/queue-4.4/fbdev-remove-unused-sh-mobile-hdmi-driver.patch @@ -0,0 +1,1601 @@ +From 34280340b1dc74c521e636f45cd728f9abf56ee2 Mon Sep 17 00:00:00 2001 +From: Geert Uytterhoeven +Date: Fri, 4 Dec 2015 17:01:43 +0100 +Subject: fbdev: Remove unused SH-Mobile HDMI driver + +From: Geert Uytterhoeven + +commit 34280340b1dc74c521e636f45cd728f9abf56ee2 upstream. + +As of commit 44d88c754e57a6d9 ("ARM: shmobile: Remove legacy SoC code +for R-Mobile A1"), the SH-Mobile HDMI driver is no longer used. +In theory it could still be used on R-Mobile A1 SoCs, but that requires +adding DT support to the driver, which is not planned. + +Remove the driver, it can be resurrected from git history when needed. + +Signed-off-by: Geert Uytterhoeven +Acked-by: Simon Horman +Signed-off-by: Tomi Valkeinen +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/video/fbdev/Kconfig | 10 + drivers/video/fbdev/Makefile | 1 + drivers/video/fbdev/sh_mobile_hdmi.c | 1489 ----------------------------------- + include/video/sh_mobile_hdmi.h | 49 - + 4 files changed, 1549 deletions(-) + +--- a/drivers/video/fbdev/Kconfig ++++ b/drivers/video/fbdev/Kconfig +@@ -1991,16 +1991,6 @@ config FB_SH_MOBILE_LCDC + ---help--- + Frame buffer driver for the on-chip SH-Mobile LCD controller. + +-config FB_SH_MOBILE_HDMI +- tristate "SuperH Mobile HDMI controller support" +- depends on FB_SH_MOBILE_LCDC +- select FB_MODE_HELPERS +- select SOUND +- select SND +- select SND_SOC +- ---help--- +- Driver for the on-chip SH-Mobile HDMI controller. +- + config FB_TMIO + tristate "Toshiba Mobile IO FrameBuffer support" + depends on FB && (MFD_TMIO || COMPILE_TEST) +--- a/drivers/video/fbdev/Makefile ++++ b/drivers/video/fbdev/Makefile +@@ -118,7 +118,6 @@ obj-$(CONFIG_FB_UDL) += udlfb.o + obj-$(CONFIG_FB_SMSCUFX) += smscufx.o + obj-$(CONFIG_FB_XILINX) += xilinxfb.o + obj-$(CONFIG_SH_MIPI_DSI) += sh_mipi_dsi.o +-obj-$(CONFIG_FB_SH_MOBILE_HDMI) += sh_mobile_hdmi.o + obj-$(CONFIG_FB_SH_MOBILE_MERAM) += sh_mobile_meram.o + obj-$(CONFIG_FB_SH_MOBILE_LCDC) += sh_mobile_lcdcfb.o + obj-$(CONFIG_FB_OMAP) += omap/ +--- a/drivers/video/fbdev/sh_mobile_hdmi.c ++++ /dev/null +@@ -1,1489 +0,0 @@ +-/* +- * SH-Mobile High-Definition Multimedia Interface (HDMI) driver +- * for SLISHDMI13T and SLIPHDMIT IP cores +- * +- * Copyright (C) 2010, Guennadi Liakhovetski +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License version 2 as +- * published by the Free Software Foundation. +- */ +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#include